[Libreoffice-commits] .: 2 commits - sd/source svtools/source
Rafael Dominguez
rdominguez at kemper.freedesktop.org
Wed Apr 11 19:41:40 PDT 2012
sd/source/ui/view/drviews2.cxx | 13 ++++++-------
svtools/source/contnr/imivctl1.cxx | 16 ++--------------
2 files changed, 8 insertions(+), 21 deletions(-)
New commits:
commit 3b887c8d3fef676e0037a4f3381f6a491ec0da4f
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Sat Mar 31 21:12:50 2012 -0430
Replace deprecated List for std::vector.
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index eec11d1..4cbaa46 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -3558,25 +3558,13 @@ void SvxIconChoiceCtrl_Impl::SetPositionMode( SvxIconChoiceCtrlPositionMode eMod
if( ePositionMode == IcnViewPositionModeAutoArrange )
{
- List aMovedEntries;
for( size_t nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = aEntries[ nCur ];
if( pEntry->GetFlags() & (ICNVIEW_FLAG_POS_LOCKED | ICNVIEW_FLAG_POS_MOVED))
- {
- SvxIconChoiceCtrlEntry_Impl* pE = new SvxIconChoiceCtrlEntry_Impl(
- pEntry, GetEntryBoundRect( pEntry ));
- aMovedEntries.Insert( pE, LIST_APPEND );
- }
+ SetEntryPos(pEntry, GetEntryBoundRect( pEntry ).TopLeft());
}
- nCount = aMovedEntries.Count();
- for( size_t nCur = 0; nCur < nCount; nCur++ )
- {
- SvxIconChoiceCtrlEntry_Impl* pE = (SvxIconChoiceCtrlEntry_Impl*)aMovedEntries.GetObject(nCur);
- SetEntryPos( pE->_pEntry, pE->_aPos );
- }
- for( size_t nCur = 0; nCur < nCount; nCur++ )
- delete (SvxIconChoiceCtrlEntry_Impl*)aMovedEntries.GetObject( nCur );
+
if( aEntries.size() )
aAutoArrangeTimer.Start();
}
commit a9a05a06ac275ec2695ff607ed118e1b46ab7a4e
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Thu Mar 29 19:26:11 2012 -0430
Replace deprecated List for vector.
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 179fe66..6ecad4c 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -804,7 +804,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
// der harten Attribute sowie der UserCall eingetragen, da diese beim nachfolgenden
// mpDrawView->SetAttributes( *pSet, sal_True ) verloren gehen und spaeter restauriert
// werden muessen
- List* pAttrList = new List();
+ std::vector<std::pair<SfxItemSet*,SdrObjUserCall*> > aAttrList;
SdPage* pPresPage = (SdPage*) mpDrawView->GetSdrPageView()->GetPage();
sal_uLong i;
@@ -816,8 +816,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
SfxItemSet* pNewSet = new SfxItemSet( GetDoc()->GetPool(), SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT, 0 );
pNewSet->Put(pObj->GetMergedItemSet());
- pAttrList->Insert( pNewSet, LIST_APPEND );
- pAttrList->Insert( pObj->GetUserCall(), LIST_APPEND );
+ aAttrList.push_back(std::make_pair(pNewSet, pObj->GetUserCall()));
}
}
@@ -857,8 +856,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pPresPage->IsPresObj( pObj ) )
{
- SfxItemSet* pNewSet = (SfxItemSet*) pAttrList->GetObject(j++);
- SdrObjUserCall* pUserCall = (SdrObjUserCall*) pAttrList->GetObject(j++);
+ std::pair<SfxItemSet*,SdrObjUserCall*> &rAttr = aAttrList[j++];
+
+ SfxItemSet* pNewSet = rAttr.first;
+ SdrObjUserCall* pUserCall = rAttr.second;
if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_MINFRAMEHEIGHT ) == SFX_ITEM_ON )
{
@@ -876,8 +877,6 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
delete pNewSet;
}
}
-
- delete pAttrList;
}
delete pSet;
More information about the Libreoffice-commits
mailing list