summaryrefslogtreecommitdiff
path: root/editeng/source/outliner
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2012-01-14 15:11:10 -0500
committerAugust Sodora <augsod@gmail.com>2012-01-14 15:13:05 -0500
commit3447718347c6ffe4135fb3d3faeff367401e25f4 (patch)
tree65f4a86a9eab5968a6d7d9df6bfc3179397866b0 /editeng/source/outliner
parent440a7c9b92822206db52861dc79d053450004a9f (diff)
SV_DECL_PTRARR_DEL->std::vector
Diffstat (limited to 'editeng/source/outliner')
-rw-r--r--editeng/source/outliner/outleeng.hxx3
-rw-r--r--editeng/source/outliner/outliner.cxx18
2 files changed, 6 insertions, 15 deletions
diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx
index 59124b83042d..14051c3e5e10 100644
--- a/editeng/source/outliner/outleeng.hxx
+++ b/editeng/source/outliner/outleeng.hxx
@@ -31,8 +31,7 @@
#include <editeng/outliner.hxx>
#include <editeng/editeng.hxx>
-typedef EENotify* EENotifyPtr;
-SV_DECL_PTRARR_DEL( NotifyList, EENotifyPtr, 1, 1 )
+typedef std::vector<EENotify> NotifyList;
class OutlinerEditEng : public EditEngine
{
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 37a569e5948d..f62cec68311b 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2039,8 +2039,6 @@ void Outliner::SetLevelDependendStyleSheet( sal_uInt16 nPara )
pEditEngine->SetParaAttribs( nPara, aOldAttrs );
}
-SV_IMPL_PTRARR( NotifyList, EENotifyPtr );
-
void Outliner::ImplBlockInsertionCallbacks( sal_Bool b )
{
if ( b )
@@ -2054,13 +2052,12 @@ void Outliner::ImplBlockInsertionCallbacks( sal_Bool b )
if ( !bBlockInsCallback )
{
// Call blocked notify events...
- while ( pEditEngine->aNotifyCache.Count() )
+ while(!pEditEngine->aNotifyCache.empty())
{
- EENotify* pNotify = pEditEngine->aNotifyCache[0];
+ EENotify aNotify(pEditEngine->aNotifyCache.front());
// Remove from list before calling, maybe we enter LeaveBlockNotifications while calling the handler...
- pEditEngine->aNotifyCache.Remove( 0 );
- pEditEngine->aOutlinerNotifyHdl.Call( pNotify );
- delete pNotify;
+ pEditEngine->aNotifyCache.erase(pEditEngine->aNotifyCache.begin());
+ pEditEngine->aOutlinerNotifyHdl.Call( &aNotify );
}
}
}
@@ -2069,14 +2066,9 @@ void Outliner::ImplBlockInsertionCallbacks( sal_Bool b )
IMPL_LINK( Outliner, EditEngineNotifyHdl, EENotify*, pNotify )
{
if ( !bBlockInsCallback )
- {
pEditEngine->aOutlinerNotifyHdl.Call( pNotify );
- }
else
- {
- EENotify* pNewNotify = new EENotify( *pNotify );
- pEditEngine->aNotifyCache.Insert( pNewNotify, pEditEngine->aNotifyCache.Count() );
- }
+ pEditEngine->aNotifyCache.push_back(*pNotify);
return 0;
}