Blame SOURCES/0001-Resolves-rhbz-1215060-get-LibreOffice-to-load-specif.patch

ebc4bd
From fa8128adf0bdd7698a2806fd277da2ff61bb8dfa Mon Sep 17 00:00:00 2001
ebc4bd
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
ebc4bd
Date: Tue, 28 Oct 2014 11:35:18 +0000
ebc4bd
Subject: [PATCH] Resolves: rhbz#1215060 get LibreOffice to load specific
ebc4bd
 Polarion .docx
ebc4bd
ebc4bd
coverity#1000600 Division or modulo by zero
ebc4bd
ebc4bd
Change-Id: I38fb8a7072eb7905f5dccc8697b3176d8b34c6c2
ebc4bd
(cherry picked from commit 04343704ae9e5b2be4a47f7ba8ef35174db7076d)
ebc4bd
ebc4bd
coverity#1202781 Division or modulo by zero
ebc4bd
ebc4bd
(cherry picked from commit 54ba9587c0f1d3b5206742339af4907047fb4748)
ebc4bd
ebc4bd
Conflicts:
ebc4bd
	filter/source/graphicfilter/epict/epict.cxx
ebc4bd
	svtools/source/misc/imap.cxx
ebc4bd
ebc4bd
Change-Id: I2908c57badd079c8f19c679f40ed815ce2cba374
ebc4bd
ebc4bd
coverity#1000600 Division or modulo by float zero
ebc4bd
ebc4bd
Change-Id: If39679b54ef1bb0a7af794c2f7a6186ebd69c2e0
ebc4bd
(cherry picked from commit 2149e924cbc32c370128c5f87a4f55c50c99e6bd)
ebc4bd
ebc4bd
be a little more consistent stylewise
ebc4bd
ebc4bd
(cherry picked from commit 2d5130ebab13fb94b07950a03b7051825b3d5b15)
ebc4bd
ebc4bd
Conflicts:
ebc4bd
	vcl/source/outdev/map.cxx
ebc4bd
ebc4bd
Change-Id: If1d822e0e6c87e792ff4a769a525e161505325c9
ebc4bd
ebc4bd
Related: rhbz#1215060 pass std::exceptions through
ebc4bd
ebc4bd
(cherry picked from commit cb4276278962c2cbd47d0685881fb2460bf31c70)
ebc4bd
ebc4bd
Conflicts:
ebc4bd
	writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
ebc4bd
ebc4bd
Change-Id: Ifb3431a50f92b95dfc1e851f9584533271e69324
ebc4bd
---
ebc4bd
 filter/source/graphicfilter/epict/epict.cxx        |  2 +-
ebc4bd
 include/o3tl/numeric.hxx                           | 28 +++++++++++++
ebc4bd
 svtools/source/misc/imap.cxx                       |  2 +-
ebc4bd
 sw/source/core/docnode/ndtbl.cxx                   | 22 ++++++----
ebc4bd
 .../source/dmapper/DomainMapperTableManager.cxx    | 47 ++++++++++++++-------
ebc4bd
 .../source/ooxml/OOXMLFastContextHandler.cxx       | 48 ++++++++++-----------
ebc4bd
 .../source/ooxml/OOXMLFastContextHandler.hxx       | 49 +++++++++++-----------
ebc4bd
 7 files changed, 124 insertions(+), 74 deletions(-)
ebc4bd
 create mode 100644 include/o3tl/numeric.hxx
ebc4bd
ebc4bd
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
ebc4bd
index 1675cdc..2e037dd 100644
ebc4bd
--- a/filter/source/graphicfilter/epict/epict.cxx
ebc4bd
+++ b/filter/source/graphicfilter/epict/epict.cxx
ebc4bd
@@ -34,7 +34,7 @@
ebc4bd
 #include <vcl/msgbox.hxx>
ebc4bd
 #include <vcl/gdimtf.hxx>
ebc4bd
 #include <tools/bigint.hxx>
