[ooo-build-commit] .: Branch 'ooo-build-3-2' - patches/dev300

Thorsten Behrens thorsten at kemper.freedesktop.org
Wed Feb 17 07:33:13 PST 2010


 patches/dev300/apply                  |    3 ++
 patches/dev300/svg-import-eh-fix.diff |   40 ++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

New commits:
commit 23a9fd16aa9b96b5a8cffe90c46d737119771086
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Wed Feb 17 16:28:40 2010 +0100

    Fix exception handling in svg import
    
    * patches/dev300/apply: added below patch
    * patches/dev300/svg-import-eh-fix.diff: catch exceptions in
      GraphicImport method, this is old code calling and exception-
      unaware. Kudos to Caolan for the fix.
    (cherry picked from commit 2ea3f12eeb055d71cc6d211c8b5ae0b0caecd8b0)

diff --git a/patches/dev300/apply b/patches/dev300/apply
index e5c6363..c165e4e 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2399,6 +2399,9 @@ svg-import-opacity-fix.diff, thorsten
 # guard against empty gradient stops
 svg-import-empty-gradient-fix.diff, n#560255, thorsten
 
+# eat exceptions before they reach unaware code
+svg-import-eh-fix.diff, cmc
+
 [ NovellLikeOnlyWin32 ]
 novell-win32-msi-patchability.diff, tml
 
diff --git a/patches/dev300/svg-import-eh-fix.diff b/patches/dev300/svg-import-eh-fix.diff
new file mode 100644
index 0000000..95c915d
--- /dev/null
+++ b/patches/dev300/svg-import-eh-fix.diff
@@ -0,0 +1,40 @@
+diff -ru filter.orig/source/svg/svgfilter.cxx filter/source/svg/svgfilter.cxx
+--- filter.orig/source/svg/svgfilter.cxx	2010-02-16 20:20:25.000000000 +0000
++++ filter/source/svg/svgfilter.cxx	2010-02-17 14:58:24.000000000 +0000
+@@ -211,7 +211,14 @@
+ class FilterConfigItem;
+ extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL )
+ {
+-	return importSvg( rStream, rGraphic );
++    BOOL bRet = FALSE;
++    try
++    {
++        bRet = importSvg( rStream, rGraphic );
++    }
++    catch (const uno::Exception&) {
++    }
++    return bRet;
+ }
+ 
+ // -----------------------------------------------------------------------------
+diff -ru filter.orig/source/svg/svgreader.cxx filter/source/svg/svgreader.cxx
+--- filter.orig/source/svg/svgreader.cxx	2010-02-16 20:20:25.000000000 +0000
++++ filter/source/svg/svgreader.cxx	2010-02-17 14:50:39.000000000 +0000
+@@ -1796,7 +1796,7 @@
+ {
+ 	uno::Reference<xml::dom::XDocumentBuilder> xDomBuilder( 
+         m_xServiceFactory->createInstance( 
+-            rtl::OUString::createFromAscii("com.sun.star.xml.dom.DocumentBuilder")), uno::UNO_QUERY );
++            rtl::OUString::createFromAscii("com.sun.star.xml.dom.DocumentBuilder")), uno::UNO_QUERY_THROW );
+ 
+     uno::Reference<xml::dom::XDocument> xDom(
+         xDomBuilder->parse(m_xInputStream),
+@@ -2702,7 +2702,7 @@
+ 	uno::Reference<xml::dom::XDocumentBuilder> xDomBuilder( 
+         xServiceFactory->createInstance( 
+             rtl::OUString::createFromAscii("com.sun.star.xml.dom.DocumentBuilder")), 
+-        uno::UNO_QUERY );
++        uno::UNO_QUERY_THROW );
+ 
+     uno::Reference<io::XInputStream> xStream(
+         new utl::OInputStreamWrapper(rStream) );


More information about the ooo-build-commit mailing list