diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-07 09:28:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-07 11:20:44 +0200 |
commit | 7f8f277b94704a289fbbd1b836e4e5d66311580d (patch) | |
tree | 2400b7306a0a2a3ea63aee2e5bfc336b52102635 /sw | |
parent | 8db77209e0755d21d9efc34f70a2978d1df5d2c6 (diff) |
fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
Diffstat (limited to 'sw')
25 files changed, 48 insertions, 48 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 4a07fd04c1b8..014ec0780031 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -98,7 +98,7 @@ protected: xImporter->setTargetDocument(mxComponent); uno::Sequence<beans::PropertyValue> aDescriptor(xTextRange.is() ? 3 : 2); aDescriptor[0].Name = "InputStream"; - SvStream* pStream = utl::UcbStreamHelper::CreateStream(getURLFromSrc("/sw/qa/extras/rtfimport/data/") + aFilename, STREAM_WRITE); + SvStream* pStream = utl::UcbStreamHelper::CreateStream(getURLFromSrc("/sw/qa/extras/rtfimport/data/") + aFilename, StreamMode::WRITE); uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pStream)); aDescriptor[0].Value <<= xStream; aDescriptor[1].Name = "InsertMode"; diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 4c7611c86cfb..047d0b05cb99 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -261,7 +261,7 @@ void SwUiWriterTest::testImportRTF() // Insert the RTF at the cursor position. OString aData = "{\\rtf1 Hello world!\\par}"; - SvMemoryStream aStream(const_cast<sal_Char*>(aData.getStr()), aData.getLength(), STREAM_READ); + SvMemoryStream aStream(const_cast<sal_Char*>(aData.getStr()), aData.getLength(), StreamMode::READ); SwReader aReader(aStream, OUString(), OUString(), *pWrtShell->GetCrsr()); Reader* pRTFReader = SwReaderWriter::GetReader(READER_WRITER_RTF); CPPUNIT_ASSERT(pRTFReader != 0); diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 583989166dc2..7e8953ed03e7 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1400,7 +1400,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) } SvMemoryStream aStrm( (void*)aSeq.getConstArray(), aSeq.getLength(), - STREAM_READ ); + StreamMode::READ ); aStrm.Seek( 0 ); // TODO/MBA: it's impossible to set a BaseURL here! diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index e00bef75d5fd..aae12b31e760 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -232,7 +232,7 @@ void SwProtocol::Init() { nRecord = 0; OUString aName("dbg_lay.go"); - SvFileStream aStream( aName, STREAM_READ ); + SvFileStream aStream( aName, StreamMode::READ ); if( aStream.IsOpen() ) { pImpl = new SwImplProtocol(); @@ -266,7 +266,7 @@ bool SwImplProtocol::NewStream() { OUString aName("dbg_lay.out"); nLineCount = 0; - pStream = new SvFileStream( aName, STREAM_WRITE | STREAM_TRUNC ); + pStream = new SvFileStream( aName, StreamMode::WRITE | StreamMode::TRUNC ); if( pStream->GetError() ) { delete pStream; @@ -391,7 +391,7 @@ void SwImplProtocol::CheckLine( OString& rLine ) void SwImplProtocol::FileInit() { OUString aName("dbg_lay.ini"); - SvFileStream aStream( aName, STREAM_READ ); + SvFileStream aStream( aName, StreamMode::READ ); if( aStream.IsOpen() ) { OString aLine; diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 9e76a2059bdb..0270960bc5fe 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1010,7 +1010,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL, else pMed = xReadStorage.is() ? new SfxMedium(xReadStorage, sBaseURL, 0 ) : - new SfxMedium(sFileName, STREAM_READ, 0, 0 ); + new SfxMedium(sFileName, StreamMode::READ, 0, 0 ); if( !sBaseURL.isEmpty() ) pMed->GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, sBaseURL ) ); @@ -1039,7 +1039,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL, pMed->SetFilter( pFilter ); } else - pMed = new SfxMedium(sFileName, STREAM_READ, pFilter, 0); + pMed = new SfxMedium(sFileName, StreamMode::READ, pFilter, 0); } } if(!sFilterOptions.isEmpty()) diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index 265cfbd3efc1..3ab18d83be1f 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -127,7 +127,7 @@ bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter) { SotStorageStreamRef xRef = rStg.OpenSotStream(OUString("WordDocument"), - STREAM_STD_READ | STREAM_NOCREATE ); + STREAM_STD_READ | StreamMode::NOCREATE ); xRef->Seek(10); sal_uInt8 nByte; xRef->ReadUChar( nByte ); diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index d01c456a288d..5065816cdff3 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -508,7 +508,7 @@ SwDoc* Reader::GetTemplateDoc() pTemplate->RemoveAllFmtLanguageDependencies(); ReadXML->SetOrganizerMode( true ); - SfxMedium aMedium( aFileName, sal_False ); + SfxMedium aMedium( aFileName, StreamMode::NONE ); SwReader aRdr( aMedium, OUString(), pTemplate ); aRdr.Read( *ReadXML ); ReadXML->SetOrganizerMode( false ); diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index d4368d298f4f..11a7d85a4606 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -1711,7 +1711,7 @@ bool SwHTMLParser::FileDownload( const OUString& rURL, SwViewShell *pOldVSh = CallEndAction(); // Ein Medium anlegen - SfxMedium aDLMedium( rURL, STREAM_READ | STREAM_SHARE_DENYWRITE ); + SfxMedium aDLMedium( rURL, StreamMode::READ | StreamMode::SHARE_DENYWRITE ); SvStream* pStream = aDLMedium.GetInStream(); if( pStream ) diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index e79dd9d8f54e..232ebcc8f01b 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -3137,14 +3137,14 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb //Open the ObjectPool SvStorageRef xObjPool = rWW8Wrt.GetWriter().GetStorage().OpenSotStorage( OUString(SL::aObjectPool), STREAM_READWRITE | - STREAM_SHARE_DENYALL); + StreamMode::SHARE_DENYALL); //Create a destination storage for the microsoft control OUStringBuffer sStorageName; sal_uInt32 nObjId = GenerateObjectID(); sStorageName.append('_').append( static_cast<sal_Int64>( nObjId )); SvStorageRef xOleStg = xObjPool->OpenSotStorage(sStorageName.makeStringAndClear(), - STREAM_READWRITE|STREAM_SHARE_DENYALL); + STREAM_READWRITE|StreamMode::SHARE_DENYALL); if (!xOleStg.Is()) return false; diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index c45b7e97c924..96dac3ba866e 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2808,7 +2808,7 @@ void WW8Export::WriteFkpPlcUsw() */ // avoid memory leak #i120098#, the unnamed obj will be released in destructor. xEscherStg = GetWriter().GetStorage().OpenSotStorage(OUString(SL::aObjectPool), - STREAM_READWRITE | STREAM_SHARE_DENYALL); + STREAM_READWRITE | StreamMode::SHARE_DENYALL); } // dggInfo - escher stream @@ -3173,11 +3173,11 @@ void WW8Export::ExportDocument_Impl() if ( bEncrypt ) { GetWriter().SetStream( - aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) ); + aTempMain.GetStream( STREAM_READWRITE | StreamMode::SHARE_DENYWRITE ) ); - pTableStrm = aTempTable.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ); + pTableStrm = aTempTable.GetStream( STREAM_READWRITE | StreamMode::SHARE_DENYWRITE ); - pDataStrm = aTempData.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ); + pDataStrm = aTempData.GetStream( STREAM_READWRITE | StreamMode::SHARE_DENYWRITE ); sal_uInt8 aRC4EncryptionHeader[ 52 ] = {0}; pTableStrm->Write( aRC4EncryptionHeader, 52 ); diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index fd2e5b13e7d9..eb1a1c5f151a 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -228,7 +228,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode ) SvStorageRef xObjStg = GetWriter().GetStorage().OpenSotStorage( OUString(SL::aObjectPool), STREAM_READWRITE | - STREAM_SHARE_DENYALL ); + StreamMode::SHARE_DENYALL ); if( xObjStg.Is() ) { @@ -250,7 +250,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode ) OUString sStorageName('_'); sStorageName += OUString::number( nPictureId ); SvStorageRef xOleStg = xObjStg->OpenSotStorage( sStorageName, - STREAM_READWRITE| STREAM_SHARE_DENYALL ); + STREAM_READWRITE| StreamMode::SHARE_DENYALL ); if( xOleStg.Is() ) { /* @@ -342,16 +342,16 @@ void WW8Export::OutputLinkedOLE( const OUString& rOleId ) { uno::Reference< embed::XStorage > xDocStg = pDoc->GetDocStorage(); uno::Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement( "OLELinks", embed::ElementModes::READ ); - SotStorageRef xObjSrc = SotStorage::OpenOLEStorage( xOleStg, rOleId, STREAM_READ ); + SotStorageRef xObjSrc = SotStorage::OpenOLEStorage( xOleStg, rOleId, StreamMode::READ ); SotStorageRef xObjStg = GetWriter().GetStorage().OpenSotStorage( OUString(SL::aObjectPool), STREAM_READWRITE | - STREAM_SHARE_DENYALL ); + StreamMode::SHARE_DENYALL ); if( xObjStg.Is() && xObjSrc.Is() ) { SotStorageRef xOleDst = xObjStg->OpenSotStorage( rOleId, - STREAM_READWRITE | STREAM_SHARE_DENYALL ); + STREAM_READWRITE | StreamMode::SHARE_DENYALL ); if ( xOleDst.Is() ) xObjSrc->CopyTo( xOleDst ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 9faf65520a87..b763ba5e7acf 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -579,7 +579,7 @@ SdrObject* SwMSDffManager::ImportOLE( long nOLEId, if( GetOLEStorageName( nOLEId, sStorageName, xSrcStg, xDstStg )) { SvStorageRef xSrc = xSrcStg->OpenSotStorage( sStorageName, - STREAM_READWRITE| STREAM_SHARE_DENYALL ); + STREAM_READWRITE| StreamMode::SHARE_DENYALL ); OSL_ENSURE(rReader.pFormImpl, "No Form Implementation!"); ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape; if ( (!(rReader.bIsHeader || rReader.bIsFooter)) && @@ -5378,7 +5378,7 @@ sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream, pTableStream->SetEndian( SvStreamEndian::LITTLE ); rDataStream = pStg->OpenSotStream(OUString(SL::aData), - STREAM_STD_READ | STREAM_NOCREATE ); + STREAM_STD_READ | StreamMode::NOCREATE ); if (rDataStream.Is() && SVSTREAM_OK == rDataStream->GetError()) { @@ -5403,7 +5403,7 @@ namespace { utl::TempFile *pT = new utl::TempFile; pT->EnableKillingFile(); - rSt.Open(pT->GetFileName(), STREAM_READWRITE | STREAM_SHARE_DENYWRITE); + rSt.Open(pT->GetFileName(), STREAM_READWRITE | StreamMode::SHARE_DENYWRITE); return pT; } @@ -6029,7 +6029,7 @@ sal_uLong WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuff { sal_uLong nRet = ERR_SWG_READ_ERROR; OSL_ENSURE( pStg, "Where is my Storage?" ); - rRef = pStg->OpenSotStream( OUString("WordDocument"), STREAM_READ | STREAM_SHARE_DENYALL); + rRef = pStg->OpenSotStream( OUString("WordDocument"), StreamMode::READ | StreamMode::SHARE_DENYALL); if( rRef.Is() ) { diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index afa58466ef4d..02bfbb323227 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -83,7 +83,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1) // 0x34, 0x38, 0x3c, 0x40 Crop Left, Top, Right, Bot in tw SvStorageStreamRef xSrc3 = rSrc1->OpenSotStream( OUString("\3PIC"), - STREAM_STD_READ | STREAM_NOCREATE); + STREAM_STD_READ | StreamMode::NOCREATE); SvStorageStream* pS = xSrc3; pS->SetEndian( SvStreamEndian::LITTLE ); pS->Seek( STREAM_SEEK_TO_END ); @@ -128,7 +128,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp, SvStorageRef& rSrc1) { SvStorageStreamRef xSrc2 = rSrc1->OpenSotStream( OUString("\3META"), - STREAM_STD_READ | STREAM_NOCREATE); + STREAM_STD_READ | StreamMode::NOCREATE); SvStorageStream* pSt = xSrc2; pSt->SetEndian( SvStreamEndian::LITTLE ); sal_uLong nRead = pSt->Read( pMfp, sizeof(*pMfp ) ); @@ -351,7 +351,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, SvStorageRef xSrc0 = pStg->OpenSotStorage(OUString(SL::aObjectPool)); SvStorageRef xSrc1 = xSrc0->OpenSotStorage( aSrcStgName, - STREAM_READWRITE| STREAM_SHARE_DENYALL ); + STREAM_READWRITE| StreamMode::SHARE_DENYALL ); if (pGrf) { @@ -425,7 +425,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, { SvStorageStreamRef xObjInfoSrc = xSrc1->OpenSotStream(OUString("\3ObjInfo"), - STREAM_STD_READ | STREAM_NOCREATE ); + STREAM_STD_READ | StreamMode::NOCREATE ); if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() ) { sal_uInt8 nByte = 0; diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index d837c8ecfae1..44d9d11ff0d7 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -596,7 +596,7 @@ sal_uInt16 SwWW8ImplReader::End_Field() sOleId += OUString::number( maFieldStack.back().mnObjLocFc ); SvStorageRef xSrc0 = pStg->OpenSotStorage(OUString(SL::aObjectPool)); - SvStorageRef xSrc1 = xSrc0->OpenSotStorage( sOleId, STREAM_READ ); + SvStorageRef xSrc1 = xSrc0->OpenSotStorage( sOleId, StreamMode::READ ); // Store it now! uno::Reference< embed::XStorage > xDocStg = GetDoc().GetDocStorage(); diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index b331a8ec210e..347ce0a4a5dc 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -427,7 +427,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog( if(!m_sURL.isEmpty()) { //file exists, has to be loaded here - SfxMedium aMedium( m_sURL, STREAM_READ ); + SfxMedium aMedium( m_sURL, StreamMode::READ ); SvStream* pStream = aMedium.GetInStream(); if(pStream) { @@ -629,7 +629,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl) } if(!m_sURL.isEmpty()) { - SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC ); + SfxMedium aMedium( m_sURL, STREAM_READWRITE|StreamMode::TRUNC ); SvStream* pStream = aMedium.GetOutStream(); pStream->SetLineDelimiter( LINEEND_LF ); pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 697eeaa542f8..4f20503a5105 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -1170,7 +1170,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) { { //read in the temporary file and use it as mail body - SfxMedium aMedium( aName.GetValue(), STREAM_READ); + SfxMedium aMedium( aName.GetValue(), StreamMode::READ); SvStream* pInStream = aMedium.GetInStream(); if(pInStream) pInStream->SetStreamCharSet( eEncoding ); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 325ed0f2f9e5..6ee410e9f64a 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -4051,8 +4051,8 @@ IMPL_LINK_NOARG(SwAutoMarkDlg_Impl, OkHdl) if(m_pEntriesBB->IsModified() || bCreateMode) { SfxMedium aMed( sAutoMarkURL, - bCreateMode ? STREAM_WRITE - : STREAM_WRITE| STREAM_TRUNC ); + bCreateMode ? StreamMode::WRITE + : StreamMode::WRITE| StreamMode::TRUNC ); SvStream* pStrm = aMed.GetOutStream(); pStrm->SetStreamCharSet( RTL_TEXTENCODING_MS_1253 ); if( !pStrm->GetError() ) diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 9bb10f182e6b..85d77e7b29db 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1359,7 +1359,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie SubInitNew(); - SfxMedium aMed( rStreamName, STREAM_READ ); + SfxMedium aMed( rStreamName, StreamMode::READ ); // #i48748# - use class <SwReloadFromHtmlReader>, because // the base URL has to be set to the filename of the document <rMedname> // and not to the base URL of the temporary file <aMed> in order to get @@ -1554,7 +1554,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh, // 2. Open the file ourselves SfxMedium* pMed = new SfxMedium( aTmpObj.GetMainURL( - INetURLObject::NO_DECODE ), STREAM_READ ); + INetURLObject::NO_DECODE ), StreamMode::READ ); if( INET_PROT_FILE == aTmpObj.GetProtocol() ) pMed->Download(); // Touch the medium (download it) diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index 5cd64bf7578c..2dae0401b546 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -58,7 +58,7 @@ void SwChapterNumRules::Save() aURL.setFinalSlash(); aURL.Append(CHAPTER_FILENAME); - SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_WRITE ); + SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::WRITE ); SvStream* pStream = aMedium.GetOutStream(); bool bRet = (pStream && pStream->GetError() == 0); if (bRet) diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index f9204f19d86e..ddcaf6e37314 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1209,7 +1209,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, { { //read in the temporary file and use it as mail body - SfxMedium aMedium( sFileURL, STREAM_READ); + SfxMedium aMedium( sFileURL, StreamMode::READ); SvStream* pInStream = aMedium.GetInStream(); OSL_ENSURE(pInStream, "no output file created?"); if(pInStream) diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index cf9ae1509940..a0b53fa95dad 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -726,7 +726,7 @@ bool SwGlossaryHdl::ImportGlossaries( const OUString& rName ) if( !rName.isEmpty() ) { const SfxFilter* pFilter = 0; - boost::scoped_ptr<SfxMedium> pMed(new SfxMedium( rName, STREAM_READ, 0, 0 )); + boost::scoped_ptr<SfxMedium> pMed(new SfxMedium( rName, StreamMode::READ, 0, 0 )); SfxFilterMatcher aMatcher( OUString("swriter") ); pMed->UseInteractionHandler( true ); if (!aMatcher.GuessFilter(*pMed, &pFilter, SFX_FILTER_VERSION_NONE)) diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 3ff1a1e54b44..ea65e3f6a9b8 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -678,7 +678,7 @@ bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, if ( xTransact.is() ) xTransact->commit(); - boost::scoped_ptr<SvStream> pSrcStm(::utl::UcbStreamHelper::CreateStream( aTempFile.GetURL(), STREAM_READ )); + boost::scoped_ptr<SvStream> pSrcStm(::utl::UcbStreamHelper::CreateStream( aTempFile.GetURL(), StreamMode::READ )); if( pSrcStm ) { xStream->SetBufferSize( 0xff00 ); @@ -1643,7 +1643,7 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, { pStream = new SvMemoryStream( (void*)sData.getStr(), sData.getLength() * sizeof( sal_Unicode ), - STREAM_READ ); + StreamMode::READ ); #ifdef OSL_BIGENDIAN pStream->SetEndian( SvStreamEndian::BIG ); #else diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 276094914e42..798b58c03bdb 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -280,7 +280,7 @@ SwDocShell* SwSrcView::GetDocShell() void SwSrcView::SaveContent(const OUString& rTmpFile) { - SfxMedium aMedium( rTmpFile, STREAM_WRITE); + SfxMedium aMedium( rTmpFile, StreamMode::WRITE); SvStream* pOutStream = aMedium.GetOutStream(); pOutStream->SetStreamCharSet( lcl_GetStreamCharSet(eLoadEncoding) ); aEditWin.Write(*pOutStream); @@ -326,7 +326,7 @@ void SwSrcView::Execute(SfxRequest& rReq) if( aDlgHelper.Execute() == ERRCODE_NONE) { SfxMedium aMedium( xFP->getFiles().getConstArray()[0], - STREAM_WRITE | STREAM_SHARE_DENYNONE ); + StreamMode::WRITE | StreamMode::SHARE_DENYNONE ); SvStream* pOutStream = aMedium.GetOutStream(); pOutStream->SetStreamCharSet(lcl_GetStreamCharSet(eLoadEncoding)); aEditWin.Write( *pOutStream ); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index afe8916bb716..6451d6bd2b9a 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2072,7 +2072,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS const SfxFilter* pFilter = rFact.GetFilterContainer()->GetFilter4FilterName( rFilterName ); if ( !pFilter ) { - pMed = new SfxMedium(rFileName, STREAM_READ, 0, 0 ); + pMed = new SfxMedium(rFileName, StreamMode::READ, 0, 0 ); SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() ); pMed->UseInteractionHandler( true ); ErrCode nErr = aMatcher.GuessFilter(*pMed, &pFilter, SFX_FILTER_VERSION_NONE); @@ -2082,7 +2082,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS pMed->SetFilter( pFilter ); } else - pMed = new SfxMedium(rFileName, STREAM_READ, pFilter, 0); + pMed = new SfxMedium(rFileName, StreamMode::READ, pFilter, 0); } else { diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx index 799cf3b61490..2f6c57602194 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.cxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx @@ -414,7 +414,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf if( nSize > 0 ) { SvMemoryStream aStream (aSequence.getArray(), nSize, - STREAM_READ ); + StreamMode::READ ); aStream.Seek ( STREAM_SEEK_TO_BEGIN ); static sal_uInt16 const nRange[] = { |