[Libreoffice-commits] .: vcl/source
Michael Meeks
mmeeks at kemper.freedesktop.org
Thu Feb 10 09:36:57 PST 2011
vcl/source/gdi/gdimtf.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 29e6053738f10979a9a282d4c14de1af0e5538ab
Author: Michael Meeks <michael.meeks at novell.com>
Date: Thu Feb 10 17:34:10 2011 +0000
catch exceptions from failing UNO-ness, fdo#33785 backstop.
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index faf0d02..41e1227 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -514,7 +514,10 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S
if (!win)
win = Application::GetFirstTopLevelWindow();
- if (win) {
+ if (!win)
+ return false;
+
+ try {
const uno::Reference<rendering::XCanvas>& xCanvas = win->GetCanvas ();
Size aSize (rDestSize.Width () + 1, rDestSize.Height () + 1);
const uno::Reference<rendering::XBitmap>& xBitmap = xCanvas->getDevice ()->createCompatibleAlphaBitmap (vcl::unotools::integerSize2DFromSize( aSize));
@@ -568,6 +571,10 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S
}
}
}
+ } catch( uno::RuntimeException& ) {
+ throw; // runtime errors are fatal
+ } catch( uno::Exception& ) {
+ // ignore errors, no way of reporting them here
}
return false;
More information about the Libreoffice-commits
mailing list