Kaydet (Commit) 161b666f authored tarafından Rafael Dominguez's avatar Rafael Dominguez Kaydeden (comit) Joseph Powers

Remove deprecated List in SvxNumOptionsTabPage for std::vector<String>.

üst 3afc77ad
...@@ -301,7 +301,7 @@ class SvxNumOptionsTabPage : public SfxTabPage ...@@ -301,7 +301,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
sal_Bool bHTMLMode : 1; sal_Bool bHTMLMode : 1;
sal_Bool bMenuButtonInitialized : 1; sal_Bool bMenuButtonInitialized : 1;
List aGrfNames; std::vector<String> aGrfNames;
Font aActBulletFont; Font aActBulletFont;
String sBullet; String sBullet;
String sStartWith; String sStartWith;
......
...@@ -1193,12 +1193,6 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, ...@@ -1193,12 +1193,6 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
SvxNumOptionsTabPage::~SvxNumOptionsTabPage() SvxNumOptionsTabPage::~SvxNumOptionsTabPage()
{ {
delete aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); delete aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
String* pStr = (String*)aGrfNames.First();
while( pStr )
{
delete pStr;
pStr = (String*)aGrfNames.Next();
}
delete pActNum; delete pActNum;
delete pPreviewWIN; delete pPreviewWIN;
delete pSaveNum; delete pSaveNum;
...@@ -1959,12 +1953,16 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton ) ...@@ -1959,12 +1953,16 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton )
if(MN_GALLERY_ENTRY <= nItemId ) if(MN_GALLERY_ENTRY <= nItemId )
{ {
aGrfName = *((String*)aGrfNames.GetObject( nItemId - MN_GALLERY_ENTRY)); sal_uInt16 idx = nItemId - MN_GALLERY_ENTRY;
Graphic aGraphic; if (idx < aGrfNames.size())
if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, nItemId - MN_GALLERY_ENTRY, &aGraphic))
{ {
aSize = SvxNumberFormat::GetGraphicSizeMM100(&aGraphic); aGrfName = aGrfNames[idx];
bSucc = sal_True; Graphic aGraphic;
if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, idx, &aGraphic))
{
aSize = SvxNumberFormat::GetGraphicSizeMM100(&aGraphic);
bSucc = sal_True;
}
} }
} }
else else
...@@ -2031,20 +2029,22 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) ...@@ -2031,20 +2029,22 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG )
bMenuButtonInitialized = sal_True; bMenuButtonInitialized = sal_True;
EnterWait(); EnterWait();
PopupMenu* pPopup = aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); 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 )); pPopup->RemoveItem( pPopup->GetItemPos( NUM_NO_GRAPHIC ));
String aEmptyStr;
GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS); 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; sGrfName = *it;
String sGrfName = *(const String*)aGrfNames.GetObject(i);
INetURLObject aObj(sGrfName); INetURLObject aObj(sGrfName);
if(aObj.GetProtocol() == INET_PROT_FILE) if(aObj.GetProtocol() == INET_PROT_FILE)
sGrfName = aObj.PathToFileName(); sGrfName = aObj.PathToFileName();
if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, &aGraphic)) if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, &aGraphic))
{ {
Bitmap aBitmap(aGraphic.GetBitmap()); Bitmap aBitmap(aGraphic.GetBitmap());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment