Kaydet (Commit) c354deac authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

fdo#78921 Don't crash when there is no storage specified

Not sure it's a good idea to get here at all
when exporting as flat xml, but anyway it
shouldn't crash.

Change-Id: Ib2ce6b044b4395222a394312d49f5a01d157f9f3
üst 005fae2b
...@@ -325,6 +325,10 @@ OUString XMLFontAutoStylePool::embedFontFile( const OUString& fileUrl ) ...@@ -325,6 +325,10 @@ OUString XMLFontAutoStylePool::embedFontFile( const OUString& fileUrl )
osl::File file( fileUrl ); osl::File file( fileUrl );
if( file.open( osl_File_OpenFlag_Read ) != osl::File::E_None ) if( file.open( osl_File_OpenFlag_Read ) != osl::File::E_None )
return OUString(); return OUString();
if ( !GetExport().GetTargetStorage().is() )
return OUString();
uno::Reference< embed::XStorage > storage; uno::Reference< embed::XStorage > storage;
storage.set( GetExport().GetTargetStorage()->openStorageElement( OUString( "Fonts" ), storage.set( GetExport().GetTargetStorage()->openStorageElement( OUString( "Fonts" ),
::embed::ElementModes::WRITE ), uno::UNO_QUERY_THROW ); ::embed::ElementModes::WRITE ), uno::UNO_QUERY_THROW );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment