diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-12-08 10:54:18 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-12-09 16:03:20 +0000 |
commit | 31084ebb59093be7dfe5ab53a20fdb3bcfde34b6 (patch) | |
tree | 5b4708eaca4fe58f585dff29f783287c2e47b197 /xmloff/source/text | |
parent | e5986baa983e1c7b5e07c45299fd84be2c230fbe (diff) |
tdf#143311 offapi,oox,writerfilter,xmloff,sw: decorative flag on flys
* sw core RES_DECORATIVE as a FRMATR
* sw API SwXFrame property "Decorative"
* UI checkbox "Decorative"
* ODF import/export as loext:decorative on draw:frame
* DOCX export
* DOCX import - very non-obvious how to get it from model.xml to dmapper
* PDF/UA export: tag flys with this flag as Artifact
* test for DOCX filters, ODF filters, PDF export
Change-Id: I1ceb67fdd4e1cfa212aafdeb1c5f4ccd873d433e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143815
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index cc3603d6e67f..ad7ca31254bc 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -370,6 +370,7 @@ class XMLTextFrameContext_Impl : public SvXMLImportContext bool bCreateFailed : 1; bool bOwnBase64Stream : 1; bool mbMultipleContent : 1; // This context is created based on a multiple content (image) + bool m_isDecorative = false; void Create(); @@ -682,6 +683,11 @@ void XMLTextFrameContext_Impl::Create() xPropSet->setPropertyValue( "AnchorPageNo", Any(nPage) ); } + if (m_isDecorative && xPropSetInfo->hasPropertyByName("Decorative")) + { + xPropSet->setPropertyValue("Decorative", uno::Any(true)); + } + if( XML_TEXT_FRAME_OBJECT != nType && XML_TEXT_FRAME_OBJECT_OLE != nType && XML_TEXT_FRAME_APPLET != nType && @@ -1064,6 +1070,10 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( case XML_ELEMENT(DRAW, XML_NOTIFY_ON_UPDATE_OF_TABLE): sTblName = aIter.toString(); break; + case XML_ELEMENT(LO_EXT, XML_DECORATIVE): + case XML_ELEMENT(DRAW, XML_DECORATIVE): + ::sax::Converter::convertBool(m_isDecorative, aIter.toString()); + break; default: SAL_INFO("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " value=" << aIter.toString()); } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 6a3e7c667c0b..8c0d53e8da93 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -3005,6 +3005,12 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes( } } + if (xPropSetInfo->hasPropertyByName("Decorative") + && rPropSet->getPropertyValue("Decorative").get<bool>()) + { + GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_DECORATIVE, XML_TRUE); + } + return nShapeFeatures; } |