diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-04-17 20:34:49 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-04-17 20:34:49 +0200 |
commit | 65bff6225b635f2b5fb75b648bf46ea54d2d7843 (patch) | |
tree | 01fd07efafdb9cd5eed1da9103725313e0b67e9e /xmloff/source/style/styleexp.cxx | |
parent | 692dac6c6e964a64909f9adfba44f936810c2646 (diff) | |
parent | a001605a190749900d3e09aa864ce56925ff848e (diff) |
CWS gnumake2: rebase to DEV300_m76; fix build problems
Diffstat (limited to 'xmloff/source/style/styleexp.cxx')
-rw-r--r-- | xmloff/source/style/styleexp.cxx | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index c83f99cc10b0..0ae6a3ea7c6c 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: styleexp.cxx,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -200,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 @@ -311,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 } |