ebc4bd
-
ebc4bd
+#include <o3tl/numeric.hxx>
ebc4bd
 #include <basegfx/polygon/b2dpolygon.hxx>
ebc4bd
 #include <basegfx/polygon/b2dpolypolygon.hxx>
ebc4bd
 #include <boost/scoped_array.hpp>
ebc4bd
diff --git a/include/o3tl/numeric.hxx b/include/o3tl/numeric.hxx
ebc4bd
new file mode 100644
ebc4bd
index 0000000..09f67f5
ebc4bd
--- /dev/null
ebc4bd
+++ b/include/o3tl/numeric.hxx
ebc4bd
@@ -0,0 +1,28 @@
ebc4bd
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
ebc4bd
+/*
ebc4bd
+ * This file is part of the LibreOffice project.
ebc4bd
+ *
ebc4bd
+ * This Source Code Form is subject to the terms of the Mozilla Public
ebc4bd
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
ebc4bd
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
ebc4bd
+ */
ebc4bd
+
ebc4bd
+#ifndef INCLUDED_O3TL_NUMERIC_HXX
ebc4bd
+#define INCLUDED_O3TL_NUMERIC_HXX
ebc4bd
+
ebc4bd
+#include <stdexcept>
ebc4bd
+
ebc4bd
+namespace o3tl
ebc4bd
+{
ebc4bd
+    struct divide_by_zero : public std::runtime_error
ebc4bd
+    {
ebc4bd
+        explicit divide_by_zero()
ebc4bd
+            : std::runtime_error("divide by zero")
ebc4bd
+        {
ebc4bd
+        }
ebc4bd
+    };
ebc4bd
+}
ebc4bd
+
ebc4bd
+#endif
ebc4bd
+
ebc4bd
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ebc4bd
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
ebc4bd
index df2fddc..887d0ce 100644
ebc4bd
--- a/svtools/source/misc/imap.cxx
ebc4bd
+++ b/svtools/source/misc/imap.cxx
ebc4bd
@@ -22,7 +22,7 @@
ebc4bd
 #include <vcl/svapp.hxx>
ebc4bd
 #include <vcl/mapmod.hxx>
ebc4bd
 #include <vcl/window.hxx>
ebc4bd
-
ebc4bd
+#include <o3tl/numeric.hxx>
ebc4bd
 #include <svl/urihelper.hxx>
ebc4bd
 #include <svtools/imap.hxx>
ebc4bd
 #include <svtools/imapobj.hxx>
ebc4bd
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
ebc4bd
index c10acd5..c6a9a07 100644
ebc4bd
--- a/sw/source/core/docnode/ndtbl.cxx
ebc4bd
+++ b/sw/source/core/docnode/ndtbl.cxx
ebc4bd
@@ -85,6 +85,7 @@
ebc4bd
 #include <rootfrm.hxx>
ebc4bd
 #include <fldupde.hxx>
ebc4bd
 #include <switerator.hxx>
ebc4bd
+#include <o3tl/numeric.hxx>
ebc4bd
 #include <boost/foreach.hpp>
ebc4bd
 
ebc4bd
 #ifdef DBG_UTIL
ebc4bd
@@ -2950,7 +2951,7 @@ const SwTableBox* SwCollectTblLineBoxes::GetBoxOfPos( const SwTableBox& rBox )
ebc4bd
 
ebc4bd
 bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth )
ebc4bd
 {
ebc4bd
-    sal_uInt16 n;
ebc4bd
+    size_t n;
ebc4bd
 
ebc4bd
     if( !aPosArr.empty() )
ebc4bd
     {
ebc4bd
@@ -2969,13 +2970,20 @@ bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth )
ebc4bd
         aPosArr.erase( aPosArr.begin(), aPosArr.begin() + n );
ebc4bd
         m_Boxes.erase(m_Boxes.begin(), m_Boxes.begin() + n);
ebc4bd
 
ebc4bd
-        // Adapt the positions to the new Size
ebc4bd
-        for( n = 0; n < aPosArr.size(); ++n )
ebc4bd
+        size_t nSize = aPosArr.size();
ebc4bd
+        if (nSize)
ebc4bd
         {
ebc4bd
-            sal_uLong nSize = nWidth;
ebc4bd
-            nSize *= ( aPosArr[ n ] - nOffset );
ebc4bd
-            nSize /= nOldWidth;
ebc4bd
-            aPosArr[ n ] = sal_uInt16( nSize );
ebc4bd
+            if (nOldWidth == 0)
ebc4bd
+                throw o3tl::divide_by_zero();
ebc4bd
+
ebc4bd
+            // Adapt the positions to the new Size
ebc4bd
+            for( n = 0; n < nSize; ++n )
ebc4bd
+            {
ebc4bd
+                sal_uLong nSize = nWidth;
ebc4bd
+                nSize *= ( aPosArr[ n ] - nOffset );
ebc4bd
+                nSize /= nOldWidth;
ebc4bd
+                aPosArr[ n ] = sal_uInt16( nSize );
ebc4bd
+            }
ebc4bd
         }
ebc4bd
     }
ebc4bd
     return !aPosArr.empty();
ebc4bd
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
ebc4bd
index 22c7a62..c4ba571 100644
ebc4bd
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
ebc4bd
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
ebc4bd
@@ -30,6 +30,7 @@
ebc4bd
 #include <com/sun/star/text/TableColumnSeparator.hpp>
ebc4bd
 #include <com/sun/star/text/VertOrientation.hpp>
ebc4bd
 #include <com/sun/star/text/WritingMode2.hpp>
ebc4bd
+#include <o3tl/numeric.hxx>
ebc4bd
 #include <ooxml/resourceids.hxx>
ebc4bd
 #include <dmapperLoggers.hxx>
ebc4bd
 
ebc4bd
@@ -697,20 +698,27 @@ void DomainMapperTableManager::endOfRowAction()
ebc4bd
         sal_Int16 nLastRelPos = 0;
ebc4bd
         sal_uInt32 nBorderGridIndex = m_nGridBefore;
ebc4bd
 
ebc4bd
-        ::std::vector< sal_Int32 >::const_iterator aSpansIter = pCurrentSpans->begin( );
ebc4bd
-        for( sal_uInt32 nBorder = 0; nBorder < m_nCell.back( ) - 1; ++nBorder )
ebc4bd
+        size_t nWidthsBound =  m_nCell.back( ) - 1;
ebc4bd
+        if (nWidthsBound)
ebc4bd
         {
ebc4bd
-            double fGridWidth = 0.;
ebc4bd
-            for ( sal_Int32 nGridCount = *aSpansIter; nGridCount > 0; --nGridCount )
ebc4bd
-                fGridWidth += (*pTableGrid.get())[nBorderGridIndex++];
ebc4bd
+            if (nFullWidthRelative == 0)
ebc4bd
+                throw o3tl::divide_by_zero();
ebc4bd
 
ebc4bd
-            sal_Int16 nRelPos =
ebc4bd
-                sal::static_int_cast< sal_Int16 >((fGridWidth * 10000) / nFullWidthRelative);
ebc4bd
+            ::std::vector< sal_Int32 >::const_iterator aSpansIter = pCurrentSpans->begin( );
ebc4bd
+            for( sal_uInt32 nBorder = 0; nBorder < nWidthsBound; ++nBorder )
ebc4bd
+            {
ebc4bd
+                double fGridWidth = 0.;
ebc4bd
+                for ( sal_Int32 nGridCount = *aSpansIter; nGridCount > 0; --nGridCount )
ebc4bd
+                    fGridWidth += (*pTableGrid.get())[nBorderGridIndex++];
ebc4bd
+
ebc4bd
+                sal_Int16 nRelPos =
ebc4bd
+                    sal::static_int_cast< sal_Int16 >((fGridWidth * 10000) / nFullWidthRelative);
ebc4bd
 
ebc4bd
-            pSeparators[nBorder].Position =  nRelPos + nLastRelPos;
ebc4bd
-            pSeparators[nBorder].IsVisible = sal_True;
ebc4bd
-            nLastRelPos = nLastRelPos + nRelPos;
ebc4bd
-            ++aSpansIter;
ebc4bd
+                pSeparators[nBorder].Position =  nRelPos + nLastRelPos;
ebc4bd
+                pSeparators[nBorder].IsVisible = sal_True;
ebc4bd
+                nLastRelPos = nLastRelPos + nRelPos;
ebc4bd
+                ++aSpansIter;
ebc4bd
+            }
ebc4bd
         }
