diff options
author | Jianyuan Li <lijiany@apache.org> | 2012-09-11 08:00:21 +0000 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-06-26 16:45:28 +0100 |
commit | f38487511957971f9d08dd5c9af8f8128371540e (patch) | |
tree | 5416c6f70d5bcae9d11e0294e5ba4ddfd8937f2e /filter | |
parent | 55162d7422a3b175c7fe9c175e0dec91b1932b6a (diff) |
#119467# Form controls cannot be saved into .ppt file in AOO3.4
Reported by: Du Jing
Patch by: Jianyuan Li
Review by: sunying
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 369625148fb2..bd6b0e40ba82 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -18,6 +18,7 @@ */ #include "eschesdo.hxx" +#include <svx/svdxcgv.hxx> #include <svx/svdomedia.hxx> #include <svx/xflftrit.hxx> #include <filter/msfilter/escherex.hxx> @@ -3812,6 +3813,37 @@ MSO_SPT EscherPropertyContainer::GetCustomShapeType( const uno::Reference< drawi return GetCustomShapeType( rXShape, nMirrorFlags, aShapeType ); } +//Implement for form control export +sal_Bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape) +{ + SdrObject* pShape = GetSdrObjectFromXShape( rXShape ); + if ( pShape ) + { + SdrModel* pMod = pShape->GetModel(); + Graphic aGraphic(SdrExchangeView::GetObjGraphic( pMod, pShape)); + + GraphicObject aGraphicObject = aGraphic; + OString aUniqueId = aGraphicObject.GetUniqueID(); + if ( aUniqueId.getLength() ) + { + if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect ) + { + Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); + + sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect, NULL ); + if ( nBlibId ) + { + AddOpt( ESCHER_Prop_pib, nBlibId, sal_True ); + ImplCreateGraphicAttributes( rXPropSet, nBlibId, sal_False ); + return sal_True; + } + } + } + } + + return sal_False; +} + EscherPersistTable::EscherPersistTable() { } |