[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/qa sw/source
Luke Deller
luke at deller.id.au
Mon Apr 2 13:05:36 UTC 2018
sw/qa/extras/ooxmlexport/data/tdf107035.docx |binary
sw/source/core/unocore/unotext.cxx | 4 ++++
2 files changed, 4 insertions(+)
New commits:
commit c1f393d899360e11e25d562d90285895f1e751e9
Author: Luke Deller <luke at deller.id.au>
Date: Mon Mar 5 00:14:28 2018 +1100
tdf#107035 Fix field character style DOCX import
Reinstate a call to DontExpandFormat which was removed from
appendTextContent in commit 232ad2f2588beff50cb5c1f3b689c581ba317583
This ensures that direct character formatting which ended immediately
before the insertion point will not be expanded to cover the inserted
content.
Reviewed-on: https://gerrit.libreoffice.org/50729
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit 18cbb8fe699131a234355e1d00fa917fede6ac46)
Change-Id: Ie5fa6b5c5acee4f885f9e67535e98801af23661a
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107035.docx b/sw/qa/extras/ooxmlexport/data/tdf107035.docx
new file mode 100644
index 000000000000..a8ab045b61c9
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf107035.docx differ
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 37ec4681d715..17e81aab7abe 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -527,6 +527,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
aIllegal.Message = "first parameter invalid";
throw aIllegal;
}
+ // Any direct formatting ending at the insert position (xRange) should not
+ // be expanded to cover the inserted content (xContent)
+ GetDoc()->DontExpandFormat( *aPam.Start() );
+
// first test if the range is at the right position, then call
// xContent->attach
const SwStartNode* pOwnStartNode = GetStartNode();
More information about the Libreoffice-commits
mailing list