ebc4bd
         TablePropertyMapPtr pPropMap( new TablePropertyMap );
ebc4bd
         pPropMap->Insert( PROP_TABLE_COLUMN_SEPARATORS, uno::makeAny( aSeparators ) );
ebc4bd
@@ -744,12 +752,19 @@ void DomainMapperTableManager::endOfRowAction()
ebc4bd
             for (sal_uInt32 i = 0; i < pCellWidths->size(); ++i)
ebc4bd
                 nFullWidthRelative += (*pCellWidths.get())[i];
ebc4bd
 
ebc4bd
-        for (sal_uInt32 i = 0; i < pCellWidths->size() - 1; ++i)
ebc4bd
+        size_t nWidthsBound = pCellWidths->size() - 1;
ebc4bd
+        if (nWidthsBound)
ebc4bd
         {
ebc4bd
-            nSum += (*pCellWidths.get())[i];
ebc4bd
-            pSeparators[nPos].Position = (nSum * 10000) / nFullWidthRelative; // Relative position
ebc4bd
-            pSeparators[nPos].IsVisible = sal_True;
ebc4bd
-            nPos++;
ebc4bd
+            if (nFullWidthRelative == 0)
ebc4bd
+                throw o3tl::divide_by_zero();
ebc4bd
+
ebc4bd
+            for (sal_uInt32 i = 0; i < nWidthsBound; ++i)
ebc4bd
+            {
ebc4bd
+                nSum += (*pCellWidths.get())[i];
ebc4bd
+                pSeparators[nPos].Position = (nSum * 10000) / nFullWidthRelative; // Relative position
ebc4bd
+                pSeparators[nPos].IsVisible = sal_True;
ebc4bd
+                nPos++;
ebc4bd
+            }
ebc4bd
         }
ebc4bd
 
ebc4bd
         TablePropertyMapPtr pPropMap( new TablePropertyMap );
ebc4bd
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
ebc4bd
index 5104574..4fd6a63 100644
ebc4bd
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
ebc4bd
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
ebc4bd
@@ -289,7 +289,7 @@ throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 void OOXMLFastContextHandler::lcl_startFastElement
ebc4bd
 (Token_t Element,
ebc4bd
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     OOXMLFactory::getInstance()->startAction(this, Element);
ebc4bd
     if( Element == (NS_wordprocessingDrawing|OOXML_positionV) )
ebc4bd
@@ -301,7 +301,7 @@ void OOXMLFastContextHandler::lcl_startFastElement
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandler::lcl_endFastElement
ebc4bd
 (Token_t Element)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     OOXMLFactory::getInstance()->endAction(this, Element);
ebc4bd
 }
ebc4bd
@@ -346,7 +346,7 @@ uno::Reference< xml::sax::XFastContextHandler >
ebc4bd
  OOXMLFastContextHandler::lcl_createFastChildContext
ebc4bd
 (Token_t Element,
ebc4bd
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     return OOXMLFactory::getInstance()->createFastChildContext(this, Element);
ebc4bd
 }
ebc4bd
@@ -381,7 +381,7 @@ void SAL_CALL OOXMLFastContextHandler::characters
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandler::lcl_characters
ebc4bd
 (const OUString & rString)
ebc4bd
-throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     if (!m_bDiscardChildren)
ebc4bd
         OOXMLFactory::getInstance()->characters(this, rString);
ebc4bd
@@ -1401,7 +1401,7 @@ OOXMLFastContextHandlerProperties::~OOXMLFastContextHandlerProperties()
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerProperties::lcl_endFastElement
ebc4bd
 (Token_t Element)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     endAction(Element);
ebc4bd
 
ebc4bd
@@ -1599,7 +1599,7 @@ OOXMLFastContextHandlerPropertyTable::~OOXMLFastContextHandlerPropertyTable()
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerPropertyTable::lcl_endFastElement
ebc4bd
 (Token_t Element)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     OOXMLPropertySet::Pointer_t pPropSet(mpPropertySet->clone());
ebc4bd
     OOXMLTableImpl::ValuePointer_t pTmpVal
ebc4bd
@@ -1655,7 +1655,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerValue::getValue() const
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerValue::lcl_endFastElement
ebc4bd
 (Token_t Element)
ebc4bd
-throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     sendPropertyToParent();
ebc4bd
 
ebc4bd
@@ -1743,7 +1743,7 @@ OOXMLFastContextHandlerTable::createFastChildContext
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerTable::lcl_endFastElement
ebc4bd
 (Token_t /*Element*/)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     addCurrentChild();
ebc4bd
 
ebc4bd
@@ -1802,7 +1802,7 @@ OOXMLFastContextHandlerXNote::~OOXMLFastContextHandlerXNote()
ebc4bd
 void OOXMLFastContextHandlerXNote::lcl_startFastElement
