diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-08-27 10:18:06 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-27 12:06:15 +0000 |
commit | 33b38082ca63813f7c478945be198cc504efde4b (patch) | |
tree | 030eb240e231d855e477d985c3edc36304dd2914 /sc | |
parent | 81a7aeb0806298c7a8571a46e09f485f3cf5ea13 (diff) |
put StreamMode masks in scope of enum class
Change-Id: I77682f7e289a59b986bb84edf014029a20266470
Reviewed-on: https://gerrit.libreoffice.org/28420
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/helper/qahelper.cxx | 6 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 6 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_sharedformula.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/excimp8.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xeescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/ftools/ftools.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotus.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97esc.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/tablink.cxx | 6 |
14 files changed, 24 insertions, 24 deletions
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index e3493a18652a..7e74465a5cf1 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -548,7 +548,7 @@ ScDocShellRef ScBootstrapFixture::load( bool bReadWrite, ScDocShellRef xDocShRef = new ScDocShell; xDocShRef->GetDocument().EnableUserInteraction(false); - SfxMedium* pSrcMed = new SfxMedium(rURL, bReadWrite ? STREAM_STD_READWRITE : STREAM_STD_READ ); + SfxMedium* pSrcMed = new SfxMedium(rURL, bReadWrite ? StreamMode::STD_READWRITE : StreamMode::STD_READ ); pSrcMed->SetFilter(pFilter); pSrcMed->UseInteractionHandler(false); SfxItemSet* pSet = pSrcMed->GetItemSet(); @@ -628,7 +628,7 @@ ScDocShellRef ScBootstrapFixture::saveAndReload( { utl::TempFile aTempFile; - SfxMedium aStoreMedium( aTempFile.GetURL(), STREAM_STD_WRITE ); + SfxMedium aStoreMedium( aTempFile.GetURL(), StreamMode::STD_WRITE ); SotClipboardFormatId nExportFormat = SotClipboardFormatId::NONE; if (nFormatType == ODS_FORMAT_TYPE) nExportFormat = SotClipboardFormatId::STARCHART_8; @@ -673,7 +673,7 @@ std::shared_ptr<utl::TempFile> ScBootstrapFixture::exportTo( ScDocShell* pShell, std::shared_ptr<utl::TempFile> pTempFile(new utl::TempFile()); pTempFile->EnableKillingFile(); - SfxMedium aStoreMedium( pTempFile->GetURL(), STREAM_STD_WRITE ); + SfxMedium aStoreMedium( pTempFile->GetURL(), StreamMode::STD_WRITE ); SotClipboardFormatId nExportFormat = SotClipboardFormatId::NONE; SfxFilterFlags nFormatType = aFileFormats[nFormat].nFormatType; if (nFormatType == ODS_FORMAT_TYPE) diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 18deabd1969d..ab17fa4d3ee8 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -297,7 +297,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt { utl::TempFile aTempFile; aTempFile.EnableKillingFile(); - SfxMedium aStoreMedium( aTempFile.GetURL(), STREAM_STD_WRITE ); + SfxMedium aStoreMedium( aTempFile.GetURL(), StreamMode::STD_WRITE ); SotClipboardFormatId nExportFormat = SotClipboardFormatId::NONE; if (nFormatType == ODS_FORMAT_TYPE) nExportFormat = SotClipboardFormatId::STARCHART_8; diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index cef4feffda22..c538ec7b056f 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -1537,7 +1537,7 @@ void ScFiltersTest::testPassword_Impl(const OUString& aFileNameBase) const_cast<SfxFilter*>(pFilter.get())->SetVersion(SOFFICE_FILEFORMAT_CURRENT); ScDocShellRef xDocSh = new ScDocShell; - SfxMedium* pMedium = new SfxMedium(aFileName, STREAM_STD_READWRITE); + SfxMedium* pMedium = new SfxMedium(aFileName, StreamMode::STD_READWRITE); SfxItemSet* pSet = pMedium->GetItemSet(); pSet->Put(SfxStringItem(SID_PASSWORD, OUString("test"))); pMedium->SetFilter(pFilter); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 19c9460d0785..954669422cb8 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4431,7 +4431,7 @@ void Test::testCopyPasteFormulas() void Test::testCopyPasteFormulasExternalDoc() { OUString aDocName("file:///source.fake"); - SfxMedium* pMedium = new SfxMedium(aDocName, STREAM_STD_READWRITE); + SfxMedium* pMedium = new SfxMedium(aDocName, StreamMode::STD_READWRITE); getDocShell().DoInitNew(pMedium); m_pDoc = &getDocShell().GetDocument(); @@ -4439,7 +4439,7 @@ void Test::testCopyPasteFormulasExternalDoc() OUString aExtDocName("file:///extdata.fake"); OUString aExtSh1Name("ExtSheet1"); OUString aExtSh2Name("ExtSheet2"); - SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE); + SfxMedium* pMed = new SfxMedium(aExtDocName, StreamMode::STD_READWRITE); xExtDocSh->DoInitNew(pMed); CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.", findLoadedDocShellByName(aExtDocName) != nullptr); diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 6322c14352a2..48105692a707 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -5293,7 +5293,7 @@ void Test::testExternalRef() OUString aExtSh1Name("Data1"); OUString aExtSh2Name("Data2"); OUString aExtSh3Name("Data3"); - SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE); + SfxMedium* pMed = new SfxMedium(aExtDocName, StreamMode::STD_READWRITE); xExtDocSh->DoInitNew(pMed); CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.", findLoadedDocShellByName(aExtDocName) != nullptr); @@ -5463,7 +5463,7 @@ void Test::testExternalRangeName() ScDocShellRef xExtDocSh = new ScDocShell; OUString aExtDocName("file:///extdata.fake"); OUString aExtSh1Name("Data1"); - SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE); + SfxMedium* pMed = new SfxMedium(aExtDocName, StreamMode::STD_READWRITE); xExtDocSh->DoInitNew(pMed); CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.", findLoadedDocShellByName(aExtDocName) != nullptr); @@ -5558,7 +5558,7 @@ void Test::testExternalRefFunctions() { ScDocShellRef xExtDocSh = new ScDocShell; OUString aExtDocName("file:///extdata.fake"); - SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE); + SfxMedium* pMed = new SfxMedium(aExtDocName, StreamMode::STD_READWRITE); xExtDocSh->DoInitNew(pMed); CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.", findLoadedDocShellByName(aExtDocName) != nullptr); diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx index e9833a23238a..6a9a0000651f 100644 --- a/sc/qa/unit/ucalc_sharedformula.cxx +++ b/sc/qa/unit/ucalc_sharedformula.cxx @@ -744,7 +744,7 @@ void Test::testSharedFormulasRefUpdateExternal() ScDocShellRef xExtDocSh = new ScDocShell; OUString aExtDocName("file:///extdata.fake"); - SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE); + SfxMedium* pMed = new SfxMedium(aExtDocName, StreamMode::STD_READWRITE); xExtDocSh->DoInitNew(pMed); ScDocument& rExtDoc = xExtDocSh->GetDocument(); diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 91f9d80499c1..87c478ee93dc 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -374,7 +374,7 @@ void ImportExcel8::ReadBasic() rFilterOpt.IsLoadExcelBasicExecutable() ) { // see if we have the XCB stream - tools::SvRef<SotStorageStream> xXCB = xRootStrg->OpenSotStream( "XCB", STREAM_STD_READ ); + tools::SvRef<SotStorageStream> xXCB = xRootStrg->OpenSotStream( "XCB", StreamMode::STD_READ ); if ( xXCB.Is()|| SVSTREAM_OK == xXCB->GetError() ) { ScCTBWrapper wrapper; diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 11c07055aca1..e340ff8dbf1e 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -1565,7 +1565,7 @@ void XclExpObjectManager::InitStream( bool bTempFile ) if( mxTempFile->IsValid() ) { mxTempFile->EnableKillingFile(); - mxDffStrm.reset( ::utl::UcbStreamHelper::CreateStream( mxTempFile->GetURL(), STREAM_STD_READWRITE ) ); + mxDffStrm.reset( ::utl::UcbStreamHelper::CreateStream( mxTempFile->GetURL(), StreamMode::STD_READWRITE ) ); } } diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index d17e48a09d36..1a8e3cfee6cf 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -169,7 +169,7 @@ tools::SvRef<SotStorage> ScfTools::OpenStorageRead( tools::SvRef<SotStorage> con { tools::SvRef<SotStorage> xSubStrg; if( xStrg.Is() && xStrg->IsContained( rStrgName ) ) - xSubStrg = xStrg->OpenSotStorage( rStrgName, STREAM_STD_READ ); + xSubStrg = xStrg->OpenSotStorage( rStrgName, StreamMode::STD_READ ); return xSubStrg; } @@ -177,7 +177,7 @@ tools::SvRef<SotStorage> ScfTools::OpenStorageWrite( tools::SvRef<SotStorage> co { tools::SvRef<SotStorage> xSubStrg; if( xStrg.Is() ) - xSubStrg = xStrg->OpenSotStorage( rStrgName, STREAM_STD_WRITE ); + xSubStrg = xStrg->OpenSotStorage( rStrgName, StreamMode::STD_WRITE ); return xSubStrg; } @@ -185,7 +185,7 @@ tools::SvRef<SotStorageStream> ScfTools::OpenStorageStreamRead( tools::SvRef<Sot { tools::SvRef<SotStorageStream> xStrm; if( xStrg.Is() && xStrg->IsContained( rStrmName ) && xStrg->IsStream( rStrmName ) ) - xStrm = xStrg->OpenSotStream( rStrmName, STREAM_STD_READ ); + xStrm = xStrg->OpenSotStream( rStrmName, StreamMode::STD_READ ); return xStrm; } @@ -194,7 +194,7 @@ tools::SvRef<SotStorageStream> ScfTools::OpenStorageStreamWrite( tools::SvRef<So OSL_ENSURE( !xStrg || !xStrg->IsContained( rStrmName ), "ScfTools::OpenStorageStreamWrite - stream exists already" ); tools::SvRef<SotStorageStream> xStrm; if( xStrg.Is() ) - xStrm = xStrg->OpenSotStream( rStrmName, STREAM_STD_WRITE | StreamMode::TRUNC ); + xStrm = xStrg->OpenSotStream( rStrmName, StreamMode::STD_WRITE | StreamMode::TRUNC ); return xStrm; } diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx index 8fcc42165078..9267cafe13c0 100644 --- a/sc/source/filter/lotus/lotus.cxx +++ b/sc/source/filter/lotus/lotus.cxx @@ -75,7 +75,7 @@ FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocum // try to load *.FM3 file INetURLObject aURL( rMedium.GetURLObject() ); aURL.setExtension( "FM3" ); - SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_STD_READ ); + SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::STD_READ ); pStream = aMedium.GetInStream(); if ( pStream ) { diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 6b48b87df8b2..7c2d39f0d6a8 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -83,7 +83,7 @@ SvStream* XclEscherExGlobal::ImplQueryPictureStream() if( mxPicTempFile->IsValid() ) { mxPicTempFile->EnableKillingFile(); - mxPicStrm.reset( ::utl::UcbStreamHelper::CreateStream( mxPicTempFile->GetURL(), STREAM_STD_READWRITE ) ); + mxPicStrm.reset( ::utl::UcbStreamHelper::CreateStream( mxPicTempFile->GetURL(), StreamMode::STD_READWRITE ) ); mxPicStrm->SetEndian( SvStreamEndian::LITTLE ); } return mxPicStrm.get(); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index b9dff306376c..0c203013a5dc 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -707,7 +707,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) ); if ( nVersion != 0 ) pSet->Put( SfxInt16Item( SID_VERSION, nVersion ) ); - pMed = new SfxMedium( aFileName, STREAM_STD_READ, pFilter, pSet ); + pMed = new SfxMedium( aFileName, StreamMode::STD_READ, pFilter, pSet ); } else { diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index e2f100ec6fc2..663cbd41c883 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2529,7 +2529,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt } } - unique_ptr<SfxMedium> pMedium(new SfxMedium(aFile, STREAM_STD_READ, pFilter, pSet)); + unique_ptr<SfxMedium> pMedium(new SfxMedium(aFile, StreamMode::STD_READ, pFilter, pSet)); if (pMedium->GetError() != ERRCODE_NONE) return nullptr; diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 78869f91db5b..9cd8ea29c42e 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -182,7 +182,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, if (!aOptions.isEmpty()) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) ); - SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, pFilter, pSet); + SfxMedium* pMed = new SfxMedium(aNewUrl, StreamMode::STD_READ, pFilter, pSet); if ( bInEdit ) // only if using the edit dialog, pMed->UseInteractionHandler(true); // enable the filter options dialog @@ -450,7 +450,7 @@ bool ScDocumentLoader::GetFilterName( const OUString& rFileName, // Filter-Detection std::shared_ptr<const SfxFilter> pSfxFilter; - SfxMedium* pMedium = new SfxMedium( rFileName, STREAM_STD_READ ); + SfxMedium* pMedium = new SfxMedium( rFileName, StreamMode::STD_READ ); if ( pMedium->GetError() == ERRCODE_NONE ) { if ( bWithInteraction ) @@ -492,7 +492,7 @@ SfxMedium* ScDocumentLoader::CreateMedium( const OUString& rFileName, std::share if ( !rOptions.isEmpty() ) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, rOptions ) ); - return new SfxMedium( rFileName, STREAM_STD_READ, pFilter, pSet ); + return new SfxMedium( rFileName, StreamMode::STD_READ, pFilter, pSet ); } ScDocumentLoader::ScDocumentLoader( const OUString& rFileName, |