diff options
author | Marcel Metz <mmetz@adrian-broher.net> | 2011-12-05 19:08:40 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-12-05 22:54:55 +0100 |
commit | 050b170e8cf911679a4d3697ae81ee49e67d10a7 (patch) | |
tree | 3767d7ec4b7b4c19c5420946170004afe1a60bba | |
parent | 0c173e748936231846c9e3e87832754c496ebc35 (diff) |
Replace ScHTMLAdjustStack with std::stack< ScHTMLAdjustStackEntry* >
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 14 | ||||
-rw-r--r-- | sc/source/filter/inc/htmlpars.hxx | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index b8bce20042d0..cdd0534f3d8d 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -544,8 +544,11 @@ void ScHTMLLayoutParser::Adjust() ScEEParseEntry* pE = maList[ i ]; if ( pE->nTab < nTab ) { // Table beendet - if ( (pS = aStack.Pop()) != 0 ) + if ( !aStack.empty() ) { + pS = aStack.top(); + aStack.pop(); + nLastCol = pS->nLastCol; nNextRow = pS->nNextRow; nCurRow = pS->nCurRow; @@ -573,7 +576,7 @@ void ScHTMLLayoutParser::Adjust() nLastCol = pE->nCol; // eingelesene Col if ( pE->nTab > nTab ) { // neue Table - aStack.Push( new ScHTMLAdjustStackEntry( + aStack.push( new ScHTMLAdjustStackEntry( nLastCol, nNextRow, nCurRow ) ); nTab = pE->nTab; pTab = (pTables ? (Table*) pTables->Get( nTab ) : NULL); @@ -642,8 +645,11 @@ void ScHTMLLayoutParser::Adjust() if ( nRowMax < nRowTmp ) nRowMax = nRowTmp; } - while ( (pS = aStack.Pop()) != 0 ) - delete pS; + while ( !aStack.empty() ) + { + delete aStack.top(); + aStack.pop(); + } } diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index d8f6ea4d4ecb..4c3ea8ecf6e3 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -29,8 +29,6 @@ #ifndef SC_HTMLPARS_HXX #define SC_HTMLPARS_HXX -#include <tools/stack.hxx> - #include <memory> #include <stack> #include <vector> @@ -158,7 +156,7 @@ struct ScHTMLAdjustStackEntry nCurRow( nCRow ) {} }; -DECLARE_STACK( ScHTMLAdjustStack, ScHTMLAdjustStackEntry* ) +typedef ::std::stack< ScHTMLAdjustStackEntry* > ScHTMLAdjustStack; // ============================================================================ |