[ooo-build-commit] .: patches/dev300

Thorsten Behrens thorsten at kemper.freedesktop.org
Wed Feb 17 07:32:05 PST 2010


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

New commits:
commit 2ea3f12eeb055d71cc6d211c8b5ae0b0caecd8b0
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.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index e63c2a8..24f0713 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2401,6 +2401,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