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 /sot | |
parent | e14b7660f622a83fe97635649674ade05fe1eb72 (diff) |
Unwind SotStorageRef typedef
Change-Id: I8d5363bb2ad813ef29b4078848914f4b0989b9f1
Diffstat (limited to 'sot')
-rw-r--r-- | sot/qa/cppunit/test_sot.cxx | 14 | ||||
-rw-r--r-- | sot/source/sdstor/storage.cxx | 2 | ||||
-rw-r--r-- | sot/workben/testsot.cxx | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx index 03b486932c25..194560504d79 100644 --- a/sot/qa/cppunit/test_sot.cxx +++ b/sot/qa/cppunit/test_sot.cxx @@ -26,10 +26,10 @@ namespace public: SotTest() {} - bool checkStream( const SotStorageRef &xObjStor, + bool checkStream( const tools::SvRef<SotStorage> &xObjStor, const OUString &rStreamName, sal_uLong nSize ); - bool checkStorage( const SotStorageRef &xObjStor ); + bool checkStorage( const tools::SvRef<SotStorage> &xObjStor ); virtual bool load(const OUString &, const OUString &rURL, const OUString &, @@ -44,7 +44,7 @@ namespace CPPUNIT_TEST_SUITE_END(); }; - bool SotTest::checkStream( const SotStorageRef &xObjStor, + bool SotTest::checkStream( const tools::SvRef<SotStorage> &xObjStor, const OUString &rStreamName, sal_uLong nSize ) { @@ -82,7 +82,7 @@ namespace return true; } - bool SotTest::checkStorage( const SotStorageRef &xObjStor ) + bool SotTest::checkStorage( const tools::SvRef<SotStorage> &xObjStor ) { SvStorageInfoList aInfoList; xObjStor->FillInfoList( &aInfoList ); @@ -92,7 +92,7 @@ namespace { if( aIt->IsStorage() ) { - SotStorageRef xChild( xObjStor->OpenSotStorage( aIt->GetName() ) ); + tools::SvRef<SotStorage> xChild( xObjStor->OpenSotStorage( aIt->GetName() ) ); checkStorage( xChild ); } else if( aIt->IsStream() ) @@ -107,7 +107,7 @@ namespace SfxFilterFlags, SotClipboardFormatId, unsigned int) { SvFileStream aStream(rURL, StreamMode::READ); - SotStorageRef xObjStor = new SotStorage(aStream); + tools::SvRef<SotStorage> xObjStor = new SotStorage(aStream); if (!xObjStor.Is() || xObjStor->GetError()) return false; @@ -126,7 +126,7 @@ namespace { OUString aURL(getURLFromSrc("/sot/qa/cppunit/data/pass/fdo84229-1.compound")); SvFileStream aStream(aURL, StreamMode::READ); - SotStorageRef xObjStor = new SotStorage(aStream); + tools::SvRef<SotStorage> xObjStor = new SotStorage(aStream); CPPUNIT_ASSERT_MESSAGE("sot storage failed to open", xObjStor.Is() && !xObjStor->GetError()); SotStorageStreamRef xStream = xObjStor->OpenSotStream("Book"); diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index ae40b74dcd60..7f204e6ac30d 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -547,7 +547,7 @@ SvMemoryStream * SotStorage::CreateMemoryStream() { SvMemoryStream * pStm = NULL; pStm = new SvMemoryStream( 0x8000, 0x8000 ); - SotStorageRef aStg = new SotStorage( *pStm ); + tools::SvRef<SotStorage> aStg = new SotStorage( *pStm ); if( CopyTo( aStg ) ) { aStg->Commit(); diff --git a/sot/workben/testsot.cxx b/sot/workben/testsot.cxx index 1d6185bbe867..19a42b12907c 100644 --- a/sot/workben/testsot.cxx +++ b/sot/workben/testsot.cxx @@ -25,11 +25,11 @@ */ int main (int argc, sal_Char **argv) { - SotStorageRef xStor = new SotStorage( "c:\\temp\\65254.ppt" ); + tools::SvRef<SotStorage> xStor = new SotStorage( "c:\\temp\\65254.ppt" ); /* - SotStorageRef xStor = new SotStorage( "c:\\temp\\video.sdb" ); - SotStorageRef xStor = new SotStorage( "c:\\temp\\video.sdb" ); - SotStorageRef x2Stor = xStor->OpenSotStorage( "1117" ); + tools::SvRef<SotStorage> xStor = new SotStorage( "c:\\temp\\video.sdb" ); + tools::SvRef<SotStorage> xStor = new SotStorage( "c:\\temp\\video.sdb" ); + tools::SvRef<SotStorage> x2Stor = xStor->OpenSotStorage( "1117" ); SotStorageStreamRef xStm = x2Stor->OpenSotStream( "Genres", STREAM_STD_READWRITE | StreamMode::TRUNC); //BYTE szData[100]; |