---
 sc/source/filter/html/htmlpars.cxx |   20 +++++++++++++-------
 sc/source/filter/inc/htmlpars.hxx  |    3 ++-
 2 files changed, 15 insertions(+), 8 deletions(-)


diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 6cebfae..bb79d59f 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -256,8 +256,11 @@ ScHTMLLayoutParser::ScHTMLLayoutParser(
 ScHTMLLayoutParser::~ScHTMLLayoutParser()
 {
     ScHTMLTableStackEntry* pS;
-    while ( (pS = aTableStack.Pop()) != 0 )
+    while ( !aTableStack.empty() )
     {
+        pS = aTableStack.top();
+        aTableStack.pop();
+
         bool found = false;
         for ( size_t i = 0, nListSize = maList.size(); i < nListSize; ++i )
         {
@@ -1092,7 +1095,7 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo )
     {   // Table in Table
         sal_uInt16 nTmpColOffset = nColOffset;  // wird in Colonize noch angepasst
         Colonize( pActEntry );
-        aTableStack.Push( new ScHTMLTableStackEntry(
+        aTableStack.push( new ScHTMLTableStackEntry(
             pActEntry, xLockedList, pLocalColOffset, nFirstTableCell,
             nColCnt, nRowCnt, nColCntStart, nMaxCol, nTable,
             nTableWidth, nColOffset, nColOffsetStart,
@@ -1154,7 +1157,7 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo )
             CloseEntry( pInfo );
             NextRow( pInfo );
         }
-        aTableStack.Push( new ScHTMLTableStackEntry(
+        aTableStack.push( new ScHTMLTableStackEntry(
             pActEntry, xLockedList, pLocalColOffset, nFirstTableCell,
             nColCnt, nRowCnt, nColCntStart, nMaxCol, nTable,
             nTableWidth, nColOffset, nColOffsetStart,
@@ -1208,9 +1211,11 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
     }
     if ( --nTableLevel > 0 )
     {   // Table in Table beendet
-        ScHTMLTableStackEntry* pS = aTableStack.Pop();
-        if ( pS )
+        if ( !aTableStack.empty() )
         {
+            ScHTMLTableStackEntry* pS = aTableStack.top();
+            aTableStack.pop();
+
             ScEEParseEntry* pE = pS->pCellEntry;
             SCROW nRows = nRowCnt - pS->nRowCnt;
             if ( nRows > 1 )
@@ -1344,11 +1349,12 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
     else
     {   // einfache Table beendet
         SetWidths();
-        ScHTMLTableStackEntry* pS = aTableStack.Pop();
         nMaxCol = 0;
         nTable = 0;
-        if ( pS )
+        if ( !aTableStack.empty() )
         {
+            ScHTMLTableStackEntry* pS = aTableStack.top();
+            aTableStack.pop();
             if ( pLocalColOffset )
                 delete pLocalColOffset;
             pLocalColOffset = pS->pLocalColOffset;
diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx
index 5d7667d..d8f6ea4 100644
--- a/sc/source/filter/inc/htmlpars.hxx
+++ b/sc/source/filter/inc/htmlpars.hxx
@@ -32,6 +32,7 @@
 #include <tools/stack.hxx>
 
 #include <memory>
+#include <stack>
 #include <vector>
 #include <list>
 #include <map>
@@ -144,7 +145,7 @@ struct ScHTMLTableStackEntry
                             {}
                         ~ScHTMLTableStackEntry() {}
 };
-DECLARE_STACK( ScHTMLTableStack, ScHTMLTableStackEntry* )
+typedef ::std::stack< ScHTMLTableStackEntry* > ScHTMLTableStack;
 
 struct ScHTMLAdjustStackEntry
 {

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to