diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-08-27 15:14:20 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-08-27 15:50:45 +0200 |
commit | b1922eecb55b233de3e6abaaa644fe9f313cf0f1 (patch) | |
tree | 1b2b3e6275946723a26b6ce16f1a5343ea0dd8ad /xmloff/source/style/styleexp.cxx | |
parent | 7e373e92fc02393732422d05264dd5115076183f (diff) |
xmloff: ODF export: actually ODF 1.2 does not allow graphic-properties
... in a style with family "paragraph", as detected by a
--with-export-validation build due to the unit test added yesterday.
So use the loext namespace for the style:graphic-properties element,
and also omit it entirely (and rely on the style:paragraph-properties
attributes fo:background-*) if the ODF version is set to 1.2 or 1.1.
Also adapt a previous check that was missing the "drawing-page" style
family, where the style:graphic-properties is allowed (commit
9746dc9ad62e7f3a39961733f2ac204e90289034)
(regression from 7d9bb549d498d6beed2c4050c402d09643febdfa)
Change-Id: Iedd66483f63020328bd61e1c1e19c62787b8ff6b
Diffstat (limited to 'xmloff/source/style/styleexp.cxx')
-rw-r--r-- | xmloff/source/style/styleexp.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index c6b62e886306..0ab12cce8c5e 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -316,8 +316,14 @@ bool XMLStyleExport::exportStyle( // <style:properties> ::std::vector< XMLPropertyState > xPropStates = rPropMapper->Filter( xPropSet, true ); + bool const bUseExtensionNamespaceForGraphicProperties( + rXMLFamily != "drawing-page" && + rXMLFamily != "graphic" && + rXMLFamily != "presentation" && + rXMLFamily != "chart"); rPropMapper->exportXML( GetExport(), xPropStates, - SvXmlExportFlags::IGN_WS ); + SvXmlExportFlags::IGN_WS, + bUseExtensionNamespaceForGraphicProperties ); rPropMapper->SetStyleName( OUString() ); |