diff options
author | David Tardon <dtardon@openoffice.org> | 2009-12-09 20:59:38 +0100 |
---|---|---|
committer | David Tardon <dtardon@openoffice.org> | 2009-12-09 20:59:38 +0100 |
commit | 7abd143cda0c008669144d0c5a29fe2773da0db4 (patch) | |
tree | c170f14cbfb47f1d4548a930ccad639678d4f14b /xmloff/source/text/txtparae.cxx | |
parent | c951b0a3b27e2dd5a650de21c11c56aa0b734960 (diff) | |
parent | 875ac20478f16e5107acb222c0b851b99d2e0f27 (diff) |
dtardon01: update to DEV300_m67
Diffstat (limited to 'xmloff/source/text/txtparae.cxx')
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 2c3891b7d3b0..d283da66aade 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -806,6 +806,11 @@ void XMLTextParagraphExport::exportListChange( } } + const bool bExportODF = + ( GetExport().getExportFlags() & EXPORT_OASIS ) != 0; + const SvtSaveOptions::ODFDefaultVersion eODFDefaultVersion = + GetExport().getDefaultVersion(); + // start a new list if ( rNextInfo.GetLevel() > 0 ) { @@ -828,10 +833,6 @@ void XMLTextParagraphExport::exportListChange( if ( nListLevelsToBeOpened > 0 ) { - const bool bExportODF = - ( GetExport().getExportFlags() & EXPORT_OASIS ) != 0; - const SvtSaveOptions::ODFDefaultVersion eODFDefaultVersion = - GetExport().getDefaultVersion(); const ::rtl::OUString sListStyleName( rNextInfo.GetNumRulesName() ); // Currently only the text documents support <ListId>. // Thus, for other document types <sListId> is empty. @@ -1037,16 +1038,14 @@ void XMLTextParagraphExport::exportListChange( pListElements->Remove( pListElements->Count()-1 ); delete pElem; - if ( rNextInfo.IsRestart() && !rNextInfo.HasStartValue() ) + // --> OD 2009-11-12 #i103745# - only for sub lists + if ( rNextInfo.IsRestart() && !rNextInfo.HasStartValue() && + rNextInfo.GetLevel() != 1 ) + // <-- { // start new sub list respectively list on same list level pElem = (*pListElements)[pListElements->Count()-1]; GetExport().EndElement( *pElem, sal_True ); - if ( rNextInfo.GetLevel() == 1 ) - { - GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME, - GetExport().EncodeStyleName( rNextInfo.GetNumRulesName() ) ); - } GetExport().IgnorableWhitespace(); GetExport().StartElement( *pElem, sal_False ); } @@ -1058,8 +1057,18 @@ void XMLTextParagraphExport::exportListChange( OUStringBuffer aBuffer; aBuffer.append( (sal_Int32)rNextInfo.GetStartValue() ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE, - aBuffer.makeStringAndClear() ); + aBuffer.makeStringAndClear() ); + } + // --> OD 2009-11-12 #i103745# - handle restart without start value on list level 1 + else if ( rNextInfo.IsRestart() && /*!rNextInfo.HasStartValue() &&*/ + rNextInfo.GetLevel() == 1 ) + { + OUStringBuffer aBuffer; + aBuffer.append( (sal_Int32)rNextInfo.GetListLevelStartValue() ); + GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE, + aBuffer.makeStringAndClear() ); } + // <-- if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) != 0 && GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) { |