diff options
author | August Sodora <augsod@gmail.com> | 2012-01-13 18:27:59 -0500 |
---|---|---|
committer | August Sodora <augsod@gmail.com> | 2012-01-13 22:21:07 -0500 |
commit | 166053646aff23f93ad3704cde05b9bda20e171c (patch) | |
tree | f1cb53e5fd1cf3651b5171de7028890c6f2cb771 /sw | |
parent | 16b7354f9f89127f5746266fc77fcb844b9309ca (diff) |
SvStringsDtor->std::vector
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 14 | ||||
-rw-r--r-- | sw/source/ui/inc/optpage.hxx | 3 |
2 files changed, 6 insertions, 11 deletions
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index e41c79f0f7f6..3952f4078c46 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -504,11 +504,11 @@ IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG } IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) -void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst ) +void SwAddPrinterTabPage::SetFax( const std::vector<String>& rFaxLst ) { aFaxLB.InsertEntry(sNone); - for ( sal_uInt16 i = 0; i < rFaxLst.Count(); ++i ) - aFaxLB.InsertEntry( *rFaxLst.GetObject(i) ); + for(size_t i = 0; i < rFaxLst.size(); ++i) + aFaxLB.InsertEntry(rFaxLst[0]); aFaxLB.SelectEntryPos(0); } @@ -530,14 +530,10 @@ void SwAddPrinterTabPage::PageCreated (SfxAllItemSet aSet) } if (pListItem && pListItem->GetValue()) { - SvStringsDtor aFaxList; + std::vector<String> aFaxList; const std::vector<rtl::OUString>& rPrinters = Printer::GetPrinterQueues(); for (unsigned int i = 0; i < rPrinters.size(); ++i) - { - String* pString = new String( rPrinters[i] ); - String* &rpString = pString; - aFaxList.Insert(rpString, 0); - } + aFaxList.insert(aFaxList.begin(), rPrinters[i]); SetFax( aFaxList ); } } diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index fd66d0331f1b..010fe0071193 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -41,7 +41,6 @@ #include <svtools/ctrlbox.hxx> #include <svx/fntctrl.hxx> #include <fontcfg.hxx> -class SvStringsDtor; class SfxPrinter; class SwWrtShell; class FontList; @@ -148,7 +147,7 @@ public: virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - void SetFax( const SvStringsDtor& ); + void SetFax( const std::vector<String>& ); void SelectFax( const String& ); void SetPreview(sal_Bool bPrev); virtual void PageCreated (SfxAllItemSet aSet); |