diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-14 22:09:03 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-14 22:10:01 +0200 |
commit | 75d0cbb2e8f737e4c1721285a172618a1af78135 (patch) | |
tree | 5c7857d982e6a1e52367b6fe278573149e8a3bcd /writerfilter | |
parent | 9d24f6ba270127ad330dc733e0fef3144319d07e (diff) |
fdo#82071 RTF import: get rid of unexpected underlining in TOC field
Regression from commit 9679e9c23216decb5f9f25f85b04cb3f25211111
(fdo#69649 Fix for pre-rendered Table Of Contents, 2013-12-30), now that
we handle hand-edited TOC, it's necessary to properly track correctly if
a property came from a style or as a direct formatting.
Fix RTFDocumentImpl::getProperties() to detect direct formatting that
cames from a char style and would result in attribute tokens.
Change-Id: Iab5a14770de43249961c280a5dc698200abc8f49
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 85884f945245..ed963a3d37e4 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -464,9 +464,14 @@ writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::getProperties(RT // createStyleProperties() puts properties to rPr, but here we need a flat list. if (itSprm->first == NS_ooxml::LN_CT_Style_rPr) { + // rPr can have both attributes and SPRM's, copy over both types. RTFSprms& rRPrSprms = itSprm->second->getSprms(); for (RTFSprms::Iterator_t itRPrSprm = rRPrSprms.begin(); itRPrSprm != rRPrSprms.end(); ++itRPrSprm) aStyleSprms.set(itRPrSprm->first, itRPrSprm->second); + + RTFSprms& rRPrAttributes = itSprm->second->getAttributes(); + for (RTFSprms::Iterator_t itRPrAttribute = rRPrAttributes.begin(); itRPrAttribute != rRPrAttributes.end(); ++itRPrAttribute) + aStyleAttributes.set(itRPrAttribute->first, itRPrAttribute->second); } else aStyleSprms.set(itSprm->first, itSprm->second); |