Kaydet (Commit) fd29c8d6 authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann

124451: WW8 import - application of index entry template patterns

-- do not propagate tab stops of unused paragraph styles
-- do not propagate default tab stops
üst 34243aa8
...@@ -430,17 +430,15 @@ bool operator == (const SwFormToken & rToken, FormTokenType eType) ...@@ -430,17 +430,15 @@ bool operator == (const SwFormToken & rToken, FormTokenType eType)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void SwForm::AdjustTabStops( SwDoc& rDoc ) // #i21237# void SwForm::AdjustTabStops( SwDoc& rDoc ) // #i21237#
{ {
for(sal_uInt16 nLevel = 1; nLevel < GetFormMax(); nLevel++) const sal_uInt16 nFormMaxLevel = GetFormMax();
for ( sal_uInt16 nLevel = 1; nLevel < nFormMaxLevel; ++nLevel )
{ {
const String& sTemplateName = GetTemplate(nLevel); SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( GetTemplate(nLevel) );
SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( sTemplateName );
if( pColl == NULL ) if( pColl == NULL )
{ {
const sal_uInt16 nId = // Paragraph Style for this level has not been created.
SwStyleNameMapper::GetPoolIdFromUIName( sTemplateName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); // --> No need to propagate default values
if ( USHRT_MAX != nId ) continue;
pColl = rDoc.GetTxtCollFromPool( nId );
} }
const SvxTabStopItem* pTabStops = pColl != NULL ? &pColl->GetTabStops(sal_False) : 0; const SvxTabStopItem* pTabStops = pColl != NULL ? &pColl->GetTabStops(sal_False) : 0;
...@@ -456,6 +454,9 @@ void SwForm::AdjustTabStops( SwDoc& rDoc ) // #i21237# ...@@ -456,6 +454,9 @@ void SwForm::AdjustTabStops( SwDoc& rDoc ) // #i21237#
{ {
const SvxTabStop& rTab = (*pTabStops)[nTab]; const SvxTabStop& rTab = (*pTabStops)[nTab];
if ( rTab.GetAdjustment() == SVX_TAB_ADJUST_DEFAULT )
continue; // ignore the default tab stop
aIt = find_if( aIt, aCurrentPattern.end(), SwFormTokenEqualToFormTokenType(TOKEN_TAB_STOP) ); aIt = find_if( aIt, aCurrentPattern.end(), SwFormTokenEqualToFormTokenType(TOKEN_TAB_STOP) );
if ( aIt != aCurrentPattern.end() ) if ( aIt != aCurrentPattern.end() )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment