diff options
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLFastContextHandler.cxx')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 3b62c912967e..7c01b7f2f29e 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -34,6 +34,7 @@ #include "OOXMLFastContextHandler.hxx" #include "OOXMLFactory.hxx" #include "Handler.hxx" +#include <dmapper/CommentProperties.hxx> #include <dmapper/PropertyIds.hxx> #include <comphelper/propertysequence.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -406,6 +407,20 @@ void OOXMLFastContextHandler::startParagraphGroup() { mpStream->startParagraphGroup(); mpParserState->setInParagraphGroup(true); + + if (const auto& pPropSet = getPropertySet()) + { + OOXMLPropertySetEntryToString aHandler(NS_ooxml::LN_AG_Parids_paraId); + pPropSet->resolve(aHandler); + if (const OUString& sText = aHandler.getString(); !sText.isEmpty()) + { + OOXMLStringValue::Pointer_t pVal = new OOXMLStringValue(sText); + OOXMLPropertySet::Pointer_t pPropertySet(new OOXMLPropertySet); + pPropertySet->add(NS_ooxml::LN_AG_Parids_paraId, pVal, OOXMLProperty::ATTRIBUTE); + mpStream->props(pPropertySet.get()); + } + } + } } @@ -2198,6 +2213,28 @@ void OOXMLFastContextHandlerMath::process() mpStream->props( pProps.get() ); } +OOXMLFastContextHandlerCommentEx::OOXMLFastContextHandlerCommentEx( + OOXMLFastContextHandler* pContext) + : OOXMLFastContextHandler(pContext) +{ +} + +void OOXMLFastContextHandlerCommentEx::lcl_endFastElement(Token_t /*Element*/) +{ + mpStream->commentProps(m_sParaId, { m_bDone }); +} + +void OOXMLFastContextHandlerCommentEx::att_paraId(const OOXMLValue::Pointer_t& pValue) +{ + m_sParaId = pValue->getString(); +} + +void OOXMLFastContextHandlerCommentEx::att_done(const OOXMLValue::Pointer_t& pValue) +{ + if (pValue->getInt()) + m_bDone = true; +} + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |