summaryrefslogtreecommitdiff
path: root/sw/source/core/text/txttab.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/txttab.cxx')
-rw-r--r--sw/source/core/text/txttab.cxx26
1 files changed, 6 insertions, 20 deletions
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 612911ecc5e9..bb69a6d0857f 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "hintids.hxx"
#include <comphelper/string.hxx>
#include <editeng/lrspitem.hxx>
@@ -84,7 +83,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
const bool bRTL = pFrm->IsRightToLeft();
// #i24363# tab stops relative to indent
// nTabLeft: The absolute value, the tab stops are relative to: Tabs origin.
- //
+
// #i91133#
const bool bTabsRelativeToIndent =
pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT);
@@ -94,9 +93,8 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
: pFrm->Frm().Left() +
( bTabsRelativeToIndent ? GetTabLeft() : 0 );
- //
// nLinePos: The absolute position, where we started the line formatting.
- //
+
SwTwips nLinePos = GetLeftMargin();
if ( bRTL )
{
@@ -105,18 +103,16 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
nLinePos = aPoint.X();
}
- //
// nTabPos: The current position, relative to the line start.
- //
+
SwTwips nTabPos = rInf.GetLastTab() ? rInf.GetLastTab()->GetTabPos() : 0;
if( nTabPos < rInf.X() )
{
nTabPos = rInf.X();
}
- //
// nCurrentAbsPos: The current position in absolute coordinates.
- //
+
const SwTwips nCurrentAbsPos = bRTL ?
nLinePos - nTabPos :
nLinePos + nTabPos;
@@ -139,17 +135,16 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
// #i24363# tab stops relative to indent
// nSearchPos: The current position relative to the tabs origin.
- //
+
const SwTwips nSearchPos = bRTL ?
nTabLeft - nCurrentAbsPos :
nCurrentAbsPos - nTabLeft;
- //
// First, we examine the tab stops set at the paragraph style or
// any hard set tab stops:
// Note: If there are no user defined tab stops, there is always a
// default tab stop.
- //
+
const SvxTabStop* pTabStop = aLineInf.GetTabStop( nSearchPos, nMyRight );
if ( pTabStop )
{
@@ -316,7 +311,6 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
// Die Basisklasse wird erstmal ohne alles initialisiert.
-
SwTabPortion::SwTabPortion( const KSHORT nTabPosition, const sal_Unicode cFillChar, const bool bAutoTab )
: SwFixPortion( 0, 0 ), nTabPos(nTabPosition), cFill(cFillChar), bAutoTabStop( bAutoTab )
{
@@ -329,8 +323,6 @@ SwTabPortion::SwTabPortion( const KSHORT nTabPosition, const sal_Unicode cFillCh
* virtual SwTabPortion::Format()
*************************************************************************/
-
-
bool SwTabPortion::Format( SwTxtFormatInfo &rInf )
{
SwTabPortion *pLastTab = rInf.GetLastTab();
@@ -345,8 +337,6 @@ bool SwTabPortion::Format( SwTxtFormatInfo &rInf )
* virtual SwTabPortion::FormatEOL()
*************************************************************************/
-
-
void SwTabPortion::FormatEOL( SwTxtFormatInfo &rInf )
{
if( rInf.GetLastTab() == this && !IsTabLeftPortion() )
@@ -357,8 +347,6 @@ void SwTabPortion::FormatEOL( SwTxtFormatInfo &rInf )
* SwTabPortion::PreFormat()
*************************************************************************/
-
-
bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
{
OSL_ENSURE( rInf.X() <= GetTabPos(), "SwTabPortion::PreFormat: rush hour" );
@@ -475,8 +463,6 @@ bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
* SwTabPortion::PostFormat()
*************************************************************************/
-
-
bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
{
const bool bTabOverMargin = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_OVER_MARGIN);