You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2014/04/25 13:39:20 UTC
svn commit: r1590001 - /openoffice/trunk/main/sw/source/core/tox/tox.cxx
Author: orw
Date: Fri Apr 25 11:39:20 2014
New Revision: 1590001
URL: http://svn.apache.org/r1590001
Log:
124451: WW8 import - application of index entry template patterns
-- do not propagate tab stops of unused paragraph styles
-- do not propagate default tab stops
Modified:
openoffice/trunk/main/sw/source/core/tox/tox.cxx
Modified: openoffice/trunk/main/sw/source/core/tox/tox.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/tox/tox.cxx?rev=1590001&r1=1590000&r2=1590001&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/tox/tox.cxx (original)
+++ openoffice/trunk/main/sw/source/core/tox/tox.cxx Fri Apr 25 11:39:20 2014
@@ -430,17 +430,15 @@ bool operator == (const SwFormToken & rT
//-----------------------------------------------------------------------------
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( sTemplateName );
+ SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( GetTemplate(nLevel) );
if( pColl == NULL )
{
- const sal_uInt16 nId =
- SwStyleNameMapper::GetPoolIdFromUIName( sTemplateName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
- if ( USHRT_MAX != nId )
- pColl = rDoc.GetTxtCollFromPool( nId );
+ // Paragraph Style for this level has not been created.
+ // --> No need to propagate default values
+ continue;
}
const SvxTabStopItem* pTabStops = pColl != NULL ? &pColl->GetTabStops(sal_False) : 0;
@@ -456,6 +454,9 @@ void SwForm::AdjustTabStops( SwDoc& rDoc
{
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) );
if ( aIt != aCurrentPattern.end() )
{