diff options
author | Oliver-Rainer Wittmann <od@openoffice.org> | 2009-12-29 10:28:54 +0100 |
---|---|---|
committer | Oliver-Rainer Wittmann <od@openoffice.org> | 2009-12-29 10:28:54 +0100 |
commit | 0e402c37a75b637824b75ed38809ce196c2acfdb (patch) | |
tree | de149f936040c2dab2bfac4b3b18b26ebe4b069c /xmloff/source/style | |
parent | 0de34b05f3c1a0409d23b63b9e69d4d7abbe1090 (diff) |
sw33bf02: #i104889# method <XMLStyleExport::exportStyle(..)> - no empty value export for style:default-outline-level for ODF version < 1.2
Diffstat (limited to 'xmloff/source/style')
-rw-r--r-- | xmloff/source/style/styleexp.cxx | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index f03c0ac9a78b..9ca113218a9d 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -200,13 +200,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 @@ -311,8 +320,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 } |