---
sc/source/filter/inc/xcl97esc.hxx | 4 ++--
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 df7c09d..a2af601 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 50b7e9e..207a37d 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;
}
Context
- [Libreoffice] [PATCH 03/11] Replace Stack with std::stack< std::pair< XclObj*, XclEscherHostAppData* > > · Marcel Metz
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.