Created attachment 119065 [details] The test file which has tabs inside its comments As the title says, GetText() replaces tab characters with: http://www.decodeunicode.org/u+0001 This isn't obvious since when the user edits the text with the GUI, they're able to navigate the tab characters normally (which're between A and b; and b and c in the attached test file test). I initially discovered this when I was trying to write a patch for the html exporter to include the comments inside the appropriate cells. To reproduce, simply do the following: 0. Compile libreoffice's sc module with debug symbols 1. run libreoffice through gdb 2. Set a breakpoint for ScPostIt::GetText 3. Open the sample file 4. I'm not sure which point in the GUI is GetText() called, but I know the unit test doesn't test for plaintext with tabs. 5. Point is, when you get tot he point in GetText(), you'll see U+0001 littered wherever tabs are.
Created attachment 119075 [details] Patch to make unit test test for tabs This is a patch to make the unit test test for tabs. This is needed for easier demonstration of the bug.
Created attachment 119076 [details] The resulting output of when the test is run with the patch applied to test for tabs.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b3cc2c6d234156e7d5be2c3f2cacd20ab44ce94f don't try to create OUString from editeng directly, tdf#94542 It will be available in 5.1.0. 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.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e108b24c1b63128f3ace77d0642d56179172ffed&h=libreoffice-5-0 don't try to create OUString from editeng directly, tdf#94542 It will be available in 5.0.3. 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.