summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-07-19 14:26:38 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-26 14:30:11 +0200
commitef3990b07b1a9b05b135807765f9dd2732ee085b (patch)
tree9391376d7da8b85b2c1e345abf97804ce0b558d9 /sw/source
parentf7f99968f2014c9e7f1f216c6ef0d2d31630087d (diff)
Convert SV_DECL_VARARR_SORT_VISIBILITY(SvxTabStopArr) o3tl::sorted_vector
And convert it from a private superclass to a member. The code is cleaner and easier to read as a consequence. Change-Id: I35501a208c96615ce5797ad06d34d3b7efc2c4db
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/docfmt.cxx7
-rw-r--r--sw/source/core/text/frmcrsr.cxx2
-rw-r--r--sw/source/core/text/txttab.cxx2
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx7
4 files changed, 7 insertions, 11 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 2dfc3dfa36c0..4c67d512c0e7 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1136,12 +1136,9 @@ int lcl_SetNewDefTabStops( SwTwips nOldWidth, SwTwips nNewWidth,
return sal_False;
// Find the default's beginning
- SvxTabStop* pTabs = ((SvxTabStop*)rChgTabStop.GetStart())
- + (nOldCnt-1);
sal_uInt16 n;
-
- for( n = nOldCnt; n ; --n, --pTabs )
- if( SVX_TAB_ADJUST_DEFAULT != pTabs->GetAdjustment() )
+ for( n = nOldCnt; n ; --n )
+ if( SVX_TAB_ADJUST_DEFAULT != rChgTabStop[n - 1].GetAdjustment() )
break;
++n;
if( n < nOldCnt ) // delete the DefTabStops
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 18554060df5c..3210de660f87 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -1590,7 +1590,7 @@ static sal_Char const sDoubleSpace[] = " ";
const SvxTabStopItem& rTab =
(const SvxTabStopItem &)pSet->
GetPool()->GetDefaultItem( RES_PARATR_TABSTOP );
- MSHORT nDefTabDist = (MSHORT)rTab.GetStart()->GetTabPos();
+ MSHORT nDefTabDist = (MSHORT)rTab[0].GetTabPos();
nRightTab = nLeftTab - nTxtLeft;
nRightTab /= nDefTabDist;
nRightTab = nRightTab * nDefTabDist + nTxtLeft;
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 137da97912ea..a53cce96abcf 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -183,7 +183,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
(const SvxTabStopItem &)pFrm->GetAttrSet()->
GetPool()->GetDefaultItem( RES_PARATR_TABSTOP );
if( rTab.Count() )
- nDefTabDist = (KSHORT)rTab.GetStart()->GetTabPos();
+ nDefTabDist = (KSHORT)rTab[0].GetTabPos();
else
nDefTabDist = SVX_TAB_DEFDIST;
aLineInf.SetDefTabStop( nDefTabDist );
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index c210149fe91c..3498cab1beb6 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -3795,10 +3795,9 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
if( nOffset )
{
// Tabs anpassen !!
- SvxTabStop* pTabs = (SvxTabStop*)aTStop.GetStart();
- for( sal_uInt16 n = aTStop.Count(); n; --n, ++pTabs)
- if( SVX_TAB_ADJUST_DEFAULT != pTabs->GetAdjustment() )
- pTabs->GetTabPos() -= nOffset;
+ for( sal_uInt16 n = 0; n < aTStop.Count(); ++n)
+ if( SVX_TAB_ADJUST_DEFAULT != aTStop[n].GetAdjustment() )
+ aTStop[n].GetTabPos() -= nOffset;
// negativer Einzug, dann auf 0 Pos einen Tab setzen
if( rLR.GetTxtFirstLineOfst() < 0 )