From dc47b2e5136f0f767273dc5fdba5c822575e194b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 6 May 2015 16:33:19 +0200 Subject: Unwind SotStorageRef typedef Change-Id: I8d5363bb2ad813ef29b4078848914f4b0989b9f1 --- sd/source/filter/eppt/eppt.cxx | 16 ++++++++-------- sd/source/filter/eppt/eppt.hxx | 4 ++-- sd/source/filter/eppt/epptso.cxx | 2 +- sd/source/filter/ppt/pptin.cxx | 2 +- sd/source/filter/ppt/pptin.hxx | 2 +- sd/source/filter/sdpptwrp.cxx | 10 +++++----- sd/source/ui/unoidl/sddetect.cxx | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) (limited to 'sd/source') diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 091d46c2c116..f9980473940e 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -66,7 +66,7 @@ using ::com::sun::star::beans::XPropertySet; //============================ PPTWriter ================================== -PPTWriter::PPTWriter( SotStorageRef& rSvStorage, +PPTWriter::PPTWriter( tools::SvRef& rSvStorage, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rXModel, ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > & rXStatInd, SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags ) : @@ -1278,13 +1278,13 @@ void PPTWriter::ImplWriteOLE( ) ::uno::Reference < embed::XEmbeddedObject > xObj( static_cast(pSdrObj)->GetObjRef() ); if( xObj.is() ) { - SotStorageRef xTempStorage( new SotStorage( new SvMemoryStream(), true ) ); + tools::SvRef xTempStorage( new SotStorage( new SvMemoryStream(), true ) ); aOleExport.ExportOLEObject( xObj, *xTempStorage ); //TODO/MBA: testing OUString aPersistStream( SVEXT_PERSIST_STREAM ); SvMemoryStream aStream; - SotStorageRef xCleanStorage( new SotStorage( false, aStream ) ); + tools::SvRef xCleanStorage( new SotStorage( false, aStream ) ); xTempStorage->CopyTo( xCleanStorage ); // create a dummy content stream, the dummy content is necessary for ppt, but not for // doc files, so we can't share code. @@ -1311,7 +1311,7 @@ void PPTWriter::ImplWriteOLE( ) OUString aName; //Initialize the graphic size which will be used on export ::com::sun::star::awt::Size aSize( pPtr->xShape->getSize() ); - SotStorageRef xDest( new SotStorage( new SvMemoryStream(), true ) ); + tools::SvRef xDest( new SotStorage( new SvMemoryStream(), true ) ); bool bOk = oox::ole::MSConvertOCXControls::WriteOCXStream( mXModel, xDest, pPtr->xControlModel, aSize, aName ); if ( bOk ) pStrm = xDest->CreateMemoryStream(); @@ -1448,7 +1448,7 @@ bool PPTWriter::ImplWriteAtomEnding() // - exported function - -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL ExportPPT( const std::vector< com::sun::star::beans::PropertyValue >& rMediaData, SotStorageRef& rSvStorage, +extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL ExportPPT( const std::vector< com::sun::star::beans::PropertyValue >& rMediaData, tools::SvRef& rSvStorage, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rXModel, ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > & rXStatInd, SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags ) @@ -1462,14 +1462,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL ExportPPT( const std::vector< extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas ) { - SotStorageRef xDest( new SotStorage( new SvMemoryStream(), true ) ); + tools::SvRef xDest( new SotStorage( new SvMemoryStream(), true ) ); SvxImportMSVBasic aMSVBas( rDocShell, *xDest ); aMSVBas.SaveOrDelMSVBAStorage( true, OUString( "_MS_VBA_Overhead" ) ); - SotStorageRef xOverhead = xDest->OpenSotStorage( OUString( "_MS_VBA_Overhead") ); + tools::SvRef xOverhead = xDest->OpenSotStorage( OUString( "_MS_VBA_Overhead") ); if ( xOverhead.Is() && ( xOverhead->GetError() == SVSTREAM_OK ) ) { - SotStorageRef xOverhead2 = xOverhead->OpenSotStorage( OUString( "_MS_VBA_Overhead") ); + tools::SvRef xOverhead2 = xOverhead->OpenSotStorage( OUString( "_MS_VBA_Overhead") ); if ( xOverhead2.Is() && ( xOverhead2->GetError() == SVSTREAM_OK ) ) { SotStorageStreamRef xTemp = xOverhead2->OpenSotStream( OUString( "_MS_VBA_Overhead2") ); diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index 7fa831df39c0..0513dbaad0ea 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -177,7 +177,7 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider bool mbFontIndependentLineSpacing; sal_uInt32 mnTextSize; - SotStorageRef mrStg; + tools::SvRef mrStg; SvStream* mpCurUserStrm; SvStream* mpStrm; SvStream* mpPicStrm; @@ -274,7 +274,7 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider virtual void ImplWriteSlideMaster( sal_uInt32 nPageNum, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXBackgroundPropSet ) SAL_OVERRIDE; public: - PPTWriter( SotStorageRef& rSvStorage, + PPTWriter( tools::SvRef& rSvStorage, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel, ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > & rStatInd, SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags ); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 7e0ba731b1d8..567a8371ae35 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -2505,7 +2505,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ::com::sun::star::awt::Size aSize; OUString aControlName; - SotStorageRef xTemp( new SotStorage( new SvMemoryStream(), true ) ); + tools::SvRef xTemp( new SotStorage( new SvMemoryStream(), true ) ); if ( oox::ole::MSConvertOCXControls::WriteOCXStream( mXModel, xTemp, aXControlModel, aSize, aControlName ) ) { OUString aUserName( xTemp->GetUserName() ); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index f563563bd8be..d20b491f5778 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2664,7 +2664,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi } bool -ImplSdPPTImport::ReadFormControl( SotStorageRef& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const +ImplSdPPTImport::ReadFormControl( tools::SvRef& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const { uno::Reference< frame::XModel > xModel; if ( mpDoc->GetDocSh() ) diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index 4c90a682c7f3..0d3d8d2a21b4 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -78,7 +78,7 @@ public: virtual ~ImplSdPPTImport(); bool Import(); - virtual bool ReadFormControl( SotStorageRef& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const SAL_OVERRIDE; + virtual bool ReadFormControl( tools::SvRef& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const SAL_OVERRIDE; }; class SdPPTImport diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 85a2bf46d1f4..a783a8c1315f 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -39,7 +39,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::task; using namespace ::com::sun::star::frame; -typedef sal_Bool ( SAL_CALL *ExportPPTPointer )( const std::vector< com::sun::star::beans::PropertyValue >&, SotStorageRef&, +typedef sal_Bool ( SAL_CALL *ExportPPTPointer )( const std::vector< com::sun::star::beans::PropertyValue >&, tools::SvRef&, Reference< XModel > &, Reference< XStatusIndicator > &, SvMemoryStream*, sal_uInt32 nCnvrtFlags ); @@ -50,7 +50,7 @@ typedef sal_Bool ( SAL_CALL *SaveVBAPointer )( SfxObjectShell&, SvMemoryStream*& #ifdef DISABLE_DYNLOADING -extern "C" sal_Bool ExportPPT( const std::vector< com::sun::star::beans::PropertyValue >&, SotStorageRef&, +extern "C" sal_Bool ExportPPT( const std::vector< com::sun::star::beans::PropertyValue >&, tools::SvRef&, Reference< XModel > &, Reference< XStatusIndicator > &, SvMemoryStream*, sal_uInt32 nCnvrtFlags ); @@ -77,12 +77,12 @@ SdPPTFilter::~SdPPTFilter() bool SdPPTFilter::Import() { bool bRet = false; - SotStorageRef pStorage = new SotStorage( mrMedium.GetInStream(), false ); + tools::SvRef pStorage = new SotStorage( mrMedium.GetInStream(), false ); if( !pStorage->GetError() ) { /* check if there is a dualstorage, then the document is probably a PPT95 containing PPT97 */ - SotStorageRef xDualStorage; + tools::SvRef xDualStorage; OUString sDualStorage( "PP97_DUALSTORAGE" ); if ( pStorage->IsContained( sDualStorage ) ) { @@ -137,7 +137,7 @@ bool SdPPTFilter::Export() { if( mxModel.is() ) { - SotStorageRef xStorRef = new SotStorage( mrMedium.GetOutStream(), false ); + tools::SvRef xStorRef = new SotStorage( mrMedium.GetOutStream(), false ); #ifndef DISABLE_DYNLOADING ExportPPTPointer PPTExport = reinterpret_cast(pLibrary->getFunctionSymbol( "ExportPPT" )); #else diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index f2e2a714e896..52effdb3ed59 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -77,7 +77,7 @@ OUString SAL_CALL SdFilterDetect::detect( Sequence< beans::PropertyValue >& lDes try { - SotStorageRef aStorage = new SotStorage( pInStrm, false ); + tools::SvRef aStorage = new SotStorage( pInStrm, false ); if ( !aStorage->GetError() && aStorage->IsStream( "PowerPoint Document" ) ) return aTypeName; } -- cgit