diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-07-02 22:58:56 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-07-02 23:03:09 +0200 |
commit | 9746dc9ad62e7f3a39961733f2ac204e90289034 (patch) | |
tree | a52c19fd5801291a118b7db0cadf897ff6ac7ca6 /xmloff | |
parent | improve indentation (diff) | |
download | core-9746dc9ad62e7f3a39961733f2ac204e90289034.tar.gz core-9746dc9ad62e7f3a39961733f2ac204e90289034.zip |
fix ODF validation errors
Introduced by 7d9bb549d498d6beed2c4050c402d09643febdfa
Change-Id: I09411486b93a031a0c405579d34d9e744b8002a7
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/XMLChartStyleContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/XMLShapeStyleContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/impastpl.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/style/prstylei.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlexppr.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextShapeStyleContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/StyleOASISTContext.cxx | 2 |
8 files changed, 18 insertions, 9 deletions
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx index 7f33644dbbac..52e6ea0812b0 100644 --- a/xmloff/source/chart/XMLChartStyleContext.cxx +++ b/xmloff/source/chart/XMLChartStyleContext.cxx @@ -115,7 +115,7 @@ SvXMLImportContext *XMLChartStyleContext::CreateChildContext( { SvXMLImportContext* pContext = NULL; - if( XML_NAMESPACE_STYLE == nPrefix ) + if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { sal_uInt32 nFamily = 0; if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) ) diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index f7731dbd0850..64ca80cd4860 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -57,7 +57,7 @@ SvXMLImportContext *XMLGraphicsDefaultStyle::CreateChildContext( sal_uInt16 nPre { SvXMLImportContext *pContext = 0; - if( XML_NAMESPACE_STYLE == nPrefix ) + if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { sal_uInt32 nFamily = 0; if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) ) diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index 9068ceb42a8f..31c32d720af0 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.cxx @@ -95,7 +95,7 @@ SvXMLImportContext *XMLShapeStyleContext::CreateChildContext( { SvXMLImportContext *pContext = 0; - if( XML_NAMESPACE_STYLE == nPrefix ) + if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { sal_uInt32 nFamily = 0; if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) ) diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index 1f0c4fb0c7f8..526485097a28 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -685,10 +685,15 @@ void SvXMLAutoStylePoolP_Impl::exportXML( XML_NAMESPACE_STYLE, XML_NAME, aExpStyles[i].mpProperties->GetName() ); + bool bExtensionNamespace = false; if( rFamily.mbAsFamily ) { GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, aStrFamilyName ); + if(aStrFamilyName != "graphic" && + aStrFamilyName != "presentation" && + aStrFamilyName != "chart" ) + bExtensionNamespace = true; } if( !aExpStyles[i].mpParent->isEmpty() ) @@ -741,7 +746,7 @@ void SvXMLAutoStylePoolP_Impl::exportXML( rFamily.mxMapper->exportXML( GetExport(), aExpStyles[i].mpProperties->GetProperties(), - nStart, nEnd, XML_EXPORT_FLAG_IGN_WS ); + nStart, nEnd, XML_EXPORT_FLAG_IGN_WS, bExtensionNamespace ); pAntiImpl->exportStyleContent( GetExport().GetDocHandler(), diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index 5397ce9a20d9..97019d3ac38c 100644 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -163,7 +163,7 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext( SvXMLImportContext *pContext = 0; sal_uInt32 nFamily = 0; - if( XML_NAMESPACE_STYLE == nPrefix ) + if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { if( IsXMLToken( rLocalName, XML_GRAPHIC_PROPERTIES ) ) nFamily = XML_TYPE_PROP_GRAPHIC; diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index bf0f968cc62c..11487677aced 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -745,7 +745,7 @@ void SvXMLExportPropertyMapper::exportXML( SvXMLExport& rExport, const ::std::vector< XMLPropertyState >& rProperties, sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx, - sal_uInt16 nFlags ) const + sal_uInt16 nFlags, bool bExtensionNamespace ) const { sal_uInt16 nPropTypeFlags = 0; for( sal_uInt16 i=0; i<MAX_PROP_TYPES; ++i ) @@ -766,7 +766,11 @@ void SvXMLExportPropertyMapper::exportXML( (nFlags & XML_EXPORT_FLAG_EMPTY) != 0 || !aIndexArray.empty() ) { - SvXMLElementExport aElem( rExport, XML_NAMESPACE_STYLE, + sal_uInt16 nNamespace = XML_NAMESPACE_STYLE; + if(bExtensionNamespace && aPropTokens[i].eToken == + xmloff::token::XML_GRAPHIC_PROPERTIES) + nNamespace = XML_NAMESPACE_LO_EXT; + SvXMLElementExport aElem( rExport, nNamespace, aPropTokens[i].eToken, (nFlags & XML_EXPORT_FLAG_IGN_WS) != 0, false ); diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx index 9a51d82b5b4f..0c341fe8a09f 100644 --- a/xmloff/source/text/XMLTextShapeStyleContext.cxx +++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx @@ -161,7 +161,7 @@ SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext( { SvXMLImportContext *pContext = 0; - if( XML_NAMESPACE_STYLE == nPrefix ) + if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { sal_uInt32 nFamily = 0; if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) ) diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index 4807b1d5ebb8..e01e342835f5 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -773,7 +773,7 @@ XMLTransformerContext *XMLStyleOASISTContext::CreateChildContext( { XMLTransformerContext *pContext = 0; - if( XML_NAMESPACE_STYLE == nPrefix ) + if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { XMLPropType ePropType = XMLPropertiesTContext_Impl::GetPropType( rLocalName ); |