diff options
-rw-r--r-- | sc/source/filter/inc/xcl97esc.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97esc.cxx | 10 |
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; } |