[PATCH libreoffice-4-0] fdo#60491: embeddedobj: catch exception in fallback path
Michael Stahl (via Code Review)
gerrit at gerrit.libreoffice.org
Mon Feb 11 03:18:01 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2096
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/96/2096/1
fdo#60491: embeddedobj: catch exception in fallback path
This allows the OLE object to at least be passed to the OS for
opening...
(cherry picked from commit 5a65ca67d9acefed399ed8706efa402c543bed87)
Change-Id: I97f93eb3a015d7771f3fc909517ffb96d61fde52
---
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 ccf8161..2cd399b 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -709,7 +709,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/2096
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97f93eb3a015d7771f3fc909517ffb96d61fde52
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Michael Stahl <mstahl at redhat.com>
More information about the LibreOffice
mailing list