summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2011-05-06 22:59:11 -0430
committerJoseph Powers <jpowers27@cox.net>2011-05-07 22:42:17 -0700
commit161b666fd1b22ed797db8735e4a06c76f7e80aa9 (patch)
tree47f489810f8776293a0bb1cfec512218f44b38fd
parent3afc77ad7ff2bf5ecdd8f2c7067be66b4b9d22d4 (diff)
Remove deprecated List in SvxNumOptionsTabPage for std::vector<String>.
-rw-r--r--cui/source/inc/numpages.hxx2
-rw-r--r--cui/source/tabpages/numpages.cxx34
2 files changed, 18 insertions, 18 deletions
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index c9108d510a76..bd61da269179 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -301,7 +301,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
sal_Bool bHTMLMode : 1;
sal_Bool bMenuButtonInitialized : 1;
- List aGrfNames;
+ std::vector<String> aGrfNames;
Font aActBulletFont;
String sBullet;
String sStartWith;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 1200f4c2cb00..5586714da17d 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1193,12 +1193,6 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
SvxNumOptionsTabPage::~SvxNumOptionsTabPage()
{
delete aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
- String* pStr = (String*)aGrfNames.First();
- while( pStr )
- {
- delete pStr;
- pStr = (String*)aGrfNames.Next();
- }
delete pActNum;
delete pPreviewWIN;
delete pSaveNum;
@@ -1959,12 +1953,16 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton )
if(MN_GALLERY_ENTRY <= nItemId )
{
- aGrfName = *((String*)aGrfNames.GetObject( nItemId - MN_GALLERY_ENTRY));
- Graphic aGraphic;
- if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, nItemId - MN_GALLERY_ENTRY, &aGraphic))
+ sal_uInt16 idx = nItemId - MN_GALLERY_ENTRY;
+ if (idx < aGrfNames.size())
{
- aSize = SvxNumberFormat::GetGraphicSizeMM100(&aGraphic);
- bSucc = sal_True;
+ aGrfName = aGrfNames[idx];
+ Graphic aGraphic;
+ if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, idx, &aGraphic))
+ {
+ aSize = SvxNumberFormat::GetGraphicSizeMM100(&aGraphic);
+ bSucc = sal_True;
+ }
}
}
else
@@ -2031,20 +2029,22 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG )
bMenuButtonInitialized = sal_True;
EnterWait();
PopupMenu* pPopup = aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
- GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames);
- if(aGrfNames.Count())
+
+ if(GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames))
{
pPopup->RemoveItem( pPopup->GetItemPos( NUM_NO_GRAPHIC ));
- String aEmptyStr;
GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
- for(sal_uInt16 i = 0; i < aGrfNames.Count(); i++)
+ Graphic aGraphic;
+ String sGrfName;
+ std::vector<String>::const_iterator it = aGrfNames.begin();
+ for(sal_uInt16 i = 0; it != aGrfNames.end(); ++it, ++i)
{
- Graphic aGraphic;
- String sGrfName = *(const String*)aGrfNames.GetObject(i);
+ sGrfName = *it;
INetURLObject aObj(sGrfName);
if(aObj.GetProtocol() == INET_PROT_FILE)
sGrfName = aObj.PathToFileName();
+
if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, &aGraphic))
{
Bitmap aBitmap(aGraphic.GetBitmap());