diff options
author | Luke Deller <luke@deller.id.au> | 2018-03-05 00:14:28 +1100 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2018-04-03 19:42:13 +0200 |
commit | c51cd09e36e37226c79609899440e8d4458cb7ad (patch) | |
tree | 43245b896e88df83665c5c56ea3288c0fd75a6a5 /sw | |
parent | e353d88e1f8640efca6bb211a65630428c2ffff5 (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)
Change-Id: Ie5fa6b5c5acee4f885f9e67535e98801af23661a
(cherry picked from commit c1f393d899360e11e25d562d90285895f1e751e9)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf107035.docx | bin | 0 -> 4240 bytes | |||
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 4 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107035.docx b/sw/qa/extras/ooxmlexport/data/tdf107035.docx Binary files differnew file mode 100644 index 000000000000..a8ab045b61c9 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf107035.docx diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index baf80081d18b..9aa0b591f246 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(); |