diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objuno.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx index 194b8839153e..ef07c9ec4483 100644 --- a/sfx2/source/doc/objuno.cxx +++ b/sfx2/source/doc/objuno.cxx @@ -4,9 +4,9 @@ * * $RCSfile: objuno.cxx,v $ * - * $Revision: 1.25 $ + * $Revision: 1.26 $ * - * last change: $Author: ihi $ $Date: 2006-08-01 11:19:18 $ + * last change: $Author: ihi $ $Date: 2006-08-01 16:06:22 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1232,6 +1232,12 @@ void SAL_CALL SfxStandaloneDocumentInfoObject::loadFromURL(const ::rtl::OUStrin if ( !_pInfo ) _pInfo = new SfxDocumentInfo; + // set the mediatype from the storage + ::rtl::OUString aMediaType; + uno::Reference< beans::XPropertySet > xStorProps( xStorage, uno::UNO_QUERY_THROW ); + xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ) ) >>= aMediaType; + _pInfo->SetSpecialMimeType( aMediaType ); + // import from XML meta data using SAX parser uno::Reference< XInterface > xXMLParser = _xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" )) ); |