ebc4bd
 (Token_t Element,
ebc4bd
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     mbForwardEventsSaved = isForwardEvents();
ebc4bd
 
ebc4bd
@@ -1817,7 +1817,7 @@ void OOXMLFastContextHandlerXNote::lcl_startFastElement
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerXNote::lcl_endFastElement
ebc4bd
 (Token_t Element)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     endAction(Element);
ebc4bd
 
ebc4bd
@@ -2066,7 +2066,7 @@ OOXMLFastContextHandlerTextTable::~OOXMLFastContextHandlerTextTable()
ebc4bd
 void OOXMLFastContextHandlerTextTable::lcl_startFastElement
ebc4bd
 (Token_t Element,
ebc4bd
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     mpParserState->startTable();
ebc4bd
     mnTableDepth++;
ebc4bd
@@ -2086,7 +2086,7 @@ void OOXMLFastContextHandlerTextTable::lcl_startFastElement
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerTextTable::lcl_endFastElement
ebc4bd
 (Token_t Element)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     endAction(Element);
ebc4bd
 
ebc4bd
@@ -2142,7 +2142,7 @@ OOXMLFastContextHandlerShape::~OOXMLFastContextHandlerShape()
ebc4bd
 void OOXMLFastContextHandlerShape::lcl_startFastElement
ebc4bd
 (Token_t Element,
ebc4bd
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     startAction(Element);
ebc4bd
 
ebc4bd
@@ -2198,7 +2198,7 @@ void OOXMLFastContextHandlerShape::sendShape( Token_t Element )
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerShape::lcl_endFastElement
ebc4bd
 (Token_t Element)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     if (mrShapeContext.is())
ebc4bd
     {
ebc4bd
@@ -2227,7 +2227,7 @@ uno::Reference< xml::sax::XFastContextHandler >
ebc4bd
 OOXMLFastContextHandlerShape::lcl_createFastChildContext
ebc4bd
 (Token_t Element,
ebc4bd
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     uno::Reference< xml::sax::XFastContextHandler > xContextHandler;
ebc4bd
 
ebc4bd
@@ -2300,7 +2300,7 @@ OOXMLFastContextHandlerShape::createUnknownChildContext
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerShape::lcl_characters
ebc4bd
 (const OUString & aChars)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     if (mrShapeContext.is())
ebc4bd
         mrShapeContext->characters(aChars);
ebc4bd
@@ -2392,7 +2392,7 @@ void OOXMLFastContextHandlerWrapper::addToken( Token_t Token )
ebc4bd
 void OOXMLFastContextHandlerWrapper::lcl_startFastElement
ebc4bd
 (Token_t Element,
ebc4bd
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     if (mxContext.is())
ebc4bd
         mxContext->startFastElement(Element, Attribs);
ebc4bd
@@ -2400,7 +2400,7 @@ void OOXMLFastContextHandlerWrapper::lcl_startFastElement
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerWrapper::lcl_endFastElement
ebc4bd
 (Token_t Element)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     if (mxContext.is())
ebc4bd
         mxContext->endFastElement(Element);
ebc4bd
@@ -2410,7 +2410,7 @@ uno::Reference< xml::sax::XFastContextHandler >
ebc4bd
 OOXMLFastContextHandlerWrapper::lcl_createFastChildContext
ebc4bd
 (Token_t Element,
ebc4bd
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     uno::Reference< xml::sax::XFastContextHandler > xResult;
ebc4bd
 
ebc4bd
@@ -2464,7 +2464,7 @@ OOXMLFastContextHandlerWrapper::lcl_createFastChildContext
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerWrapper::lcl_characters
ebc4bd
 (const OUString & aChars)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     if (mxContext.is())
ebc4bd
         mxContext->characters(aChars);
ebc4bd
@@ -2599,14 +2599,14 @@ OOXMLFastContextHandlerLinear::OOXMLFastContextHandlerLinear(OOXMLFastContextHan
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerLinear::lcl_startFastElement(Token_t Element,
ebc4bd
     const uno::Reference< xml::sax::XFastAttributeList >& Attribs)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     buffer.appendOpeningTag( Element, Attribs );
ebc4bd
     ++depthCount;
ebc4bd
 }
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerLinear::lcl_endFastElement(Token_t Element)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     buffer.appendClosingTag( Element );
ebc4bd
     if( --depthCount == 0 )
ebc4bd
@@ -2616,7 +2616,7 @@ void OOXMLFastContextHandlerLinear::lcl_endFastElement(Token_t Element)
ebc4bd
 uno::Reference< xml::sax::XFastContextHandler >
ebc4bd
 OOXMLFastContextHandlerLinear::lcl_createFastChildContext(Token_t,
ebc4bd
     const uno::Reference< xml::sax::XFastAttributeList >&)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     uno::Reference< xml::sax::XFastContextHandler > xContextHandler;
ebc4bd
     xContextHandler.set( this );
ebc4bd
@@ -2624,7 +2624,7 @@ OOXMLFastContextHandlerLinear::lcl_createFastChildContext(Token_t,
ebc4bd
 }
ebc4bd
 
ebc4bd
 void OOXMLFastContextHandlerLinear::lcl_characters(const OUString& aChars)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException)
ebc4bd
+    throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
ebc4bd
 {
ebc4bd
     buffer.appendCharacters( aChars );
ebc4bd
 }
ebc4bd
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
ebc4bd
index f56f5e9..6a40c25 100644
ebc4bd
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
ebc4bd
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
ebc4bd
@@ -263,20 +263,19 @@ protected:
ebc4bd
     virtual void lcl_startFastElement
ebc4bd
     (Token_t Element,
ebc4bd
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException);
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception);
ebc4bd
 
ebc4bd
     virtual void lcl_endFastElement(Token_t Element)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException);
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception);
ebc4bd
 
ebc4bd
     virtual uno::Reference< xml::sax::XFastContextHandler >
ebc4bd
     lcl_createFastChildContext
ebc4bd
     (Token_t Element,
ebc4bd
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException);
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception);
ebc4bd
 
ebc4bd
     virtual void lcl_characters(const OUString & aChars)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException);
ebc4bd
-
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception);
ebc4bd
     void startAction(Token_t Element);
ebc4bd
     virtual void lcl_startAction(Token_t Element);
ebc4bd
     void endAction(Token_t Element);
ebc4bd
@@ -361,7 +360,7 @@ protected:
ebc4bd
     OOXMLPropertySet::Pointer_t mpPropertySet;
ebc4bd
 
