summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-06 16:33:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-07 11:05:04 +0200
commitdc47b2e5136f0f767273dc5fdba5c822575e194b (patch)
tree128ac4f7f3aca38d0928b76e529ae7fae021f7c3
parente14b7660f622a83fe97635649674ade05fe1eb72 (diff)
Unwind SotStorageRef typedef
Change-Id: I8d5363bb2ad813ef29b4078848914f4b0989b9f1
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx2
-rw-r--r--basic/source/basmgr/basmgr.cxx14
-rw-r--r--basic/source/uno/scriptcont.cxx2
-rw-r--r--editeng/source/misc/svxacorr.cxx30
-rw-r--r--filter/source/msfilter/msdffimp.cxx18
-rw-r--r--filter/source/msfilter/msoleexp.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx18
-rw-r--r--filter/source/msfilter/svxmsbas2.cxx8
-rw-r--r--include/editeng/svxacorr.hxx4
-rw-r--r--include/filter/msfilter/msdffimp.hxx6
-rw-r--r--include/filter/msfilter/svdfppt.hxx4
-rw-r--r--include/filter/msfilter/svxmsbas.hxx2
-rw-r--r--include/oox/ole/olehelper.hxx4
-rw-r--r--include/sot/storage.hxx5
-rw-r--r--include/svx/galtheme.hxx4
-rw-r--r--oox/source/export/ooxml-export-notes.txt2
-rw-r--r--oox/source/ole/olehelper.cxx4
-rw-r--r--sc/source/filter/excel/excel.cxx4
-rw-r--r--sc/source/filter/excel/excimp8.cxx4
-rw-r--r--sc/source/filter/excel/expop2.cxx2
-rw-r--r--sc/source/filter/excel/xepivot.cxx2
-rw-r--r--sc/source/filter/excel/xeroot.cxx2
-rw-r--r--sc/source/filter/excel/xestream.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx2
-rw-r--r--sc/source/filter/excel/xiroot.cxx2
-rw-r--r--sc/source/filter/excel/xlroot.cxx10
-rw-r--r--sc/source/filter/ftools/ftools.cxx12
-rw-r--r--sc/source/filter/inc/ftools.hxx8
-rw-r--r--sc/source/filter/inc/xeroot.hxx2
-rw-r--r--sc/source/filter/inc/xiroot.hxx2
-rw-r--r--sc/source/filter/inc/xlroot.hxx12
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx2
-rw-r--r--sc/source/ui/unoobj/exceldetect.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sd/inc/sdmod.hxx2
-rw-r--r--sd/source/filter/eppt/eppt.cxx16
-rw-r--r--sd/source/filter/eppt/eppt.hxx4
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sd/source/filter/ppt/pptin.cxx2
-rw-r--r--sd/source/filter/ppt/pptin.hxx2
-rw-r--r--sd/source/filter/sdpptwrp.cxx10
-rw-r--r--sd/source/ui/unoidl/sddetect.cxx2
-rw-r--r--sfx2/source/appl/xpackcreator.cxx4
-rw-r--r--sot/qa/cppunit/test_sot.cxx14
-rw-r--r--sot/source/sdstor/storage.cxx2
-rw-r--r--sot/workben/testsot.cxx8
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/mathtype.cxx2
-rw-r--r--starmath/source/smdetect.cxx2
-rw-r--r--starmath/source/unofilter.cxx2
-rw-r--r--svtools/source/misc/imagemgr.cxx2
-rw-r--r--svx/source/gallery2/galtheme.cxx10
-rw-r--r--svx/workben/msview/msview.cxx2
-rw-r--r--sw/inc/shellio.hxx12
-rw-r--r--sw/source/core/undo/unins.cxx2
-rw-r--r--sw/source/filter/basflt/iodetect.cxx2
-rw-r--r--sw/source/filter/writer/writer.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx6
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx6
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx12
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par.hxx6
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx12
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx6
-rw-r--r--sw/source/filter/xml/xmlimp.hxx2
-rw-r--r--sw/source/ui/uno/swdetect.cxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx4
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx6
70 files changed, 190 insertions, 195 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 9da674b4c603..fce1ee00030d 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -427,7 +427,7 @@ namespace basic
OUString aAppBasicDir = SvtPathOptions().GetBasicPath();
// Storage and BaseURL are only needed by binary documents!
- SotStorageRef xDummyStor = new SotStorage( OUString() );
+ tools::SvRef<SotStorage> xDummyStor = new SotStorage( OUString() );
_out_rpBasicManager = new BasicManager( *xDummyStor, OUString() /* TODO/LATER: xStorage */,
pAppBasic,
&aAppBasicDir, true );
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index a01d2e09f3d6..bd8c61c81783 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -550,7 +550,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
mpImpl->mpManagerStream = new SvMemoryStream();
static_cast<SvStream*>(&xManagerStream)->ReadStream( *mpImpl->mpManagerStream );
- SotStorageRef xBasicStorage = rStorage.OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, false );
+ tools::SvRef<SotStorage> xBasicStorage = rStorage.OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, false );
if( xBasicStorage.Is() && !xBasicStorage->GetError() )
{
sal_uInt16 nLibs = GetLibCount();
@@ -877,7 +877,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
aLibRelStorage = aLibRelStorage.smartRel2Abs( aLibRelStorageName, bWasAbsolute);
DBG_ASSERT(!bWasAbsolute, "RelStorageName was absolute!" );
- SotStorageRef xStorageRef;
+ tools::SvRef<SotStorage> xStorageRef;
if ( aLibAbsStorage == aCurStorage || aLibRelStorageName == szImbedded )
{
xStorageRef = &rStorage;
@@ -960,7 +960,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
{
aStorageName = GetStorageName();
}
- SotStorageRef xStorage;
+ tools::SvRef<SotStorage> xStorage;
// The current must not be opened again...
if ( pCurStorage )
{
@@ -983,7 +983,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
{
xStorage = new SotStorage( false, aStorageName, eStorageReadMode );
}
- SotStorageRef xBasicStorage = xStorage->OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, false );
+ tools::SvRef<SotStorage> xBasicStorage = xStorage->OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, false );
if ( !xBasicStorage.Is() || xBasicStorage->GetError() )
{
@@ -1228,7 +1228,7 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage )
if ( bDelBasicFromStorage && !itLibInfo->IsReference() &&
( !itLibInfo->IsExtern() || SotStorage::IsStorageFile( itLibInfo->GetStorageName() ) ) )
{
- SotStorageRef xStorage;
+ tools::SvRef<SotStorage> xStorage;
try
{
if (!itLibInfo->IsExtern())
@@ -1247,7 +1247,7 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage )
if (xStorage.Is() && xStorage->IsStorage(OUString(szBasicStorage)))
{
- SotStorageRef xBasicStorage = xStorage->OpenSotStorage
+ tools::SvRef<SotStorage> xBasicStorage = xStorage->OpenSotStorage
( OUString(szBasicStorage), STREAM_STD_READWRITE, false );
if ( !xBasicStorage.Is() || xBasicStorage->GetError() )
@@ -1421,7 +1421,7 @@ StarBASIC* BasicManager::CreateLib( const OUString& rLibName, const OUString& Pa
{
try
{
- SotStorageRef xStorage = new SotStorage(false, LinkTargetURL, StreamMode::READ | StreamMode::SHARE_DENYWRITE);
+ tools::SvRef<SotStorage> xStorage = new SotStorage(false, LinkTargetURL, StreamMode::READ | StreamMode::SHARE_DENYWRITE);
if (!xStorage->GetError())
{
pLib = AddLib(*xStorage, rLibName, true);
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index cedd2e553eeb..ae1b9bf4e78e 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -362,7 +362,7 @@ SfxLibraryContainer* SfxScriptLibraryContainer::createInstanceImpl()
void SAL_CALL SfxScriptLibraryContainer::importFromOldStorage( const OUString& aFile )
{
// TODO: move loading from old storage to binary filters?
- SotStorageRef xStorage = new SotStorage( false, aFile );
+ tools::SvRef<SotStorage> xStorage = new SotStorage( false, aFile );
if( xStorage.Is() && xStorage->GetError() == ERRCODE_NONE )
{
BasicManager* pBasicManager = new BasicManager( *(SotStorage*)xStorage, aFile );
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 062d9e050026..d1af5f0f0d07 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1994,7 +1994,7 @@ bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
SvStringsISortDtor*& rpLst,
const sal_Char* pStrmName,
- SotStorageRef& rStg)
+ tools::SvRef<SotStorage>& rStg)
{
if( rpLst )
rpLst->clear();
@@ -2068,7 +2068,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
const SvStringsISortDtor& rLst,
const sal_Char* pStrmName,
- SotStorageRef &rStg,
+ tools::SvRef<SotStorage> &rStg,
bool bConvert )
{
if( rStg.Is() )
@@ -2201,7 +2201,7 @@ bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const OUString& rNew)
if( !rNew.isEmpty() && GetCplSttExceptList()->insert( rNew ).second )
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
+ tools::SvRef<SotStorage> xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2222,7 +2222,7 @@ bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const OUString& rNew)
if( !rNew.isEmpty() && pExceptList && pExceptList->insert( rNew ).second )
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
+ tools::SvRef<SotStorage> xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2240,7 +2240,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList()
{
try
{
- SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE );
+ tools::SvRef<SotStorage> xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE );
OUString sTemp ( pXMLImplCplStt_ExcptLstStr );
if( xStg.Is() && xStg->IsContained( sTemp ) )
LoadXMLExceptList_Imp( pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2254,7 +2254,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList()
void SvxAutoCorrectLanguageLists::SaveCplSttExceptList()
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
+ tools::SvRef<SotStorage> xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2284,7 +2284,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList()
{
try
{
- SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE );
+ tools::SvRef<SotStorage> xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE );
OUString sTemp ( pXMLImplWrdStt_ExcptLstStr );
if( xStg.Is() && xStg->IsContained( sTemp ) )
LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2299,7 +2299,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList()
void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList()
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
+ tools::SvRef<SotStorage> xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2334,7 +2334,7 @@ void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const OUString& rName )
{
if( sShareAutoCorrFile != sUserAutoCorrFile )
{
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
+ tools::SvRef<SotStorage> xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
if( xStg.Is() && SVSTREAM_OK == xStg->GetError() &&
xStg->IsStream( rName ) )
{
@@ -2399,8 +2399,8 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
}
if (bConvert && !bError)
{
- SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), StreamMode::READ );
- SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, StreamMode::WRITE );
+ tools::SvRef<SotStorage> xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), StreamMode::READ );
+ tools::SvRef<SotStorage> xDstStg = new SotStorage( sUserAutoCorrFile, StreamMode::WRITE );
if( xSrcStg.Is() && xDstStg.Is() )
{
@@ -2508,7 +2508,7 @@ bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vector<SvxAutocorrWo
GetAutocorrWordList();
MakeUserStorage_Impl();
- SotStorageRef xStorage = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
+ tools::SvRef<SotStorage> xStorage = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
bool bRet = xStorage.Is() && SVSTREAM_OK == xStorage->GetError();
@@ -2581,7 +2581,7 @@ bool SvxAutoCorrectLanguageLists::PutText( const OUString& rShort, const OUStrin
GetAutocorrWordList();
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
+ tools::SvRef<SotStorage> xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
@@ -2643,7 +2643,7 @@ bool SvxAutoCorrectLanguageLists::PutText( const OUString& rShort,
SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, false );
if( pAutocorr_List->Insert( pNew ) )
{
- SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
+ tools::SvRef<SotStorage> xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
MakeBlocklist_Imp( *xStor );
}
else
@@ -2665,7 +2665,7 @@ bool SvxAutoCorrectLanguageLists::DeleteText( const OUString& rShort )
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
+ tools::SvRef<SotStorage> xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE );
bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
if( bRet )
{
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
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 4724843e3c40..91c515762629 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -175,10 +175,10 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists
bool IsFileChanged_Imp();
void LoadXMLExceptList_Imp( SvStringsISortDtor*& rpLst,
const sal_Char* pStrmName,
- SotStorageRef& rStg);
+ tools::SvRef<SotStorage>& rStg);
static void SaveExceptList_Imp( const SvStringsISortDtor& rLst,
const sal_Char* pStrmName,
- SotStorageRef& rStg,
+ tools::SvRef<SotStorage>& rStg,
bool bConvert = false);
bool MakeBlocklist_Imp( SotStorage& rStg );
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 6c8d0625fbf4..34834adcdf5e 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -507,7 +507,7 @@ protected :
// the following method needs to be overridden for the import of OLE objects
virtual bool GetOLEStorageName( long nOLEId,
OUString& rStorageName,
- SotStorageRef& rSrcStorage,
+ tools::SvRef<SotStorage>& rSrcStorage,
com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xDestStg
) const;
@@ -606,7 +606,7 @@ public:
static bool ConvertToOle2( SvStream& rStm,
sal_uInt32 nLen,
const GDIMetaFile*,
- const SotStorageRef & rDest );
+ const tools::SvRef<SotStorage> & rDest );
void SetModel(SdrModel* pModel, long nApplicationScale);
SdrModel* GetModel() const { return pSdrModel; }
@@ -705,7 +705,7 @@ public:
sal_uInt32 GetConvertFlags() const { return nSvxMSDffOLEConvFlags; }
static SdrOle2Obj* CreateSdrOLEFromStorage( const OUString& rStorageName,
- SotStorageRef& rSrcStorage,
+ tools::SvRef<SotStorage>& rSrcStorage,
const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xDestStg,
const Graphic& rGraf,
const Rectangle& rBoundRect,
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index d820b17c6cad..82f3a0a7fb58 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -632,7 +632,7 @@ public:
sal_uInt32* pTableArry,
SvxMSDffSolverContainer*
);
- virtual bool ReadFormControl( SotStorageRef& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const = 0;
+ virtual bool ReadFormControl( tools::SvRef<SotStorage>& rSrc1, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const = 0;
};
struct PPTTextCharacterStyleAtomInterpreter
@@ -1305,7 +1305,7 @@ public :
mpPPTImporter ( pPPTImporter ),
mxInStrm ( rxInStrm )
{};
- bool ReadOCXStream( SotStorageRef& rSrc1,
+ bool ReadOCXStream( tools::SvRef<SotStorage>& rSrc1,
com::sun::star::uno::Reference<
com::sun::star::drawing::XShape > *pShapeRef=0,
bool bFloatingCtrl=false );
diff --git a/include/filter/msfilter/svxmsbas.hxx b/include/filter/msfilter/svxmsbas.hxx
index 24db778a98aa..d379750e3d8e 100644
--- a/include/filter/msfilter/svxmsbas.hxx
+++ b/include/filter/msfilter/svxmsbas.hxx
@@ -64,7 +64,7 @@ public:
static OUString GetMSBasicStorageName();
private:
- SotStorageRef xRoot;
+ tools::SvRef<SotStorage> xRoot;
SfxObjectShell &rDocSh;
};
diff --git a/include/oox/ole/olehelper.hxx b/include/oox/ole/olehelper.hxx
index 167a7d285be0..ae1890855442 100644
--- a/include/oox/ole/olehelper.hxx
+++ b/include/oox/ole/olehelper.hxx
@@ -161,10 +161,10 @@ protected:
public:
MSConvertOCXControls( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel );
virtual ~MSConvertOCXControls();
- bool ReadOCXStorage( SotStorageRef& rSrc1, ::com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rxFormComp );
+ bool ReadOCXStorage( tools::SvRef<SotStorage>& rSrc1, ::com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rxFormComp );
bool ReadOCXCtlsStream(SotStorageStreamRef& rSrc1, ::com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rxFormComp,
sal_Int32 nPos, sal_Int32 nSize );
- static 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 bool WriteOCXStream( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, tools::SvRef<SotStorage> &rSrc1, const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > &rControlModel, const com::sun::star::awt::Size& rSize,OUString &rName);
static 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);
};
diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index 3c6f46ed8f5a..90a77e8cdfa9 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -214,11 +214,6 @@ public:
static sal_Int32 GetVersion( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage );
};
-#ifndef SOT_DECL_SOTSTORAGE_DEFINED
-#define SOT_DECL_SOTSTORAGE_DEFINED
-typedef tools::SvRef<SotStorage> SotStorageRef;
-#endif
-
#endif // _SVSTOR_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index 2597870a5153..e956ea028e2e 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -98,7 +98,7 @@ private:
GalleryObjectList aObjectList;
OUString m_aDestDir;
bool m_bDestDirRelative;
- SotStorageRef aSvDrawStorageRef;
+ tools::SvRef<SotStorage> aSvDrawStorageRef;
Gallery* pParent;
GalleryThemeEntry* pThm;
sal_uIntPtr mnThemeLockCount;
@@ -182,7 +182,7 @@ public:
SAL_DLLPRIVATE void AbortActualize() { bAbortActualize = true; }
SAL_DLLPRIVATE Gallery* GetParent() const { return pParent; }
- SAL_DLLPRIVATE SotStorageRef GetSvDrawStorage() const { return aSvDrawStorageRef; }
+ SAL_DLLPRIVATE tools::SvRef<SotStorage> GetSvDrawStorage() const { return aSvDrawStorageRef; }
public:
diff --git a/oox/source/export/ooxml-export-notes.txt b/oox/source/export/ooxml-export-notes.txt
index 9855c1dc4c96..6129e51b0baf 100644
--- a/oox/source/export/ooxml-export-notes.txt
+++ b/oox/source/export/ooxml-export-notes.txt
@@ -150,7 +150,7 @@ Old binary filters (export)
- So why's CheckPackageSignature_Impl() fail? Because
lcl_ExportExcel2007Xml() had the code:
- SotStorageRef xRootStrg = new SotStorage( pMedStrm, FALSE );
+ tools::SvRef<SotStorage> xRootStrg = new SotStorage( pMedStrm, FALSE );
That is, it was creating an OLE Structured Storage document over the
SvStream, and then (later) used the *same* SvStream and passed it to
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index dc5bda3dd4e5..08b126d24f17 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -522,7 +522,7 @@ bool MSConvertOCXControls::importControlFromStream( ::oox::BinaryInputStream& rI
return rxFormComp.is();
}
-bool MSConvertOCXControls::ReadOCXStorage( SotStorageRef& xOleStg,
+bool MSConvertOCXControls::ReadOCXStorage( tools::SvRef<SotStorage>& xOleStg,
Reference< XFormComponent > & rxFormComp )
{
if ( xOleStg.Is() )
@@ -570,7 +570,7 @@ bool MSConvertOCXControls::WriteOCXExcelKludgeStream( const ::com::sun::star::un
return true;
}
-bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxModel, SotStorageRef &xOleStg,
+bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxModel, tools::SvRef<SotStorage> &xOleStg,
const Reference< XControlModel > &rxControlModel,
const com::sun::star::awt::Size& rSize, OUString &rName)
{
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 831e0cf33c97..09d6d50b4c91 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -66,7 +66,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
XclBiff eBiff = EXC_BIFF_UNKNOWN; // The BIFF version of the main stream.
// try to open an OLE storage
- SotStorageRef xRootStrg;
+ tools::SvRef<SotStorage> xRootStrg;
SotStorageStreamRef xStrgStrm;
if( SotStorage::IsStorageFile( pMedStrm ) )
{
@@ -145,7 +145,7 @@ static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument,
SvStream* pMedStrm, bool bBiff8, rtl_TextEncoding eNach )
{
// try to open an OLE storage
- SotStorageRef xRootStrg = new SotStorage( pMedStrm, false );
+ tools::SvRef<SotStorage> xRootStrg = new SotStorage( pMedStrm, false );
if( xRootStrg->GetError() ) return eERR_OPEN;
// create BIFF dependent strings
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 58d486e609a0..65d334eef9fd 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -373,7 +373,7 @@ void ImportExcel8::Feat()
void ImportExcel8::ReadBasic()
{
SfxObjectShell* pShell = GetDocShell();
- SotStorageRef xRootStrg = GetRootStorage();
+ tools::SvRef<SotStorage> xRootStrg = GetRootStorage();
const SvtFilterOptions& rFilterOpt = SvtFilterOptions::Get();
if( pShell && xRootStrg.Is() ) try
{
@@ -468,7 +468,7 @@ void ImportExcel8::LoadDocumentProperties()
if( SfxObjectShell* pShell = GetDocShell() )
{
// BIFF5+ without storage is possible
- SotStorageRef xRootStrg = GetRootStorage();
+ tools::SvRef<SotStorage> xRootStrg = GetRootStorage();
if( xRootStrg.Is() ) try
{
uno::Reference< document::XDocumentPropertiesSupplier > xDPS( pShell->GetModel(), uno::UNO_QUERY_THROW );
diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx
index 29e157d7b531..f9726f642403 100644
--- a/sc/source/filter/excel/expop2.cxx
+++ b/sc/source/filter/excel/expop2.cxx
@@ -62,7 +62,7 @@ FltError ExportBiff5::Write()
SfxObjectShell* pDocShell = GetDocShell();
OSL_ENSURE( pDocShell, "ExportBiff5::Write - no document shell" );
- SotStorageRef xRootStrg = GetRootStorage();
+ tools::SvRef<SotStorage> xRootStrg = GetRootStorage();
OSL_ENSURE( xRootStrg.Is(), "ExportBiff5::Write - no root storage" );
bool bWriteBasicStrg = false;
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index bc80de83de1b..d734056caf09 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -812,7 +812,7 @@ void XclExpPivotCache::WriteDConName( XclExpStream& rStrm ) const
void XclExpPivotCache::WriteCacheStream()
{
- SotStorageRef xSvStrg = OpenStorage( EXC_STORAGE_PTCACHE );
+ tools::SvRef<SotStorage> xSvStrg = OpenStorage( EXC_STORAGE_PTCACHE );
SotStorageStreamRef xSvStrm = OpenStream( xSvStrg, ScfTools::GetHexStr( maPCInfo.mnStrmId ) );
if( xSvStrm.Is() )
{
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index 22656a195895..9c3b311b1504 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -52,7 +52,7 @@ using namespace ::com::sun::star;
// Global data ================================================================
XclExpRootData::XclExpRootData( XclBiff eBiff, SfxMedium& rMedium,
- SotStorageRef xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc ) :
+ tools::SvRef<SotStorage> xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc ) :
XclRootData( eBiff, rMedium, xRootStrg, rDoc, eTextEnc, true )
{
SvtSaveOptions aSaveOpt;
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 99706cc48fba..42ceb6c20fc2 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -1070,7 +1070,7 @@ bool XclExpXmlStream::exportDocument()
// NOTE: Don't use SotStorage or SvStream any more, and never call
// SfxMedium::GetOutStream() anywhere in the xlsx export filter code!
// Instead, write via XOutputStream instance.
- SotStorageRef rStorage = static_cast<SotStorage*>(NULL);
+ tools::SvRef<SotStorage> rStorage = static_cast<SotStorage*>(NULL);
XclExpObjList::ResetCounters();
XclExpRootData aData( EXC_BIFF8, *pShell->GetMedium (), rStorage, rDoc, RTL_TEXTENCODING_DONTKNOW );
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 1da2d67a4f39..0e540c40451e 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -3444,7 +3444,7 @@ SdrObject* XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicObj,
else
{
SfxObjectShell* pDocShell = GetDocShell();
- SotStorageRef xSrcStrg = GetRootStorage();
+ tools::SvRef<SotStorage> xSrcStrg = GetRootStorage();
OUString aStrgName = rPicObj.GetOleStorageName();
if( pDocShell && xSrcStrg.Is() && (!aStrgName.isEmpty()) )
{
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 7b5dd249ad70..6b813dc065e8 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -715,7 +715,7 @@ void XclImpPivotCache::ReadPivotCacheStream( XclImpStream& rStrm )
}
// open pivot cache storage stream
- SotStorageRef xSvStrg = OpenStorage( EXC_STORAGE_PTCACHE );
+ tools::SvRef<SotStorage> xSvStrg = OpenStorage( EXC_STORAGE_PTCACHE );
SotStorageStreamRef xSvStrm = OpenStream( xSvStrg, ScfTools::GetHexStr( mnStrmId ) );
if( !xSvStrm.Is() )
return;
diff --git a/sc/source/filter/excel/xiroot.cxx b/sc/source/filter/excel/xiroot.cxx
index 08380801042a..2ff388b8a26c 100644
--- a/sc/source/filter/excel/xiroot.cxx
+++ b/sc/source/filter/excel/xiroot.cxx
@@ -40,7 +40,7 @@
// Global data ================================================================
XclImpRootData::XclImpRootData( XclBiff eBiff, SfxMedium& rMedium,
- SotStorageRef xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc ) :
+ tools::SvRef<SotStorage> xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc ) :
XclRootData( eBiff, rMedium, xRootStrg, rDoc, eTextEnc, false ),
mxDocImport(new ScDocumentImport(rDoc)),
mbHasCodePage( false ),
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 56f6053149a1..8463fb73ec1f 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -76,7 +76,7 @@ XclDebugObjCounter::~XclDebugObjCounter()
#endif
XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
- SotStorageRef xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc, bool bExport ) :
+ tools::SvRef<SotStorage> xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc, bool bExport ) :
meBiff( eBiff ),
meOutput( EXC_OUTPUT_BINARY ),
mrMedium( rMedium ),
@@ -238,23 +238,23 @@ uno::Sequence< beans::NamedValue > XclRoot::RequestEncryptionData( ::comphelper:
bool XclRoot::HasVbaStorage() const
{
- SotStorageRef xRootStrg = GetRootStorage();
+ tools::SvRef<SotStorage> xRootStrg = GetRootStorage();
return xRootStrg.Is() && xRootStrg->IsContained( EXC_STORAGE_VBA_PROJECT );
}
-SotStorageRef XclRoot::OpenStorage( SotStorageRef xStrg, const OUString& rStrgName ) const
+tools::SvRef<SotStorage> XclRoot::OpenStorage( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName ) const
{
return mrData.mbExport ?
ScfTools::OpenStorageWrite( xStrg, rStrgName ) :
ScfTools::OpenStorageRead( xStrg, rStrgName );
}
-SotStorageRef XclRoot::OpenStorage( const OUString& rStrgName ) const
+tools::SvRef<SotStorage> XclRoot::OpenStorage( const OUString& rStrgName ) const
{
return OpenStorage( GetRootStorage(), rStrgName );
}
-SotStorageStreamRef XclRoot::OpenStream( SotStorageRef xStrg, const OUString& rStrmName ) const
+SotStorageStreamRef XclRoot::OpenStream( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ) const
{
return mrData.mbExport ?
ScfTools::OpenStorageStreamWrite( xStrg, rStrmName ) :
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index cb81d715cb31..c74829ca2415 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -166,23 +166,23 @@ OUString ScfTools::ConvertToScDefinedName(const OUString& rName )
// *** streams and storages *** -----------------------------------------------
-SotStorageRef ScfTools::OpenStorageRead( SotStorageRef xStrg, const OUString& rStrgName )
+tools::SvRef<SotStorage> ScfTools::OpenStorageRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName )
{
- SotStorageRef xSubStrg;
+ tools::SvRef<SotStorage> xSubStrg;
if( xStrg.Is() && xStrg->IsContained( rStrgName ) )
xSubStrg = xStrg->OpenSotStorage( rStrgName, STREAM_STD_READ );
return xSubStrg;
}
-SotStorageRef ScfTools::OpenStorageWrite( SotStorageRef xStrg, const OUString& rStrgName )
+tools::SvRef<SotStorage> ScfTools::OpenStorageWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName )
{
- SotStorageRef xSubStrg;
+ tools::SvRef<SotStorage> xSubStrg;
if( xStrg.Is() )
xSubStrg = xStrg->OpenSotStorage( rStrgName, STREAM_STD_WRITE );
return xSubStrg;
}
-SotStorageStreamRef ScfTools::OpenStorageStreamRead( SotStorageRef xStrg, const OUString& rStrmName )
+SotStorageStreamRef ScfTools::OpenStorageStreamRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName )
{
SotStorageStreamRef xStrm;
if( xStrg.Is() && xStrg->IsContained( rStrmName ) && xStrg->IsStream( rStrmName ) )
@@ -190,7 +190,7 @@ SotStorageStreamRef ScfTools::OpenStorageStreamRead( SotStorageRef xStrg, const
return xStrm;
}
-SotStorageStreamRef ScfTools::OpenStorageStreamWrite( SotStorageRef xStrg, const OUString& rStrmName )
+SotStorageStreamRef ScfTools::OpenStorageStreamWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName )
{
OSL_ENSURE( !xStrg || !xStrg->IsContained( rStrmName ), "ScfTools::OpenStorageStreamWrite - stream exists already" );
SotStorageStreamRef xStrm;
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 95a33953f2fa..fecc646645ae 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -158,14 +158,14 @@ public:
// *** streams and storages *** -----------------------------------------------
/** Tries to open an existing storage with the specified name in the passed storage (read-only). */
- static SotStorageRef OpenStorageRead( SotStorageRef xStrg, const OUString& rStrgName );
+ static tools::SvRef<SotStorage> OpenStorageRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName );
/** Creates and opens a storage with the specified name in the passed storage (read/write). */
- static SotStorageRef OpenStorageWrite( SotStorageRef xStrg, const OUString& rStrgName );
+ static tools::SvRef<SotStorage> OpenStorageWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName );
/** Tries to open an existing stream with the specified name in the passed storage (read-only). */
- static SotStorageStreamRef OpenStorageStreamRead( SotStorageRef xStrg, const OUString& rStrmName );
+ static SotStorageStreamRef OpenStorageStreamRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName );
/** Creates and opens a stream with the specified name in the passed storage (read/write). */
- static SotStorageStreamRef OpenStorageStreamWrite( SotStorageRef xStrg, const OUString& rStrmName );
+ static SotStorageStreamRef OpenStorageStreamWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName );
// *** item handling *** ------------------------------------------------------
diff --git a/sc/source/filter/inc/xeroot.hxx b/sc/source/filter/inc/xeroot.hxx
index 7f1b6dd980b5..2693185e301e 100644
--- a/sc/source/filter/inc/xeroot.hxx
+++ b/sc/source/filter/inc/xeroot.hxx
@@ -102,7 +102,7 @@ struct XclExpRootData : public XclRootData
OStringBuffer maStringBuf; /// buffer to avoid massive OUString allocations
explicit XclExpRootData( XclBiff eBiff, SfxMedium& rMedium,
- SotStorageRef xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc );
+ tools::SvRef<SotStorage> xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc );
virtual ~XclExpRootData();
};
diff --git a/sc/source/filter/inc/xiroot.hxx b/sc/source/filter/inc/xiroot.hxx
index 7db16978b8d2..818c7b7714e4 100644
--- a/sc/source/filter/inc/xiroot.hxx
+++ b/sc/source/filter/inc/xiroot.hxx
@@ -118,7 +118,7 @@ struct XclImpRootData : public XclRootData
bool mbHasBasic; /// true = document contains VB project.
explicit XclImpRootData( XclBiff eBiff, SfxMedium& rMedium,
- SotStorageRef xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc );
+ tools::SvRef<SotStorage> xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc );
virtual ~XclImpRootData();
};
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index a29e6e8beaef..7c0e0213d3c8 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -79,7 +79,7 @@ struct XclRootData
XclBiff meBiff; /// Current BIFF version.
XclOutput meOutput; /// Current Output format.
SfxMedium& mrMedium; /// The medium to import from.
- SotStorageRef mxRootStrg; /// The root OLE storage of imported/exported file.
+ tools::SvRef<SotStorage> mxRootStrg; /// The root OLE storage of imported/exported file.
ScDocument& mrDoc; /// The source or destination document.
ScDocumentImport maDocImport;
OUString maDocUrl; /// Document URL of imported/exported file.
@@ -113,7 +113,7 @@ struct XclRootData
const bool mbExport; /// false = Import, true = Export.
explicit XclRootData( XclBiff eBiff, SfxMedium& rMedium,
- SotStorageRef xRootStrg, ScDocument& rDoc,
+ tools::SvRef<SotStorage> xRootStrg, ScDocument& rDoc,
rtl_TextEncoding eTextEnc, bool bExport );
virtual ~XclRootData();
};
@@ -190,16 +190,16 @@ public:
/** Returns the OLE2 root storage of the imported/exported file.
@return Pointer to root storage or 0, if the file is a simple stream. */
- inline SotStorageRef GetRootStorage() const { return mrData.mxRootStrg; }
+ inline tools::SvRef<SotStorage> GetRootStorage() const { return mrData.mxRootStrg; }
/** Returns true, if the document contains a VBA storage. */
bool HasVbaStorage() const;
/** Tries to open a storage as child of the specified storage for reading or writing. */
- SotStorageRef OpenStorage( SotStorageRef xStrg, const OUString& rStrgName ) const;
+ tools::SvRef<SotStorage> OpenStorage( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName ) const;
/** Tries to open a storage as child of the root storage for reading or writing. */
- SotStorageRef OpenStorage( const OUString& rStrgName ) const;
+ tools::SvRef<SotStorage> OpenStorage( const OUString& rStrgName ) const;
/** Tries to open a new stream in the specified storage for reading or writing. */
- SotStorageStreamRef OpenStream( SotStorageRef xStrg, const OUString& rStrmName ) const;
+ SotStorageStreamRef OpenStream( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ) const;
/** Tries to open a new stream in the root storage for reading or writing. */
SotStorageStreamRef OpenStream( const OUString& rStrmName ) const;
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 6dec0637d5e0..ae8b93b67cc2 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -891,7 +891,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm )
sal_uInt32 nPictureId = sal_uInt32(sal_uIntPtr(this) >> 2);
sprintf( aBuf, "%08X", static_cast< unsigned int >( nPictureId ) );
aStorageName += OUString::createFromAscii(aBuf);
- SotStorageRef xOleStg = pRootStorage->OpenSotStorage( aStorageName,
+ tools::SvRef<SotStorage> xOleStg = pRootStorage->OpenSotStorage( aStorageName,
STREAM_READWRITE| StreamMode::SHARE_DENYALL );
if( xOleStg.Is() )
{
diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx
index b8bddd8577ee..c22f8d312fa8 100644
--- a/sc/source/ui/unoobj/exceldetect.cxx
+++ b/sc/source/ui/unoobj/exceldetect.cxx
@@ -67,7 +67,7 @@ bool hasStream(const uno::Reference<io::XInputStream>& xInStream, const OUString
try
{
- SotStorageRef xStorage = new SotStorage(pStream, false);
+ tools::SvRef<SotStorage> xStorage = new SotStorage(pStream, false);
if (!xStorage.Is() || xStorage->GetError())
return false;
return xStorage->IsStream(rName);
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 6f0544a10baf..fa79b0ce6283 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4037,7 +4037,7 @@ static SotClipboardFormatId lcl_GetDropFormatId( const uno::Reference<datatransf
if( aDataHelper.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR, aObjDesc ) &&
aDataHelper.GetSotStorageStream( SotClipboardFormatId::EMBED_SOURCE, xStm ) )
{
- SotStorageRef xStore( new SotStorage( *xStm ) );
+ tools::SvRef<SotStorage> xStore( new SotStorage( *xStm ) );
bDoRtf = ( ( aObjDesc.maClassName == SvGlobalName( SO3_SW_CLASSID ) ||
aObjDesc.maClassName == SvGlobalName( SO3_SWWEB_CLASSID ) )
&& aDataHelper.HasFormat( SotClipboardFormatId::RTF ) );
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 071f54327688..ca4c559ceb29 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -137,7 +137,7 @@ protected:
SdOptions* pDrawOptions;
SvxSearchItem* pSearchItem;
SvNumberFormatter* pNumberFormatter;
- SotStorageRef xOptionStorage;
+ tools::SvRef<SotStorage> xOptionStorage;
bool bWaterCan;
SfxErrorHandler* mpErrorHdl;
/** This device is used for printer independent layout. It is virtual
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<SotStorage>& 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<SdrOle2Obj*>(pSdrObj)->GetObjRef() );
if( xObj.is() )
{
- SotStorageRef xTempStorage( new SotStorage( new SvMemoryStream(), true ) );
+ tools::SvRef<SotStorage> 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<SotStorage> 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<SotStorage> 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<SotStorage>& 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<SotStorage> 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<SotStorage> xOverhead = xDest->OpenSotStorage( OUString( "_MS_VBA_Overhead") );
if ( xOverhead.Is() && ( xOverhead->GetError() == SVSTREAM_OK ) )
{
- SotStorageRef xOverhead2 = xOverhead->OpenSotStorage( OUString( "_MS_VBA_Overhead") );
+ tools::SvRef<SotStorage> 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<SotStorage> 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<SotStorage>& 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<SotStorage> 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<SotStorage>& 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<SotStorage>& 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<SotStorage>&,
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<SotStorage>&,
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<SotStorage> 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<SotStorage> 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<SotStorage> xStorRef = new SotStorage( mrMedium.GetOutStream(), false );
#ifndef DISABLE_DYNLOADING
ExportPPTPointer PPTExport = reinterpret_cast<ExportPPTPointer>(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<SotStorage> aStorage = new SotStorage( pInStrm, false );
if ( !aStorage->GetError() && aStorage->IsStream( "PowerPoint Document" ) )
return aTypeName;
}
diff --git a/sfx2/source/appl/xpackcreator.cxx b/sfx2/source/appl/xpackcreator.cxx
index 124641dec40c..f447273a90ed 100644
--- a/sfx2/source/appl/xpackcreator.cxx
+++ b/sfx2/source/appl/xpackcreator.cxx
@@ -79,12 +79,12 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const OUString& aFolde
StreamMode::READ,
false,
true );
- SotStorageRef aStorage = new SotStorage( pUCBStorage );
+ tools::SvRef<SotStorage> aStorage = new SotStorage( pUCBStorage );
if ( !aTempURL.isEmpty() )
{
pTempStream = new SvFileStream( aTempURL, STREAM_STD_READWRITE );
- SotStorageRef aTargetStorage = new SotStorage( true, *pTempStream );
+ tools::SvRef<SotStorage> aTargetStorage = new SotStorage( true, *pTempStream );
aStorage->CopyTo( aTargetStorage );
aTargetStorage->Commit();
diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx
index 03b486932c25..194560504d79 100644
--- a/sot/qa/cppunit/test_sot.cxx
+++ b/sot/qa/cppunit/test_sot.cxx
@@ -26,10 +26,10 @@ namespace
public:
SotTest() {}
- bool checkStream( const SotStorageRef &xObjStor,
+ bool checkStream( const tools::SvRef<SotStorage> &xObjStor,
const OUString &rStreamName,
sal_uLong nSize );
- bool checkStorage( const SotStorageRef &xObjStor );
+ bool checkStorage( const tools::SvRef<SotStorage> &xObjStor );
virtual bool load(const OUString &,
const OUString &rURL, const OUString &,
@@ -44,7 +44,7 @@ namespace
CPPUNIT_TEST_SUITE_END();
};
- bool SotTest::checkStream( const SotStorageRef &xObjStor,
+ bool SotTest::checkStream( const tools::SvRef<SotStorage> &xObjStor,
const OUString &rStreamName,
sal_uLong nSize )
{
@@ -82,7 +82,7 @@ namespace
return true;
}
- bool SotTest::checkStorage( const SotStorageRef &xObjStor )
+ bool SotTest::checkStorage( const tools::SvRef<SotStorage> &xObjStor )
{
SvStorageInfoList aInfoList;
xObjStor->FillInfoList( &aInfoList );
@@ -92,7 +92,7 @@ namespace
{
if( aIt->IsStorage() )
{
- SotStorageRef xChild( xObjStor->OpenSotStorage( aIt->GetName() ) );
+ tools::SvRef<SotStorage> xChild( xObjStor->OpenSotStorage( aIt->GetName() ) );
checkStorage( xChild );
}
else if( aIt->IsStream() )
@@ -107,7 +107,7 @@ namespace
SfxFilterFlags, SotClipboardFormatId, unsigned int)
{
SvFileStream aStream(rURL, StreamMode::READ);
- SotStorageRef xObjStor = new SotStorage(aStream);
+ tools::SvRef<SotStorage> xObjStor = new SotStorage(aStream);
if (!xObjStor.Is() || xObjStor->GetError())
return false;
@@ -126,7 +126,7 @@ namespace
{
OUString aURL(getURLFromSrc("/sot/qa/cppunit/data/pass/fdo84229-1.compound"));
SvFileStream aStream(aURL, StreamMode::READ);
- SotStorageRef xObjStor = new SotStorage(aStream);
+ tools::SvRef<SotStorage> xObjStor = new SotStorage(aStream);
CPPUNIT_ASSERT_MESSAGE("sot storage failed to open",
xObjStor.Is() && !xObjStor->GetError());
SotStorageStreamRef xStream = xObjStor->OpenSotStream("Book");
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index ae40b74dcd60..7f204e6ac30d 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -547,7 +547,7 @@ SvMemoryStream * SotStorage::CreateMemoryStream()
{
SvMemoryStream * pStm = NULL;
pStm = new SvMemoryStream( 0x8000, 0x8000 );
- SotStorageRef aStg = new SotStorage( *pStm );
+ tools::SvRef<SotStorage> aStg = new SotStorage( *pStm );
if( CopyTo( aStg ) )
{
aStg->Commit();
diff --git a/sot/workben/testsot.cxx b/sot/workben/testsot.cxx
index 1d6185bbe867..19a42b12907c 100644
--- a/sot/workben/testsot.cxx
+++ b/sot/workben/testsot.cxx
@@ -25,11 +25,11 @@
*/
int main (int argc, sal_Char **argv)
{
- SotStorageRef xStor = new SotStorage( "c:\\temp\\65254.ppt" );
+ tools::SvRef<SotStorage> xStor = new SotStorage( "c:\\temp\\65254.ppt" );
/*
- SotStorageRef xStor = new SotStorage( "c:\\temp\\video.sdb" );
- SotStorageRef xStor = new SotStorage( "c:\\temp\\video.sdb" );
- SotStorageRef x2Stor = xStor->OpenSotStorage( "1117" );
+ tools::SvRef<SotStorage> xStor = new SotStorage( "c:\\temp\\video.sdb" );
+ tools::SvRef<SotStorage> xStor = new SotStorage( "c:\\temp\\video.sdb" );
+ tools::SvRef<SotStorage> x2Stor = xStor->OpenSotStorage( "1117" );
SotStorageStreamRef xStm = x2Stor->OpenSotStream( "Genres", STREAM_STD_READWRITE | StreamMode::TRUNC);
//BYTE szData[100];
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index b17665f36a1b..8ceb44924dc4 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -724,7 +724,7 @@ bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
if ( SotStorage::IsStorageFile( pStream ) )
{
- SotStorageRef aStorage = new SotStorage( pStream, false );
+ tools::SvRef<SotStorage> aStorage = new SotStorage( pStream, false );
if ( aStorage->IsStream(OUString("Equation Native")) )
{
// is this a MathType Storage?
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index c93abc95dd31..cc5036cf2242 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -1885,7 +1885,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
SvStream *pStream = rMedium.GetOutStream();
if ( pStream )
{
- SotStorageRef pStor = new SotStorage( pStream, false );
+ tools::SvRef<SotStorage> pStor = new SotStorage( pStream, false );
SvGlobalName aGName(0x0002ce02L, 0x0000, 0x0000,0xc0,0x00,
0x00,0x00,0x00,0x00,0x00,0x46 );
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index e00ec08d648a..c16e4ded7ea0 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -69,7 +69,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
bool bStorageOk = false;
try
{
- SotStorageRef aStorage = new SotStorage( pInStrm, false );
+ tools::SvRef<SotStorage> aStorage = new SotStorage( pInStrm, false );
bStorageOk = !aStorage->GetError();
if (bStorageOk)
{
diff --git a/starmath/source/unofilter.cxx b/starmath/source/unofilter.cxx
index c89f21532dd0..d87ce77b2bba 100644
--- a/starmath/source/unofilter.cxx
+++ b/starmath/source/unofilter.cxx
@@ -75,7 +75,7 @@ sal_Bool MathTypeFilter::filter(const uno::Sequence<beans::PropertyValue>& rDesc
{
if (SotStorage::IsStorageFile(pStream.get()))
{
- SotStorageRef aStorage(new SotStorage(pStream.get(), false));
+ tools::SvRef<SotStorage> aStorage(new SotStorage(pStream.get(), false));
// Is this a MathType Storage?
if (aStorage->IsStream(OUString("Equation Native")))
{
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 0cf60364ca55..e341ec2212a1 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -379,7 +379,7 @@ static sal_uInt16 GetImageId_Impl( const INetURLObject& rObject, bool bDetectFol
sal_uInt16 nId = IMG_WRITERTEMPLATE;
try
{
- SotStorageRef aStorage = new SotStorage( sURL, STREAM_STD_READ );
+ tools::SvRef<SotStorage> aStorage = new SotStorage( sURL, STREAM_STD_READ );
if ( !aStorage->GetError() )
{
SvGlobalName aGlobalName = aStorage->GetClassName();
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 66fdb01712c6..39cf84c464ff 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -663,7 +663,7 @@ void GalleryTheme::Actualize( const Link<>& rActualizeLink, GalleryProgress* pPr
try
{
- SotStorageRef aTempStorageRef( new SotStorage( false, aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READWRITE ) );
+ tools::SvRef<SotStorage> aTempStorageRef( new SotStorage( false, aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READWRITE ) );
aSvDrawStorageRef->CopyTo( aTempStorageRef );
nStorErr = aSvDrawStorageRef->GetError();
}
@@ -937,7 +937,7 @@ bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool )
if( pObject && ( SGA_OBJ_SVDRAW == pObject->eObjKind ) )
{
const INetURLObject aURL( ImplGetURL( pObject ) );
- SotStorageRef xStor( GetSvDrawStorage() );
+ tools::SvRef<SotStorage> xStor( GetSvDrawStorage() );
if( xStor.Is() )
{
@@ -959,7 +959,7 @@ bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool )
bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos )
{
INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_SVDRAW ) );
- SotStorageRef xStor( GetSvDrawStorage() );
+ tools::SvRef<SotStorage> xStor( GetSvDrawStorage() );
bool bRet = false;
if( xStor.Is() )
@@ -1009,7 +1009,7 @@ bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxMode
if( pObject && ( SGA_OBJ_SVDRAW == pObject->eObjKind ) )
{
const INetURLObject aURL( ImplGetURL( pObject ) );
- SotStorageRef xStor( GetSvDrawStorage() );
+ tools::SvRef<SotStorage> xStor( GetSvDrawStorage() );
if( xStor.Is() )
{
@@ -1055,7 +1055,7 @@ bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxMode
bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream, sal_uIntPtr nInsertPos )
{
INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_SVDRAW ) );
- SotStorageRef xStor( GetSvDrawStorage() );
+ tools::SvRef<SotStorage> xStor( GetSvDrawStorage() );
bool bRet = false;
if( xStor.Is() )
diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx
index 434c7d2018d3..b03b14b1d585 100644
--- a/svx/workben/msview/msview.cxx
+++ b/svx/workben/msview/msview.cxx
@@ -722,7 +722,7 @@ private:
Atom* mpAtom;
SvStream* mpDocStream;
- SotStorageRef maStorage;
+ tools::SvRef<SotStorage> maStorage;
};
typedef boost::shared_ptr< PPTDocument > PPTDocumentPtr;
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 83aff3c1d44b..2dd9c3eba575 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -147,7 +147,7 @@ public:
class SW_DLLPUBLIC SwReader: public SwDocFac
{
SvStream* pStrm;
- SotStorageRef pStg;
+ tools::SvRef<SotStorage> pStg;
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
SfxMedium* pMedium; // Who wants to obtain a Medium (W4W).
@@ -199,7 +199,7 @@ class SW_DLLPUBLIC Reader
protected:
SvStream* pStrm;
- SotStorageRef pStg;
+ tools::SvRef<SotStorage> pStg;
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
SfxMedium* pMedium; // Who wants to obtain a Medium (W4W).
@@ -257,8 +257,8 @@ public:
virtual size_t GetSectionList( SfxMedium& rMedium,
std::vector<OUString*>& rStrings ) const;
- SotStorageRef getSotStorageRef() { return pStg; };
- void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; };
+ tools::SvRef<SotStorage> getSotStorageRef() { return pStg; };
+ void setSotStorageRef(tools::SvRef<SotStorage> pStgRef) { pStg = pStgRef; };
private:
virtual sal_uLong Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &)=0;
@@ -466,7 +466,7 @@ class SW_DLLPUBLIC StgWriter : public Writer
{
protected:
OUString aFltName;
- SotStorageRef pStg;
+ tools::SvRef<SotStorage> pStg;
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
// Create error at call.
@@ -492,7 +492,7 @@ public:
class SW_DLLPUBLIC SwWriter
{
SvStream* pStrm;
- SotStorageRef pStg;
+ tools::SvRef<SotStorage> pStg;
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
SfxMedium* pMedium;
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 0c820b369c9b..931cb1f580cc 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -429,7 +429,7 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext)
case ND_OLENODE:
{
// StarView does not yet provide an option to copy a StarOBJ
- SotStorageRef aRef = new SotStorage( OUString() );
+ tools::SvRef<SotStorage> aRef = new SotStorage( OUString() );
SwOLEObj& rSwOLE = (SwOLEObj&)static_cast<SwOLENode*>(pCNd)->GetOLEObj();
// temporary storage until object is inserted
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index c71a2bcb9f3f..8474052fcdb6 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -156,7 +156,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const OUString& rFileName)
if (SotStorage::IsStorageFile(rFileName))
{
// package storage or OLEStorage based format
- SotStorageRef xStg;
+ tools::SvRef<SotStorage> xStg;
INetURLObject aObj;
aObj.SetSmartProtocol( INetProtocol::File );
aObj.SetSmartURL( rFileName );
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 36de9c85b4d6..a6ebb7b2fa13 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -249,7 +249,7 @@ sal_uLong Writer::Write( SwPaM& rPaM, SvStream& rStrm, const OUString* pFName )
sal_uLong nResult = ERRCODE_ABORT;
try
{
- SotStorageRef aRef = new SotStorage( rStrm );
+ tools::SvRef<SotStorage> aRef = new SotStorage( rStrm );
nResult = Write( rPaM, *aRef, pFName );
if ( nResult == ERRCODE_NONE )
aRef->Commit();
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 729d7f2f02de..4fec4349ffa1 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -3126,7 +3126,7 @@ SwMSConvertControls::SwMSConvertControls( SfxObjectShell *pDSh,SwPaM *pP ) : oox
// in transitioning away old filter for ole/ocx controls, ReadOCXStream has been made pure virtual in
// filter/source/msocximex.cxx, so.. we need an implementation here
-bool SwMSConvertControls::ReadOCXStream( SotStorageRef& rSrc1,
+bool SwMSConvertControls::ReadOCXStream( tools::SvRef<SotStorage>& rSrc1,
com::sun::star::uno::Reference< com::sun::star::drawing::XShape > *pShapeRef,
bool bFloatingCtrl )
{
@@ -3159,7 +3159,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFo
aSize.Height = TWIPS_TO_MM(aRect.Bottom());
//Open the ObjectPool
- SotStorageRef xObjPool = rWW8Wrt.GetWriter().GetStorage().OpenSotStorage(
+ tools::SvRef<SotStorage> xObjPool = rWW8Wrt.GetWriter().GetStorage().OpenSotStorage(
OUString(SL::aObjectPool), STREAM_READWRITE |
StreamMode::SHARE_DENYALL);
@@ -3167,7 +3167,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFo
OUStringBuffer sStorageName;
sal_uInt32 nObjId = GenerateObjectID();
sStorageName.append('_').append( static_cast<sal_Int64>( nObjId ));
- SotStorageRef xOleStg = xObjPool->OpenSotStorage(sStorageName.makeStringAndClear(),
+ tools::SvRef<SotStorage> xOleStg = xObjPool->OpenSotStorage(sStorageName.makeStringAndClear(),
STREAM_READWRITE|StreamMode::SHARE_DENYALL);
if (!xOleStg.Is())
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 8aa4c37a859b..b5ac30d395b4 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -959,7 +959,7 @@ protected:
WW8AttributeOutput *m_pAttrOutput; ///< Converting attributes to stream data
private:
- SotStorageRef xEscherStg; /// memory leak #i120098#, to hold the reference to unnamed SotStorage obj
+ tools::SvRef<SotStorage> xEscherStg; /// memory leak #i120098#, to hold the reference to unnamed SotStorage obj
public:
/// Access to the attribute output class.
@@ -1049,8 +1049,8 @@ public:
void StartCommentOutput( const OUString& rName );
void EndCommentOutput( const OUString& rName );
void OutGrf(const sw::Frame &rFrame);
- bool TestOleNeedsGraphic(const SwAttrSet& rSet, SotStorageRef xOleStg,
- SotStorageRef xObjStg, OUString &rStorageName, SwOLENode *pOLENd);
+ bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> xOleStg,
+ tools::SvRef<SotStorage> xObjStg, OUString &rStorageName, SwOLENode *pOLENd);
virtual void AppendBookmarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) SAL_OVERRIDE;
virtual void AppendBookmark( const OUString& rName, bool bSkip = false ) SAL_OVERRIDE;
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 5ac3aada3e15..94b9cc592df8 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -94,7 +94,7 @@ void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ )
}
bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
- SotStorageRef xOleStg, SotStorageRef xObjStg, OUString &rStorageName,
+ tools::SvRef<SotStorage> xOleStg, tools::SvRef<SotStorage> xObjStg, OUString &rStorageName,
SwOLENode *pOLENd)
{
bool bGraphicNeeded = false;
@@ -227,7 +227,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
}
pDataAdr = pSpecOLE + 2; //WW6 sprm is 1 but has 1 byte len as well.
- SotStorageRef xObjStg = GetWriter().GetStorage().OpenSotStorage(
+ tools::SvRef<SotStorage> xObjStg = GetWriter().GetStorage().OpenSotStorage(
OUString(SL::aObjectPool), STREAM_READWRITE |
StreamMode::SHARE_DENYALL );
@@ -250,7 +250,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
Set_UInt32(pDataAdr, nPictureId);
OUString sStorageName('_');
sStorageName += OUString::number( nPictureId );
- SotStorageRef xOleStg = xObjStg->OpenSotStorage( sStorageName,
+ tools::SvRef<SotStorage> xOleStg = xObjStg->OpenSotStorage( sStorageName,
STREAM_READWRITE| StreamMode::SHARE_DENYALL );
if( xOleStg.Is() )
{
@@ -343,15 +343,15 @@ void WW8Export::OutputLinkedOLE( const OUString& rOleId )
{
uno::Reference< embed::XStorage > xDocStg = m_pDoc->GetDocStorage();
uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement( "OLELinks", embed::ElementModes::READ );
- SotStorageRef xObjSrc = SotStorage::OpenOLEStorage( xOleStg, rOleId, StreamMode::READ );
+ tools::SvRef<SotStorage> xObjSrc = SotStorage::OpenOLEStorage( xOleStg, rOleId, StreamMode::READ );
- SotStorageRef xObjStg = GetWriter().GetStorage().OpenSotStorage(
+ tools::SvRef<SotStorage> xObjStg = GetWriter().GetStorage().OpenSotStorage(
OUString(SL::aObjectPool), STREAM_READWRITE |
StreamMode::SHARE_DENYALL );
if( xObjStg.Is() && xObjSrc.Is() )
{
- SotStorageRef xOleDst = xObjStg->OpenSotStorage( rOleId,
+ tools::SvRef<SotStorage> xOleDst = xObjStg->OpenSotStorage( rOleId,
STREAM_READWRITE | StreamMode::SHARE_DENYALL );
if ( xOleDst.Is() )
xObjSrc->CopyTo( xOleDst );
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index 833c4e79595c..3c212cce20c1 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -67,7 +67,7 @@ private:
WW8GlossaryFib *pGlossary;
SotStorageStreamRef xTableStream;
SotStorageStreamRef &rStrm;
- SotStorageRef xStg;
+ tools::SvRef<SotStorage> xStg;
sal_uInt16 nStrings;
static bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile,
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 694ff0f76539..55f7212d03e8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -574,11 +574,11 @@ SdrObject* SwMSDffManager::ImportOLE( long nOLEId,
SdrObject* pRet = 0;
OUString sStorageName;
- SotStorageRef xSrcStg;
+ tools::SvRef<SotStorage> xSrcStg;
uno::Reference < embed::XStorage > xDstStg;
if( GetOLEStorageName( nOLEId, sStorageName, xSrcStg, xDstStg ))
{
- SotStorageRef xSrc = xSrcStg->OpenSotStorage( sStorageName,
+ tools::SvRef<SotStorage> xSrc = xSrcStg->OpenSotStorage( sStorageName,
STREAM_READWRITE| StreamMode::SHARE_DENYALL );
OSL_ENSURE(rReader.m_pFormImpl, "No Form Implementation!");
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape;
@@ -4842,7 +4842,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom,
if ( !aURL.endsWithIgnoreAsciiCase( ".dot" ) || ( !sCreatedFrom.isEmpty() && sCreatedFrom.equals( aURL ) ) )
continue; // don't try and read the same document as ourselves
- SotStorageRef rRoot = new SotStorage( aURL, STREAM_STD_READWRITE, StorageMode::Transacted );
+ tools::SvRef<SotStorage> rRoot = new SotStorage( aURL, STREAM_STD_READWRITE, StorageMode::Transacted );
BasicProjImportHelper aBasicImporter( *m_pDocShell );
// Import vba via oox filter
@@ -6149,7 +6149,7 @@ bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, bool bSaveRelFiles) const
}
bool SwMSDffManager::GetOLEStorageName(long nOLEId, OUString& rStorageName,
- SotStorageRef& rSrcStorage, uno::Reference < embed::XStorage >& rDestStorage) const
+ tools::SvRef<SotStorage>& rSrcStorage, uno::Reference < embed::XStorage >& rDestStorage) const
{
bool bRet = false;
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 08b04410b500..6e912159e9b9 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -743,7 +743,7 @@ public:
com::sun::star::uno::Reference <
com::sun::star::drawing::XShape > *pShape, bool bFloatingCtrl) SAL_OVERRIDE;
bool ExportControl(WW8Export &rWrt, const SdrUnoObj& rFormObj);
- bool ReadOCXStream( SotStorageRef& rSrc1,
+ bool ReadOCXStream( tools::SvRef<SotStorage>& rSrc1,
com::sun::star::uno::Reference<
com::sun::star::drawing::XShape > *pShapeRef=0,
bool bFloatingCtrl=false );
@@ -761,7 +761,7 @@ private:
std::map<sal_uInt32,OString> aOldEscherBlipCache;
virtual bool GetOLEStorageName( long nOLEId, OUString& rStorageName,
- SotStorageRef& rSrcStorage, com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rDestStorage ) const SAL_OVERRIDE;
+ tools::SvRef<SotStorage>& rSrcStorage, com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rDestStorage ) const SAL_OVERRIDE;
virtual bool ShapeHasText( sal_uLong nShapeId, sal_uLong nFilePos ) const SAL_OVERRIDE;
// #i32596# - new parameter <_nCalledByGroup>, which
// indicates, if the OLE object is imported inside a group object
@@ -1889,7 +1889,7 @@ public: // eigentlich private, geht aber leider nur public
static bool GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc);
static void PicRead( SvStream *pDataStream, WW8_PIC *pPic, bool bVer67);
- static bool ImportOleWMF( SotStorageRef xSrc1, GDIMetaFile &rWMF,
+ static bool ImportOleWMF( tools::SvRef<SotStorage> xSrc1, GDIMetaFile &rWMF,
long &rX, long &rY);
static ColorData GetCol(sal_uInt8 nIco);
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index bddb76b1ad8e..b65018064951 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -67,7 +67,7 @@ struct OLE_MFP
using namespace ::com::sun::star;
-static bool SwWw8ReadScaling(long& rX, long& rY, SotStorageRef& rSrc1)
+static bool SwWw8ReadScaling(long& rX, long& rY, tools::SvRef<SotStorage>& rSrc1)
{
// Skalierungsfaktoren holen:
// Informationen in PIC-Stream ( durch ausprobieren )
@@ -125,7 +125,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SotStorageRef& rSrc1)
}
static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
- SotStorageRef& rSrc1)
+ tools::SvRef<SotStorage>& rSrc1)
{
SotStorageStreamRef xSrc2 = rSrc1->OpenSotStream( OUString("\3META"),
STREAM_STD_READ | StreamMode::NOCREATE);
@@ -179,7 +179,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
return true;
}
-static bool SwWw6ReadMacPICTStream(Graphic& rGraph, SotStorageRef& rSrc1)
+static bool SwWw6ReadMacPICTStream(Graphic& rGraph, tools::SvRef<SotStorage>& rSrc1)
{
// 03-META-Stream nicht da. Vielleicht ein 03-PICT ?
SotStorageStreamRef xSrc4 = rSrc1->OpenSotStream(OUString("\3PICT"));
@@ -309,7 +309,7 @@ SwFrmFmt* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
return pFmt;
}
-bool SwWW8ImplReader::ImportOleWMF(SotStorageRef xSrc1,GDIMetaFile &rWMF,
+bool SwWW8ImplReader::ImportOleWMF(tools::SvRef<SotStorage> xSrc1,GDIMetaFile &rWMF,
long &rX,long &rY)
{
bool bOk = false;
@@ -349,8 +349,8 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
// ergibt Name "_4711"
aSrcStgName += OUString::number( m_nObjLocFc );
- SotStorageRef xSrc0 = m_pStg->OpenSotStorage(OUString(SL::aObjectPool));
- SotStorageRef xSrc1 = xSrc0->OpenSotStorage( aSrcStgName,
+ tools::SvRef<SotStorage> xSrc0 = m_pStg->OpenSotStorage(OUString(SL::aObjectPool));
+ tools::SvRef<SotStorage> xSrc1 = xSrc0->OpenSotStorage( aSrcStgName,
STREAM_READWRITE| StreamMode::SHARE_DENYALL );
if (pGrf)
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index cdc629fd9ca3..0d11bd9ff2b6 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -605,8 +605,8 @@ sal_uInt16 SwWW8ImplReader::End_Field()
OUString sOleId('_');
sOleId += OUString::number( m_aFieldStack.back().mnObjLocFc );
- SotStorageRef xSrc0 = m_pStg->OpenSotStorage(OUString(SL::aObjectPool));
- SotStorageRef xSrc1 = xSrc0->OpenSotStorage( sOleId, StreamMode::READ );
+ tools::SvRef<SotStorage> xSrc0 = m_pStg->OpenSotStorage(OUString(SL::aObjectPool));
+ tools::SvRef<SotStorage> xSrc1 = xSrc0->OpenSotStorage( sOleId, StreamMode::READ );
// Store it now!
uno::Reference< embed::XStorage > xDocStg = GetDoc().GetDocStorage();
@@ -614,7 +614,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
{
uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement(
"OLELinks", embed::ElementModes::WRITE );
- SotStorageRef xObjDst = SotStorage::OpenOLEStorage( xOleStg, sOleId );
+ tools::SvRef<SotStorage> xObjDst = SotStorage::OpenOLEStorage( xOleStg, sOleId );
if ( xObjDst.Is() )
{
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index 5aa42e783e9f..e6006f12b6d3 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -63,7 +63,7 @@ class SwXMLImport: public SvXMLImport
SvXMLItemMapEntriesRef xTableColItemMap;
SvXMLItemMapEntriesRef xTableRowItemMap;
SvXMLItemMapEntriesRef xTableCellItemMap;
- SotStorageRef xPackage;
+ tools::SvRef<SotStorage> xPackage;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
xLateInitSettings;
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index af951ced90db..7d48ea5b0dde 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -90,7 +90,7 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
try
{
- SotStorageRef aStorage = new SotStorage ( pInStrm, false );
+ tools::SvRef<SotStorage> aStorage = new SotStorage ( pInStrm, false );
if ( !aStorage->GetError() )
{
bIsDetected = aStorage->IsContained( "WordDocument" );
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 07ad1142e228..f674064d54d1 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -225,7 +225,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
SwRead pRead = StartConvertFrom(rMedium, &pRdr);
if (!pRead)
return false; // #129881# return if no reader is found
- SotStorageRef pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls
+ tools::SvRef<SotStorage> pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls
m_pDoc->setDocAccTitle(OUString());
SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
@@ -545,7 +545,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
if ( bSave )
{
- SotStorageRef xStg = new SotStorage( rMedium.GetOutStream(), false );
+ tools::SvRef<SotStorage> xStg = new SotStorage( rMedium.GetOutStream(), false );
OSL_ENSURE( !xStg->GetError(), "No storage available for storing VBA macros!" );
if ( !xStg->GetError() )
{
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index cee4a342e440..9b6652f8f801 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -72,7 +72,7 @@ catch (...)
typedef struct
{
- SotStorageRef ref;
+ tools::SvRef<SotStorage> ref;
} SotStorageRefWrapper;
typedef struct
@@ -147,7 +147,7 @@ struct OLEStorageImpl
SotStorageStreamRef getStream(std::size_t nId);
private:
- void traverse(const SotStorageRef &rStorage, const rtl::OUString &rPath);
+ void traverse(const tools::SvRef<SotStorage> &rStorage, const rtl::OUString &rPath);
SotStorageStreamRef createStream(const rtl::OUString &rPath);
@@ -211,7 +211,7 @@ SotStorageStreamRef OLEStorageImpl::getStream(const std::size_t nId)
return maStreams[nId].stream.ref;
}
-void OLEStorageImpl::traverse(const SotStorageRef &rStorage, const rtl::OUString &rPath)
+void OLEStorageImpl::traverse(const tools::SvRef<SotStorage> &rStorage, const rtl::OUString &rPath)
{
SvStorageInfoList infos;