Created attachment 83794 [details] demo of bug Hi there, I just git cloned the latest master of libcdr and used cdr2text (& the various other tools) to reproduce. If I have a text box with text containing any blank lines, the code strips these blank lines out. Attached is a sample file demonstrating the issue. Below is a hack patch to libcdr which produces the correct output by inserting a line with a single space. diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp index ec76a21..08f5e44 100644 --- a/src/lib/CDRParser.cpp +++ b/src/lib/CDRParser.cpp @@ -3032,6 +3032,10 @@ void libcdr::CDRParser::readTxsm(WPXInputStream *input, unsigned length) memcpy(&textData[0], buffer, numBytesRead); input->seek(1, WPX_SEEK_CUR); //skip the 0 ending character + if (textData.empty()) { + textData.push_back(' '); + charDescriptions.push_back(0); + } if (!textData.empty()) m_collector->collectText(textId, stlId, textData, charDescriptions, charStyles); }
Fridrich, this is a libcdr issue with a patch, I cannot confirm it, could you please take a look?
@OP: it would be helpful for confirmation if you provided a PDF of the testcase made with Corel Draw (to compare with LO import), and maybe a text file with the text that must be there in the box (including all the empty lines). Thank you.
Hi there, the page is just one text box with some boundrary markers. The text should read as below; however in cdr git it was not including any of the blank lines: Ek 4 Söz: Efesliler 5:1 Cathryn Hoard Müzik: Cathryn Hoard C F C F Tanrı sizi Mesih'te bağışladı, C F C F İsa sizin için çarmıha gerildi. F C F C G KORO: |: Bunun için sevgili cocukları olarak F G C Tanrı'yı örnek alın! :| C F C F Mesih bizi nasıl sevdiyse biz de sevelim. C F C F Efesliler beşinci bölüm ayet bir. KORO F G C |: Tanrı'yı örnek alın! :|
Reproducible with 4.1.0.4 under Win7x64.
Created attachment 84511 [details] The attachment 83794 [details] exported by CorelDraw In this file, the original characters of the testcase from comment 0 (including correct whitespace characters and empty lines), that should be imported by Draw, are easily available.