summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorJianyuan Li <lijiany@apache.org>2012-09-11 08:00:21 +0000
committerNoel Power <noel.power@suse.com>2013-06-26 16:45:28 +0100
commitf38487511957971f9d08dd5c9af8f8128371540e (patch)
tree5416c6f70d5bcae9d11e0294e5ba4ddfd8937f2e /sd
parentbnc#823675 RTF import: fix import of numbering bullet associated font (diff)
downloadcore-f38487511957971f9d08dd5c9af8f8128371540e.tar.gz
core-f38487511957971f9d08dd5c9af8f8128371540e.zip
#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.cxx3
-rw-r--r--sd/source/filter/eppt/epptso.cxx4
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 );