ebc4bd
     virtual void lcl_endFastElement(Token_t Element)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
     virtual void setParent(OOXMLFastContextHandler * pParent) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
 private:
ebc4bd
@@ -380,7 +379,7 @@ protected:
ebc4bd
     OOXMLTableImpl mTable;
ebc4bd
 
ebc4bd
     virtual void lcl_endFastElement(Token_t Element)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
  };
ebc4bd
 
ebc4bd
 class OOXMLFastContextHandlerValue :
ebc4bd
@@ -395,7 +394,7 @@ public:
ebc4bd
     virtual OOXMLValue::Pointer_t getValue() const SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual void lcl_endFastElement(Token_t Element)
ebc4bd
-    throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual string getType() const SAL_OVERRIDE { return "Value"; }
ebc4bd
 
ebc4bd
@@ -427,7 +426,7 @@ protected:
ebc4bd
     RefAndPointer_t mCurrentChild;
ebc4bd
 
ebc4bd
     virtual void lcl_endFastElement(Token_t Element)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual ResourceEnum_t getResource() const SAL_OVERRIDE { return TABLE; }
ebc4bd
 
ebc4bd
@@ -456,10 +455,10 @@ private:
ebc4bd
     virtual void lcl_startFastElement
ebc4bd
     (Token_t Element,
ebc4bd
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual void lcl_endFastElement(Token_t Element)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual ResourceEnum_t getResource() const SAL_OVERRIDE { return STREAM; }
ebc4bd
 };
ebc4bd
@@ -507,10 +506,10 @@ protected:
ebc4bd
     virtual void lcl_startFastElement
ebc4bd
     (Token_t Element,
ebc4bd
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual void lcl_endFastElement(Token_t Element)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 };
ebc4bd
 
ebc4bd
 class OOXMLFastContextHandlerShape: public OOXMLFastContextHandlerProperties
ebc4bd
@@ -559,19 +558,19 @@ protected:
ebc4bd
     virtual void lcl_startFastElement
ebc4bd
     (Token_t Element,
ebc4bd
      const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual void lcl_endFastElement(Token_t Element)
ebc4bd
-        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual uno::Reference< xml::sax::XFastContextHandler >
ebc4bd
     lcl_createFastChildContext
ebc4bd
     (Token_t Element,
ebc4bd
      const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual void lcl_characters(const OUString & aChars)
ebc4bd
-                throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+                throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
 };
ebc4bd
 
ebc4bd
@@ -628,19 +627,19 @@ protected:
ebc4bd
     virtual void lcl_startFastElement
ebc4bd
     (Token_t Element,
ebc4bd
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual void lcl_endFastElement(Token_t Element)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual uno::Reference< xml::sax::XFastContextHandler >
ebc4bd
     lcl_createFastChildContext
ebc4bd
     (Token_t Element,
ebc4bd
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual void lcl_characters(const OUString & aChars)
ebc4bd
-                throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+                throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual void setId(Id nId) SAL_OVERRIDE;
ebc4bd
     virtual Id getId() const SAL_OVERRIDE;
ebc4bd
@@ -690,15 +689,15 @@ protected:
ebc4bd
     virtual void process() = 0;
ebc4bd
 
ebc4bd
     virtual void lcl_startFastElement(Token_t Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
-    virtual void lcl_endFastElement(Token_t Element) throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+    virtual void lcl_endFastElement(Token_t Element) throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     virtual uno::Reference< xml::sax::XFastContextHandler > lcl_createFastChildContext(Token_t Element,
ebc4bd
         const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
ebc4bd
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
-    virtual void lcl_characters(const OUString & aChars) throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
ebc4bd
+    virtual void lcl_characters(const OUString & aChars) throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
ebc4bd
 
ebc4bd
     // should be private, but not much point in making deep copies of it
ebc4bd
     oox::formulaimport::XmlStreamBuilder buffer;
ebc4bd
-- 
ebc4bd
2.1.0
ebc4bd