diff options
-rw-r--r-- | include/oox/ole/olehelper.hxx | 21 | ||||
-rw-r--r-- | oox/source/ole/olehelper.cxx | 98 |
2 files changed, 0 insertions, 119 deletions
diff --git a/include/oox/ole/olehelper.hxx b/include/oox/ole/olehelper.hxx index 5b25c1df7e6e..e7ff93fc6609 100644 --- a/include/oox/ole/olehelper.hxx +++ b/include/oox/ole/olehelper.hxx @@ -154,12 +154,6 @@ private: // implementation into the sd module itself. class OOX_DLLPUBLIC MSConvertOCXControls : public SvxMSConvertOCXControls { -#ifdef SvxMSConvertOCXControlsRemoved - com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxShapes; - com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > mxDrawPage; - com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer > mxFormComps; - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > mxServiceFactory; -#endif protected: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxCtx; ::oox::GraphicHelper maGrfHelper; @@ -179,21 +173,6 @@ public: sal_Int32 nPos, sal_Int32 nSize ); static sal_Bool WriteOCXStream( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, SotStorageRef &rSrc1, const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > &rControlModel, const com::sun::star::awt::Size& rSize,OUString &rName); static sal_Bool WriteOCXExcelKludgeStream( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutStrm, const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > &rControlModel, const com::sun::star::awt::Size& rSize,OUString &rName); - -#ifdef SvxMSConvertOCXControlsRemoved - const com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > & GetShapes(); - const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer > & GetFormComps(); - virtual const com::sun::star::uno::Reference< - com::sun::star::drawing::XDrawPage > & GetDrawPage(); - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & GetServiceFactory(); - virtual sal_Bool InsertControl( - const com::sun::star::uno::Reference< - com::sun::star::form::XFormComponent >& /*rFComp*/, - const com::sun::star::awt::Size& /*rSize*/, - com::sun::star::uno::Reference< - com::sun::star::drawing::XShape >* /*pShape*/, - sal_Bool /*bFloatingCtrl*/ ) {return sal_False;} -#endif }; diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index 2d1bdd5a71e8..24d6e430229d 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -621,104 +621,6 @@ sal_Bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxMode return sal_True; } -#ifdef SvxMSConvertOCXControlsRemoved -const Reference< com::sun::star::lang::XMultiServiceFactory > & MSConvertOCXControls::GetServiceFactory() -{ - if ( !mxServiceFactory.is() && mxModel.is() ) - mxServiceFactory.set( mxModel, UNO_QUERY ); - return mxServiceFactory; -} - -const Reference< XIndexContainer >& - MSConvertOCXControls::GetFormComps() -{ - if( !mxFormComps.is() ) - { - GetDrawPage(); - if( mxDrawPage.is() ) - { - Reference< XFormsSupplier > xFormsSupplier( mxDrawPage, - UNO_QUERY ); - OSL_ENSURE( xFormsSupplier.is(), - "not able to get XFormsSupplier from XDrawPage" ); - - Reference< XNameContainer > xNameCont = - xFormsSupplier->getForms(); - - OUString sStdName = "WW-Standard"; - OUString sName( sStdName ); - sal_uInt16 n = 0; - - while( xNameCont->hasByName( sName ) ) - { - sName = sStdName; - sName += OUString::number(++n); - } - - const Reference< XMultiServiceFactory > &rServiceFactory - = GetServiceFactory(); - if( !rServiceFactory.is() ) - return mxFormComps; - - Reference< XInterface > xCreate = - rServiceFactory->createInstance("com.sun.star.form.component.Form"); - if( xCreate.is() ) - { - Reference< XPropertySet > xFormPropSet( xCreate, - UNO_QUERY ); - - Any aTmp(&sName,getCppuType((OUString *)0)); - xFormPropSet->setPropertyValue( "Name", aTmp ); - - Reference< XForm > xForm( xCreate, UNO_QUERY ); - OSL_ENSURE(xForm.is(), "No Form?"); - - Reference< XIndexContainer > xForms( xNameCont, - UNO_QUERY ); - OSL_ENSURE( xForms.is(), "XForms not available" ); - - aTmp.setValue( &xForm, - ::getCppuType((Reference < XForm >*)0)); - xForms->insertByIndex( xForms->getCount(), aTmp ); - - mxFormComps = Reference< XIndexContainer > - (xCreate, UNO_QUERY); - } - } - } - - return mxFormComps; -} -const Reference< XDrawPage >& MSConvertOCXControls::GetDrawPage() -{ - if( !mxDrawPage.is() && mxModel.is() ) - { - Reference< XDrawPageSupplier > xTxtDoc(mxModel, UNO_QUERY); - OSL_ENSURE( xTxtDoc.is(),"no XDrawPageSupplier from XModel"); - mxDrawPage = xTxtDoc->getDrawPage(); - OSL_ENSURE( mxDrawPage.is(), "no XDrawPage" ); - } - return mxDrawPage; -} - -const Reference< XShapes >& MSConvertOCXControls::GetShapes() -{ - if( !mxShapes.is() ) - { - GetDrawPage(); - if( mxDrawPage.is() ) - { - - mxShapes = Reference< XShapes >(mxDrawPage, - UNO_QUERY); - OSL_ENSURE( mxShapes.is(), "no XShapes from XDrawPage" ); - } - } - return mxShapes; -} -#endif - - } // namespace ole } // namespace oox |