This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit cb9a6237029353005bfa8c852c6c534bbfec4e2b Author: Jim Jagielski <[email protected]> AuthorDate: Tue Nov 3 09:23:16 2026 -0500 xmloff: keep the fill of a shape out of its text style in ODF 1.4 Extended --- main/xmloff/source/draw/shapeexport.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main/xmloff/source/draw/shapeexport.cxx b/main/xmloff/source/draw/shapeexport.cxx index 2816084daa..7004711f75 100644 --- a/main/xmloff/source/draw/shapeexport.cxx +++ b/main/xmloff/source/draw/shapeexport.cxx @@ -61,6 +61,8 @@ #include "xmloff/xmlnmspe.hxx" #include <xmloff/nmspmap.hxx> +#include <xmloff/xmltypes.hxx> +#include <unotools/saveopt.hxx> using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -388,6 +390,18 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap { xPropStates = GetExport().GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter( xPropSet ); + // ODF 1.4 Extended: the fill of the shape is in its own style, a paragraph style may not hold style:graphic-properties + if( SvtSaveOptions().GetODFDefaultVersion() == SvtSaveOptions::ODFVER_014_EXT ) + { + UniReference< XMLPropertySetMapper > xMapper( GetExport().GetTextParagraphExport()->GetParagraphPropertyMapper()->getPropertySetMapper() ); + for( ::std::vector< XMLPropertyState >::iterator aIter = xPropStates.begin(); aIter != xPropStates.end(); ++aIter ) + { + if( aIter->mnIndex != -1 && ( xMapper->GetEntryType( aIter->mnIndex ) & XML_TYPE_PROP_MASK ) == XML_TYPE_PROP_GRAPHIC && + xMapper->GetEarliestODFVersionForExport( aIter->mnIndex ) == SvtSaveOptions::ODFVER_EXTENSION ) + aIter->mnIndex = -1; + } + } + // ---------------------------------------------------------------------- // yet more additionally, we need to care for the ParaAdjust property if ( XmlShapeTypeDrawControlShape == aShapeInfo.meShapeType )
