diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-12-18 11:47:48 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-12-18 17:12:54 +0100 |
commit | 5fd4d10da1370c46ac831e58eb4d138c9a02ab7d (patch) | |
tree | 576eb5a43e0373e2e652a3fd259176cb179bce3c | |
parent | 8a0f3020eda5ce23e272a095e52aca5a386cfddc (diff) |
Reduce indentation
Change-Id: I056016bac5d08a85f9664e31bcaee01c2dd9e6e0
Reviewed-on: https://gerrit.libreoffice.org/85391
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 19f36171f443..0f6c54e82e26 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1584,28 +1584,26 @@ ErrCode SwDocShell::LoadStylesFromFile( const OUString& rURL, } // --> OD #i117339# - trigger import only for own formats bool bImport( false ); + if ( aMed.IsStorage() ) { - if ( aMed.IsStorage() ) + // As <SfxMedium.GetFilter().IsOwnFormat() resp. IsOwnTemplateFormat() + // does not work correct (e.g., MS Word 2007 XML Template), + // use workaround provided by MAV. + uno::Reference< embed::XStorage > xStorage = aMed.GetStorage(); + if ( xStorage.is() ) { - // As <SfxMedium.GetFilter().IsOwnFormat() resp. IsOwnTemplateFormat() - // does not work correct (e.g., MS Word 2007 XML Template), - // use workaround provided by MAV. - uno::Reference< embed::XStorage > xStorage = aMed.GetStorage(); - if ( xStorage.is() ) + // use <try-catch> on retrieving <MediaType> in order to check, + // if the storage is one of our own ones. + try { - // use <try-catch> on retrieving <MediaType> in order to check, - // if the storage is one of our own ones. - try - { - uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY_THROW ); - const OUString aMediaTypePropName( "MediaType" ); - xProps->getPropertyValue( aMediaTypePropName ); - bImport = true; - } - catch (const uno::Exception&) - { - bImport = false; - } + uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY_THROW ); + const OUString aMediaTypePropName( "MediaType" ); + xProps->getPropertyValue( aMediaTypePropName ); + bImport = true; + } + catch (const uno::Exception&) + { + bImport = false; } } } |