diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-06 16:33:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-07 11:05:04 +0200 |
commit | dc47b2e5136f0f767273dc5fdba5c822575e194b (patch) | |
tree | 128ac4f7f3aca38d0928b76e529ae7fae021f7c3 /filter | |
parent | e14b7660f622a83fe97635649674ade05fe1eb72 (diff) |
Unwind SotStorageRef typedef
Change-Id: I8d5363bb2ad813ef29b4078848914f4b0989b9f1
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 18 | ||||
-rw-r--r-- | filter/source/msfilter/msoleexp.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 18 | ||||
-rw-r--r-- | filter/source/msfilter/svxmsbas2.cxx | 8 |
4 files changed, 24 insertions, 24 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index b3ebbccdfdff..f20527272130 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -6501,7 +6501,7 @@ void SvxMSDffManager::ProcessClientAnchor2( SvStream& /* rSt */, DffRecordHeader return; // will be overridden by SJ in Draw } -bool SvxMSDffManager::GetOLEStorageName( long /* nOLEId */, OUString&, SotStorageRef&, uno::Reference < embed::XStorage >& ) const +bool SvxMSDffManager::GetOLEStorageName( long /* nOLEId */, OUString&, tools::SvRef<SotStorage>&, uno::Reference < embed::XStorage >& ) const { return false; } @@ -6521,7 +6521,7 @@ SdrObject* SvxMSDffManager::ImportOLE( long nOLEId, { SdrObject* pRet = 0; OUString sStorageName; - SotStorageRef xSrcStg; + tools::SvRef<SotStorage> xSrcStg; ErrCode nError = ERRCODE_NONE; uno::Reference < embed::XStorage > xDstStg; if( GetOLEStorageName( nOLEId, sStorageName, xSrcStg, xDstStg )) @@ -6671,7 +6671,7 @@ static const ClsIDs aClsIDs[] = { bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen, - const GDIMetaFile * pMtf, const SotStorageRef& rDest ) + const GDIMetaFile * pMtf, const tools::SvRef<SotStorage>& rDest ) { bool bMtfRead = false; SotStorageStreamRef xOle10Stm = rDest->OpenSotStream( OUString("\1Ole10Native"), @@ -6921,7 +6921,7 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS else { SfxFilterMatcher aMatch( sStarName ); - SotStorageRef xStorage = new SotStorage( false, *xMemStream ); + tools::SvRef<SotStorage> xStorage = new SotStorage( false, *xMemStream ); rSrcStg.CopyTo( xStorage ); xStorage->Commit(); xStorage.Clear(); @@ -7030,7 +7030,7 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS // TODO/MBA: code review and testing! SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage( const OUString& rStorageName, - SotStorageRef& rSrcStorage, + tools::SvRef<SotStorage>& rSrcStorage, const uno::Reference < embed::XStorage >& xDestStorage, const Graphic& rGrf, const Rectangle& rBoundRect, @@ -7054,7 +7054,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage( aDstStgName += OUString::number( ++nMSOleObjCntr ); { - SotStorageRef xObjStg = rSrcStorage->OpenSotStorage( rStorageName, + tools::SvRef<SotStorage> xObjStg = rSrcStorage->OpenSotStorage( rStorageName, STREAM_READWRITE| StreamMode::SHARE_DENYALL ); if( xObjStg.Is() ) { @@ -7113,11 +7113,11 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage( if( bValidStorage ) { // object is not an own object - SotStorageRef xObjStor = SotStorage::OpenOLEStorage( xDestStorage, aDstStgName, STREAM_READWRITE ); + tools::SvRef<SotStorage> xObjStor = SotStorage::OpenOLEStorage( xDestStorage, aDstStgName, STREAM_READWRITE ); if ( xObjStor.Is() ) { - SotStorageRef xSrcStor = rSrcStorage->OpenSotStorage( rStorageName, StreamMode::READ ); + tools::SvRef<SotStorage> xSrcStor = rSrcStorage->OpenSotStorage( rStorageName, StreamMode::READ ); xSrcStor->CopyTo( xObjStor ); if( !xObjStor->GetError() ) @@ -7144,7 +7144,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage( else { // or is it an OLE-1 Stream in the DataStream? - SotStorageRef xObjStor = SotStorage::OpenOLEStorage( xDestStorage, aDstStgName ); + tools::SvRef<SotStorage> xObjStor = SotStorage::OpenOLEStorage( xDestStorage, aDstStgName ); //TODO/MBA: remove metafile conversion from ConvertToOle2 //when is this code used?! GDIMetaFile aMtf; diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx index 65f185b7d556..61fccc2dba7f 100644 --- a/filter/source/msfilter/msoleexp.cxx +++ b/filter/source/msfilter/msoleexp.cxx @@ -203,7 +203,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt } catch( const uno::Exception& ) {} // #TODO really handle exceptions - interactionalhandler etc. ? - SotStorageRef xOLEStor = new SotStorage( pStream, true ); + tools::SvRef<SotStorage> xOLEStor = new SotStorage( pStream, true ); xOLEStor->CopyTo( &rDestStg ); rDestStg.Commit(); } @@ -328,7 +328,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt catch ( const uno::Exception& ) {} - SotStorageRef xOLEStor = SotStorage::OpenOLEStorage( xStor, aTempName, STREAM_STD_READ ); + tools::SvRef<SotStorage> xOLEStor = SotStorage::OpenOLEStorage( xStor, aTempName, STREAM_STD_READ ); xOLEStor->CopyTo( &rDestStg ); rDestStg.Commit(); } diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index e36ff31c5076..ea1ba041472d 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1646,7 +1646,7 @@ SdrPowerPointImport::~SdrPowerPointImport() delete[] pPersistPtr; } -bool PPTConvertOCXControls::ReadOCXStream( SotStorageRef& rSrc, +bool PPTConvertOCXControls::ReadOCXStream( tools::SvRef<SotStorage>& rSrc, com::sun::star::uno::Reference< com::sun::star::drawing::XShape > *pShapeRef, bool bFloatingCtrl ) @@ -1833,7 +1833,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId, Storage* pObjStor = pDest ? new Storage( *pDest, true ) : NULL; if ( pObjStor ) { - SotStorageRef xObjStor( new SotStorage( pObjStor ) ); + tools::SvRef<SotStorage> xObjStor( new SotStorage( pObjStor ) ); if ( xObjStor.Is() && !xObjStor->GetError() ) { if ( xObjStor->GetClassName() == SvGlobalName() ) @@ -1884,7 +1884,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId, aNm = pOe->pShell->getEmbeddedObjectContainer().CreateUniqueObjectName(); // object is not an own object - SotStorageRef xTarget = SotStorage::OpenOLEStorage( pOe->pShell->GetStorage(), aNm, STREAM_READWRITE ); + tools::SvRef<SotStorage> xTarget = SotStorage::OpenOLEStorage( pOe->pShell->GetStorage(), aNm, STREAM_READWRITE ); if ( xObjStor.Is() && xTarget.Is() ) { xObjStor->CopyTo( xTarget ); @@ -1997,16 +1997,16 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt SvMemoryStream* pBas = ImportExOleObjStg( nPersistPtr, nOleId ); if ( pBas ) { - SotStorageRef xSource( new SotStorage( pBas, true ) ); - SotStorageRef xDest( new SotStorage( new SvMemoryStream(), true ) ); + tools::SvRef<SotStorage> xSource( new SotStorage( pBas, true ) ); + tools::SvRef<SotStorage> xDest( new SotStorage( new SvMemoryStream(), true ) ); if ( xSource.Is() && xDest.Is() ) { // is this a visual basic storage ? - SotStorageRef xSubStorage = xSource->OpenSotStorage( "VBA", + tools::SvRef<SotStorage> xSubStorage = xSource->OpenSotStorage( "VBA", STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL ); if( xSubStorage.Is() && ( SVSTREAM_OK == xSubStorage->GetError() ) ) { - SotStorageRef xMacros = xDest->OpenSotStorage( "MACROS" ); + tools::SvRef<SotStorage> xMacros = xDest->OpenSotStorage( "MACROS" ); if ( xMacros.Is() ) { SvStorageInfoList aList; @@ -2025,10 +2025,10 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt uno::Reference < embed::XStorage > xDoc( pShell->GetStorage() ); if ( xDoc.is() ) { - SotStorageRef xVBA = SotStorage::OpenOLEStorage( xDoc, SvxImportMSVBasic::GetMSBasicStorageName() ); + tools::SvRef<SotStorage> xVBA = SotStorage::OpenOLEStorage( xDoc, SvxImportMSVBasic::GetMSBasicStorageName() ); if ( xVBA.Is() && ( xVBA->GetError() == SVSTREAM_OK ) ) { - SotStorageRef xSubVBA = xVBA->OpenSotStorage( "_MS_VBA_Overhead" ); + tools::SvRef<SotStorage> xSubVBA = xVBA->OpenSotStorage( "_MS_VBA_Overhead" ); if ( xSubVBA.Is() && ( xSubVBA->GetError() == SVSTREAM_OK ) ) { SotStorageStreamRef xOriginal = xSubVBA->OpenSotStream( "_MS_VBA_Overhead2" ); diff --git a/filter/source/msfilter/svxmsbas2.cxx b/filter/source/msfilter/svxmsbas2.cxx index 313e76ff27d4..9e7740a61dba 100644 --- a/filter/source/msfilter/svxmsbas2.cxx +++ b/filter/source/msfilter/svxmsbas2.cxx @@ -32,7 +32,7 @@ sal_uLong SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto, sal_uLong nRet = ERRCODE_NONE; uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() ); OUString aDstStgName( GetMSBasicStorageName() ); - SotStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, + tools::SvRef<SotStorage> xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL ) ); if( xVBAStg.Is() && !xVBAStg->GetError() ) { @@ -44,8 +44,8 @@ sal_uLong SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto, if( pBasicMan && pBasicMan->IsBasicModified() ) nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE; #endif - SotStorageRef xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, STREAM_STD_READ ); - SotStorageRef xDst = xRoot->OpenSotStorage( rStorageName, STREAM_READWRITE | StreamMode::TRUNC ); + tools::SvRef<SotStorage> xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, STREAM_STD_READ ); + tools::SvRef<SotStorage> xDst = xRoot->OpenSotStorage( rStorageName, STREAM_READWRITE | StreamMode::TRUNC ); xSrc->CopyTo( xDst ); xDst->Commit(); ErrCode nError = xDst->GetError(); @@ -64,7 +64,7 @@ sal_uLong SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto, sal_uLong SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocSh) { uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() ); - SotStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(), + tools::SvRef<SotStorage> xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(), StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL )); return ( xVBAStg.Is() && !xVBAStg->GetError() ) ? ERRCODE_SVX_VBASIC_STORAGE_EXIST |