---
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;
// ============================================================================
Context
- [Libreoffice] [PATCH 10/11] Replace ScHTMLAdjustStack with std::stack< ScHTMLAdjustStackEntry* > · 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.