[Libreoffice-commits] core.git: xmloff/source
Maxim Monastirsky
momonasmon at gmail.com
Tue May 20 23:01:07 PDT 2014
xmloff/source/style/XMLFontAutoStylePool.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit c354deac3c6174b0e725c9bb6aab10b65a95fa0d
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Tue May 20 17:53:25 2014 +0300
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
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index ff95ad6..4800c05 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -325,6 +325,10 @@ OUString XMLFontAutoStylePool::embedFontFile( const OUString& fileUrl )
osl::File file( fileUrl );
if( file.open( osl_File_OpenFlag_Read ) != osl::File::E_None )
return OUString();
+
+ if ( !GetExport().GetTargetStorage().is() )
+ return OUString();
+
uno::Reference< embed::XStorage > storage;
storage.set( GetExport().GetTargetStorage()->openStorageElement( OUString( "Fonts" ),
::embed::ElementModes::WRITE ), uno::UNO_QUERY_THROW );
More information about the Libreoffice-commits
mailing list