You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2015/03/04 13:59:14 UTC
[Issue 123385] getString returns LF (Chr(10)) instead of CR
(Chr(13)) for a paragraph break
https://bz.apache.org/ooo/show_bug.cgi?id=123385
openofficebugs@keithalcock.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |openofficebugs@keithalcock.
| |com
--- Comment #3 from openofficebugs@keithalcock.com ---
Running on Windows 7 I also get CR -> CR/LF, but running on Linux it's CR ->
LF. That's very unfortunate, because LF -> LF so that you can't tell what
character is in the document and given that, our extension is broken. The C++
code I am using for testing is
void testInsertString(Reference<XTextDocument> text_doc, const char* text) {
OUString input = OUString::createFromAscii(text);
Reference<XText> xText = text_doc->getText();
Reference<XTextCursor> xTextCursor = xText->createTextCursor();
Reference<XTextRange> xTextRange(xTextCursor, UNO_QUERY);
xText->insertString(xTextRange, input, sal_True);
OUString output = xTextRange->getString();
if (input != output)
std::cerr << "String mismatch!" << std::endl;
xTextCursor->setString(OUString::createFromAscii(""));
}
testInsertString(text_doc, "\r");
testInsertString(text_doc, "\n");
testInsertString(text_doc, "\t");
--
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.