summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Metz <mmetz@adrian-broher.net>2011-12-05 20:08:33 +0100
committerEike Rathke <erack@redhat.com>2011-12-05 22:53:16 +0100
commitecfcc545433d30e3b70fd0c909cce782edbdee39 (patch)
tree50349cd0d001cf42986d66e005b93da804def2a5
parent149c1746a1e2ee0557c72c067fe6fe79f0781c4d (diff)
Replace Stack with std::stack< std::pair< XclObj*, XclEscherHostAppData* > >
-rw-r--r--sc/source/filter/inc/xcl97esc.hxx4
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx10
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx
index df7c09d7fd63..a2af601e8e2b 100644
--- a/sc/source/filter/inc/xcl97esc.hxx
+++ b/sc/source/filter/inc/xcl97esc.hxx
@@ -30,8 +30,8 @@
#define SC_XCL97ESC_HXX
#include <memory>
+#include <stack>
#include <tools/table.hxx>
-#include <tools/stack.hxx>
#include <filter/msfilter/escherex.hxx>
#include "xlescher.hxx"
#include "xeroot.hxx"
@@ -149,7 +149,7 @@ private:
private:
XclExpObjectManager& mrObjMgr;
- Stack aStack;
+ std::stack< std::pair< XclObj*, XclEscherHostAppData* > > aStack;
XclObj* pCurrXclObj;
XclEscherHostAppData* pCurrAppData;
XclEscherClientData* pTheClientData; // always the same
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index 50b7e9ed9236..207a37dfcff9 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -115,7 +115,7 @@ XclEscherEx::XclEscherEx( const XclExpRoot& rRoot, XclExpObjectManager& rObjMgr,
XclEscherEx::~XclEscherEx()
{
- OSL_ENSURE( !aStack.Count(), "~XclEscherEx: stack not empty" );
+ OSL_ENSURE( !aStack.empty(), "~XclEscherEx: stack not empty" );
DeleteCurrAppData();
delete pTheClientData;
}
@@ -207,8 +207,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
UpdateDffFragmentEnd();
}
}
- aStack.Push( pCurrXclObj );
- aStack.Push( pCurrAppData );
+ aStack.push( std::make_pair( pCurrXclObj, pCurrAppData ) );
pCurrAppData = new XclEscherHostAppData;
SdrObject* pObj = GetSdrObjectFromXShape( rxShape );
if ( !pObj )
@@ -347,8 +346,9 @@ void XclEscherEx::EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID )
// get next object from stack
DeleteCurrAppData();
- pCurrAppData = static_cast< XclEscherHostAppData* >( aStack.Pop() );
- pCurrXclObj = static_cast< XclObj* >( aStack.Pop() );
+ pCurrXclObj = aStack.top().first;
+ pCurrAppData = aStack.top().second;
+ aStack.pop();
if( nAdditionalText == 3 )
nAdditionalText = 0;
}