summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-06 16:38:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-07 11:05:04 +0200
commit0241519f323b2b29db747467b8c3d9590c33f0df (patch)
treede5e98992f8db0ed8d23f1ff8d972113700295fd
parentdc47b2e5136f0f767273dc5fdba5c822575e194b (diff)
Unwind SotStorageStreamRef typedef
Change-Id: If7652a7c0251b741660365848a717c06954ca419
-rw-r--r--basic/source/basmgr/basmgr.cxx10
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx4
-rw-r--r--chart2/source/controller/main/ChartTransferable.cxx2
-rw-r--r--chart2/source/controller/main/ChartTransferable.hxx2
-rw-r--r--dbaccess/source/ui/browser/dbexchange.cxx2
-rw-r--r--dbaccess/source/ui/inc/TableCopyHelper.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableRowExchange.hxx2
-rw-r--r--dbaccess/source/ui/inc/dbexchange.hxx2
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableRowExchange.cxx2
-rw-r--r--editeng/source/misc/svxacorr.cxx6
-rw-r--r--filter/source/msfilter/msdffimp.cxx12
-rw-r--r--filter/source/msfilter/msoleexp.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx4
-rw-r--r--include/oox/ole/olehelper.hxx2
-rw-r--r--include/sot/storage.hxx5
-rw-r--r--include/svtools/transfer.hxx6
-rw-r--r--include/svx/galmisc.hxx4
-rw-r--r--include/svx/galtheme.hxx4
-rw-r--r--oox/source/ole/olehelper.cxx14
-rw-r--r--sc/source/filter/excel/excel.cxx8
-rw-r--r--sc/source/filter/excel/excimp8.cxx2
-rw-r--r--sc/source/filter/excel/xepivot.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx2
-rw-r--r--sc/source/filter/excel/xlroot.cxx4
-rw-r--r--sc/source/filter/ftools/ftools.cxx8
-rw-r--r--sc/source/filter/inc/XclImpChangeTrack.hxx2
-rw-r--r--sc/source/filter/inc/ftools.hxx4
-rw-r--r--sc/source/filter/inc/xcl97esc.hxx2
-rw-r--r--sc/source/filter/inc/xiescher.hxx2
-rw-r--r--sc/source/filter/inc/xlroot.hxx4
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx4
-rw-r--r--sc/source/filter/xcl97/XclImpChangeTrack.cxx2
-rw-r--r--sc/source/ui/app/drwtrans.cxx2
-rw-r--r--sc/source/ui/app/transobj.cxx2
-rw-r--r--sc/source/ui/inc/drwtrans.hxx2
-rw-r--r--sc/source/ui/inc/transobj.hxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/viewfun3.cxx2
-rw-r--r--sc/source/ui/view/viewfun4.cxx2
-rw-r--r--sc/source/ui/view/viewfun5.cxx6
-rw-r--r--sd/inc/sdmod.hxx2
-rw-r--r--sd/source/filter/eppt/eppt.cxx4
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sd/source/filter/ppt/propread.hxx2
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx2
-rw-r--r--sd/source/ui/app/sdmod.cxx4
-rw-r--r--sd/source/ui/app/sdxfer.cxx2
-rw-r--r--sd/source/ui/dlg/morphdlg.cxx4
-rw-r--r--sd/source/ui/dlg/vectdlg.cxx4
-rw-r--r--sd/source/ui/inc/View.hxx2
-rw-r--r--sd/source/ui/inc/sdxfer.hxx2
-rw-r--r--sd/source/ui/view/sdview2.cxx2
-rw-r--r--sd/source/ui/view/sdview3.cxx18
-rw-r--r--sfx2/source/doc/oleprops.cxx4
-rw-r--r--sot/qa/cppunit/test_sot.cxx6
-rw-r--r--sot/workben/testsot.cxx2
-rw-r--r--starmath/inc/document.hxx2
-rw-r--r--starmath/source/eqnolefilehdr.cxx2
-rw-r--r--starmath/source/mathtype.cxx8
-rw-r--r--svtools/source/misc/transfer.cxx20
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--svx/source/gallery2/galtheme.cxx16
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx4
-rw-r--r--sw/inc/shellio.hxx2
-rw-r--r--sw/source/filter/basflt/iodetect.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx6
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx2
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx6
-rw-r--r--sw/source/filter/ww8/ww8par.cxx16
-rw-r--r--sw/source/filter/ww8/ww8par.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx8
-rw-r--r--sw/source/filter/xml/wrtxml.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx10
-rw-r--r--sw/source/uibase/inc/swdtflvr.hxx2
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx20
78 files changed, 176 insertions, 181 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index bd8c61c81783..83e6f50552a1 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -546,7 +546,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
// #91626 Save all stream data to save it unmodified if basic isn't modified
// in an 6.0+ office. So also the old basic dialogs can be saved.
- SotStorageStreamRef xManagerStream = rStorage.OpenSotStream( OUString(szManagerStream), eStreamReadMode );
+ tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( OUString(szManagerStream), eStreamReadMode );
mpImpl->mpManagerStream = new SvMemoryStream();
static_cast<SvStream*>(&xManagerStream)->ReadStream( *mpImpl->mpManagerStream );
@@ -558,7 +558,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
for( sal_uInt16 nL = 0; nL < nLibs; nL++ )
{
BasicLibInfo& rInfo = mpImpl->aLibs[nL];
- SotStorageStreamRef xBasicStream = xBasicStorage->OpenSotStream( rInfo.GetLibName(), eStreamReadMode );
+ tools::SvRef<SotStorageStream> xBasicStream = xBasicStorage->OpenSotStream( rInfo.GetLibName(), eStreamReadMode );
mpImpl->mppLibStreams[nL] = new SvMemoryStream();
static_cast<SvStream*>(&xBasicStream)->ReadStream( *( mpImpl->mppLibStreams[nL] ) );
}
@@ -733,7 +733,7 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib )
void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL, bool bLoadLibs )
{
- SotStorageStreamRef xManagerStream = rStorage.OpenSotStream( OUString(szManagerStream), eStreamReadMode );
+ tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( OUString(szManagerStream), eStreamReadMode );
OUString aStorName( rStorage.GetName() );
// #i13114 removed, DBG_ASSERT( aStorName.Len(), "No Storage Name!" );
@@ -825,7 +825,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
{
- SotStorageStreamRef xManagerStream = rStorage.OpenSotStream( OUString(szOldManagerStream), eStreamReadMode );
+ tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( OUString(szOldManagerStream), eStreamReadMode );
OUString aStorName( rStorage.GetName() );
DBG_ASSERT( aStorName.getLength(), "No Storage Name!" );
@@ -993,7 +993,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
else
{
// In the Basic-Storage every lib is in a Stream...
- SotStorageStreamRef xBasicStream = xBasicStorage->OpenSotStream( pLibInfo->GetLibName(), eStreamReadMode );
+ tools::SvRef<SotStorageStream> xBasicStream = xBasicStorage->OpenSotStream( pLibInfo->GetLibName(), eStreamReadMode );
if ( !xBasicStream.Is() || xBasicStream->GetError() )
{
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD , pLibInfo->GetLibName(), ERRCODE_BUTTON_OK );
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 259cb389abe1..839fd5d55282 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -262,7 +262,7 @@ void ChartController::executeDispatch_Paste()
{
if ( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) )
{
xStm->Seek( 0 );
@@ -277,7 +277,7 @@ void ChartController::executeDispatch_Paste()
else if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) )
{
// graphic exchange format (graphic manager bitmap format?)
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ))
ReadGraphic( *xStm, aGraphic );
}
diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx
index 464345ec4003..ff85446bfabd 100644
--- a/chart2/source/controller/main/ChartTransferable.cxx
+++ b/chart2/source/controller/main/ChartTransferable.cxx
@@ -99,7 +99,7 @@ bool ChartTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, c
return bResult;
}
-bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
+bool ChartTransferable::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
const datatransfer::DataFlavor& /* rFlavor */ )
{
// called from SetObject, put data into stream
diff --git a/chart2/source/controller/main/ChartTransferable.hxx b/chart2/source/controller/main/ChartTransferable.hxx
index 5ebf31902825..2275fec28d42 100644
--- a/chart2/source/controller/main/ChartTransferable.hxx
+++ b/chart2/source/controller/main/ChartTransferable.hxx
@@ -44,7 +44,7 @@ protected:
// implementation of TransferableHelper methods
virtual void AddSupportedFormats() SAL_OVERRIDE;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
private:
diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx
index d92610986691..f7d6117b2611 100644
--- a/dbaccess/source/ui/browser/dbexchange.cxx
+++ b/dbaccess/source/ui/browser/dbexchange.cxx
@@ -134,7 +134,7 @@ namespace dbaui
osl_atomic_decrement( &m_refCount );
}
- bool ODataClipboard::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ )
+ bool ODataClipboard::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ )
{
if (nUserObjectId == SotClipboardFormatId::RTF || nUserObjectId == SotClipboardFormatId::HTML )
{
diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx
index d2b1df6023d6..ceba0c89c35e 100644
--- a/dbaccess/source/ui/inc/TableCopyHelper.hxx
+++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx
@@ -76,7 +76,7 @@ namespace dbaui
OUString sDefaultTableName;
OUString aUrl;
- SotStorageStreamRef aHtmlRtfStorage;
+ tools::SvRef<SotStorageStream> aHtmlRtfStorage;
ElementType nType;
SvTreeListEntry* pDroppedAt;
sal_Int8 nAction;
diff --git a/dbaccess/source/ui/inc/TableRowExchange.hxx b/dbaccess/source/ui/inc/TableRowExchange.hxx
index 84cc98404c0b..7af8a8632bfc 100644
--- a/dbaccess/source/ui/inc/TableRowExchange.hxx
+++ b/dbaccess/source/ui/inc/TableRowExchange.hxx
@@ -35,7 +35,7 @@ namespace dbaui
protected:
virtual void AddSupportedFormats() SAL_OVERRIDE;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
virtual void ObjectReleased() SAL_OVERRIDE;
};
}
diff --git a/dbaccess/source/ui/inc/dbexchange.hxx b/dbaccess/source/ui/inc/dbexchange.hxx
index 8e856b941f93..71eb2a2882e2 100644
--- a/dbaccess/source/ui/inc/dbexchange.hxx
+++ b/dbaccess/source/ui/inc/dbexchange.hxx
@@ -79,7 +79,7 @@ namespace dbaui
virtual void AddSupportedFormats() SAL_OVERRIDE;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
virtual void ObjectReleased() SAL_OVERRIDE;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
};
}
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index dab0e67d046e..0541b8840d25 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -286,7 +286,7 @@ bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData
// now we need to copy the stream
::utl::TempFile aTmp;
_rAsyncDrop.aUrl = aTmp.GetURL();
- SotStorageStreamRef aNew = new SotStorageStream( aTmp.GetFileName() );
+ tools::SvRef<SotStorageStream> aNew = new SotStorageStream( aTmp.GetFileName() );
_rAsyncDrop.aHtmlRtfStorage->Seek(STREAM_SEEK_TO_BEGIN);
_rAsyncDrop.aHtmlRtfStorage->CopyTo( aNew );
aNew->Commit();
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index c47fc25d70a1..4fe2c01f9ffb 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -777,7 +777,7 @@ void OTableEditorCtrl::InsertRows( long nRow )
TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent()));
if(aTransferData.HasFormat(SotClipboardFormatId::SBA_TABED))
{
- SotStorageStreamRef aStreamRef;
+ tools::SvRef<SotStorageStream> aStreamRef;
bool bOk = aTransferData.GetSotStorageStream(SotClipboardFormatId::SBA_TABED,aStreamRef);
if (bOk && aStreamRef.Is())
{
diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
index b1ce44b6f6b4..25ed58951048 100644
--- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
@@ -30,7 +30,7 @@ namespace dbaui
: m_vTableRow(_rvTableRow)
{
}
- bool OTableRowExchange::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ )
+ bool OTableRowExchange::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ )
{
if(nUserObjectId == SotClipboardFormatId::SBA_TABED)
{
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index d1af5f0f0d07..48d12f9ac421 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2007,7 +2007,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
if( rStg.Is() && rStg->IsStream( sStrmName ) )
{
- SotStorageStreamRef xStrm = rStg->OpenSotStream( sTmp,
+ tools::SvRef<SotStorageStream> xStrm = rStg->OpenSotStream( sTmp,
( StreamMode::READ | StreamMode::SHARE_DENYWRITE | StreamMode::NOCREATE ) );
if( SVSTREAM_OK != xStrm->GetError())
{
@@ -2081,7 +2081,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
}
else
{
- SotStorageStreamRef xStrm = rStg->OpenSotStream( sStrmName,
+ tools::SvRef<SotStorageStream> xStrm = rStg->OpenSotStream( sStrmName,
( StreamMode::READ | StreamMode::WRITE | StreamMode::SHARE_DENYWRITE ) );
if( xStrm.Is() )
{
@@ -2452,7 +2452,7 @@ bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SotStorage& rStg )
bool bRet = true, bRemove = !pAutocorr_List || pAutocorr_List->empty();
if( !bRemove )
{
- SotStorageStreamRef refList = rStg.OpenSotStream( sStrmName,
+ tools::SvRef<SotStorageStream> refList = rStg.OpenSotStream( sStrmName,
( StreamMode::READ | StreamMode::WRITE | StreamMode::SHARE_DENYWRITE ) );
if( refList.Is() )
{
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index f20527272130..506c449d9bed 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6533,7 +6533,7 @@ SdrObject* SvxMSDffManager::ImportOLE( long nOLEId,
bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile & rMtf )
{
- SotStorageStreamRef xStm = pStor->OpenSotStream(OUString(SVEXT_PERSIST_STREAM));
+ tools::SvRef<SotStorageStream> xStm = pStor->OpenSotStream(OUString(SVEXT_PERSIST_STREAM));
xStm->SetVersion( pStor->GetVersion() );
xStm->SetBufferSize( 8192 );
@@ -6674,7 +6674,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
const GDIMetaFile * pMtf, const tools::SvRef<SotStorage>& rDest )
{
bool bMtfRead = false;
- SotStorageStreamRef xOle10Stm = rDest->OpenSotStream( OUString("\1Ole10Native"),
+ tools::SvRef<SotStorageStream> xOle10Stm = rDest->OpenSotStream( OUString("\1Ole10Native"),
StreamMode::WRITE| StreamMode::SHARE_DENYALL );
if( xOle10Stm->GetError() )
return false;
@@ -6722,7 +6722,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
// write to ole10 stream
xOle10Stm->WriteUInt32( nDataLen );
xOle10Stm->Write( pData.get(), nDataLen );
- xOle10Stm = SotStorageStreamRef();
+ xOle10Stm = tools::SvRef<SotStorageStream>();
// set the compobj stream
const ClsIDs* pIds;
@@ -6915,7 +6915,7 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
if ( pName )
{
// TODO/LATER: perhaps we need to retrieve VisArea and Metafile from the storage also
- SotStorageStreamRef xStr = rSrcStg.OpenSotStream( OUString( "package_stream" ), STREAM_STD_READ );
+ tools::SvRef<SotStorageStream> xStr = rSrcStg.OpenSotStream( OUString( "package_stream" ), STREAM_STD_READ );
xStr->ReadStream( *xMemStream );
}
else
@@ -7060,7 +7060,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
{
{
sal_uInt8 aTestA[10]; // exist the \1CompObj-Stream ?
- SotStorageStreamRef xSrcTst = xObjStg->OpenSotStream( OUString( "\1CompObj" ) );
+ tools::SvRef<SotStorageStream> xSrcTst = xObjStg->OpenSotStream( OUString( "\1CompObj" ) );
bValidStorage = xSrcTst.Is() && sizeof( aTestA ) ==
xSrcTst->Read( aTestA, sizeof( aTestA ) );
if( !bValidStorage )
@@ -7081,7 +7081,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
// is a kind of embedded objects in Word documents
// TODO/LATER: should the caller be notified if the aspect changes in future?
- SotStorageStreamRef xObjInfoSrc = xObjStg->OpenSotStream(
+ tools::SvRef<SotStorageStream> xObjInfoSrc = xObjStg->OpenSotStream(
OUString( "\3ObjInfo" ), STREAM_STD_READ | StreamMode::NOCREATE );
if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
{
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index 61fccc2dba7f..dc3340eb5e8c 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -224,7 +224,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt
rDestStg.SetClass( aEmbName,
SotClipboardFormatId::EMBEDDED_OBJ_OLE,
GetStorageType( aEmbName ) );
- SotStorageStreamRef xExtStm = rDestStg.OpenSotStream(
+ tools::SvRef<SotStorageStream> xExtStm = rDestStg.OpenSotStream(
OUString( "properties_stream" ),
STREAM_STD_READWRITE);
@@ -279,7 +279,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt
if ( bExtentSuccess )
{
- SotStorageStreamRef xEmbStm = rDestStg.OpenSotStream(
+ tools::SvRef<SotStorageStream> xEmbStm = rDestStg.OpenSotStream(
OUString( "package_stream" ),
STREAM_STD_READWRITE);
if( !xEmbStm->GetError() )
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index ea1ba041472d..484ce1036651 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1840,7 +1840,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
{
xObjStor->SetClass( SvGlobalName( pObjStor->GetClassId() ), pObjStor->GetFormat(), pObjStor->GetUserName() );
}
- SotStorageStreamRef xSrcTst = xObjStor->OpenSotStream( "\1Ole" );
+ tools::SvRef<SotStorageStream> xSrcTst = xObjStor->OpenSotStream( "\1Ole" );
if ( xSrcTst.Is() )
{
sal_uInt8 aTestA[ 10 ];
@@ -2031,7 +2031,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
tools::SvRef<SotStorage> xSubVBA = xVBA->OpenSotStorage( "_MS_VBA_Overhead" );
if ( xSubVBA.Is() && ( xSubVBA->GetError() == SVSTREAM_OK ) )
{
- SotStorageStreamRef xOriginal = xSubVBA->OpenSotStream( "_MS_VBA_Overhead2" );
+ tools::SvRef<SotStorageStream> xOriginal = xSubVBA->OpenSotStream( "_MS_VBA_Overhead2" );
if ( xOriginal.Is() && ( xOriginal->GetError() == SVSTREAM_OK ) )
{
if ( nPersistPtr && ( nPersistPtr < nPersistPtrAnz ) )
diff --git a/include/oox/ole/olehelper.hxx b/include/oox/ole/olehelper.hxx
index ae1890855442..17e76e254a86 100644
--- a/include/oox/ole/olehelper.hxx
+++ b/include/oox/ole/olehelper.hxx
@@ -162,7 +162,7 @@ public:
MSConvertOCXControls( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel );
virtual ~MSConvertOCXControls();
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,
+ bool ReadOCXCtlsStream(tools::SvRef<SotStorageStream>& 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, 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 90a77e8cdfa9..45593de08c0b 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -91,11 +91,6 @@ public:
virtual sal_uInt64 remainingSize() SAL_OVERRIDE;
};
-#ifndef SOT_DECL_SOTSTORAGESTREAM_DEFINED
-#define SOT_DECL_SOTSTORAGESTREAM_DEFINED
-typedef tools::SvRef<SotStorageStream> SotStorageStreamRef;
-#endif
-
namespace ucbhelper
{
class Content;
diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx
index 0c86721d7cd5..c292b13d07ff 100644
--- a/include/svtools/transfer.hxx
+++ b/include/svtools/transfer.hxx
@@ -241,7 +241,7 @@ protected:
virtual void AddSupportedFormats() = 0;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) = 0;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
virtual void DragFinished( sal_Int8 nDropAction );
virtual void ObjectReleased();
@@ -357,8 +357,8 @@ public:
css::uno::Sequence<sal_Int8> GetSequence( SotClipboardFormatId nFormat, const OUString& rDestDoc );
css::uno::Sequence<sal_Int8> GetSequence( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc );
- bool GetSotStorageStream( SotClipboardFormatId nFormat, SotStorageStreamRef& rStreamRef );
- bool GetSotStorageStream( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, SotStorageStreamRef& rStreamRef );
+ bool GetSotStorageStream( SotClipboardFormatId nFormat, tools::SvRef<SotStorageStream>& rStreamRef );
+ bool GetSotStorageStream( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, tools::SvRef<SotStorageStream>& rStreamRef );
css::uno::Reference<css::io::XInputStream> GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc );
css::uno::Reference<css::io::XInputStream> GetInputStream( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc );
diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx
index c833b084eb2d..c0604ea80067 100644
--- a/include/svx/galmisc.hxx
+++ b/include/svx/galmisc.hxx
@@ -163,7 +163,7 @@ private:
GalleryTheme* mpTheme;
SgaObjKind meObjectKind;
sal_uInt32 mnObjectPos;
- SotStorageStreamRef mxModelStream;
+ tools::SvRef<SotStorageStream> mxModelStream;
GraphicObject* mpGraphicObject;
ImageMap* mpImageMap;
INetURLObject* mpURL;
@@ -178,7 +178,7 @@ protected:
// TransferableHelper
virtual void AddSupportedFormats() SAL_OVERRIDE;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
virtual void DragFinished( sal_Int8 nDropAction ) SAL_OVERRIDE;
virtual void ObjectReleased() SAL_OVERRIDE;
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index e956ea028e2e..21ec91ffb67e 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -207,8 +207,8 @@ public:
bool GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool bProgress = false );
bool InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
- SAL_DLLPRIVATE bool GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rModelStreamRef, bool bProgress = false );
- SAL_DLLPRIVATE bool InsertModelStream( const SotStorageStreamRef& rModelStream, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
+ SAL_DLLPRIVATE bool GetModelStream( sal_uIntPtr nPos, tools::SvRef<SotStorageStream>& rModelStreamRef, bool bProgress = false );
+ SAL_DLLPRIVATE bool InsertModelStream( const tools::SvRef<SotStorageStream>& rModelStream, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
SAL_DLLPRIVATE bool GetURL( sal_uIntPtr nPos, INetURLObject& rURL, bool bProgress = false );
bool InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 08b126d24f17..4344873d846a 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -473,7 +473,7 @@ MSConvertOCXControls::importControlFromStream( ::oox::BinaryInputStream& rInStrm
}
bool
-MSConvertOCXControls::ReadOCXCtlsStream( SotStorageStreamRef& rSrc1, Reference< XFormComponent > & rxFormComp,
+MSConvertOCXControls::ReadOCXCtlsStream( tools::SvRef<SotStorageStream>& rSrc1, Reference< XFormComponent > & rxFormComp,
sal_Int32 nPos,
sal_Int32 nStreamSize)
{
@@ -527,13 +527,13 @@ bool MSConvertOCXControls::ReadOCXStorage( tools::SvRef<SotStorage>& xOleStg,
{
if ( xOleStg.Is() )
{
- SotStorageStreamRef pNameStream = xOleStg->OpenSotStream( OUString("\3OCXNAME"));
+ tools::SvRef<SotStorageStream> pNameStream = xOleStg->OpenSotStream( OUString("\3OCXNAME"));
BinaryXInputStream aNameStream( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper( *pNameStream ) ), true );
- SotStorageStreamRef pContents = xOleStg->OpenSotStream( OUString("contents"));
+ tools::SvRef<SotStorageStream> pContents = xOleStg->OpenSotStream( OUString("contents"));
BinaryXInputStream aInStrm( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper( *pContents ) ), true );
- SotStorageStreamRef pClsStrm = xOleStg->OpenSotStream(OUString("\1CompObj"));
+ tools::SvRef<SotStorageStream> pClsStrm = xOleStg->OpenSotStream(OUString("\1CompObj"));
BinaryXInputStream aClsStrm( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper(*pClsStrm ) ), true );
aClsStrm.skip(12);
@@ -588,17 +588,17 @@ bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxModel, t
rName = exportHelper.getTypeName();
xOleStg->SetClass( aName, SotClipboardFormatId::EMBEDDED_OBJ_OLE, sFullName);
{
- SotStorageStreamRef pNameStream = xOleStg->OpenSotStream(OUString("\3OCXNAME"));
+ tools::SvRef<SotStorageStream> pNameStream = xOleStg->OpenSotStream(OUString("\3OCXNAME"));
Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pNameStream );
exportHelper.exportName( xOut );
}
{
- SotStorageStreamRef pObjStream = xOleStg->OpenSotStream(OUString("\1CompObj"));
+ tools::SvRef<SotStorageStream> pObjStream = xOleStg->OpenSotStream(OUString("\1CompObj"));
Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pObjStream );
exportHelper.exportCompObj( xOut );
}
{
- SotStorageStreamRef pContents = xOleStg->OpenSotStream(OUString("contents"));
+ tools::SvRef<SotStorageStream> pContents = xOleStg->OpenSotStream(OUString("contents"));
Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pContents );
exportHelper.exportControl( xOut, rSize );
}
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 09d6d50b4c91..6230384ce5c9 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -67,7 +67,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
// try to open an OLE storage
tools::SvRef<SotStorage> xRootStrg;
- SotStorageStreamRef xStrgStrm;
+ tools::SvRef<SotStorageStream> xStrgStrm;
if( SotStorage::IsStorageFile( pMedStrm ) )
{
xRootStrg = new SotStorage( pMedStrm, false );
@@ -79,11 +79,11 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
if( xRootStrg.Is() )
{
// try to open the "Book" stream
- SotStorageStreamRef xBookStrm = ScfTools::OpenStorageStreamRead( xRootStrg, EXC_STREAM_BOOK );
+ tools::SvRef<SotStorageStream> xBookStrm = ScfTools::OpenStorageStreamRead( xRootStrg, EXC_STREAM_BOOK );
XclBiff eBookBiff = xBookStrm.Is() ? XclImpStream::DetectBiffVersion( *xBookStrm ) : EXC_BIFF_UNKNOWN;
// try to open the "Workbook" stream
- SotStorageStreamRef xWorkbookStrm = ScfTools::OpenStorageStreamRead( xRootStrg, EXC_STREAM_WORKBOOK );
+ tools::SvRef<SotStorageStream> xWorkbookStrm = ScfTools::OpenStorageStreamRead( xRootStrg, EXC_STREAM_WORKBOOK );
XclBiff eWorkbookBiff = xWorkbookStrm.Is() ? XclImpStream::DetectBiffVersion( *xWorkbookStrm ) : EXC_BIFF_UNKNOWN;
// decide which stream to use
@@ -164,7 +164,7 @@ static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument,
}
// open the "Book"/"Workbook" stream
- SotStorageStreamRef xStrgStrm = ScfTools::OpenStorageStreamWrite( xRootStrg, aStrmName );
+ tools::SvRef<SotStorageStream> xStrgStrm = ScfTools::OpenStorageStreamWrite( xRootStrg, aStrmName );
if( !xStrgStrm.Is() || xStrgStrm->GetError() ) return eERR_OPEN;
xStrgStrm->SetBufferSize( 0x8000 ); // still needed?
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 65d334eef9fd..3b91332d61ac 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -384,7 +384,7 @@ void ImportExcel8::ReadBasic()
rFilterOpt.IsLoadExcelBasicExecutable() )
{
// see if we have the XCB stream
- SotStorageStreamRef xXCB = xRootStrg->OpenSotStream( OUString("XCB"), STREAM_STD_READ | StreamMode::NOCREATE );
+ tools::SvRef<SotStorageStream> xXCB = xRootStrg->OpenSotStream( OUString("XCB"), STREAM_STD_READ | StreamMode::NOCREATE );
if ( xXCB.Is()|| SVSTREAM_OK == xXCB->GetError() )
{
ScCTBWrapper wrapper;
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index d734056caf09..71ca74523386 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -813,7 +813,7 @@ void XclExpPivotCache::WriteDConName( XclExpStream& rStrm ) const
void XclExpPivotCache::WriteCacheStream()
{
tools::SvRef<SotStorage> xSvStrg = OpenStorage( EXC_STORAGE_PTCACHE );
- SotStorageStreamRef xSvStrm = OpenStream( xSvStrg, ScfTools::GetHexStr( maPCInfo.mnStrmId ) );
+ tools::SvRef<SotStorageStream> xSvStrm = OpenStream( xSvStrg, ScfTools::GetHexStr( maPCInfo.mnStrmId ) );
if( xSvStrm.Is() )
{
XclExpStream aStrm( *xSvStrm, GetRoot() );
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 6b813dc065e8..48fe3b30cd0e 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -716,7 +716,7 @@ void XclImpPivotCache::ReadPivotCacheStream( XclImpStream& rStrm )
// open pivot cache storage stream
tools::SvRef<SotStorage> xSvStrg = OpenStorage( EXC_STORAGE_PTCACHE );
- SotStorageStreamRef xSvStrm = OpenStream( xSvStrg, ScfTools::GetHexStr( mnStrmId ) );
+ tools::SvRef<SotStorageStream> xSvStrm = OpenStream( xSvStrg, ScfTools::GetHexStr( mnStrmId ) );
if( !xSvStrm.Is() )
return;
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 8463fb73ec1f..df3f4d69d199 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -254,14 +254,14 @@ tools::SvRef<SotStorage> XclRoot::OpenStorage( const OUString& rStrgName ) const
return OpenStorage( GetRootStorage(), rStrgName );
}
-SotStorageStreamRef XclRoot::OpenStream( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ) const
+tools::SvRef<SotStorageStream> XclRoot::OpenStream( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ) const
{
return mrData.mbExport ?
ScfTools::OpenStorageStreamWrite( xStrg, rStrmName ) :
ScfTools::OpenStorageStreamRead( xStrg, rStrmName );
}
-SotStorageStreamRef XclRoot::OpenStream( const OUString& rStrmName ) const
+tools::SvRef<SotStorageStream> XclRoot::OpenStream( const OUString& rStrmName ) const
{
return OpenStream( GetRootStorage(), rStrmName );
}
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index c74829ca2415..342715e93d01 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -182,18 +182,18 @@ tools::SvRef<SotStorage> ScfTools::OpenStorageWrite( tools::SvRef<SotStorage> xS
return xSubStrg;
}
-SotStorageStreamRef ScfTools::OpenStorageStreamRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName )
+tools::SvRef<SotStorageStream> ScfTools::OpenStorageStreamRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName )
{
- SotStorageStreamRef xStrm;
+ tools::SvRef<SotStorageStream> xStrm;
if( xStrg.Is() && xStrg->IsContained( rStrmName ) && xStrg->IsStream( rStrmName ) )
xStrm = xStrg->OpenSotStream( rStrmName, STREAM_STD_READ );
return xStrm;
}
-SotStorageStreamRef ScfTools::OpenStorageStreamWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName )
+tools::SvRef<SotStorageStream> ScfTools::OpenStorageStreamWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName )
{
OSL_ENSURE( !xStrg || !xStrg->IsContained( rStrmName ), "ScfTools::OpenStorageStreamWrite - stream exists already" );
- SotStorageStreamRef xStrm;
+ tools::SvRef<SotStorageStream> xStrm;
if( xStrg.Is() )
xStrm = xStrg->OpenSotStream( rStrmName, STREAM_STD_WRITE | StreamMode::TRUNC );
return xStrm;
diff --git a/sc/source/filter/inc/XclImpChangeTrack.hxx b/sc/source/filter/inc/XclImpChangeTrack.hxx
index e681f08a3667..bf7801d5f22f 100644
--- a/sc/source/filter/inc/XclImpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclImpChangeTrack.hxx
@@ -55,7 +55,7 @@ private:
OUString sOldUsername;
ScChangeTrack* pChangeTrack;
- SotStorageStreamRef xInStrm; // input stream
+ tools::SvRef<SotStorageStream> xInStrm; // input stream
XclImpStream* pStrm; // stream import class
sal_uInt16 nTabIdCount;
bool bGlobExit; // global exit loop
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index fecc646645ae..09d7efe37e16 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -163,9 +163,9 @@ public:
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( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName );
+ static tools::SvRef<SotStorageStream> 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( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName );
+ static tools::SvRef<SotStorageStream> OpenStorageStreamWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName );
// *** item handling *** ------------------------------------------------------
diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx
index a38f0edfefc4..e5d1bd1d52ec 100644
--- a/sc/source/filter/inc/xcl97esc.hxx
+++ b/sc/source/filter/inc/xcl97esc.hxx
@@ -106,7 +106,7 @@ public:
const Rectangle* pChildAnchor );
private:
- SotStorageStreamRef mxCtlsStrm; /// The 'Ctls' stream.
+ tools::SvRef<SotStorageStream> mxCtlsStrm; /// The 'Ctls' stream.
/** Creates a TBX form control OBJ record from the passed form control. */
XclExpTbxControlObj* CreateTBXCtrlObj(
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape,
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index 337ae0ac04a4..ebf7792a248b 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -1034,7 +1034,7 @@ private:
typedef ::std::vector< XclImpDffConvDataRef > XclImpDffConvDataStack;
const OUString maStdFormName; /// Standard name of control forms.
- SotStorageStreamRef mxCtlsStrm; /// The 'Ctls' stream for OCX form controls.
+ tools::SvRef<SotStorageStream> mxCtlsStrm; /// The 'Ctls' stream for OCX form controls.
ScfProgressBarRef mxProgress; /// The progress bar used in ProcessObj().
XclImpDffConvDataStack maDataStack; /// Stack for registered drawing managers.
sal_uInt32 mnOleImpFlags; /// Application OLE import settings.
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index 7c0e0213d3c8..d65ccf08bd42 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -199,9 +199,9 @@ public:
/** Tries to open a storage as child of the root storage for reading or writing. */
tools::SvRef<SotStorage> OpenStorage( const OUString& rStrgName ) const;
/** Tries to open a new stream in the specified storage for reading or writing. */
- SotStorageStreamRef OpenStream( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ) const;
+ tools::SvRef<SotStorageStream> 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;
+ tools::SvRef<SotStorageStream> OpenStream( const OUString& rStrmName ) const;
/** Returns the destination document (import) or source document (export). */
ScDocument& GetDoc() const;
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index de775462da3e..acd7fa2cb33f 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -1601,7 +1601,7 @@ void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction )
bool XclExpChangeTrack::WriteUserNamesStream()
{
bool bRet = false;
- SotStorageStreamRef xSvStrm = OpenStream( EXC_STREAM_USERNAMES );
+ tools::SvRef<SotStorageStream> xSvStrm = OpenStream( EXC_STREAM_USERNAMES );
OSL_ENSURE( xSvStrm.Is(), "XclExpChangeTrack::WriteUserNamesStream - no stream" );
if( xSvStrm.Is() )
{
@@ -1623,7 +1623,7 @@ void XclExpChangeTrack::Write()
if( WriteUserNamesStream() )
{
- SotStorageStreamRef xSvStrm = OpenStream( EXC_STREAM_REVLOG );
+ tools::SvRef<SotStorageStream> xSvStrm = OpenStream( EXC_STREAM_REVLOG );
OSL_ENSURE( xSvStrm.Is(), "XclExpChangeTrack::Write - no stream" );
if( xSvStrm.Is() )
{
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 0c4be44d4dd9..417aa3f80720 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -44,7 +44,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea
// Verify that the User Names stream exists before going any further. Excel adds both
// "Revision Log" and "User Names" streams when Change Tracking is active but the Revision log
// remains if Change Tracking is turned off.
- SotStorageStreamRef xUserStrm = OpenStream( EXC_STREAM_USERNAMES );
+ tools::SvRef<SotStorageStream> xUserStrm = OpenStream( EXC_STREAM_USERNAMES );
if( !xUserStrm.Is() )
return;
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index b83928dca397..9279bffdaa2c 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -450,7 +450,7 @@ bool ScDrawTransferObj::GetData( const css::datatransfer::DataFlavor& rFlavor, c
return bOK;
}
-bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
+bool ScDrawTransferObj::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
const ::com::sun::star::datatransfer::DataFlavor& /* rFlavor */ )
{
// called from SetObject, put data into stream
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 815c10206486..11a696f2b196 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -388,7 +388,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt
return bOK;
}
-bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
+bool ScTransferObj::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
const datatransfer::DataFlavor& rFlavor )
{
// called from SetObject, put data into stream
diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx
index 8f5642b2a59c..5103d3a3312d 100644
--- a/sc/source/ui/inc/drwtrans.hxx
+++ b/sc/source/ui/inc/drwtrans.hxx
@@ -76,7 +76,7 @@ public:
virtual void AddSupportedFormats() SAL_OVERRIDE;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
virtual void ObjectReleased() SAL_OVERRIDE;
virtual void DragFinished( sal_Int8 nDropAction ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index 57d8ea6f8954..c0772b579573 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -73,7 +73,7 @@ public:
virtual void AddSupportedFormats() SAL_OVERRIDE;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId,
const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
virtual void ObjectReleased() SAL_OVERRIDE;
virtual void DragFinished( sal_Int8 nDropAction ) SAL_OVERRIDE;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index fa79b0ce6283..1a895e1403ae 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4032,7 +4032,7 @@ static SotClipboardFormatId lcl_GetDropFormatId( const uno::Reference<datatransf
// If it's a Writer object, insert RTF instead of OLE
bool bDoRtf = false;
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR, aObjDesc ) &&
aDataHelper.GetSotStorageStream( SotClipboardFormatId::EMBED_SOURCE, xStm ) )
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index f1dd83099799..d44bda381190 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -744,7 +744,7 @@ bool ScViewFunc::PasteOnDrawObjectLinked(
if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) )
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
ScDrawView* pScDrawView = GetScDrawView();
if( pScDrawView && aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ) )
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 0ccf18bd5b2b..e15e201c9d44 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -164,7 +164,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
ScAddress( nStartCol, nStartRow, GetViewData().GetTabNo() ) );
OUString aStr;
- SotStorageStreamRef xStream;
+ tools::SvRef<SotStorageStream> xStream;
if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RTF, xStream ) && xStream.Is() )
// mba: clipboard always must contain absolute URLs (could be from alien source)
aImpEx.ImportStream( *xStream, OUString(), SotClipboardFormatId::RTF );
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index c220b234d523..3172c1d69b1f 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -296,7 +296,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
aObj.SetOverwriting( true );
OUString aStr;
- SotStorageStreamRef xStream;
+ tools::SvRef<SotStorageStream> xStream;
if ( aDataHelper.GetSotStorageStream( nFormatId, xStream ) && xStream.Is() )
{
if (nFormatId == SotClipboardFormatId::HTML)
@@ -471,7 +471,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
}
else if (nFormatId == SotClipboardFormatId::SVXB)
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ) )
{
Graphic aGraphic;
@@ -481,7 +481,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
}
else if ( nFormatId == SotClipboardFormatId::DRAWING )
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) )
{
MakeDrawLayer(); // before loading model, so 3D factory has been created
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index ca4c559ceb29..fc44c68aa024 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -98,7 +98,7 @@ public:
void GetState(SfxItemSet&);
SdOptions* GetSdOptions(DocumentType eDocType);
- SD_DLLPUBLIC SotStorageStreamRef GetOptionStream( const OUString& rOptionName, SdOptionStreamMode eMode );
+ SD_DLLPUBLIC tools::SvRef<SotStorageStream> GetOptionStream( const OUString& rOptionName, SdOptionStreamMode eMode );
bool GetWaterCan() const { return bWaterCan; }
void SetWaterCan( bool bWC ) { bWaterCan = bWC; }
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index f9980473940e..6728bc79a6ec 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -1288,7 +1288,7 @@ void PPTWriter::ImplWriteOLE( )
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.
- SotStorageStreamRef xStm = xCleanStorage->OpenSotStream( aPersistStream, STREAM_STD_READWRITE );
+ tools::SvRef<SotStorageStream> xStm = xCleanStorage->OpenSotStream( aPersistStream, STREAM_STD_READWRITE );
xStm->WriteUInt32( 0 ) // no ClipboardId
.WriteUInt32( 4 ) // no target device
.WriteUInt32( 1 ) // aspect ratio
@@ -1472,7 +1472,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL SaveVBA( SfxObjectShell& rDocS
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") );
+ tools::SvRef<SotStorageStream> xTemp = xOverhead2->OpenSotStream( OUString( "_MS_VBA_Overhead2") );
if ( xTemp.Is() && ( xTemp->GetError() == SVSTREAM_OK ) )
{
sal_uInt32 nLen = xTemp->GetSize();
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 567a8371ae35..c7bfef93e4e2 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -2512,7 +2512,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
OUString aOleIdentifier;
if ( !aUserName.isEmpty() )
{
- SotStorageStreamRef xCompObj = xTemp->OpenSotStream(
+ tools::SvRef<SotStorageStream> xCompObj = xTemp->OpenSotStream(
OUString( "\1CompObj" ),
StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL );
sal_uInt32 const nStreamLen = xCompObj->remainingSize();
diff --git a/sd/source/filter/ppt/propread.hxx b/sd/source/filter/ppt/propread.hxx
index 29c71816627b..1ffbaa8113c7 100644
--- a/sd/source/filter/ppt/propread.hxx
+++ b/sd/source/filter/ppt/propread.hxx
@@ -139,7 +139,7 @@ class Section
class PropRead
{
bool mbStatus;
- SotStorageStreamRef mpSvStream;
+ tools::SvRef<SotStorageStream> mpSvStream;
sal_uInt16 mnByteOrder;
sal_uInt16 mnFormat;
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 300c35cb2cd9..b7c627a30b8a 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -586,7 +586,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
// get the input stream (storage or stream)
- SotStorageStreamRef xDocStream;
+ tools::SvRef<SotStorageStream> xDocStream;
Reference<io::XInputStream> xInputStream;
uno::Reference < embed::XStorage > xStorage = mrMedium.GetStorage();
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 14ed722069ed..d1c4e6f2a49d 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -172,11 +172,11 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
* if the stream is opened for reading but does not exist, an 'empty'
* RefObject is returned
*/
-SotStorageStreamRef SdModule::GetOptionStream( const OUString& rOptionName,
+tools::SvRef<SotStorageStream> SdModule::GetOptionStream( const OUString& rOptionName,
SdOptionStreamMode eMode )
{
::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
if( pDocSh )
{
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 422b18ac2e57..044f680c827f 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -571,7 +571,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
return bOK;
}
-bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject, SotClipboardFormatId nObjectType, const DataFlavor& )
+bool SdTransferable::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pObject, SotClipboardFormatId nObjectType, const DataFlavor& )
{
bool bRet = false;
diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx
index b3dc63b2b30e..b5984f82cfe7 100644
--- a/sd/source/ui/dlg/morphdlg.cxx
+++ b/sd/source/ui/dlg/morphdlg.cxx
@@ -79,7 +79,7 @@ void MorphDlg::dispose()
void MorphDlg::LoadSettings()
{
- SotStorageStreamRef xIStm( SD_MOD()->GetOptionStream( OUString(SD_OPTION_MORPHING) ,
+ tools::SvRef<SotStorageStream> xIStm( SD_MOD()->GetOptionStream( OUString(SD_OPTION_MORPHING) ,
SD_OPTION_LOAD ) );
sal_uInt16 nSteps;
bool bOrient, bAttrib;
@@ -103,7 +103,7 @@ void MorphDlg::LoadSettings()
void MorphDlg::SaveSettings() const
{
- SotStorageStreamRef xOStm( SD_MOD()->GetOptionStream( OUString(SD_OPTION_MORPHING) ,
+ tools::SvRef<SotStorageStream> xOStm( SD_MOD()->GetOptionStream( OUString(SD_OPTION_MORPHING) ,
SD_OPTION_STORE ) );
if( xOStm.Is() )
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 7d8245e78e56..99271d207f90 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -312,7 +312,7 @@ IMPL_LINK_NOARG(SdVectorizeDlg, ModifyHdl)
void SdVectorizeDlg::LoadSettings()
{
- SotStorageStreamRef xIStm( SD_MOD()->GetOptionStream(
+ tools::SvRef<SotStorageStream> xIStm( SD_MOD()->GetOptionStream(
OUString( SD_OPTION_VECTORIZE ) ,
SD_OPTION_LOAD ) );
sal_uInt16 nLayers;
@@ -343,7 +343,7 @@ void SdVectorizeDlg::LoadSettings()
void SdVectorizeDlg::SaveSettings() const
{
- SotStorageStreamRef xOStm( SD_MOD()->GetOptionStream(
+ tools::SvRef<SotStorageStream> xOStm( SD_MOD()->GetOptionStream(
OUString(SD_OPTION_VECTORIZE) ,
SD_OPTION_STORE ) );
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 610648d78014..14a0ab01a8c0 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -171,7 +171,7 @@ public:
SdrMediaObj* InsertMediaObj( const OUString& rURL, const OUString& rMimeType, sal_Int8& rAction,
const Point& rPos, const Size& rSize );
- bool PasteRTFTable( SotStorageStreamRef xStm, SdrPage* pPage, SdrInsertFlags nPasteOptions );
+ bool PasteRTFTable( ::tools::SvRef<SotStorageStream> xStm, SdrPage* pPage, SdrInsertFlags nPasteOptions );
bool IsPresObjSelected(bool bOnPage = true, bool bOnMasterPage = true, bool bCheckPresObjListOnly = false, bool bCheckLayoutOnly = false) const;
diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx
index 640c20763b6a..6d78cfbec722 100644
--- a/sd/source/ui/inc/sdxfer.hxx
+++ b/sd/source/ui/inc/sdxfer.hxx
@@ -106,7 +106,7 @@ protected:
virtual void AddSupportedFormats() SAL_OVERRIDE;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
virtual void ObjectReleased() SAL_OVERRIDE;
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index c279456e1348..29e388d34ea0 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -686,7 +686,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
{
if(pIAOHandle->getOverlayObjectList().isHitPixel(rEvt.maPosPixel))
{
- SotStorageStreamRef xStm;
+ ::tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) && xStm.Is() )
{
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 0458af1ac139..eeb5f78b98bd 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -312,7 +312,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// ImageMap?
if( !pOwnData && aDataHelper.HasFormat( SotClipboardFormatId::SVIM ) )
{
- SotStorageStreamRef xStm;
+ ::tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVIM, xStm ) )
{
@@ -329,7 +329,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// if the objekt supports rtf and there is a table involved, default is to create a table
if( aDataHelper.HasFormat( SotClipboardFormatId::RTF ) && ! aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
{
- SotStorageStreamRef xStm;
+ ::tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RTF, xStm ) )
{
@@ -659,7 +659,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if(!bReturn && CHECK_FORMAT_TRANS( SotClipboardFormatId::DRAWING ))
{
- SotStorageStreamRef xStm;
+ ::tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) )
{
@@ -1180,7 +1180,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(SotClipboardFormatId::SVXB))
{
- SotStorageStreamRef xStm;
+ ::tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ) )
{
@@ -1297,7 +1297,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if(!bReturn && pPickObj && CHECK_FORMAT_TRANS( SotClipboardFormatId::XFA ) )
{
- SotStorageStreamRef xStm;
+ ::tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) )
{
@@ -1362,7 +1362,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::HTML))
{
- SotStorageStreamRef xStm;
+ ::tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::HTML, xStm ) )
{
@@ -1374,7 +1374,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::EDITENGINE))
{
- SotStorageStreamRef xStm;
+ ::tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::EDITENGINE, xStm ) )
{
@@ -1403,7 +1403,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::RTF))
{
- SotStorageStreamRef xStm;
+ ::tools::SvRef<SotStorageStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RTF, xStm ) )
{
@@ -1500,7 +1500,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
return bReturn;
}
-bool View::PasteRTFTable( SotStorageStreamRef xStm, SdrPage* pPage, SdrInsertFlags nPasteOptions )
+bool View::PasteRTFTable( ::tools::SvRef<SotStorageStream> xStm, SdrPage* pPage, SdrInsertFlags nPasteOptions )
{
boost::scoped_ptr<SdDrawDocument> pModel(new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh ));
pModel->NewOrLoadCompleted(NEW_DOC);
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index bdb2e9e1b72e..055355b4b675 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -1150,7 +1150,7 @@ ErrCode SfxOlePropertySet::LoadPropertySet( SotStorage* pStrg, const OUString& r
{
if( pStrg )
{
- SotStorageStreamRef xStrm = pStrg->OpenSotStream( rStrmName, STREAM_STD_READ );
+ tools::SvRef<SotStorageStream> xStrm = pStrg->OpenSotStream( rStrmName, STREAM_STD_READ );
if( xStrm.Is() && (xStrm->GetError() == SVSTREAM_OK) )
{
xStrm->SetBufferSize( STREAM_BUFFER_SIZE );
@@ -1168,7 +1168,7 @@ ErrCode SfxOlePropertySet::SavePropertySet( SotStorage* pStrg, const OUString& r
{
if( pStrg )
{
- SotStorageStreamRef xStrm = pStrg->OpenSotStream( rStrmName, StreamMode::TRUNC | STREAM_STD_WRITE );
+ tools::SvRef<SotStorageStream> xStrm = pStrg->OpenSotStream( rStrmName, StreamMode::TRUNC | STREAM_STD_WRITE );
if( xStrm.Is() )
Save( *xStrm );
else
diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx
index 194560504d79..f3c55157e147 100644
--- a/sot/qa/cppunit/test_sot.cxx
+++ b/sot/qa/cppunit/test_sot.cxx
@@ -54,7 +54,7 @@ namespace
return true;
{ // Read the data in one block
- SotStorageStreamRef xStream( xObjStor->OpenSotStream( rStreamName ) );
+ tools::SvRef<SotStorageStream> xStream( xObjStor->OpenSotStream( rStreamName ) );
xStream->Seek(0);
sal_uLong nRemaining = xStream->GetSize() - xStream->Tell();
@@ -66,7 +66,7 @@ namespace
// fprintf(stderr, "readable size %d vs size %d remaining %d\n", nReadableSize, nSize, nReadableSize);
}
{ // Read the data backwards as well
- SotStorageStreamRef xStream( xObjStor->OpenSotStream( rStreamName ) );
+ tools::SvRef<SotStorageStream> xStream( xObjStor->OpenSotStream( rStreamName ) );
for( sal_uLong i = nReadableSize; i > 0; i-- )
{
CPPUNIT_ASSERT_MESSAGE( "sot reading error", !xStream->GetError() );
@@ -129,7 +129,7 @@ namespace
tools::SvRef<SotStorage> xObjStor = new SotStorage(aStream);
CPPUNIT_ASSERT_MESSAGE("sot storage failed to open",
xObjStor.Is() && !xObjStor->GetError());
- SotStorageStreamRef xStream = xObjStor->OpenSotStream("Book");
+ tools::SvRef<SotStorageStream> xStream = xObjStor->OpenSotStream("Book");
CPPUNIT_ASSERT_MESSAGE("stream failed to open",
xStream.Is() && !xObjStor->GetError());
CPPUNIT_ASSERT_MESSAGE("error in opened stream", !xStream->GetError());
diff --git a/sot/workben/testsot.cxx b/sot/workben/testsot.cxx
index 19a42b12907c..9e7c14670bfc 100644
--- a/sot/workben/testsot.cxx
+++ b/sot/workben/testsot.cxx
@@ -31,7 +31,7 @@ int main (int argc, sal_Char **argv)
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);
+ tools::SvRef<SotStorageStream> xStm = x2Stor->OpenSotStream( "Genres", STREAM_STD_READWRITE | StreamMode::TRUNC);
//BYTE szData[100];
//xStm->Write( szData, 100 );
UINT32 nSize = xStm->GetSize();
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index ddc1367f9ab6..5531a4c21427 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -128,7 +128,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener
virtual void OnDocumentPrinterChanged( Printer * ) SAL_OVERRIDE;
virtual bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) SAL_OVERRIDE;
virtual bool Load( SfxMedium& rMedium ) SAL_OVERRIDE;
- void ImplSave( SotStorageStreamRef xStrm );
+ void ImplSave( tools::SvRef<SotStorageStream> xStrm );
virtual bool Save() SAL_OVERRIDE;
virtual bool SaveAs( SfxMedium& rMedium ) SAL_OVERRIDE;
virtual bool ConvertTo( SfxMedium &rMedium ) SAL_OVERRIDE;
diff --git a/starmath/source/eqnolefilehdr.cxx b/starmath/source/eqnolefilehdr.cxx
index ddd6e9593b9e..0853ebd1cac8 100644
--- a/starmath/source/eqnolefilehdr.cxx
+++ b/starmath/source/eqnolefilehdr.cxx
@@ -32,7 +32,7 @@ bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion )
// code snippet copied from MathType::Parse
- SotStorageStreamRef xSrc = pStor->OpenSotStream(
+ tools::SvRef<SotStorageStream> xSrc = pStor->OpenSotStream(
OUString("Equation Native"),
STREAM_STD_READ | StreamMode::NOCREATE);
if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError()))
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index cc5036cf2242..09eb7e1a23d3 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -554,7 +554,7 @@ void MathType::TypeFaceToString(OUString &rTxt,sal_uInt8 nFace)
int MathType::Parse(SotStorage *pStor)
{
- SotStorageStreamRef xSrc = pStor->OpenSotStream(
+ tools::SvRef<SotStorageStream> xSrc = pStor->OpenSotStream(
OUString("Equation Native"),
STREAM_STD_READ | StreamMode::NOCREATE);
if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError()))
@@ -1906,7 +1906,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
0xB2, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
- SotStorageStreamRef xStor( pStor->OpenSotStream(OUString("\1CompObj")));
+ tools::SvRef<SotStorageStream> xStor( pStor->OpenSotStream(OUString("\1CompObj")));
xStor->Write(aCompObj,sizeof(aCompObj));
static sal_uInt8 const aOle[] = {
@@ -1914,12 +1914,12 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
- SotStorageStreamRef xStor2( pStor->OpenSotStream(OUString("\1Ole")));
+ tools::SvRef<SotStorageStream> xStor2( pStor->OpenSotStream(OUString("\1Ole")));
xStor2->Write(aOle,sizeof(aOle));
xStor.Clear();
xStor2.Clear();
- SotStorageStreamRef xSrc = pStor->OpenSotStream(OUString("Equation Native"));
+ tools::SvRef<SotStorageStream> xSrc = pStor->OpenSotStream(OUString("Equation Native"));
if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError()))
return 0;
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 78f034698063..40d2a044142d 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -944,7 +944,7 @@ bool TransferableHelper::SetINetImage( const INetImage& rINtImg,
bool TransferableHelper::SetObject( void* pUserObject, SotClipboardFormatId nUserObjectId, const DataFlavor& rFlavor )
{
- SotStorageStreamRef xStm( new SotStorageStream( OUString() ) );
+ tools::SvRef<SotStorageStream> xStm( new SotStorageStream( OUString() ) );
xStm->SetVersion( SOFFICE_FILEFORMAT_50 );
@@ -973,7 +973,7 @@ bool TransferableHelper::SetObject( void* pUserObject, SotClipboardFormatId nUse
-bool TransferableHelper::WriteObject( SotStorageStreamRef&, void*, SotClipboardFormatId, const DataFlavor& )
+bool TransferableHelper::WriteObject( tools::SvRef<SotStorageStream>&, void*, SotClipboardFormatId, const DataFlavor& )
{
OSL_FAIL( "TransferableHelper::WriteObject( ... ) not implemented" );
return false;
@@ -1663,7 +1663,7 @@ bool TransferableDataHelper::GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx
bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& rBmpEx )
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
DataFlavor aSubstFlavor;
bool bRet(GetSotStorageStream(rFlavor, xStm));
bool bSuppressPNG(false); // #122982# If PNG stream not accessed, but BMP one, suppress trying to load PNG
@@ -1760,7 +1760,7 @@ bool TransferableDataHelper::GetGDIMetaFile(SotClipboardFormatId nFormat, GDIMet
bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIMetaFile& rMtf )
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
DataFlavor aSubstFlavor;
bool bRet = false;
@@ -1857,7 +1857,7 @@ bool TransferableDataHelper::GetGraphic( const ::com::sun::star::datatransfer::D
}
else
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
if( GetSotStorageStream( rFlavor, xStm ) )
{
@@ -1881,7 +1881,7 @@ bool TransferableDataHelper::GetImageMap( SotClipboardFormatId nFormat, ImageMap
bool TransferableDataHelper::GetImageMap( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, ImageMap& rIMap )
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
bool bRet = GetSotStorageStream( rFlavor, xStm );
if( bRet )
@@ -2068,7 +2068,7 @@ bool TransferableDataHelper::GetINetImage(
const ::com::sun::star::datatransfer::DataFlavor& rFlavor,
INetImage& rINtImg )
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
bool bRet = GetSotStorageStream( rFlavor, xStm );
if( bRet )
@@ -2091,7 +2091,7 @@ bool TransferableDataHelper::GetFileList(
const ::com::sun::star::datatransfer::DataFlavor&,
FileList& rFileList )
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
bool bRet = false;
for( sal_uInt32 i = 0, nFormatCount = GetFormatCount(); ( i < nFormatCount ) && !bRet; ++i )
@@ -2148,7 +2148,7 @@ Sequence<sal_Int8> TransferableDataHelper::GetSequence( const DataFlavor& rFlavo
-bool TransferableDataHelper::GetSotStorageStream( SotClipboardFormatId nFormat, SotStorageStreamRef& rxStream )
+bool TransferableDataHelper::GetSotStorageStream( SotClipboardFormatId nFormat, tools::SvRef<SotStorageStream>& rxStream )
{
DataFlavor aFlavor;
return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetSotStorageStream( aFlavor, rxStream ) );
@@ -2156,7 +2156,7 @@ bool TransferableDataHelper::GetSotStorageStream( SotClipboardFormatId nFormat,
-bool TransferableDataHelper::GetSotStorageStream( const DataFlavor& rFlavor, SotStorageStreamRef& rxStream )
+bool TransferableDataHelper::GetSotStorageStream( const DataFlavor& rFlavor, tools::SvRef<SotStorageStream>& rxStream )
{
Sequence<sal_Int8> aSeq = GetSequence(rFlavor, OUString());
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index c2bbb6f75a95..46dfae05b25c 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -541,7 +541,7 @@ bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, cons
return bRet;
}
-bool GalleryTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject,
+bool GalleryTransferable::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject,
SotClipboardFormatId, const datatransfer::DataFlavor& )
{
bool bRet = false;
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 39cf84c464ff..76030e7e1e3d 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -576,7 +576,7 @@ void GalleryTheme::Actualize( const Link<>& rActualizeLink, GalleryProgress* pPr
if ( aSvDrawStorageRef.Is() )
{
const OUString aStmName( GetSvDrawStreamNameFromURL( pEntry->aURL ) );
- SotStorageStreamRef pIStm = aSvDrawStorageRef->OpenSotStream( aStmName, StreamMode::READ );
+ tools::SvRef<SotStorageStream> pIStm = aSvDrawStorageRef->OpenSotStream( aStmName, StreamMode::READ );
if( pIStm && !pIStm->GetError() )
{
@@ -942,7 +942,7 @@ bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool )
if( xStor.Is() )
{
const OUString aStmName( GetSvDrawStreamNameFromURL( aURL ) );
- SotStorageStreamRef xIStm( xStor->OpenSotStream( aStmName, StreamMode::READ ) );
+ tools::SvRef<SotStorageStream> xIStm( xStor->OpenSotStream( aStmName, StreamMode::READ ) );
if( xIStm.Is() && !xIStm->GetError() )
{
@@ -965,7 +965,7 @@ bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPo
if( xStor.Is() )
{
const OUString aStmName( GetSvDrawStreamNameFromURL( aURL ) );
- SotStorageStreamRef xOStm( xStor->OpenSotStream( aStmName, StreamMode::WRITE | StreamMode::TRUNC ) );
+ tools::SvRef<SotStorageStream> xOStm( xStor->OpenSotStream( aStmName, StreamMode::WRITE | StreamMode::TRUNC ) );
if( xOStm.Is() && !xOStm->GetError() )
{
@@ -1001,7 +1001,7 @@ bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPo
return bRet;
}
-bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxModelStream, bool )
+bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, tools::SvRef<SotStorageStream>& rxModelStream, bool )
{
const GalleryObject* pObject = ImplGetGalleryObject( nPos );
bool bRet = false;
@@ -1014,7 +1014,7 @@ bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxMode
if( xStor.Is() )
{
const OUString aStmName( GetSvDrawStreamNameFromURL( aURL ) );
- SotStorageStreamRef xIStm( xStor->OpenSotStream( aStmName, StreamMode::READ ) );
+ tools::SvRef<SotStorageStream> xIStm( xStor->OpenSotStream( aStmName, StreamMode::READ ) );
if( xIStm.Is() && !xIStm->GetError() )
{
@@ -1052,7 +1052,7 @@ bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxMode
return bRet;
}
-bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream, sal_uIntPtr nInsertPos )
+bool GalleryTheme::InsertModelStream( const tools::SvRef<SotStorageStream>& rxModelStream, sal_uIntPtr nInsertPos )
{
INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_SVDRAW ) );
tools::SvRef<SotStorage> xStor( GetSvDrawStorage() );
@@ -1061,7 +1061,7 @@ bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream,
if( xStor.Is() )
{
const OUString aStmName( GetSvDrawStreamNameFromURL( aURL ) );
- SotStorageStreamRef xOStm( xStor->OpenSotStream( aStmName, StreamMode::WRITE | StreamMode::TRUNC ) );
+ tools::SvRef<SotStorageStream> xOStm( xStor->OpenSotStream( aStmName, StreamMode::WRITE | StreamMode::TRUNC ) );
if( xOStm.Is() && !xOStm->GetError() )
{
@@ -1187,7 +1187,7 @@ bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran
if( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
{
- SotStorageStreamRef xModelStm;
+ tools::SvRef<SotStorageStream> xModelStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xModelStm ) )
bRet = InsertModelStream( xModelStm, nInsertPos );
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index cabf37f9e717..058d81bedf77 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -52,7 +52,7 @@ protected:
virtual void AddSupportedFormats() SAL_OVERRIDE;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
public:
@@ -82,7 +82,7 @@ bool SvxColorValueSetData::GetData( const css::datatransfer::DataFlavor& rFlavor
return bRet;
}
-bool SvxColorValueSetData::WriteObject( SotStorageStreamRef& rxOStm, void*, SotClipboardFormatId, const ::com::sun::star::datatransfer::DataFlavor& )
+bool SvxColorValueSetData::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void*, SotClipboardFormatId, const ::com::sun::star::datatransfer::DataFlavor& )
{
WriteXFillExchangeData( *rxOStm, maData );
return( rxOStm->GetError() == ERRCODE_NONE );
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 2dd9c3eba575..b7e36ddb70a1 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -281,7 +281,7 @@ class SW_DLLPUBLIC StgReader : public Reader
OUString aFltName;
protected:
- sal_uLong OpenMainStream( SotStorageStreamRef& rRef, sal_uInt16& rBuffSize );
+ sal_uLong OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize );
public:
virtual int GetReaderType() SAL_OVERRIDE;
OUString GetFltName() { return aFltName; }
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 8474052fcdb6..0263e5a5cf6b 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -125,7 +125,7 @@ bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
== (rFilter.GetUserData() == FILTER_WW8);
if (bRet && !rFilter.IsAllowedAsTemplate())
{
- SotStorageStreamRef xRef =
+ tools::SvRef<SotStorageStream> xRef =
rStg.OpenSotStream(OUString("WordDocument"),
STREAM_STD_READ | StreamMode::NOCREATE );
xRef->Seek(10);
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index ba224a520b08..129beb314f27 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3130,8 +3130,8 @@ void WW8Export::ExportDocument_Impl()
pFib = new WW8Fib( bWrtWW8 ? 8 : 6, m_bDot );
- SotStorageStreamRef xWwStrm( GetWriter().GetStorage().OpenSotStream( m_aMainStg ) );
- SotStorageStreamRef xTableStrm( xWwStrm ), xDataStrm( xWwStrm );
+ tools::SvRef<SotStorageStream> xWwStrm( GetWriter().GetStorage().OpenSotStream( m_aMainStg ) );
+ tools::SvRef<SotStorageStream> xTableStrm( xWwStrm ), xDataStrm( xWwStrm );
xWwStrm->SetBufferSize( 32768 );
if( bWrtWW8 )
@@ -3381,7 +3381,7 @@ void WW8Export::PrepareStorage()
SvGlobalName aGName( nId1, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x46 );
GetWriter().GetStorage().SetClass( aGName, SotClipboardFormatId::NONE, OUString::createFromAscii( pName ));
- SotStorageStreamRef xStor( GetWriter().GetStorage().OpenSotStream(sCompObj) );
+ tools::SvRef<SotStorageStream> xStor( GetWriter().GetStorage().OpenSotStream(sCompObj) );
xStor->Write( pData, nLen );
SwDocShell* pDocShell = m_pDoc->GetDocShell ();
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 94b9cc592df8..f3776bcf7757 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -269,7 +269,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
if ( !xOleStg->IsStream( aObjInfo ) )
{
const sal_uInt8 pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
- SotStorageStreamRef rObjInfoStream = xOleStg->OpenSotStream( aObjInfo );
+ tools::SvRef<SotStorageStream> rObjInfoStream = xOleStg->OpenSotStream( aObjInfo );
if ( rObjInfoStream.Is() && !rObjInfoStream->GetError() )
{
rObjInfoStream->Write( pObjInfoData, sizeof( pObjInfoData ) );
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 586e1b494dff..2b7d3de7f49e 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -33,7 +33,7 @@
#include "ww8glsy.hxx"
#include "ww8par.hxx"
-WW8Glossary::WW8Glossary(SotStorageStreamRef &refStrm, sal_uInt8 nVersion,
+WW8Glossary::WW8Glossary(tools::SvRef<SotStorageStream> &refStrm, sal_uInt8 nVersion,
SotStorage *pStg)
: pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0)
{
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index 3c212cce20c1..b14f1268afd8 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -57,7 +57,7 @@ private:
class WW8Glossary
{
public:
- WW8Glossary( SotStorageStreamRef &refStrm, sal_uInt8 nVersion, SotStorage *pStg=0);
+ WW8Glossary( tools::SvRef<SotStorageStream> &refStrm, sal_uInt8 nVersion, SotStorage *pStg=0);
bool Load( SwTextBlocks &rBlocks, bool bSaveRelFile );
~WW8Glossary() { delete pGlossary; }
WW8GlossaryFib *GetFib() { return pGlossary; }
@@ -65,8 +65,8 @@ public:
private:
WW8GlossaryFib *pGlossary;
- SotStorageStreamRef xTableStream;
- SotStorageStreamRef &rStrm;
+ tools::SvRef<SotStorageStream> xTableStream;
+ tools::SvRef<SotStorageStream> &rStrm;
tools::SvRef<SotStorage> xStg;
sal_uInt16 nStrings;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 55f7212d03e8..e6b7c66245f6 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4849,10 +4849,10 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom,
aBasicImporter.import( m_pDocShell->GetMedium()->GetInputStream() );
lcl_createTemplateToProjectEntry( xPrjNameCache, aURL, aBasicImporter.getProjectName() );
// Read toolbars & menus
- SotStorageStreamRef refMainStream = rRoot->OpenSotStream( OUString( "WordDocument" ));
+ tools::SvRef<SotStorageStream> refMainStream = rRoot->OpenSotStream( OUString( "WordDocument" ));
refMainStream->SetEndian(SvStreamEndian::LITTLE);
WW8Fib aWwFib( *refMainStream, 8 );
- SotStorageStreamRef xTableStream = rRoot->OpenSotStream(OUString::createFromAscii( aWwFib.fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ);
+ tools::SvRef<SotStorageStream> xTableStream = rRoot->OpenSotStream(OUString::createFromAscii( aWwFib.fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ);
if (xTableStream.Is() && SVSTREAM_OK == xTableStream->GetError())
{
@@ -5352,8 +5352,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
return nErrRet;
}
-sal_uLong SwWW8ImplReader::SetSubStreams(SotStorageStreamRef &rTableStream,
- SotStorageStreamRef &rDataStream)
+sal_uLong SwWW8ImplReader::SetSubStreams(tools::SvRef<SotStorageStream> &rTableStream,
+ tools::SvRef<SotStorageStream> &rDataStream)
{
sal_uLong nErrRet = 0;
// 6 stands for "6 OR 7", 7 stands for "ONLY 7"
@@ -5584,7 +5584,7 @@ sal_uLong SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGlos
if (m_pWwFib->nFibError)
nErrRet = ERR_SWG_READ_ERROR;
- SotStorageStreamRef xTableStream, xDataStream;
+ tools::SvRef<SotStorageStream> xTableStream, xDataStream;
if (!nErrRet)
nErrRet = SetSubStreams(xTableStream, xDataStream);
@@ -6027,7 +6027,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC()
return new WW8Reader();
}
-sal_uLong WW8Reader::OpenMainStream( SotStorageStreamRef& rRef, sal_uInt16& rBuffSize )
+sal_uLong WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize )
{
sal_uLong nRet = ERR_SWG_READ_ERROR;
OSL_ENSURE( pStg, "Where is my Storage?" );
@@ -6053,7 +6053,7 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, co
sal_uInt16 nOldBuffSize = 32768;
bool bNew = !bInsertMode; // New Doc (no inserting)
- SotStorageStreamRef refStrm; // So that no one else can steal the Stream
+ tools::SvRef<SotStorageStream> refStrm; // So that no one else can steal the Stream
SvStream* pIn = pStrm;
sal_uLong nRet = 0;
@@ -6139,7 +6139,7 @@ bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, bool bSaveRelFiles) const
WW8Reader *pThis = const_cast<WW8Reader *>(this);
sal_uInt16 nOldBuffSize = 32768;
- SotStorageStreamRef refStrm;
+ tools::SvRef<SotStorageStream> refStrm;
if (!pThis->OpenMainStream(refStrm, nOldBuffSize))
{
WW8Glossary aGloss( refStrm, 8, pStg );
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 6e912159e9b9..b888331cca5f 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -130,7 +130,7 @@ struct WW8LFOInfo;
class WW8Reader : public StgReader
{
virtual sal_uLong Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) SAL_OVERRIDE;
- sal_uLong OpenMainStream( SotStorageStreamRef& rRef, sal_uInt16& rBuffSize );
+ sal_uLong OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize );
public:
virtual int GetReaderType() SAL_OVERRIDE;
@@ -1536,7 +1536,7 @@ private:
void ImportDopTypography(const WW8DopTypography &rTypo);
sal_uLong LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss);
- sal_uLong SetSubStreams(SotStorageStreamRef &rTableStream, SotStorageStreamRef &rDataStream);
+ sal_uLong SetSubStreams(tools::SvRef<SotStorageStream> &rTableStream, tools::SvRef<SotStorageStream> &rDataStream);
sal_uLong CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos);
void ReadDocVars();
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index b65018064951..cc6b92af8571 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -82,7 +82,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, tools::SvRef<SotStorage>& rSrc1
// 0x2c, 0x30 Skalierung x,y in Promille
// 0x34, 0x38, 0x3c, 0x40 Crop Left, Top, Right, Bot in tw
- SotStorageStreamRef xSrc3 = rSrc1->OpenSotStream( OUString("\3PIC"),
+ tools::SvRef<SotStorageStream> xSrc3 = rSrc1->OpenSotStream( OUString("\3PIC"),
STREAM_STD_READ | StreamMode::NOCREATE);
SotStorageStream* pS = xSrc3;
pS->SetEndian( SvStreamEndian::LITTLE );
@@ -127,7 +127,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, tools::SvRef<SotStorage>& rSrc1
static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
tools::SvRef<SotStorage>& rSrc1)
{
- SotStorageStreamRef xSrc2 = rSrc1->OpenSotStream( OUString("\3META"),
+ tools::SvRef<SotStorageStream> xSrc2 = rSrc1->OpenSotStream( OUString("\3META"),
STREAM_STD_READ | StreamMode::NOCREATE);
SotStorageStream* pSt = xSrc2;
pSt->SetEndian( SvStreamEndian::LITTLE );
@@ -182,7 +182,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
static bool SwWw6ReadMacPICTStream(Graphic& rGraph, tools::SvRef<SotStorage>& rSrc1)
{
// 03-META-Stream nicht da. Vielleicht ein 03-PICT ?
- SotStorageStreamRef xSrc4 = rSrc1->OpenSotStream(OUString("\3PICT"));
+ tools::SvRef<SotStorageStream> xSrc4 = rSrc1->OpenSotStream(OUString("\3PICT"));
SotStorageStream* pStp = xSrc4;
pStp->SetEndian( SvStreamEndian::LITTLE );
sal_uInt8 aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
@@ -424,7 +424,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
{
- SotStorageStreamRef xObjInfoSrc = xSrc1->OpenSotStream(OUString("\3ObjInfo"),
+ tools::SvRef<SotStorageStream> xObjInfoSrc = xSrc1->OpenSotStream(OUString("\3ObjInfo"),
STREAM_STD_READ | StreamMode::NOCREATE );
if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
{
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 1c9a4b7e40b0..6e6edcad8ece 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -79,7 +79,7 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >&
// Get data sink ...
uno::Reference< io::XOutputStream > xOut;
- SotStorageStreamRef xDocStream;
+ tools::SvRef<SotStorageStream> xDocStream;
uno::Reference< document::XGraphicObjectResolver > xGraphicResolver;
SvXMLGraphicHelper *pGraphicHelper = 0;
uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index cf964bf93174..d8fd971d5b76 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -610,7 +610,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
return bOK;
}
-bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
+bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream,
void* pObject, SotClipboardFormatId nObjectType,
const DataFlavor& /*rFlavor*/ )
{
@@ -1635,7 +1635,7 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
MSE40HTMLClipFormatObj aMSE40ClpObj;
- SotStorageStreamRef xStrm;
+ tools::SvRef<SotStorageStream> xStrm;
SvStream* pStream = 0;
SwRead pRead = 0;
OUString sData;
@@ -2071,7 +2071,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
OUString aApp, aTopic, aItem;
{
- SotStorageStreamRef xStrm;
+ tools::SvRef<SotStorageStream> xStrm;
if( !rData.GetSotStorageStream( SotClipboardFormatId::LINK, xStrm ))
{
OSL_ENSURE( false, "DDE Data not found." );
@@ -2229,7 +2229,7 @@ bool SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
const Point* pPt, sal_uInt8 nActionFlags, bool bNeedToSelectBeforePaste)
{
bool nRet = false;
- SotStorageStreamRef xStrm;
+ tools::SvRef<SotStorageStream> xStrm;
if( rData.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStrm ))
{
xStrm->SetVersion( SOFFICE_FILEFORMAT_50 );
@@ -2271,7 +2271,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
case SotClipboardFormatId::SVXB:
{
- SotStorageStreamRef xStm;
+ tools::SvRef<SotStorageStream> xStm;
if(rData.GetSotStorageStream(SotClipboardFormatId::SVXB, xStm))
{
diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx
index ec11afc86846..29b3df2dee15 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -136,7 +136,7 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper
protected:
virtual void AddSupportedFormats() SAL_OVERRIDE;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
- virtual bool WriteObject( SotStorageStreamRef& rxOStm,
+ virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm,
void* pUserObject,
SotClipboardFormatId nUserObjectId,
const css::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 9b6652f8f801..535c3e99f4b1 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -77,7 +77,7 @@ typedef struct
typedef struct
{
- SotStorageStreamRef ref;
+ tools::SvRef<SotStorageStream> ref;
} SotStorageStreamRefWrapper;
namespace
@@ -143,13 +143,13 @@ struct OLEStorageImpl
void initialize(SvStream *pStream);
- SotStorageStreamRef getStream(const rtl::OUString &rPath);
- SotStorageStreamRef getStream(std::size_t nId);
+ tools::SvRef<SotStorageStream> getStream(const rtl::OUString &rPath);
+ tools::SvRef<SotStorageStream> getStream(std::size_t nId);
private:
void traverse(const tools::SvRef<SotStorage> &rStorage, const rtl::OUString &rPath);
- SotStorageStreamRef createStream(const rtl::OUString &rPath);
+ tools::SvRef<SotStorageStream> createStream(const rtl::OUString &rPath);
public:
SotStorageRefWrapper mxRootStorage; //< root storage of the OLE2
@@ -186,7 +186,7 @@ void OLEStorageImpl::initialize(SvStream *const pStream)
mbInitialized = true;
}
-SotStorageStreamRef OLEStorageImpl::getStream(const rtl::OUString &rPath)
+tools::SvRef<SotStorageStream> OLEStorageImpl::getStream(const rtl::OUString &rPath)
{
const rtl::OUString aPath(lcl_normalizeSubStreamPath(rPath));
NameMap_t::iterator aIt = maNameMap.find(aPath);
@@ -195,7 +195,7 @@ SotStorageStreamRef OLEStorageImpl::getStream(const rtl::OUString &rPath)
// Later, given how libcdr's zip stream implementation behaves,
// return the first stream in the storage if there is one.
if (maNameMap.end() == aIt)
- return SotStorageStreamRef();
+ return tools::SvRef<SotStorageStream>();
if (!maStreams[aIt->second].stream.ref.Is())
maStreams[aIt->second].stream.ref = createStream(aPath);
@@ -203,7 +203,7 @@ SotStorageStreamRef OLEStorageImpl::getStream(const rtl::OUString &rPath)
return maStreams[aIt->second].stream.ref;
}
-SotStorageStreamRef OLEStorageImpl::getStream(const std::size_t nId)
+tools::SvRef<SotStorageStream> OLEStorageImpl::getStream(const std::size_t nId)
{
if (!maStreams[nId].stream.ref.Is())
maStreams[nId].stream.ref = createStream(rtl::OStringToOUString(maStreams[nId].name, RTL_TEXTENCODING_UTF8));
@@ -241,7 +241,7 @@ void OLEStorageImpl::traverse(const tools::SvRef<SotStorage> &rStorage, const rt
}
}
-SotStorageStreamRef OLEStorageImpl::createStream(const rtl::OUString &rPath)
+tools::SvRef<SotStorageStream> OLEStorageImpl::createStream(const rtl::OUString &rPath)
{
const sal_Int32 nDelim = rPath.lastIndexOf(sal_Unicode('/'));
@@ -425,7 +425,7 @@ private:
bool isZip();
void ensureZipIsInitialized();
- static librevenge::RVNGInputStream *createWPXStream(const SotStorageStreamRef &rxStorage);
+ static librevenge::RVNGInputStream *createWPXStream(const tools::SvRef<SotStorageStream> &rxStorage);
static librevenge::RVNGInputStream *createWPXStream(const Reference<XInputStream> &rxStream);
private:
@@ -732,7 +732,7 @@ void WPXSvInputStreamImpl::invalidateReadBuffer()
}
}
-librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const SotStorageStreamRef &rxStorage)
+librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const tools::SvRef<SotStorageStream> &rxStorage)
{
if (rxStorage.Is())
{