diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-06 16:33:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-07 11:05:04 +0200 |
commit | dc47b2e5136f0f767273dc5fdba5c822575e194b (patch) | |
tree | 128ac4f7f3aca38d0928b76e529ae7fae021f7c3 /sc | |
parent | e14b7660f622a83fe97635649674ade05fe1eb72 (diff) |
Unwind SotStorageRef typedef
Change-Id: I8d5363bb2ad813ef29b4078848914f4b0989b9f1
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/excel.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/excimp8.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/expop2.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xepivot.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xeroot.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xipivot.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xiroot.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xlroot.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/ftools/ftools.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/inc/ftools.hxx | 8 | ||||
-rw-r--r-- | sc/source/filter/inc/xeroot.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/xiroot.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/xlroot.hxx | 12 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/exceldetect.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 |
18 files changed, 37 insertions, 37 deletions
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 ) ); |