summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNigel Hawkins <n.hawkins@gmx.com>2011-07-25 14:43:52 +0100
committerNigel Hawkins <n.hawkins@gmx.com>2011-07-25 16:44:53 +0100
commite93e5e29e919ace0a63df0f92c2afe765e467c31 (patch)
tree4761bcab884293913d4525f60857cc290a3fd5a1
parentbcc8fe1b7fd77af60f1c077ea65102ca73b446c4 (diff)
Replace SvUShorts with vector in envfmt.[ch]xx
-rw-r--r--sw/source/ui/envelp/envfmt.cxx8
-rw-r--r--sw/source/ui/envelp/envfmt.hxx7
2 files changed, 5 insertions, 10 deletions
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index b6b44a1735..b0377faf4d 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -233,11 +233,11 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
bFound = sal_True;
}
aSizeFormatBox.InsertEntry(aPaperName, nPos);
- aIDs.Insert((sal_uInt16) i, nPos);
+ aIDs.insert( aIDs.begin() + nPos, (sal_uInt16) i);
}
}
aSizeFormatBox.InsertEntry(SvxPaperInfo::GetName(PAPER_USER));
- aIDs.Insert((sal_uInt16) PAPER_USER, aIDs.Count());
+ aIDs.push_back( (sal_uInt16) PAPER_USER );
}
@@ -260,7 +260,7 @@ IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
{
Paper ePaper = SvxPaperInfo::GetSvxPaper(
Size(lHeight, lWidth), MAP_TWIP, sal_True);
- for (sal_uInt16 i = 0; i < aIDs.Count(); i++)
+ for (sal_uInt16 i = 0; i < (sal_uInt16)aIDs.size(); i++)
if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
@@ -576,7 +576,7 @@ void SwEnvFmtPage::Reset(const SfxItemSet& rSet)
Paper ePaper = SvxPaperInfo::GetSvxPaper(
Size( Min(rItem.lWidth, rItem.lHeight),
Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, sal_True);
- for (sal_uInt16 i = 0; i < (sal_uInt16) aIDs.Count(); i++)
+ for (sal_uInt16 i = 0; i < (sal_uInt16) aIDs.size(); i++)
if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index de5845d007..58f49202a2 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -28,11 +28,6 @@
#ifndef _ENVFMT_HXX
#define _ENVFMT_HXX
-
-#ifndef _SVSTDARR_HXX
-#define _SVSTDARR_USHORTS
-#include <svl/svstdarr.hxx>
-#endif
#include <svtools/stdctrl.hxx>
#include <vcl/field.hxx>
#include <vcl/menubtn.hxx>
@@ -72,7 +67,7 @@ class SwEnvFmtPage : public SfxTabPage
MetricField aSizeHeightField;
SwEnvPreview aPreview;
- SvUShorts aIDs;
+ std::vector<sal_uInt16> aIDs;
SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet);
~SwEnvFmtPage();