[PATCH libreoffice-3-6] fdo#60491: embeddedobj: catch exception in fallback path
Michael Stahl (via Code Review)
gerrit at gerrit.libreoffice.org
Mon Feb 11 03:44:50 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2097
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/97/2097/1
fdo#60491: embeddedobj: catch exception in fallback path
This allows the OLE object to at least be passed to the OS for
opening...
Change-Id: I97f93eb3a015d7771f3fc909517ffb96d61fde52
(cherry picked from commit 5a65ca67d9acefed399ed8706efa402c543bed87)
---
M embeddedobj/source/msole/oleembed.cxx
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index b44d789..5c5b063 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -716,7 +716,14 @@
aArgs ), uno::UNO_QUERY_THROW );
uno::Reference< io::XStream > xCONTENTS;
- xNameContainer->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CONTENTS"))) >>= xCONTENTS;
+ try
+ {
+ xNameContainer->getByName("CONTENTS") >>= xCONTENTS;
+ }
+ catch (container::NoSuchElementException const&)
+ {
+ // ignore
+ }
sal_Bool bCopied = xCONTENTS.is() && lcl_CopyStream(xCONTENTS->getInputStream(), xStream->getOutputStream());
--
To view, visit https://gerrit.libreoffice.org/2097
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97f93eb3a015d7771f3fc909517ffb96d61fde52
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Michael Stahl <mstahl at redhat.com>
More information about the LibreOffice
mailing list