diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2006-11-01 14:07:54 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2006-11-01 14:07:54 +0000 |
commit | 307ebc52b94ba9e0fa9dac59f69567055ebce4c5 (patch) | |
tree | 052c8ab40dc55a8032642e1da4aa864048b71fa5 | |
parent | 6eb8ebc69b838575a9cdd67ab1f5f0d7ea339907 (diff) |
INTEGRATION: CWS swqbf88 (1.28.10); FILE MERGED
2006/10/23 10:10:04 od 1.28.10.3: RESYNC: (1.28-1.29); FILE MERGED
resolve merge conflict
2006/10/18 09:44:55 od 1.28.10.2: #i70223# method <XMLTextStyleContext::Finish(..)>
- do not apply list style, if default outline level is set for
text documents from versions prior OOo 2.1 resp. SO8 PU5
2006/10/13 13:06:02 od 1.28.10.1: #i69629# class <XMLTextStyleContext>
- merge changes of fix i69523
- adjustments due to changed <XMLTextImportHelper>
-rw-r--r-- | xmloff/source/text/txtstyli.cxx | 68 |
1 files changed, 47 insertions, 21 deletions
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 6782ac9f22ce..2b4e97cc686c 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -4,9 +4,9 @@ * * $RCSfile: txtstyli.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: rt $ $Date: 2006-10-30 09:08:04 $ + * last change: $Author: vg $ $Date: 2006-11-01 15:07:53 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -295,9 +295,13 @@ void XMLTextStyleContext::CreateAndInsert( sal_Bool bOverwrite ) pEventContext->ReleaseRef(); } - if( nOutlineLevel > 0 ) - GetImport().GetTextImport()->SetOutlineStyle( nOutlineLevel, + // --> OD 2006-10-12 #i69629# + if ( nOutlineLevel > 0 ) + { + GetImport().GetTextImport()->AddOutlineStyleCandidate( nOutlineLevel, GetDisplayName() ); + } + // <-- } void XMLTextStyleContext::SetDefaults( ) @@ -344,31 +348,53 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) if ( mbListStyleSet && xPropSetInfo->hasPropertyByName( sNumberingStyleName ) ) { - if ( !sListStyleName.getLength() ) + // --> OD 2006-10-12 #i70223# + // Only for text document from version prior OOo 2.1 resp. SO 8 PU5: + // - Do not apply list style, if paragraph style has a default outline + // level > 0 and thus, will be assigned to the corresponding list + // level of the outline style. + bool bApplyListStyle( true ); + if ( nOutlineLevel > 0 ) { - Any aAny; - aAny <<= sListStyleName /* empty string */; - xPropSet->setPropertyValue( sNumberingStyleName, aAny ); + sal_Int32 nUPD( 0 ); + sal_Int32 nBuild( 0 ); + GetImport().getBuildIds( nUPD, nBuild ); + if ( nUPD < 680 || + ( nUPD == 680 && nBuild <= 9073 /* BuildId of OOo 2.0.4/SO8 PU4 */ ) ) + { + bApplyListStyle = false; + } } - else + + if ( bApplyListStyle ) { - // change list style name to display name - OUString sDisplayListStyleName( - GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_LIST, - sListStyleName ) ); - // The families container must exist - const Reference < XNameContainer >& rNumStyles = - GetImport().GetTextImport()->GetNumberingStyles(); -// if( rNumStyles.is() && rNumStyles->hasByName( sDisplayListStyleName ) && -// xPropSetInfo->hasPropertyByName( sNumberingStyleName ) ) - if ( rNumStyles.is() && - rNumStyles->hasByName( sDisplayListStyleName ) ) + if ( !sListStyleName.getLength() ) { Any aAny; - aAny <<= sDisplayListStyleName; + aAny <<= sListStyleName /* empty string */; xPropSet->setPropertyValue( sNumberingStyleName, aAny ); } + else + { + // change list style name to display name + OUString sDisplayListStyleName( + GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_LIST, + sListStyleName ) ); + // The families container must exist + const Reference < XNameContainer >& rNumStyles = + GetImport().GetTextImport()->GetNumberingStyles(); + // if( rNumStyles.is() && rNumStyles->hasByName( sDisplayListStyleName ) && + // xPropSetInfo->hasPropertyByName( sNumberingStyleName ) ) + if ( rNumStyles.is() && + rNumStyles->hasByName( sDisplayListStyleName ) ) + { + Any aAny; + aAny <<= sDisplayListStyleName; + xPropSet->setPropertyValue( sNumberingStyleName, aAny ); + } + } } + // <-- } // <-- |