Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1974
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/74/1974/1
fdo#59419 fix RTF import of hex form of \r and \n
(cherry picked from commits a5e885df24eb11c028a94ac709966b3ce2976db9 and
927de8786850936bb42c5595c41a4353c076fdea)
Conflicts:
sw/qa/extras/rtfimport/rtfimport.cxx
Change-Id: Ic700cdc67f756cafc454c326b73f680a8a47a6e8
---
M writerfilter/source/rtftok/rtfdocumentimpl.cxx
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index c961c7d..37d0376 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -944,6 +944,14 @@
void RTFDocumentImpl::text(OUString& rString)
{
+ if (rString.getLength() == 1 && m_aStates.top().nDestinationState != DESTINATION_DOCCOMM)
+ {
+ // No cheating! Tokenizer ignores bare \r and \n, their hex \'0d / \'0a form doesn't
count, either.
+ sal_Unicode ch = rString.getStr()[0];
+ if (ch == 0x0d || ch == 0x0a)
+ return;
+ }
+
bool bRet = true;
switch (m_aStates.top().nDestinationState)
{
--
To view, visit https://gerrit.libreoffice.org/1974
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic700cdc67f756cafc454c326b73f680a8a47a6e8
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Miklos Vajna <vmiklos@suse.cz>
Context
- [PATCH libreoffice-4-0] fdo#59419 fix RTF import of hex form of \r and \n · Miklos Vajna (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.