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 /sd | |
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 'sd')
-rw-r--r-- | sd/source/filter/eppt/eppt.cxx | 3 | ||||
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 861d06abbf0f..d7eeb5d62fb3 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -1325,7 +1325,8 @@ void PPTWriter::ImplWriteOLE( ) if ( pPtr->xControlModel.is() ) { OUString aName; - ::com::sun::star::awt::Size aSize; + //Initialize the graphic size which will be used on export + ::com::sun::star::awt::Size aSize( pPtr->xShape->getSize() ); SvStorageRef xDest( new SvStorage( new SvMemoryStream(), sal_True ) ); sal_Bool bOk = oox::ole::MSConvertOCXControls::WriteOCXStream( mXModel, xDest, pPtr->xControlModel, aSize, aName ); if ( bOk ) diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index fa1a46b017a7..3d45f89b109b 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -2573,6 +2573,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a << nPageId; PPTExOleObjEntry* pEntry = new PPTExOleObjEntry( OCX_CONTROL, mpExEmbed->Tell() ); pEntry->xControlModel = aXControlModel; + pEntry->xShape = mXShape; maExOleObj.push_back( pEntry ); mnExEmbed++; @@ -2644,6 +2645,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ImplCreateShape( ESCHER_ShpInst_HostControl, nSpFlags, aSolverContainer ); if ( aPropOpt.CreateGraphicProperties( mXPropSet, OUString( "MetaFile" ), sal_False ) ) aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 ); + //export form control graphic + else if ( aPropOpt.CreateBlipPropertiesforOLEControl(mXPropSet,mXShape)) + aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 ); aPropOpt.AddOpt( ESCHER_Prop_pictureId, mnExEmbed ); aPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0x10000 ); |