openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [openoffice] branch AOO419 updated: Merge pull request #116 from ardovm/bug127952
Date Fri, 08 Jan 2021 11:14:08 GMT
This is an automated email from the ASF dual-hosted git repository.

jim pushed a commit to branch AOO419
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO419 by this push:
     new 5610821  Merge pull request #116 from ardovm/bug127952
5610821 is described below

commit 561082130aec836ff9c7626c642cf3c44fbec11f
Author: Jim Jagielski <jim@apache.org>
AuthorDate: Fri Jan 8 06:11:47 2021 -0500

    Merge pull request #116 from ardovm/bug127952
    
    [writerfilter] Add checks for non-empty stacks
    
    (cherry picked from commit 477f4cf4ef09b35cfc4e99137827b734eae2c292)
    (cherry picked from commit cd64ceffdfea81aece1f071877a4f5321cacbcfa)
---
 .../source/dmapper/DomainMapperTableManager.cxx    | 24 ++++++++++++++++------
 .../source/dmapper/DomainMapper_Impl.cxx           |  6 ++++--
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/main/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/main/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 4ffc994..37c3896 100644
--- a/main/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/main/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -334,13 +334,25 @@ void DomainMapperTableManager::pushStackOfMembers()
 
 void DomainMapperTableManager::popStackOfMembers()
 {
-    m_nCellCounterForCurrentRow.pop();
-    m_nCurrentCellBorderIndex.pop();
-    m_nCurrentHeaderRepeatCount.pop();
-    m_nTableWidthOfCurrentTable.pop();
+    if (!m_nCellCounterForCurrentRow.empty()) {
+        m_nCellCounterForCurrentRow.pop();
+    }
+    if (!m_nCurrentCellBorderIndex.empty()) {
+        m_nCurrentCellBorderIndex.pop();
+    }
+    if (!m_nCurrentHeaderRepeatCount.empty()) {
+        m_nCurrentHeaderRepeatCount.pop();
+    }
+    if (!m_nTableWidthOfCurrentTable.empty()) {
+        m_nTableWidthOfCurrentTable.pop();
+    }
 
-    m_aTableGrid.pop();
-    m_aGridSpans.pop();
+    if (!m_aTableGrid.empty()) {
+        m_aTableGrid.pop();
+    }
+    if (!m_aGridSpans.empty()) {
+        m_aGridSpans.pop();
+    }
 }
 
 
diff --git a/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 13a5499..68f1d04 100644
--- a/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -301,8 +301,10 @@ void    DomainMapper_Impl::PopProperties(ContextType eId)
         m_pLastSectionContext = m_aPropertyStacks[eId].top( );
     }
 
-    m_aPropertyStacks[eId].pop();
-    m_aContextStack.pop();
+    if (!m_aPropertyStacks[eId].empty()) {
+        m_aPropertyStacks[eId].pop();
+        m_aContextStack.pop();
+    }
     if(!m_aContextStack.empty() && !m_aPropertyStacks[m_aContextStack.top()].empty())
 
             m_pTopContext = m_aPropertyStacks[m_aContextStack.top()].top();


Mime
View raw message