[openoffice.org/f14/master] Resolves: rhbz#659394 avoid mangling internal state in case of UNO exception

David Tardon dtardon at fedoraproject.org
Wed Jan 12 11:30:52 UTC 2011


commit ea0ea972b5f0bb5263050ccc229a5f81e452135a
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Jan 12 12:29:41 2011 +0100

    Resolves: rhbz#659394 avoid mangling internal state in case of UNO exception

 ...-avoid-mangling-internal-state-in-case-of.patch |   92 ++++++++++++++++++++
 openoffice.org.spec                                |   10 ++-
 2 files changed, 101 insertions(+), 1 deletions(-)
---
diff --git a/0001-rhbz-659394-avoid-mangling-internal-state-in-case-of.patch b/0001-rhbz-659394-avoid-mangling-internal-state-in-case-of.patch
new file mode 100644
index 0000000..a3f75d1
--- /dev/null
+++ b/0001-rhbz-659394-avoid-mangling-internal-state-in-case-of.patch
@@ -0,0 +1,92 @@
+From 1e0b9a0f2a75d4998c2eebc8fa9fc48cc92d5335 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Wed, 12 Jan 2011 12:01:42 +0100
+Subject: [PATCH] rhbz#659394 avoid mangling internal state in case of UNO exception
+
+---
+ writerfilter/inc/resourcemodel/TableManager.hxx |   52 +++++++++++++++--------
+ 1 files changed, 34 insertions(+), 18 deletions(-)
+
+diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx
+index 86b2d62..cae1fa8 100644
+--- a/writerfilter/inc/resourcemodel/TableManager.hxx
++++ b/writerfilter/inc/resourcemodel/TableManager.hxx
+@@ -40,6 +40,10 @@
+ #include "util.hxx"
+ #include "TagLogger.hxx"
+ 
++#if OSL_DEBUG_LEVEL > 0
++#   include <rtl/strbuf.hxx>
++#endif
++
+ namespace writerfilter
+ {
+ 
+@@ -967,34 +971,46 @@ void TableManager<T, PropertiesPointer>::resolveCurrentTable()
+ 
+     if (mpTableDataHandler.get() != NULL)
+     {
+-        typename TableData<T, PropertiesPointer>::Pointer_t
+-            pTableData = mTableDataStack.top();
++        try
++        {
++            typename TableData<T, PropertiesPointer>::Pointer_t
++                pTableData = mTableDataStack.top();
+ 
+-        unsigned int nRows = pTableData->getRowCount();
++            unsigned int nRows = pTableData->getRowCount();
+ 
+-        mpTableDataHandler->startTable(nRows, pTableData->getDepth(), getTableProps());
++            mpTableDataHandler->startTable(nRows, pTableData->getDepth(), getTableProps());
+ 
+-        for (unsigned int nRow = 0; nRow < nRows; ++nRow)
+-        {
+-            typename RowData<T, PropertiesPointer>::Pointer_t pRowData = pTableData->getRow(nRow);
++            for (unsigned int nRow = 0; nRow < nRows; ++nRow)
++            {
++                typename RowData<T, PropertiesPointer>::Pointer_t pRowData = pTableData->getRow(nRow);
+ 
+-            unsigned int nCells = pRowData->getCellCount();
++                unsigned int nCells = pRowData->getCellCount();
+ 
+-            mpTableDataHandler->startRow(nCells, pRowData->getProperties());
++                mpTableDataHandler->startRow(nCells, pRowData->getProperties());
+ 
+-            for (unsigned int nCell = 0; nCell < nCells; ++nCell)
+-            {
+-                mpTableDataHandler->startCell
+-                    (pRowData->getCellStart(nCell),
+-                     pRowData->getCellProperties(nCell));
++                for (unsigned int nCell = 0; nCell < nCells; ++nCell)
++                {
++                    mpTableDataHandler->startCell
++                        (pRowData->getCellStart(nCell),
++                        pRowData->getCellProperties(nCell));
++
++                    mpTableDataHandler->endCell(pRowData->getCellEnd(nCell));
++                }
+ 
+-                mpTableDataHandler->endCell(pRowData->getCellEnd(nCell));
++                mpTableDataHandler->endRow();
+             }
+ 
+-            mpTableDataHandler->endRow();
++            mpTableDataHandler->endTable();
++        }
++        catch (uno::Exception const& e)
++        {
++            (void) e;
++#if OSL_DEBUG_LEVEL > 0
++            rtl::OStringBuffer aBuf("resolving of current table failed with: ");
++            aBuf.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
++            OSL_ENSURE(false, aBuf.getStr());
++#endif
+         }
+-
+-        mpTableDataHandler->endTable();
+     }
+     resetTableProps();
+     clearData();
+-- 
+1.7.3.4
+
diff --git a/openoffice.org.spec b/openoffice.org.spec
index a2bf8e4..47ff244 100644
--- a/openoffice.org.spec
+++ b/openoffice.org.spec
@@ -1,6 +1,6 @@
 %define oootag OOO330
 %define ooomilestone 19
-%define rh_rpm_release 1
+%define rh_rpm_release 2
 
 # rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
 %define __jar_repack %{nil}
@@ -154,6 +154,7 @@ Patch70: workspace.jl155.patch
 Patch71: 0001-Avoid-double-paste-when-pasting-text-into-cell-comme.patch
 Patch72: 0001-Resolves-rhbz-660342-Undo-Redo-crash-with-postits.patch
 Patch73: 0001-Resolves-rhbz-666088-clean-up-search-cache-singleton.patch
+Patch74: 0001-rhbz-659394-avoid-mangling-internal-state-in-case-of.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1724,6 +1725,7 @@ cp -p %{SOURCE5} external/unowinreg/unowinreg.dll
 %patch71 -p1 -b .Avoid-double-paste-when-pasting-text-into-cell-comme.patch
 %patch72 -p1 -b .rhbz-660342-Undo-Redo-crash-with-postits.patch
 %patch73 -p1 -b .rhbz-666088-clean-up-search-cache-singleton.patch
+%patch74 -p1 -b .rhbz-659394-avoid-mangling-internal-state-in-case-of.patch
 touch scripting/source/pyprov/delzip
 touch scripting/util/provider/beanshell/delzip
 touch scripting/util/provider/javascript/delzip
@@ -3920,6 +3922,12 @@ unopkg remove --shared org.openoffice.legacy.ScriptProviderForPython.zip > /dev/
 %endif
 
 %changelog
+* Wed Jan 12 2011 David Tardon <dtardon at redhat.com>- 1:3.3.0-19.2
+- Resolves: rhbz#659394 avoid mangling internal state in case of UNO
+  exception
+- Resolves: rhbz#662581 [abrt] pure virtual call in
+  sw::mark::MarkManager::deleteMark
+
 * Fri Jan 07 2011 Caolán McNamara <caolanm at redhat.com>- 1:3.3.0-19.1
 - Resolves: rhbz#666088 don't crash on clean up of search cache
 


More information about the scm-commits mailing list