set document settings / embed fonts when importing odp

Change-Id: Ib7160c3b00399e704cd02a41735b0ff4f13d8554
This commit is contained in:
Radek Doulik 2013-02-22 18:15:22 +01:00
parent 046ad9ffad
commit eb451cbc1a
2 changed files with 12 additions and 0 deletions

View file

@ -1068,4 +1068,15 @@ void SdXMLImport::AddDateTimeDecl( const ::rtl::OUString& rName, const ::rtl::OU
return aDecl.maStrText;
}
void SdXMLImport::NotifyEmbeddedFontRead()
{
uno::Reference< lang::XMultiServiceFactory > xFac( GetModel(), uno::UNO_QUERY );
if( xFac.is() )
{
uno::Reference< beans::XPropertySet > xProps( xFac->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.Settings" ) ) ), uno::UNO_QUERY );
if( xProps.is() )
xProps->setPropertyValue("EmbedFonts", uno::makeAny( true ) );
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -310,6 +310,7 @@ public:
::rtl::OUString GetFooterDecl( const ::rtl::OUString& rName ) const;
::rtl::OUString GetDateTimeDecl( const ::rtl::OUString& rName, sal_Bool& rbFixed, ::rtl::OUString& rDateTimeFormat );
virtual void NotifyEmbeddedFontRead() SAL_OVERRIDE;
};
#endif // _SDXMLIMP_HXX