summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorLuke Deller <luke@deller.id.au>2018-03-05 00:14:28 +1100
committerAndras Timar <andras.timar@collabora.com>2018-03-19 10:21:23 +0100
commitf6926d2140cce74c30cf9b30fe58cd43a73399ec (patch)
treebb957210268c948b8f43be3818b97d0c6e8d4102 /sw/source/core
parent84023b2481348270361868ca1276867bfdfdd767 (diff)
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@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 18cbb8fe699131a234355e1d00fa917fede6ac46) Reviewed-on: https://gerrit.libreoffice.org/50815 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> (cherry picked from commit afe0aa7fde7e4d4f9a928235e41953bf73e2ea6c) Change-Id: Ie5fa6b5c5acee4f885f9e67535e98801af23661a
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/unocore/unotext.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index db3d78c9c382..6d01370e5d19 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -528,6 +528,10 @@ SwXText::insertTextContent(
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();