diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-08-27 07:57:03 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-08-27 07:57:03 +0000 |
commit | 867d2b9a2c864506bc8edc7efe71b9a91658bb8e (patch) | |
tree | 73ac6cb35e6623297e99fa1214751f80b56844f4 /xmloff/source/text | |
parent | 713f0dfd379f614baf9657a1145157a6c40ee6f9 (diff) |
INTEGRATION: CWS sw30bf13_DEV300 (1.13.24.1.2); FILE MERGED
2008/08/15 14:04:37 od 1.13.24.1.2.1: #i92811# - import of lists:
-- assure that the first list with a certain list style uses
the internal list style's default list id as its list id
- export of lists:
-- correct export of property text::continue-numbering
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLTextListBlockContext.cxx | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx index 337bbcd7dc75..4a9c3ffed596 100644 --- a/xmloff/source/text/XMLTextListBlockContext.cxx +++ b/xmloff/source/text/XMLTextListBlockContext.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: XMLTextListBlockContext.cxx,v $ - * $Revision: 1.14 $ + * $Revision: 1.15 $ * * This file is part of OpenOffice.org. * @@ -232,6 +232,24 @@ XMLTextListBlockContext::XMLTextListBlockContext( // --> OD 2008-04-23 #refactorlists# if ( mnLevel == 0 ) // root <list> element { + // --> OD 2008-08-15 #i92811# + ::rtl::OUString sListStyleDefaultListId; + { + uno::Reference< beans::XPropertySet > xNumRuleProps( mxNumRules, UNO_QUERY ); + if ( xNumRuleProps.is() ) + { + uno::Reference< beans::XPropertySetInfo > xNumRulePropSetInfo( + xNumRuleProps->getPropertySetInfo()); + if ( xNumRulePropSetInfo.is() && + xNumRulePropSetInfo->hasPropertyByName( mrTxtImport.sPropNameDefaultListId) ) + { + xNumRuleProps->getPropertyValue( mrTxtImport.sPropNameDefaultListId ) >>= sListStyleDefaultListId; + DBG_ASSERT( sListStyleDefaultListId.getLength() != 0, + "no default list id found at numbering rules instance. Serious defect -> please inform OD." ); + } + } + } + // <-- if ( msListId.getLength() == 0 ) // no text:id property found { sal_Int32 nUPD( 0 ); @@ -242,25 +260,18 @@ XMLTextListBlockContext::XMLTextListBlockContext( { // handling former documents written by OpenOffice.org: // use default list id of numbering rules instance, if existing - uno::Reference< beans::XPropertySet > xNumRuleProps( mxNumRules, UNO_QUERY ); - if ( xNumRuleProps.is() ) + // --> OD 2008-08-15 #i92811# + if ( sListStyleDefaultListId.getLength() != 0 ) { - uno::Reference< beans::XPropertySetInfo > xNumRulePropSetInfo( - xNumRuleProps->getPropertySetInfo()); - if ( xNumRulePropSetInfo.is() && - xNumRulePropSetInfo->hasPropertyByName( mrTxtImport.sPropNameDefaultListId) ) + msListId = sListStyleDefaultListId; + if ( !bIsContinueNumberingAttributePresent && + !mbRestartNumbering && + mrTxtImport.IsListProcessed( msListId ) ) { - xNumRuleProps->getPropertyValue( mrTxtImport.sPropNameDefaultListId ) >>= msListId; - DBG_ASSERT( msListId.getLength() != 0, - "no default list id found at numbering rules instance. Serious defect -> please inform OD." ); - if ( !bIsContinueNumberingAttributePresent && - !mbRestartNumbering && - mrTxtImport.IsListProcessed( msListId ) ) - { - mbRestartNumbering = sal_True; - } + mbRestartNumbering = sal_True; } } + // <-- } if ( msListId.getLength() == 0 ) { @@ -303,7 +314,11 @@ XMLTextListBlockContext::XMLTextListBlockContext( if ( !mrTxtImport.IsListProcessed( msListId ) ) { - mrTxtImport.KeepListAsProcessed( msListId, msListStyleName, msContinueListId ); + // --> OD 2008-08-15 #i92811# + mrTxtImport.KeepListAsProcessed( msListId, msListStyleName, + msContinueListId, + sListStyleDefaultListId ); + // <-- } } // <-- |