diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-11-23 17:21:39 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-11-23 17:21:39 +0000 |
commit | 94cdfeb628108625040ea35c596a6742a9778d6d (patch) | |
tree | ac77cf78693c0656c43a3ec10fb4c7167bc3623b | |
parent | ccbbbc821d52f4aea292663f10d8eec5a05f1fa4 (diff) |
CWS-TOOLING: integrate CWS sw32bf07
2009-11-16 13:33:38 +0100 mst r277514 : #i106930#: thints.cxx: isNestedAny: new empty hints at start/end _not_ nested
2009-11-13 10:55:40 +0100 mst r277494 : #i100658#: SwDocInfoField::Expand(): do not add properties that are not found
2009-11-13 10:38:27 +0100 od r277493 : #i106218# method <XMLTextImportHelper::SetOutlineStyles(..)>
- First collect all paragraph styles chosen for assignment to the outline style.
Then perform the intrinsic assignment.
Reason: side effect of assignment in Writer.
2009-11-13 10:32:21 +0100 od r277492 : #i106218# method <HasOutlineStyleToBeWrittenAsNormalListStyle(..)>
- consider that the outline style itself is set at the parent paragraph style of
one of the to the outline style assigned paragraph styles.
2009-11-13 09:30:06 +0100 os r277490 : #i106730# load styles from source, not from working document
2009-11-13 07:24:13 +0100 os r277489 : #i106859# crash fixed
2009-11-12 15:29:09 +0100 od r277480 : #i103745# method <XMLTextParagraphExport::exportListChange(..)>
- correct handling of restart without start value on list level 1
-rw-r--r-- | svx/source/cui/cuicharmap.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 48 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 31 |
3 files changed, 44 insertions, 40 deletions
diff --git a/svx/source/cui/cuicharmap.cxx b/svx/source/cui/cuicharmap.cxx index a66c7b3c10..d06d962c86 100644 --- a/svx/source/cui/cuicharmap.cxx +++ b/svx/source/cui/cuicharmap.cxx @@ -71,11 +71,12 @@ SvxCharacterMap::SvxCharacterMap( Window* pParent, BOOL bOne, const SfxItemSet* if ( pItem ) bOne = pItem->GetValue(); + mpCharMapData = new SvxCharMapData( this, bOne, &DIALOG_MGR() ); + SFX_ITEMSET_ARG( pSet, pCharItem, SfxInt32Item, SID_ATTR_CHAR, FALSE ); if ( pCharItem ) - SetChar( pItem->GetValue() ); + SetChar( pCharItem->GetValue() ); - mpCharMapData = new SvxCharMapData( this, bOne, &DIALOG_MGR() ); SFX_ITEMSET_ARG( pSet, pDisableItem, SfxBoolItem, FN_PARAM_2, FALSE ); if ( pDisableItem && pDisableItem->GetValue() ) diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 23422c10f6..5e59f12ee6 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1508,8 +1508,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( return sStyleName; } -// --> OD 2006-10-12 #i69629# -// adjustments to reflect change of internal data structure <mpOutlineStylesCandidates> void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, sal_Int8 nOutlineLevel ) { @@ -1560,9 +1558,7 @@ void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, } // else: we already had a style name, so we let it pass. } -// <-- -// --> OD 2006-10-12 #i69629# void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel, const OUString& rStyleName ) { @@ -1585,16 +1581,13 @@ void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel mpOutlineStylesCandidates[nOutlineLevel-1].push_back( rStyleName ); } } -// <-- -// --> OD 2006-10-12 #i69629# void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) { if ( ( mpOutlineStylesCandidates != NULL || bSetEmptyLevels ) && xChapterNumbering.is() && !IsInsertMode() ) { - // --> OD 2007-12-19 #152540# bool bChooseLastOne( false ); { if ( GetXMLImport().IsTextDocInOOoFileFormat() ) @@ -1607,15 +1600,12 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) sal_Int32 nBuild( 0 ); if ( GetXMLImport().getBuildIds( nUPD, nBuild ) ) { - // --> OD 2008-03-19 #i86058# // check explicitly on certain versions bChooseLastOne = ( nUPD == 641 ) || ( nUPD == 645 ) || // prior OOo 2.0 ( nUPD == 680 && nBuild <= 9073 ); // OOo 2.0 - OOo 2.0.4 - // <-- } } } - // <-- OUString sOutlineStyleName; { @@ -1624,8 +1614,15 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) xChapterNumRule->getPropertyValue(sName) >>= sOutlineStyleName; } - OUString sEmpty; - sal_Int32 nCount = xChapterNumbering->getCount(); + const sal_Int32 nCount = xChapterNumbering->getCount(); + // --> OD 2009-11-13 #i106218# + // First collect all paragraph styles choosen for assignment to each + // list level of the outline style, then perform the intrinsic assignment. + // Reason: The assignment of a certain paragraph style to a list level + // of the outline style causes side effects on the children + // paragraph styles in Writer. + ::std::vector<OUString> sChosenStyles(nCount); + // <-- for( sal_Int32 i=0; i < nCount; ++i ) { if ( bSetEmptyLevels || @@ -1634,17 +1631,12 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) { // determine, which candidate is one to be assigned to the list // level of the outline style - OUString sChoosenStyle( sEmpty ); if ( mpOutlineStylesCandidates && !mpOutlineStylesCandidates[i].empty() ) { - // --> OD 2007-12-19 #152540# if ( bChooseLastOne ) - // <-- { - // --> OD 2006-11-06 #i71249# - take last added one - sChoosenStyle = mpOutlineStylesCandidates[i].back(); - // <-- + sChosenStyles[i] = mpOutlineStylesCandidates[i].back(); } else { @@ -1655,24 +1647,26 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) sNumberingStyleName, sOutlineStyleName ) ) { - sChoosenStyle = mpOutlineStylesCandidates[i][j]; + sChosenStyles[i] = mpOutlineStylesCandidates[i][j]; break; } } } } - - Sequence < PropertyValue > aProps( 1 ); - PropertyValue *pProps = aProps.getArray(); - pProps->Name = sHeadingStyleName; - pProps->Value <<= sChoosenStyle; - - xChapterNumbering->replaceByIndex( i, makeAny( aProps ) ); } } + // --> OD 2009-11-13 #i106218# + Sequence < PropertyValue > aProps( 1 ); + PropertyValue *pProps = aProps.getArray(); + pProps->Name = sHeadingStyleName; + for ( sal_Int32 i = 0; i < nCount; ++i ) + { + pProps->Value <<= sChosenStyles[i]; + xChapterNumbering->replaceByIndex( i, makeAny( aProps ) ); + } + // <-- } } -// <-- void XMLTextImportHelper::SetHyperlink( SvXMLImport& rImport, diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 69e73929f2..21df9d374c 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -807,6 +807,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 ) { @@ -829,10 +834,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. @@ -1038,16 +1039,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 ); } @@ -1059,8 +1058,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 ) { |