Bug 64400

Summary: DXF import mangles Text
Product: LibreOffice Reporter: Tomas <utkhammar>
Component: filters and storageAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: barta, l.lunak, michael.stahl
Priority: medium Keywords: regression
Version: 4.0.0.3 release   
Hardware: All   
OS: All   
Whiteboard: target:4.1.4 target:4.0.6
Crash report or crash signature: Regression By:
Attachments: Pdf document that can be produced.
The example dxf file to be inserted as a picture into a writer document

Description Tomas 2013-05-09 20:01:10 UTC
Steps to re-produce the error:

1. Open a new Writer document.
2. Insert the attached example dxf file as a picture.
3. Not that the texts on the picture looks good.
4. Export the document to pdf.
5. Open the pdf document and conclude that the texts in the documents look. The  
   texts are too long. It looks like the texts continue beyond the end of the 
   original string.

It has been working before. I am using 3.5 for which I do not encounter the problem.

Tomas
Comment 1 Tomas 2013-05-09 20:10:57 UTC
Created attachment 79060 [details]
Pdf document that can be produced.

All texts are too long. They have strange trailing characters.
Comment 2 Tomas 2013-05-09 20:12:02 UTC
Created attachment 79061 [details]
The example dxf file to be inserted as a picture into a writer document
Comment 3 Tomas 2013-05-09 20:13:46 UTC
I made some typos. It should be:

Steps to re-produce the error:

1. Open a new Writer document.
2. Insert the attached example dxf file as a picture.
3. Note that the texts on the picture looks good.
4. Export the document to pdf.
5. Open the pdf document and conclude that the texts in the documents look bad. 
   The texts are too long. It looks like the texts continue beyond the end of the 
   original string.

It has been working before. I am using 3.5 for which I do not encounter the problem.

Tomas
Comment 4 tommy27 2013-05-20 11:26:43 UTC
I confirm the bug on LibO 4.0.3 using Vista 64bit. 

Lines of the original picture goes beyond margins in the exported .pdf version.

setting status as: NEW
Comment 5 Tomas 2013-06-27 12:34:22 UTC
I have installed on another linux work station version 3.5.0rc3 and it works. Any ideas on how I can find that "old" version?
Comment 6 Tomas 2013-08-13 11:48:20 UTC
I have tried OpenOffice 4.0.0 and it works without problems. My plan is to use OpenOffice instead.
Comment 7 tommy27 2013-08-13 13:17:49 UTC
I add regression keyword according to Comment 5
Comment 8 Tomas 2013-08-19 14:30:54 UTC
I have also found that version 3.5.7 is ok.
Comment 9 Michael Stahl (allotropia) 2013-10-07 09:33:56 UTC
problem is that the DXF import filter stores all strings in 
char[DXF_MAX_STRING_LEN+1] arrays, and then calls the OUString
constructor with that, which does not work any more (if it ever did).

this is fixed by master commit 96852a89da058084b2acf5ff706d9679b127b29a
Comment 10 Commit Notification 2013-10-09 13:34:50 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e577b3d19787ea16397a36dd6b2f93628b2799ed&h=libreoffice-4-1

fdo#64400: DXF import filter: fix OUString handling


It will be available in LibreOffice 4.1.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2013-10-09 13:36:40 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ac48e8c589233962bc68644b30bb184c3b0ee321&h=libreoffice-4-0

fdo#64400: DXF import filter: fix OUString handling


It will be available in LibreOffice 4.0.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2013-10-15 17:38:03 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-0-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5b98ed53008ee715b992a99afd8db5cfd10781b6&h=libreoffice-4-0-6

fdo#64400: DXF import filter: fix OUString handling


It will be available already in LibreOffice 4.0.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.