summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-06-23 20:46:07 +0100
committerDavid Tardon <dtardon@redhat.com>2013-06-24 12:57:45 +0000
commit411bd0b8a7184720c2bcbcf468c98fd7158481b3 (patch)
tree92380de5c08907fbd3b85ae993e37ce75ca9b14a /xmloff
parenta078353850bc6934a46ad8e0249fbadf35dfe0b2 (diff)
Resolves: rhbz#976304 gallery elements may not support document.Settings
so the createInstance throws, so the element doesn't get inserted into the documents. regression since f0cd6fe9075cd0aa00162474784ad804a07ed138 Change-Id: Ie6cef7a4f0d5ac8a34d41139c3439fc04e9c7f20 (cherry picked from commit fd240ba81b317a54fc4512aaec33650cd7a30e29) Reviewed-on: https://gerrit.libreoffice.org/4466 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 6e86da36ed2f..c9149b9ae87a 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2915,15 +2915,16 @@ XMLFontAutoStylePool* SdXMLExport::CreateFontAutoStylePool()
Reference< lang::XMultiServiceFactory > xFac( GetModel(), UNO_QUERY );
if( xFac.is() )
{
- Reference<beans::XPropertySet> const xProps( xFac->createInstance(
- "com.sun.star.document.Settings"), UNO_QUERY );
- if (xProps.is())
+ try
{
- try // clipboard document doesn't have shell so throws here
- {
- xProps->getPropertyValue("EmbedFonts") >>= bEmbedFonts;
- }
- catch (uno::Exception const&) { }
+ Reference<beans::XPropertySet> const xProps( xFac->createInstance(
+ "com.sun.star.document.Settings"), UNO_QUERY_THROW );
+ xProps->getPropertyValue("EmbedFonts") >>= bEmbedFonts;
+ }
+ catch (...)
+ {
+ // clipboard document doesn't have shell so throws from getPropertyValue
+ // gallery elements may not support com.sun.star.document.Settings so throws from createInstance
}
}
}