summaryrefslogtreecommitdiff
path: root/sw/source/core/text/itrform2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/itrform2.cxx')
-rw-r--r--sw/source/core/text/itrform2.cxx62
1 files changed, 31 insertions, 31 deletions
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index f0f3646a38da..dddeed9b40df 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1332,43 +1332,43 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
SAL_FALLTHROUGH;
default :
{
- SwTabPortion* pLastTabPortion = rInf.GetLastTab();
- if ( pLastTabPortion && cChar == rInf.GetTabDecimal() )
- {
- // Abandon dec. tab position if line is full
- // We have a decimal tab portion in the line and the next character has to be
- // aligned at the tab stop position. We store the width from the beginning of
- // the tab stop portion up to the portion containing the decimal separator:
- if (GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ &&
- POR_TABDECIMAL == pLastTabPortion->GetWhichPor() )
+ SwTabPortion* pLastTabPortion = rInf.GetLastTab();
+ if ( pLastTabPortion && cChar == rInf.GetTabDecimal() )
{
- OSL_ENSURE( rInf.X() >= pLastTabPortion->GetFix(), "Decimal tab stop position cannot be calculated" );
- const sal_uInt16 nWidthOfPortionsUpToDecimalPosition = static_cast<sal_uInt16>(rInf.X() - pLastTabPortion->GetFix() );
- static_cast<SwTabDecimalPortion*>(pLastTabPortion)->SetWidthOfPortionsUpToDecimalPosition( nWidthOfPortionsUpToDecimalPosition );
- rInf.SetTabDecimal( 0 );
+ // Abandon dec. tab position if line is full
+ // We have a decimal tab portion in the line and the next character has to be
+ // aligned at the tab stop position. We store the width from the beginning of
+ // the tab stop portion up to the portion containing the decimal separator:
+ if (GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ &&
+ POR_TABDECIMAL == pLastTabPortion->GetWhichPor() )
+ {
+ OSL_ENSURE( rInf.X() >= pLastTabPortion->GetFix(), "Decimal tab stop position cannot be calculated" );
+ const sal_uInt16 nWidthOfPortionsUpToDecimalPosition = static_cast<sal_uInt16>(rInf.X() - pLastTabPortion->GetFix() );
+ static_cast<SwTabDecimalPortion*>(pLastTabPortion)->SetWidthOfPortionsUpToDecimalPosition( nWidthOfPortionsUpToDecimalPosition );
+ rInf.SetTabDecimal( 0 );
+ }
+ else
+ rInf.SetFull( rInf.GetLastTab()->Format( rInf ) );
}
- else
- rInf.SetFull( rInf.GetLastTab()->Format( rInf ) );
- }
- if( rInf.GetRest() )
- {
- if( rInf.IsFull() )
+ if( rInf.GetRest() )
{
- rInf.SetNewLine(true);
- return nullptr;
+ if( rInf.IsFull() )
+ {
+ rInf.SetNewLine(true);
+ return nullptr;
+ }
+ pPor = rInf.GetRest();
+ rInf.SetRest(nullptr);
}
- pPor = rInf.GetRest();
- rInf.SetRest(nullptr);
- }
- else
- {
- if( rInf.IsFull() )
- return nullptr;
- pPor = NewTextPortion( rInf );
+ else
+ {
+ if( rInf.IsFull() )
+ return nullptr;
+ pPor = NewTextPortion( rInf );
+ }
+ break;
}
- break;
- }
}
// if a portion is created despite there being a pending RestPortion,