diff options
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index a724dea9f236..1313fee8aa03 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1857,7 +1857,9 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, throw uno::RuntimeException(); // find the mediatype and extension - uno::Reference< container::XNameAccess > xTypeDetection = + uno::Reference< container::XNameAccess > xTypeDetection; + + xTypeDetection = mxType.is() ? uno::Reference< container::XNameAccess >( mxType, uno::UNO_QUERY_THROW ) : uno::Reference< container::XNameAccess >( |