summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-07-11 13:33:39 +0000
committerRüdiger Timm <rt@openoffice.org>2008-07-11 13:33:39 +0000
commit052e849324c180690117e6e0d9e79f79421cf907 (patch)
tree33bc43e51e467b0a68f5549a7e88cb856b2dae3b
parentcf752926307d3eac2bdc35017be4f37f40c5fd48 (diff)
INTEGRATION: CWS sw30bf08 (1.31.120); FILE MERGED
2008/07/01 09:47:56 od 1.31.120.1: #i91133# method <SwTxtFormatter::NewTabPortion(..)> - correct tab handling
-rw-r--r--sw/source/core/text/txttab.cxx33
1 files changed, 10 insertions, 23 deletions
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 41af88ef241a..f43b2777486f 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: txttab.cxx,v $
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
* This file is part of OpenOffice.org.
*
@@ -106,27 +106,14 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
// #i24363# tab stops relative to indent
// nTabLeft: The absolute value, the tab stops are relative to: Tabs origin.
//
- // --> OD 2008-02-07 #newlistlevelattrs#
-// const SwTwips nTmpIndent = pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) ?
-// pFrm->GetAttrSet()->GetLRSpace().GetTxtLeft() : 0;
-// const SwTwips nTabLeft = bRTL ?
-// pFrm->Frm().Right() - nTmpIndent :
-// pFrm->Frm().Left() + nTmpIndent;
- SwTwips nTabLeft( 0 );
- if ( pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) )
- {
- nTabLeft = Left();
- if ( bRTL )
- {
- Point aPoint( nTabLeft, 0 );
- pFrm->SwitchLTRtoRTL( aPoint );
- nTabLeft = aPoint.X();
- }
- }
- else
- {
- nTabLeft = bRTL ? pFrm->Frm().Right() : pFrm->Frm().Left();
- }
+ // --> OD 2008-07-01 #i91133#
+ const bool bTabsRelativeToIndent =
+ pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT);
+ const SwTwips nTabLeft = bRTL
+ ? pFrm->Frm().Right() -
+ ( bTabsRelativeToIndent ? GetTabLeft() : 0 )
+ : pFrm->Frm().Left() +
+ ( bTabsRelativeToIndent ? GetTabLeft() : 0 );
// <--
//
@@ -225,7 +212,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
}
// --> OD 2008-02-07 #newlistlevelattrs#
long nForced = 0;
- if ( !pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) )
+ if ( !bTabsRelativeToIndent )
{
if ( bRTL )
{