summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-03-23 11:22:15 +0100
committerVladimir Glazunov <vg@openoffice.org>2010-03-23 11:22:15 +0100
commit1dfffc435b365edf9d621373e85879df6a16222f (patch)
treea57953a578d00de7c17e33621b0bf2fa58fb5568 /xmloff
parentb1cebcc503f4aafb694f5a1ca65ec587780933bc (diff)
parentd44ef3602a375ff6f5a841702aeb49cf61b74c6a (diff)
CWS-TOOLING: integrate CWS sw33bf02
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/styleexp.cxx22
-rw-r--r--xmloff/source/text/XMLTextNumRuleInfo.cxx9
2 files changed, 25 insertions, 6 deletions
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 0bbdf9e18482..5292b92d4128 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -197,13 +197,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 +317,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
}
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx
index 5d37764d5726..482d94d05889 100644
--- a/xmloff/source/text/XMLTextNumRuleInfo.cxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx
@@ -120,6 +120,15 @@ void XMLTextNumRuleInfo::Set(
}
// <--
+ // --> OD 2010-01-13 #b6912256#
+ if ( mnListLevel < 0 )
+ {
+ DBG_ASSERT( false,
+ "<XMLTextNumRuleInfo::Set(..)> - unexpected numbering level" );
+ Reset();
+ return;
+ }
+
// --> OD 2006-09-27 #i69627#
bool bSuppressListStyle( false );
if ( mxNumRules.is() )