summaryrefslogtreecommitdiff
path: root/sd/source/filter
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2011-09-23 17:31:46 +0100
committerNoel Power <noel.power@novell.com>2011-09-26 12:06:04 +0100
commit5609c512cd4d2899300b432d88d93cff05a05c87 (patch)
tree9d312ec779374bdc17934926fd612a09b06081c4 /sd/source/filter
parentf8f54cbb5d6a34ea74c4e92a3bdb8e34b7b101d6 (diff)
move OCX_Control ( and subclasses ) and OCX control export to oox
Diffstat (limited to 'sd/source/filter')
-rw-r--r--sd/source/filter/eppt/eppt.cxx5
-rw-r--r--sd/source/filter/eppt/eppt.hxx1
-rw-r--r--sd/source/filter/eppt/epptso.cxx17
-rw-r--r--sd/source/filter/ppt/pptin.cxx13
-rw-r--r--sd/source/filter/ppt/pptin.hxx4
5 files changed, 23 insertions, 17 deletions
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index b996d205cf1d..832e7b0b7c1c 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -64,6 +64,7 @@
#include <editeng/flditem.hxx>
#include <sfx2/docinf.hxx>
#include <oox/export/utils.hxx>
+#include <oox/ole/olehelper.hxx>
using namespace com::sun::star;
using namespace ::com::sun::star::uno;
@@ -1332,10 +1333,10 @@ void PPTWriter::ImplWriteOLE( )
{
if ( pPtr->xControlModel.is() )
{
- String aName;
+ rtl::OUString aName;
::com::sun::star::awt::Size aSize;
SvStorageRef xDest( new SvStorage( new SvMemoryStream(), sal_True ) );
- sal_Bool bOk = SvxMSConvertOCXControls::WriteOCXStream( xDest, pPtr->xControlModel, aSize, aName );
+ sal_Bool bOk = oox::ole::MSConvertOCXControls::WriteOCXStream( mXModel, xDest, pPtr->xControlModel, aSize, aName );
if ( bOk )
pStrm = xDest->CreateMemoryStream();
}
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index a3284bd9f810..5695aa595e45 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -83,7 +83,6 @@
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/style/TabStop.hpp>
-#include <filter/msfilter/msocximex.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 62967ac171e1..10932acc9fa5 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -89,7 +89,7 @@
#include <com/sun/star/table/XMergeableCell.hpp>
#include <com/sun/star/table/BorderLine.hpp>
#include <set>
-
+#include <oox/ole/olehelper.hxx>
#include "i18npool/mslangid.hxx"
using namespace ::com::sun::star;
@@ -2564,9 +2564,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
<< (sal_uInt32)0x0012de00;
::com::sun::star::awt::Size aSize;
- String aControlName;
+ rtl::OUString aControlName;
SvStorageRef xTemp( new SvStorage( new SvMemoryStream(), sal_True ) );
- if ( SvxMSConvertOCXControls::WriteOCXStream( xTemp, aXControlModel, aSize, aControlName ) )
+ if ( oox::ole::MSConvertOCXControls::WriteOCXStream( mXModel, xTemp, aXControlModel, aSize, aControlName ) )
{
String aUserName( xTemp->GetUserName() );
String aOleIdentifier;
@@ -2602,7 +2602,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
}
}
- if ( aControlName.Len() )
+
+ if ( aControlName.getLength() )
PPTWriter::WriteCString( *mpExEmbed, aControlName, 1 );
if ( aOleIdentifier.Len() )
PPTWriter::WriteCString( *mpExEmbed, aOleIdentifier, 2 );
@@ -2623,15 +2624,15 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
aPropOpt.AddOpt( ESCHER_Prop_pictureId, mnExEmbed );
aPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0x10000 );
- if ( aControlName.Len() )
+ if ( aControlName.getLength() )
{
sal_uInt16 i, nBufSize;
- nBufSize = ( aControlName.Len() + 1 ) << 1;
+ nBufSize = ( aControlName.getLength() + 1 ) << 1;
sal_uInt8* pBuf = new sal_uInt8[ nBufSize ];
sal_uInt8* pTmp = pBuf;
- for ( i = 0; i < aControlName.Len(); i++ )
+ for ( i = 0; i < aControlName.getLength(); i++ )
{
- sal_Unicode nUnicode = aControlName.GetChar( i );
+ sal_Unicode nUnicode = *(aControlName.getStr() + i);
*pTmp++ = (sal_uInt8)nUnicode;
*pTmp++ = (sal_uInt8)( nUnicode >> 8 );
}
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 0f4c8824758f..2620f2026c36 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -103,6 +103,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/string.hxx>
+#include <oox/ole/olehelper.hxx>
using namespace ::com::sun::star;
@@ -2707,10 +2708,16 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
bool
-ImplSdPPTImport::ReadFormControl( uno::Reference< io::XInputStream >& xIs, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const
+ImplSdPPTImport::ReadFormControl( SotStorageRef& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const
{
- ::oox::ole::OleFormCtrlImportHelper maFormCtrlHelper( xIs, lcl_getUnoCtx(), mpDoc->GetDocSh()->GetModel() );
- return maFormCtrlHelper.importFormControlFromObjStorage( rFormComp );
+ uno::Reference< frame::XModel > xModel;
+ if ( mpDoc->GetDocSh() )
+ {
+ xModel = mpDoc->GetDocSh()->GetModel();
+ oox::ole::MSConvertOCXControls mCtrlImporter( xModel );
+ return mCtrlImporter.ReadOCXStorage( rSrc1, rFormComp );
+ }
+ return false;
}
// ---------------------
diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx
index babc2a3ae538..39bd87405601 100644
--- a/sd/source/filter/ppt/pptin.hxx
+++ b/sd/source/filter/ppt/pptin.hxx
@@ -36,7 +36,6 @@
#include <filter/msfilter/msfiltertracer.hxx>
#include <com/sun/star/uno/Any.h>
#include <boost/shared_ptr.hpp>
-#include <oox/ole/olehelper.hxx>
class SdDrawDocument;
class SfxMedium;
@@ -71,7 +70,6 @@ class ImplSdPPTImport : public SdrPowerPointImport
SdrLayerID mnBackgroundObjectsLayerID;
tAnimationMap maAnimations;
-// ::oox::ole::OleFormCtrlImportHelper maFormCtrlHelper;
void SetHeaderFooterPageSettings( SdPage* pPage, const PptSlidePersistEntry* pMasterPersist );
void ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimationsUsed );
@@ -90,7 +88,7 @@ public:
~ImplSdPPTImport();
sal_Bool Import();
- virtual bool ReadFormControl( com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& xIs, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const;
+ virtual bool ReadFormControl( SotStorageRef& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const;
};
class SdPPTImport