summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-12-08 10:54:18 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-12-12 10:03:17 +0000
commit22cb755ca9ef95cae38bce236f655f0807824d66 (patch)
treedde9e4f8facfb32ca4188e694749dbd1113664df /xmloff
parentc462636c9a752b6548601c8ccd6b11608b89a10f (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> (cherry picked from commit 31084ebb59093be7dfe5ab53a20fdb3bcfde34b6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143863
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx10
-rw-r--r--xmloff/source/text/txtparae.cxx6
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;
}