summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-03-22 14:23:43 +0100
committerMichael Stahl <mstahl@redhat.com>2013-03-22 15:25:23 +0100
commitcc85e44cfa7ce7ae49944535418c5735c560f0ad (patch)
tree67d27972d336fb7e3d43f07d0712374b7d659f53 /xmloff
parente8a526e1f5626673a572d53dc1c8db6d8aadba13 (diff)
SdXMLExport::CreateFontAutoStylePool: "EmbedFonts": ignore exceptions
(regression from f0cd6fe9075cd0aa00162474784ad804a07ed138) Change-Id: Ia86c0d168e9dd24555e7431666c0d783daef3b6a
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index e2337d5029b7..78563fb77cd7 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2912,15 +2912,22 @@ OUString SAL_CALL SdXMLExport::getImplementationName() throw( uno::RuntimeExcept
XMLFontAutoStylePool* SdXMLExport::CreateFontAutoStylePool()
{
bool bEmbedFonts = false;
- if( getExportFlags() & EXPORT_CONTENT ) {
+ if (getExportFlags() & EXPORT_CONTENT)
+ {
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())
{
- Reference< beans::XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), UNO_QUERY );
- if( xProps.is() )
+ try // clipboard document doesn't have shell so throws here
+ {
xProps->getPropertyValue("EmbedFonts") >>= bEmbedFonts;
-
+ }
+ catch (uno::Exception const&) { }
}
+ }
}
XMLFontAutoStylePool *pPool = new XMLFontAutoStylePool( *this, bEmbedFonts );