summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2018-09-21 12:38:48 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-10-01 18:13:16 +0200
commit88188dd62d1d1e3caa1b8ee03fdf246aafdec71e (patch)
treeeebf613f27630659cde919f56039b5b3b53f71fb /writerfilter
parentfeb475c6594c5520ea50ba74e8c17e8a1815dc1f (diff)
tdf#105444 DOCX import: don't put extra paragraphs in comments
on Win32, waiting only for \r\n instead of \n in RemoveLastParagraph(). Change-Id: I8921a6a72e8397ed04edb9f339ba3f0bf5bbb98b Reviewed-on: https://gerrit.libreoffice.org/60865 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit bdade7e3fc33c1832c6f6a472443fca8238738d2) Reviewed-on: https://gerrit.libreoffice.org/60896
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index aff0159140e6..444b19c6de6c 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -432,7 +432,9 @@ void DomainMapper_Impl::RemoveLastParagraph( )
xCursor->goLeft( 1, true );
// If this is a text on a shape, possibly the text has the trailing
// newline removed already.
- if (xCursor->getString() == SAL_NEWLINE_STRING)
+ if (xCursor->getString() == SAL_NEWLINE_STRING ||
+ // tdf#105444 comments need an exception, if SAL_NEWLINE_STRING defined as "\r\n"
+ (sizeof(SAL_NEWLINE_STRING)-1 == 2 && xCursor->getString() == "\n"))
{
uno::Reference<beans::XPropertySet> xDocProps(GetTextDocument(), uno::UNO_QUERY);
const OUString aRecordChanges("RecordChanges");