diff options
Diffstat (limited to 'xmloff/source/style/styleexp.cxx')
-rw-r--r-- | xmloff/source/style/styleexp.cxx | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 0bbdf9e18482..cb666d899fb7 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -39,7 +39,6 @@ //#include "xmlitmap.hxx" #endif #include <xmloff/xmluconv.hxx> -#include "xmlkywd.hxx" #include <xmloff/attrlist.hxx> #include <xmloff/xmlprmap.hxx> #include <xmloff/xmlexppr.hxx> @@ -197,13 +196,22 @@ sal_Bool XMLStyleExport::exportStyle( OUStringBuffer sTmp; sTmp.append( static_cast<sal_Int32>(nOutlineLevel)); GetExport().AddAttribute( XML_NAMESPACE_STYLE, - XML_DEFAULT_OUTLINE_LEVEL, - sTmp.makeStringAndClear() ); + XML_DEFAULT_OUTLINE_LEVEL, + sTmp.makeStringAndClear() ); } else { - GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DEFAULT_OUTLINE_LEVEL, - OUString( RTL_CONSTASCII_USTRINGPARAM( "" ))); + // --> OD 2009-12-29 #i104889# + // empty value for style:default-outline-level does exist + // since ODF 1.2. Thus, suppress its export for former versions. + if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) != 0 && + GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) + // <-- + { + GetExport().AddAttribute( XML_NAMESPACE_STYLE, + XML_DEFAULT_OUTLINE_LEVEL, + OUString( RTL_CONSTASCII_USTRINGPARAM( "" ))); + } } } }//<-end,zhaojianwei @@ -308,8 +316,9 @@ sal_Bool XMLStyleExport::exportStyle( } ///////////////////////////////////////////////// if ( bNoInheritedListStyle ) - GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_LIST_STYLE_NAME, - OUString( RTL_CONSTASCII_USTRINGPARAM( "" ))); + GetExport().AddAttribute( XML_NAMESPACE_STYLE, + XML_LIST_STYLE_NAME, + OUString( RTL_CONSTASCII_USTRINGPARAM( "" ))); } //<-end,zhaojianwei } |