--- sc/source/filter/html/htmlpars.cxx | 14 ++++++++++---- 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 bb79d59f..67644c2 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -545,8 +545,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; @@ -574,7 +577,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); @@ -643,8 +646,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 d8f6ea4..4c3ea8e 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; // ============================================================================
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice