summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2013-02-22 18:15:22 +0100
committerRadek Doulik <rodo@novell.com>2013-02-22 18:15:55 +0100
commiteb451cbc1aa2f96b1a913d85823ef27275ad367b (patch)
treec69310b3a8d08718b4ef4f7f3f0d4c0f42dca9f0
parent046ad9ffad7b4647fcc66291dec73bbb67a7fe85 (diff)
set document settings / embed fonts when importing odp
Change-Id: Ib7160c3b00399e704cd02a41735b0ff4f13d8554
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx11
-rw-r--r--xmloff/source/draw/sdxmlimp_impl.hxx1
2 files changed, 12 insertions, 0 deletions
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 6797c739f4ea..3c86883d7785 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -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: */
diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx
index dbede52ec884..43ba353e17b3 100644
--- a/xmloff/source/draw/sdxmlimp_impl.hxx
+++ b/xmloff/source/draw/sdxmlimp_impl.hxx
@@ -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