[Libreoffice-commits] core.git: 5 commits - avmedia/source basctl/source basic/source chart2/source connectivity/source cppcanvas/qa cppcanvas/source cui/source dbaccess/qa dbaccess/source desktop/source drawinglayer/source editeng/source embeddedobj/source embeddedobj/test extensions/source filter/qa filter/source forms/source formula/source fpicker/source framework/source idl/source include/svtools include/tools include/unotools include/vcl libreofficekit/qa lotuswordpro/source oox/source reportdesign/source rsc/source sc/source sd/inc sd/source sfx2/source slideshow/source sot/qa sot/source starmath/source svgio/qa svgio/source svl/source svtools/source svx/source svx/workben sw/qa sw/source test/source toolkit/source tools/qa tools/source unotools/source vcl/android vcl/generic vcl/headless vcl/inc vcl/ios vcl/osx vcl/qa vcl/source vcl/unx vcl/win vcl/workben writerfilter/source xmlsecurity/source
Noel Grandin
noel at peralex.com
Wed Jan 7 01:22:26 PST 2015
avmedia/source/macavf/framegrabber.mm | 2
avmedia/source/opengl/oglplayer.cxx | 2
avmedia/source/quicktime/framegrabber.mm | 2
avmedia/source/win/framegrabber.cxx | 2
basctl/source/basicide/baside2.cxx | 4
basctl/source/basicide/baside2b.cxx | 2
basic/source/basmgr/basmgr.cxx | 8
basic/source/comp/io.cxx | 32 +-
basic/source/inc/iosys.hxx | 4
basic/source/inc/opcodes.hxx | 2
basic/source/runtime/iosys.cxx | 26 -
basic/source/runtime/methods.cxx | 6
basic/source/runtime/runtime.cxx | 6
chart2/source/view/main/OpenGLRender.cxx | 2
connectivity/source/drivers/dbase/DIndex.cxx | 6
connectivity/source/drivers/dbase/DIndexes.cxx | 2
connectivity/source/drivers/dbase/DTable.cxx | 14
connectivity/source/drivers/file/FTable.cxx | 2
connectivity/source/drivers/flat/ETable.cxx | 4
cppcanvas/qa/extras/emfplus/emfplus.cxx | 2
cppcanvas/source/mtfrenderer/emfplus.cxx | 6
cppcanvas/source/mtfrenderer/implrenderer.cxx | 4
cui/source/dialogs/hldocntp.cxx | 2
cui/source/options/personalization.cxx | 2
dbaccess/qa/unit/embeddeddb_performancetest.cxx | 2
dbaccess/source/filter/xml/xmlfilter.cxx | 2
dbaccess/source/ui/app/AppDetailPageHelper.cxx | 2
desktop/source/app/app.cxx | 4
drawinglayer/source/processor2d/vclhelperbufferdevice.cxx | 6
drawinglayer/source/tools/converters.cxx | 6
editeng/source/editeng/editeng.cxx | 2
editeng/source/editeng/impedit2.cxx | 4
editeng/source/editeng/impedit3.cxx | 2
editeng/source/misc/svxacorr.cxx | 16 -
editeng/source/xml/xmltxtexp.cxx | 2
editeng/source/xml/xmltxtimp.cxx | 2
embeddedobj/source/msole/graphconvert.cxx | 2
embeddedobj/test/mtexecutor/bitmapcreator.cxx | 2
extensions/source/plugin/base/context.cxx | 2
extensions/source/plugin/base/xplugin.cxx | 4
extensions/source/scanner/scanwin.cxx | 2
filter/qa/cppunit/filters-dxf-test.cxx | 2
filter/qa/cppunit/filters-eps-test.cxx | 2
filter/qa/cppunit/filters-met-test.cxx | 2
filter/qa/cppunit/filters-pcd-test.cxx | 2
filter/qa/cppunit/filters-pcx-test.cxx | 2
filter/qa/cppunit/filters-pict-test.cxx | 4
filter/qa/cppunit/filters-ppm-test.cxx | 2
filter/qa/cppunit/filters-psd-test.cxx | 2
filter/qa/cppunit/filters-ras-test.cxx | 2
filter/qa/cppunit/filters-tga-test.cxx | 2
filter/qa/cppunit/filters-tiff-test.cxx | 2
filter/source/flash/swfexporter.cxx | 4
filter/source/flash/swfwriter.cxx | 4
filter/source/flash/swfwriter1.cxx | 4
filter/source/graphicfilter/eps/eps.cxx | 2
filter/source/graphicfilter/icgm/cgm.cxx | 2
filter/source/graphicfilter/ieps/ieps.cxx | 4
filter/source/msfilter/escherex.cxx | 4
filter/source/msfilter/msdffimp.cxx | 12
filter/source/msfilter/svdfppt.cxx | 10
filter/source/msfilter/svxmsbas2.cxx | 6
filter/source/pdf/pdffilter.cxx | 2
filter/source/svg/svgexport.cxx | 4
filter/source/svg/svgwriter.cxx | 6
filter/source/xsltdialog/xmlfilterjar.cxx | 4
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 4
forms/source/component/DatabaseForm.cxx | 2
forms/source/component/ImageControl.cxx | 2
forms/source/richtext/richtextvclcontrol.cxx | 2
formula/source/ui/dlg/formula.cxx | 4
fpicker/source/office/iodlg.cxx | 2
framework/source/fwe/helper/actiontriggerhelper.cxx | 4
idl/source/cmptools/lex.cxx | 2
idl/source/prj/command.cxx | 4
idl/source/prj/database.cxx | 2
idl/source/prj/svidl.cxx | 6
include/svtools/imap.hxx | 8
include/tools/stream.hxx | 51 +--
include/tools/vcompat.hxx | 5
include/unotools/moduleoptions.hxx | 9
include/vcl/apptypes.hxx | 25 +
include/vcl/keycodes.hxx | 18 -
include/vcl/svapp.hxx | 2
include/vcl/window.hxx | 8
libreofficekit/qa/unit/tiledrendering.cxx | 2
lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 2
lotuswordpro/source/filter/bencont.cxx | 2
oox/source/drawingml/customshapepresetdata.cxx | 2
oox/source/export/drawingml.cxx | 2
oox/source/export/vmlexport.cxx | 2
reportdesign/source/filter/xml/xmlfilter.cxx | 2
rsc/source/rsc/rsc.cxx | 4
sc/source/core/data/documen8.cxx | 4
sc/source/core/tool/autoform.cxx | 4
sc/source/core/tool/chartlis.cxx | 2
sc/source/core/tool/rechead.cxx | 2
sc/source/filter/excel/excimp8.cxx | 2
sc/source/filter/ftools/ftools.cxx | 2
sc/source/filter/html/htmlexp.cxx | 8
sc/source/filter/xcl97/xcl97rec.cxx | 2
sc/source/ui/app/drwtrans.cxx | 2
sc/source/ui/app/scmod.cxx | 2
sc/source/ui/app/transobj.cxx | 2
sc/source/ui/docshell/datastream.cxx | 2
sc/source/ui/docshell/impex.cxx | 2
sc/source/ui/inc/impex.hxx | 2
sc/source/ui/unoobj/confuno.cxx | 2
sc/source/ui/view/viewfun4.cxx | 2
sd/inc/sdiocmpt.hxx | 14
sd/source/core/CustomAnimationPreset.cxx | 2
sd/source/core/drawdoc3.cxx | 2
sd/source/core/sdiocmpt.cxx | 16 -
sd/source/filter/eppt/eppt.cxx | 2
sd/source/filter/eppt/epptso.cxx | 2
sd/source/filter/eppt/pptexsoundcollection.cxx | 2
sd/source/filter/html/htmlex.cxx | 4
sd/source/filter/html/pubdlg.cxx | 14
sd/source/filter/ppt/pptin.cxx | 2
sd/source/filter/ppt/propread.cxx | 2
sd/source/ui/app/sdxfer.cxx | 2
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 2
sd/source/ui/dlg/morphdlg.cxx | 4
sd/source/ui/dlg/navigatr.cxx | 4
sd/source/ui/dlg/tpaction.cxx | 2
sd/source/ui/dlg/vectdlg.cxx | 4
sd/source/ui/func/fuinsfil.cxx | 2
sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx | 2
sd/source/ui/tools/IdleDetection.cxx | 2
sd/source/ui/unoidl/UnoDocumentSettings.cxx | 2
sd/source/ui/view/sdview4.cxx | 2
sfx2/source/appl/appopen.cxx | 2
sfx2/source/appl/linkmgr2.cxx | 2
sfx2/source/appl/opengrf.cxx | 2
sfx2/source/appl/xpackcreator.cxx | 2
sfx2/source/control/recentdocsview.cxx | 2
sfx2/source/dialog/filedlghelper.cxx | 2
sfx2/source/doc/docfile.cxx | 12
sfx2/source/doc/objmisc.cxx | 2
sfx2/source/doc/objstor.cxx | 8
sfx2/source/doc/oleprops.cxx | 2
sfx2/source/doc/sfxbasemodel.cxx | 2
sfx2/source/inc/openflag.hxx | 6
sfx2/source/view/viewfrm.cxx | 8
slideshow/source/engine/shapes/shapeimporter.cxx | 2
sot/qa/cppunit/test_sot.cxx | 4
sot/source/base/formats.cxx | 2
sot/source/sdstor/stg.cxx | 62 +--
sot/source/sdstor/stgcache.cxx | 6
sot/source/sdstor/stgdir.cxx | 12
sot/source/sdstor/stgelem.cxx | 4
sot/source/sdstor/stgio.cxx | 2
sot/source/sdstor/stgole.cxx | 6
sot/source/sdstor/storage.cxx | 22 -
sot/source/sdstor/ucbstorage.cxx | 121 +++----
sot/source/unoolestorage/xolesimplestorage.cxx | 2
starmath/source/eqnolefilehdr.cxx | 2
starmath/source/mathtype.cxx | 2
starmath/source/unomodel.cxx | 2
svgio/qa/cppunit/SvgImportTest.cxx | 2
svgio/source/svgreader/svgimagenode.cxx | 2
svl/source/items/cntwall.cxx | 2
svtools/source/control/ctrlbox.cxx | 4
svtools/source/control/inettbc.cxx | 2
svtools/source/graphic/descriptor.cxx | 2
svtools/source/graphic/grfattr.cxx | 4
svtools/source/graphic/grfmgr.cxx | 8
svtools/source/graphic/provider.cxx | 8
svtools/source/misc/imap.cxx | 8
svtools/source/misc/imap3.cxx | 8
svtools/source/misc/templatefoldercache.cxx | 2
svtools/source/misc/transfer.cxx | 4
svx/source/core/extedit.cxx | 2
svx/source/core/graphichelper.cxx | 4
svx/source/dialog/imapdlg.cxx | 4
svx/source/gallery2/galini.cxx | 2
svx/source/gallery2/gallery1.cxx | 4
svx/source/gallery2/galmisc.cxx | 2
svx/source/gallery2/galtheme.cxx | 40 +-
svx/source/sidebar/nbdtmg.cxx | 4
svx/source/svdraw/svdograf.cxx | 4
svx/source/svdraw/svdotxln.cxx | 2
svx/source/tbxctrls/Palette.cxx | 4
svx/source/unodraw/unoshap2.cxx | 2
svx/source/xml/xmlgrhlp.cxx | 4
svx/source/xml/xmlxtexp.cxx | 2
svx/source/xml/xmlxtimp.cxx | 2
svx/source/xoutdev/_xoutbmp.cxx | 6
svx/source/xoutdev/xexch.cxx | 4
svx/workben/msview/xmlconfig.cxx | 2
sw/qa/extras/rtfimport/rtfimport.cxx | 2
sw/qa/extras/uiwriter/uiwriter.cxx | 2
sw/source/core/docnode/section.cxx | 2
sw/source/core/inc/layact.hxx | 6
sw/source/core/layout/dbg_lay.cxx | 6
sw/source/core/layout/layact.cxx | 10
sw/source/core/layout/paintfrm.cxx | 2
sw/source/core/unocore/unocrsrhelper.cxx | 4
sw/source/core/view/viewsh.cxx | 2
sw/source/filter/basflt/iodetect.cxx | 2
sw/source/filter/basflt/shellio.cxx | 2
sw/source/filter/html/htmlcss1.cxx | 2
sw/source/filter/ww8/wrtw8esh.cxx | 4
sw/source/filter/ww8/wrtww8.cxx | 8
sw/source/filter/ww8/wrtww8gr.cxx | 10
sw/source/filter/ww8/ww8par.cxx | 8
sw/source/filter/ww8/ww8par4.cxx | 8
sw/source/filter/ww8/ww8par5.cxx | 2
sw/source/ui/dbui/createaddresslistdialog.cxx | 4
sw/source/ui/dbui/mmoutputpage.cxx | 2
sw/source/ui/index/cnttab.cxx | 4
sw/source/uibase/app/docsh2.cxx | 4
sw/source/uibase/config/uinums.cxx | 2
sw/source/uibase/dbui/dbmgr.cxx | 2
sw/source/uibase/dochdl/gloshdl.cxx | 2
sw/source/uibase/dochdl/swdtflvr.cxx | 4
sw/source/uibase/docvw/edtwin.cxx | 2
sw/source/uibase/uiview/srcview.cxx | 4
sw/source/uibase/uiview/view2.cxx | 4
sw/source/uibase/uno/SwXDocumentSettings.cxx | 2
test/source/htmltesttools.cxx | 2
test/source/mtfxmldump.cxx | 2
test/source/primitive2dxmldump.cxx | 2
test/source/xmltesttools.cxx | 2
toolkit/source/awt/vclxprinter.cxx | 2
toolkit/source/helper/vclunohelper.cxx | 4
tools/qa/cppunit/test_stream.cxx | 12
tools/source/fsys/urlobj.cxx | 2
tools/source/generic/poly.cxx | 4
tools/source/generic/poly2.cxx | 4
tools/source/rc/resmgr.cxx | 4
tools/source/stream/stream.cxx | 4
tools/source/stream/strmunx.cxx | 30 -
tools/source/stream/strmwnt.cxx | 6
tools/source/stream/vcompat.cxx | 6
unotools/source/ucbhelper/tempfile.cxx | 2
unotools/source/ucbhelper/ucblockbytes.cxx | 2
unotools/source/ucbhelper/ucbstreamhelper.cxx | 4
vcl/android/androidinst.cxx | 4
vcl/generic/fontmanager/fontcache.cxx | 4
vcl/generic/print/common_gfx.cxx | 2
vcl/headless/svpframe.cxx | 6
vcl/headless/svpinst.cxx | 4
vcl/inc/android/androidinst.hxx | 2
vcl/inc/headless/svpframe.hxx | 2
vcl/inc/headless/svpinst.hxx | 2
vcl/inc/osx/salframe.h | 2
vcl/inc/osx/salinst.h | 2
vcl/inc/salframe.hxx | 7
vcl/inc/salinst.hxx | 3
vcl/inc/unx/gtk/gtkframe.hxx | 2
vcl/inc/unx/gtk/gtkinst.hxx | 2
vcl/inc/unx/saldisp.hxx | 2
vcl/inc/unx/salframe.h | 2
vcl/inc/unx/salinst.h | 2
vcl/inc/win/salframe.h | 2
vcl/inc/win/salinst.h | 2
vcl/ios/iosinst.cxx | 4
vcl/osx/salframe.cxx | 6
vcl/osx/salinst.cxx | 18 -
vcl/qa/cppunit/graphicfilter/filters-test.cxx | 2
vcl/qa/cppunit/wmf/wmfimporttest.cxx | 8
vcl/source/app/svapp.cxx | 2
vcl/source/edit/textview.cxx | 2
vcl/source/filter/GraphicNativeMetadata.cxx | 2
vcl/source/filter/graphicfilter.cxx | 10
vcl/source/filter/graphicfilter2.cxx | 2
vcl/source/filter/sgvmain.cxx | 2
vcl/source/filter/wmf/enhwmf.cxx | 10
vcl/source/gdi/font.cxx | 4
vcl/source/gdi/gdimetafiletools.cxx | 4
vcl/source/gdi/gdimtf.cxx | 6
vcl/source/gdi/gfxlink.cxx | 6
vcl/source/gdi/gradient.cxx | 4
vcl/source/gdi/graphictools.cxx | 8
vcl/source/gdi/hatch.cxx | 4
vcl/source/gdi/impgraph.cxx | 12
vcl/source/gdi/lineinfo.cxx | 4
vcl/source/gdi/mapmod.cxx | 4
vcl/source/gdi/metaact.cxx | 220 +++++++-------
vcl/source/gdi/pdfwriter_impl2.cxx | 2
vcl/source/gdi/pngread.cxx | 2
vcl/source/gdi/print.cxx | 4
vcl/source/gdi/region.cxx | 4
vcl/source/gdi/wall.cxx | 4
vcl/source/opengl/OpenGLHelper.cxx | 2
vcl/source/window/window.cxx | 4
vcl/unx/generic/app/saldisp.cxx | 10
vcl/unx/generic/app/salinst.cxx | 22 -
vcl/unx/generic/dtrans/bmp.cxx | 2
vcl/unx/generic/printer/jobdata.cxx | 2
vcl/unx/generic/printer/ppdparser.cxx | 2
vcl/unx/generic/printer/printerinfomanager.cxx | 2
vcl/unx/generic/window/salframe.cxx | 6
vcl/unx/generic/window/salobj.cxx | 1
vcl/unx/gtk/app/gtkinst.cxx | 14
vcl/unx/gtk/gdi/salprn-gtk.cxx | 2
vcl/unx/gtk/window/gtksalframe.cxx | 8
vcl/win/source/app/salinst.cxx | 14
vcl/win/source/gdi/salgdi3.cxx | 2
vcl/win/source/window/salframe.cxx | 10
vcl/workben/icontest.cxx | 2
vcl/workben/mtfdemo.cxx | 2
writerfilter/source/filter/RtfFilter.cxx | 4
xmlsecurity/source/helper/xmlsignaturehelper2.cxx | 2
305 files changed, 887 insertions(+), 913 deletions(-)
New commits:
commit 7f8f277b94704a289fbbd1b836e4e5d66311580d
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jan 7 09:28:42 2015 +0200
fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
diff --git a/avmedia/source/macavf/framegrabber.mm b/avmedia/source/macavf/framegrabber.mm
index 6c2609d..4662720 100644
--- a/avmedia/source/macavf/framegrabber.mm
+++ b/avmedia/source/macavf/framegrabber.mm
@@ -99,7 +99,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
void* pBitmapBytes = (void*)CFDataGetBytePtr( pCFData );
// convert the image into the return-value type which is a graphic::XGraphic
- SvMemoryStream aMemStm( pBitmapBytes, nBitmapLen, STREAM_READ | STREAM_WRITE );
+ SvMemoryStream aMemStm( pBitmapBytes, nBitmapLen, StreamMode::READ | StreamMode::WRITE );
Graphic aGraphic;
if( GraphicConverter::Import( aMemStm, aGraphic, CVT_TIF ) == ERRCODE_NONE )
xRet = aGraphic.GetXGraphic();
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index 910974e..8bc513b 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -46,7 +46,7 @@ OGLPlayer::~OGLPlayer()
static bool lcl_LoadFile( glTFFile* io_pFile, const OUString& rURL)
{
- SvFileStream aStream( rURL, STREAM_READ );
+ SvFileStream aStream( rURL, StreamMode::READ );
if( !aStream.IsOpen() )
return false;
diff --git a/avmedia/source/quicktime/framegrabber.mm b/avmedia/source/quicktime/framegrabber.mm
index 7f7ee59..5a92e79 100644
--- a/avmedia/source/quicktime/framegrabber.mm
+++ b/avmedia/source/quicktime/framegrabber.mm
@@ -97,7 +97,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
NSData *pBitmap = [pImage TIFFRepresentation];
long nSize = [pBitmap length];
const void* pBitmapData = [pBitmap bytes];
- SvMemoryStream aMemStm( (char *)pBitmapData, nSize, STREAM_READ | STREAM_WRITE );
+ SvMemoryStream aMemStm( (char *)pBitmapData, nSize, StreamMode::READ | StreamMode::WRITE );
Graphic aGraphic;
if ( GraphicConverter::Import( aMemStm, aGraphic, CVT_TIF ) == ERRCODE_NONE )
{
diff --git a/avmedia/source/win/framegrabber.cxx b/avmedia/source/win/framegrabber.cxx
index 1418276..6330382 100644
--- a/avmedia/source/win/framegrabber.cxx
+++ b/avmedia/source/win/framegrabber.cxx
@@ -173,7 +173,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
{
if( SUCCEEDED( pDet->GetBitmapBits( fMediaTime, NULL, pBuffer, nWidth, nHeight ) ) )
{
- SvMemoryStream aMemStm( pBuffer, nSize, STREAM_READ | STREAM_WRITE );
+ SvMemoryStream aMemStm( pBuffer, nSize, StreamMode::READ | StreamMode::WRITE );
Bitmap aBmp;
if( ReadDIB(aBmp, aMemStm, false ) && !aBmp.IsEmpty() )
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d8bf5b4..1d2daa6 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -426,7 +426,7 @@ bool ModulWindow::LoadBasic()
{
Sequence< OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
- SfxMedium aMedium( aCurPath, STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE );
+ SfxMedium aMedium( aCurPath, StreamMode::READ | StreamMode::SHARE_DENYWRITE | StreamMode::NOCREATE );
SvStream* pStream = aMedium.GetInStream();
if ( pStream )
{
@@ -477,7 +477,7 @@ bool ModulWindow::SaveBasicSource()
{
Sequence< OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
- SfxMedium aMedium( aCurPath, STREAM_WRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC );
+ SfxMedium aMedium( aCurPath, StreamMode::WRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC );
SvStream* pStream = aMedium.GetOutStream();
if ( pStream )
{
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 1bd399e..cdd734d 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -110,7 +110,7 @@ void setTextEngineText (ExtTextEngine& rEngine, OUString const& aStr)
rEngine.SetText(OUString());
OString aUTF8Str = OUStringToOString( aStr, RTL_TEXTENCODING_UTF8 );
SvMemoryStream aMemStream( (void*)aUTF8Str.getStr(), aUTF8Str.getLength(),
- STREAM_READ | STREAM_SEEK_TO_BEGIN );
+ StreamMode::READ );
aMemStream.SetStreamCharSet( RTL_TEXTENCODING_UTF8 );
aMemStream.SetLineDelimiter( LINEEND_LF );
rEngine.Read(aMemStream);
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index a9ef314..224d1af 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -100,8 +100,8 @@ static const char szCryptingKey[] = "CryptedBasic";
TYPEINIT1( BasicManager, SfxBroadcaster );
-StreamMode eStreamReadMode = STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL;
-StreamMode eStorageReadMode = STREAM_READ | STREAM_SHARE_DENYWRITE;
+const StreamMode eStreamReadMode = StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL;
+const StreamMode eStorageReadMode = StreamMode::READ | StreamMode::SHARE_DENYWRITE;
// BasicManager impl data
@@ -1536,7 +1536,7 @@ StarBASIC* BasicManager::CreateLib( const OUString& rLibName, const OUString& Pa
{
try
{
- SotStorageRef xStorage = new SotStorage(false, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE);
+ SotStorageRef xStorage = new SotStorage(false, LinkTargetURL, StreamMode::READ | StreamMode::SHARE_DENYWRITE);
if (!xStorage->GetError())
{
pLib = AddLib(*xStorage, rLibName, true);
@@ -2049,7 +2049,7 @@ uno::Sequence< sal_Int8 > implGetDialogData( SbxObject* pDialog )
SbxObject* implCreateDialog( const uno::Sequence< sal_Int8 >& aData )
{
sal_Int8* pData = const_cast< uno::Sequence< sal_Int8 >& >(aData).getArray();
- SvMemoryStream aMemStream( pData, aData.getLength(), STREAM_READ );
+ SvMemoryStream aMemStream( pData, aData.getLength(), StreamMode::READ );
SbxBase* pBase = SbxBase::Load( aMemStream );
return dynamic_cast<SbxObject*>(pBase);
}
diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx
index 0ac30a6..2265ed5 100644
--- a/basic/source/comp/io.cxx
+++ b/basic/source/comp/io.cxx
@@ -173,20 +173,20 @@ void SbiParser::Open()
SbiExpression aFileName( this );
SbiToken eTok;
TestToken( FOR );
- short nMode = 0;
+ StreamMode nMode = StreamMode::NONE;
short nFlags = 0;
switch( Next() )
{
case INPUT:
- nMode = STREAM_READ; nFlags |= SBSTRM_INPUT; break;
+ nMode = StreamMode::READ; nFlags |= SBSTRM_INPUT; break;
case OUTPUT:
- nMode = STREAM_WRITE | STREAM_TRUNC; nFlags |= SBSTRM_OUTPUT; break;
+ nMode = StreamMode::WRITE | StreamMode::TRUNC; nFlags |= SBSTRM_OUTPUT; break;
case APPEND:
- nMode = STREAM_WRITE; nFlags |= SBSTRM_APPEND; break;
+ nMode = StreamMode::WRITE; nFlags |= SBSTRM_APPEND; break;
case RANDOM:
- nMode = STREAM_READ | STREAM_WRITE; nFlags |= SBSTRM_RANDOM; break;
+ nMode = StreamMode::READ | StreamMode::WRITE; nFlags |= SBSTRM_RANDOM; break;
case BINARY:
- nMode = STREAM_READ | STREAM_WRITE; nFlags |= SBSTRM_BINARY; break;
+ nMode = StreamMode::READ | StreamMode::WRITE; nFlags |= SBSTRM_BINARY; break;
default:
Error( SbERR_SYNTAX );
}
@@ -194,20 +194,20 @@ void SbiParser::Open()
{
Next();
eTok = Next();
- // influence only STREAM_READ,STREAM_WRITE-Flags in nMode
- nMode &= ~(STREAM_READ | STREAM_WRITE); // delete
+ // influence only READ,WRITE-Flags in nMode
+ nMode &= ~StreamMode(StreamMode::READ | StreamMode::WRITE); // delete
if( eTok == READ )
{
if( Peek() == WRITE )
{
Next();
- nMode |= (STREAM_READ | STREAM_WRITE);
+ nMode |= (StreamMode::READ | StreamMode::WRITE);
}
else
- nMode |= STREAM_READ;
+ nMode |= StreamMode::READ;
}
else if( eTok == WRITE )
- nMode |= STREAM_WRITE;
+ nMode |= StreamMode::WRITE;
else
Error( SbERR_SYNTAX );
}
@@ -218,7 +218,7 @@ void SbiParser::Open()
#define tmpSHARED
#endif
case SHARED:
- Next(); nMode |= STREAM_SHARE_DENYNONE; break;
+ Next(); nMode |= StreamMode::SHARE_DENYNONE; break;
#ifdef tmpSHARED
#define SHARED
#undef tmpSHARED
@@ -228,11 +228,11 @@ void SbiParser::Open()
eTok = Next();
if( eTok == READ )
{
- if( Peek() == WRITE ) Next(), nMode |= STREAM_SHARE_DENYALL;
- else nMode |= STREAM_SHARE_DENYREAD;
+ if( Peek() == WRITE ) Next(), nMode |= StreamMode::SHARE_DENYALL;
+ else nMode |= StreamMode::SHARE_DENYREAD;
}
else if( eTok == WRITE )
- nMode |= STREAM_SHARE_DENYWRITE;
+ nMode |= StreamMode::SHARE_DENYWRITE;
else
Error( SbERR_SYNTAX );
break;
@@ -262,7 +262,7 @@ void SbiParser::Open()
if( pChan )
pChan->Gen();
aFileName.Gen();
- aGen.Gen( _OPEN, nMode, nFlags );
+ aGen.Gen( _OPEN, static_cast<sal_uInt32>(nMode), nFlags );
bInStatement = false;
}
diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx
index 80ba1ee..85c29ca 100644
--- a/basic/source/inc/iosys.hxx
+++ b/basic/source/inc/iosys.hxx
@@ -51,7 +51,7 @@ class SbiStream
public:
SbiStream();
~SbiStream();
- SbError Open( short, const OString&, short, short, short );
+ SbError Open( short, const OString&, StreamMode, short, short );
SbError Close();
SbError Read(OString&, sal_uInt16 = 0, bool bForceReadingPerByte=false);
SbError Read( char& );
@@ -89,7 +89,7 @@ public:
void SetChannel( short n ) { nChan = n; }
short GetChannel() const { return nChan;}
void ResetChannel() { nChan = 0; }
- void Open( short, const OString&, short, short, short );
+ void Open( short, const OString&, StreamMode, short, short );
void Close();
void Read(OString&, short = 0);
char Read();
diff --git a/basic/source/inc/opcodes.hxx b/basic/source/inc/opcodes.hxx
index 38948d7..6699331 100644
--- a/basic/source/inc/opcodes.hxx
+++ b/basic/source/inc/opcodes.hxx
@@ -136,7 +136,7 @@ enum SbiOpcode {
// management
_STMNT, // begin of a statement (+Line+Col)
// E/A
- _OPEN, // (+SvStreamFlags+Flags)
+ _OPEN, // (+StreamMode+Flags)
// objects
_LOCAL, // define locals variables (+StringID+Typ)
_PUBLIC, // module global variables (+StringID+Typ)
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 4627218..82da678 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -311,7 +311,7 @@ class OslStream : public SvStream
osl::File maFile;
public:
- OslStream( const OUString& rName, short nStrmMode );
+ OslStream( const OUString& rName, StreamMode nStrmMode );
virtual ~OslStream();
virtual sal_Size GetData( void* pData, sal_Size nSize ) SAL_OVERRIDE;
virtual sal_Size PutData( const void* pData, sal_Size nSize ) SAL_OVERRIDE;
@@ -320,20 +320,20 @@ public:
virtual void SetSize( sal_uInt64 nSize) SAL_OVERRIDE;
};
-OslStream::OslStream( const OUString& rName, short nStrmMode )
+OslStream::OslStream( const OUString& rName, StreamMode nStrmMode )
: maFile( rName )
{
sal_uInt32 nFlags;
- if( (nStrmMode & (STREAM_READ | STREAM_WRITE)) == (STREAM_READ | STREAM_WRITE) )
+ if( (nStrmMode & (StreamMode::READ | StreamMode::WRITE)) == (StreamMode::READ | StreamMode::WRITE) )
{
nFlags = osl_File_OpenFlag_Read | osl_File_OpenFlag_Write;
}
- else if( nStrmMode & STREAM_WRITE )
+ else if( nStrmMode & StreamMode::WRITE )
{
nFlags = osl_File_OpenFlag_Write;
}
- else //if( nStrmMode & STREAM_READ )
+ else //if( nStrmMode & StreamMode::READ )
{
nFlags = osl_File_OpenFlag_Read;
}
@@ -562,16 +562,16 @@ void UCBStream::SetSize( sal_uInt64 nSize )
SbError SbiStream::Open
-( short nCh, const OString& rName, short nStrmMode, short nFlags, short nL )
+( short nCh, const OString& rName, StreamMode nStrmMode, short nFlags, short nL )
{
nMode = nFlags;
nLen = nL;
nChan = nCh;
nLine = 0;
nExpandOnWriteTo = 0;
- if( ( nStrmMode & ( STREAM_READ|STREAM_WRITE ) ) == STREAM_READ )
+ if( ( nStrmMode & ( StreamMode::READ|StreamMode::WRITE ) ) == StreamMode::READ )
{
- nStrmMode |= STREAM_NOCREATE;
+ nStrmMode |= StreamMode::NOCREATE;
}
OUString aStr(OStringToOUString(rName, osl_getThreadTextEncoding()));
OUString aNameStr = getFullPath( aStr );
@@ -583,23 +583,23 @@ SbError SbiStream::Open
{
// #??? For write access delete file if it already exists (not for appending)
- if( (nStrmMode & STREAM_WRITE) != 0 && !IsAppend() && !IsBinary() &&
+ if( (nStrmMode & StreamMode::WRITE) && !IsAppend() && !IsBinary() &&
xSFI->exists( aNameStr ) && !xSFI->isFolder( aNameStr ) )
{
xSFI->kill( aNameStr );
}
- if( (nStrmMode & (STREAM_READ | STREAM_WRITE)) == (STREAM_READ | STREAM_WRITE) )
+ if( (nStrmMode & (StreamMode::READ | StreamMode::WRITE)) == (StreamMode::READ | StreamMode::WRITE) )
{
Reference< XStream > xIS = xSFI->openFileReadWrite( aNameStr );
pStrm = new UCBStream( xIS );
}
- else if( nStrmMode & STREAM_WRITE )
+ else if( nStrmMode & StreamMode::WRITE )
{
Reference< XStream > xIS = xSFI->openFileReadWrite( aNameStr );
pStrm = new UCBStream( xIS );
}
- else //if( nStrmMode & STREAM_READ )
+ else //if( nStrmMode & StreamMode::READ )
{
Reference< XInputStream > xIS = xSFI->openFileRead( aNameStr );
pStrm = new UCBStream( xIS );
@@ -787,7 +787,7 @@ SbError SbiIoSystem::GetError()
return n;
}
-void SbiIoSystem::Open(short nCh, const OString& rName, short nMode, short nFlags, short nLen)
+void SbiIoSystem::Open(short nCh, const OString& rName, StreamMode nMode, short nFlags, short nLen)
{
nError = 0;
if( nCh >= CHANNELS || !nCh )
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 6bf3a93..7ccbab7 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4476,7 +4476,7 @@ RTLFUNC(LoadPicture)
}
OUString aFileURL = getFullPath( rPar.Get(1)->GetOUString() );
- boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aFileURL, STREAM_READ ));
+ boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aFileURL, StreamMode::READ ));
if( pStream )
{
Bitmap aBmp;
@@ -4504,7 +4504,7 @@ RTLFUNC(SavePicture)
SbxBase* pObj = static_cast<SbxObject*>(rPar.Get(1)->GetObject());
if( pObj->IsA( TYPE( SbStdPicture ) ) )
{
- SvFileStream aOStream( rPar.Get(2)->GetOUString(), STREAM_WRITE | STREAM_TRUNC );
+ SvFileStream aOStream( rPar.Get(2)->GetOUString(), StreamMode::WRITE | StreamMode::TRUNC );
Graphic aGraphic = static_cast<SbStdPicture*>(pObj)->GetGraphic();
WriteGraphic( aOStream, aGraphic );
}
@@ -4716,7 +4716,7 @@ RTLFUNC(DumpAllObjects)
p = p->GetParent();
}
SvFileStream aStrm( rPar.Get( 1 )->GetOUString(),
- STREAM_WRITE | STREAM_TRUNC );
+ StreamMode::WRITE | StreamMode::TRUNC );
p->Dump( aStrm, rPar.Get( 2 )->GetBool() );
aStrm.Close();
if( aStrm.GetError() != SVSTREAM_OK )
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index e05ea92..1595d5c 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -227,7 +227,7 @@ SbiRuntime::pStep2 SbiRuntime::aStep2[] = {// all opcodes with two operands
// Verwaltung
&SbiRuntime::StepSTMNT, // beginning of a statement (+Line+Col)
// E/A
- &SbiRuntime::StepOPEN, // (+SvStreamFlags+Flags)
+ &SbiRuntime::StepOPEN, // (+StreamMode+Flags)
// Objects
&SbiRuntime::StepLOCAL, // define local variable (+StringId+Typ)
&SbiRuntime::StepPUBLIC, // module global variable (+StringID+Typ)
@@ -4304,7 +4304,7 @@ void SbiRuntime::StepSTMNT( sal_uInt32 nOp1, sal_uInt32 nOp2 )
}
}
-// (+SvStreamFlags+Flags)
+// (+StreamMode+Flags)
// Stack: block length
// channel number
// file name
@@ -4317,7 +4317,7 @@ void SbiRuntime::StepOPEN( sal_uInt32 nOp1, sal_uInt32 nOp2 )
short nBlkLen = pLen->GetInteger();
short nChan = pChan->GetInteger();
OString aName(OUStringToOString(pName->GetOUString(), osl_getThreadTextEncoding()));
- pIosys->Open( nChan, aName, static_cast<short>( nOp1 ),
+ pIosys->Open( nChan, aName, static_cast<StreamMode>( nOp1 ),
static_cast<short>( nOp2 ), nBlkLen );
Error( pIosys->GetError() );
}
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 15073c3..09256b4 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -658,7 +658,7 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, const awt::Point&
OUString aName = OUString( "file:///home/moggi/Documents/work/text" ) + OUString::number( nIdx++ ) + ".png";
try {
vcl::PNGWriter aWriter( rBitmapEx );
- SvFileStream sOutput( aName, STREAM_WRITE );
+ SvFileStream sOutput( aName, StreamMode::WRITE );
aWriter.Write( sOutput );
sOutput.Close();
} catch (...) {
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index c5f876b..c904e17 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -150,9 +150,9 @@ bool ODbaseIndex::openIndexFile()
OUString sFile = getCompletePath();
if(UCBContentHelper::Exists(sFile))
{
- m_pFileStream = OFileTable::createStream_simpleError(sFile, STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE);
+ m_pFileStream = OFileTable::createStream_simpleError(sFile, STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
if (!m_pFileStream)
- m_pFileStream = OFileTable::createStream_simpleError(sFile,STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYNONE);
+ m_pFileStream = OFileTable::createStream_simpleError(sFile, StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYNONE);
if(m_pFileStream)
{
m_pFileStream->SetEndian(SvStreamEndian::LITTLE);
@@ -487,7 +487,7 @@ bool ODbaseIndex::CreateImpl()
::dbtools::throwFunctionSequenceException(*this);
// create the index file
- m_pFileStream = OFileTable::createStream_simpleError(sFile,STREAM_READWRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC);
+ m_pFileStream = OFileTable::createStream_simpleError(sFile,STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC);
if (!m_pFileStream)
{
const OUString sError( m_pTable->getConnection()->getResources().getResourceStringWithSubstitution(
diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx b/connectivity/source/drivers/dbase/DIndexes.cxx
index d3f2c87..38a6d1e 100644
--- a/connectivity/source/drivers/dbase/DIndexes.cxx
+++ b/connectivity/source/drivers/dbase/DIndexes.cxx
@@ -52,7 +52,7 @@ sdbcx::ObjectType ODbaseIndexes::createObject(const OUString& _rName)
}
sdbcx::ObjectType xRet;
- SvStream* pFileStream = ::connectivity::file::OFileTable::createStream_simpleError(sFile,STREAM_READ | STREAM_NOCREATE| STREAM_SHARE_DENYWRITE);
+ SvStream* pFileStream = ::connectivity::file::OFileTable::createStream_simpleError(sFile, StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
if(pFileStream)
{
pFileStream->SetEndian(SvStreamEndian::LITTLE);
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index f8746b9..d96b207 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -494,13 +494,13 @@ void ODbaseTable::construct()
"ODbaseTable::ODbaseTable: invalid extension!");
// getEntry is expected to ensure the correct file name
- m_pFileStream = createStream_simpleError( sFileName, STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE);
+ m_pFileStream = createStream_simpleError( sFileName, STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
m_bWriteable = ( m_pFileStream != NULL );
if ( !m_pFileStream )
{
m_bWriteable = false;
- m_pFileStream = createStream_simpleError( sFileName, STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYNONE);
+ m_pFileStream = createStream_simpleError( sFileName, StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYNONE);
}
if(m_pFileStream)
@@ -519,11 +519,11 @@ void ODbaseTable::construct()
// If the memo file isn't found, the data will be displayed anyhow.
// However, updates can't be done
// but the operation is executed
- m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE);
+ m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
if ( !m_pMemoStream )
{
m_bWriteableMemo = false;
- m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYNONE);
+ m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYNONE);
}
if (m_pMemoStream)
ReadMemoHeader();
@@ -1060,7 +1060,7 @@ bool ODbaseTable::CreateImpl()
if (aContent.isDocument())
{
// Only if the file exists with length > 0 raise an error
- SvStream* pFileStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE),STREAM_READ);
+ SvStream* pFileStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READ);
if (pFileStream && pFileStream->Seek(STREAM_SEEK_TO_END))
{
@@ -1174,7 +1174,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
bCreateMemo = false;
Date aDate( Date::SYSTEM ); // current date
- m_pFileStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),STREAM_READWRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC );
+ m_pFileStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC );
if (!m_pFileStream)
return false;
@@ -1420,7 +1420,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
{
// filehandling macro for table creation
- m_pMemoStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),STREAM_READWRITE | STREAM_SHARE_DENYWRITE);
+ m_pMemoStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),STREAM_READWRITE | StreamMode::SHARE_DENYWRITE);
if (!m_pMemoStream)
return false;
diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx
index 88296de..540a5f0 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -204,7 +204,7 @@ void OFileTable::dropColumn(sal_Int32 /*_nPos*/)
SvStream* OFileTable::createStream_simpleError( const OUString& _rFileName, StreamMode _eOpenMode)
{
- SvStream* pReturn = ::utl::UcbStreamHelper::CreateStream( _rFileName, _eOpenMode, (_eOpenMode & STREAM_NOCREATE) == STREAM_NOCREATE);
+ SvStream* pReturn = ::utl::UcbStreamHelper::CreateStream( _rFileName, _eOpenMode, bool(_eOpenMode & StreamMode::NOCREATE));
if (pReturn && (ERRCODE_NONE != pReturn->GetErrorCode()))
{
delete pReturn;
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 3688e91..df816fb 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -432,10 +432,10 @@ void OFlatTable::construct()
OUString aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE);
- m_pFileStream = createStream_simpleError( aFileName,STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE);
+ m_pFileStream = createStream_simpleError( aFileName, STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYWRITE);
if(!m_pFileStream)
- m_pFileStream = createStream_simpleError( aFileName,STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYNONE);
+ m_pFileStream = createStream_simpleError( aFileName, StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYNONE);
if(m_pFileStream)
{
diff --git a/cppcanvas/qa/extras/emfplus/emfplus.cxx b/cppcanvas/qa/extras/emfplus/emfplus.cxx
index 96bde56..c704b4a 100644
--- a/cppcanvas/qa/extras/emfplus/emfplus.cxx
+++ b/cppcanvas/qa/extras/emfplus/emfplus.cxx
@@ -64,7 +64,7 @@ public:
char* pEnv = getenv("CPPCANVAS_DEBUG_EMFPLUS_DUMP_TO");
if (pEnv)
{
- SvFileStream aStream(OUString::fromUtf8(pEnv), STREAM_WRITE);
+ SvFileStream aStream(OUString::fromUtf8(pEnv), StreamMode::WRITE);
vcl::PNGWriter aWriter(aResultBitmap);
CPPUNIT_ASSERT(aWriter.Write(aStream));
}
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index f58ec95..11843e2 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1136,7 +1136,7 @@ namespace cppcanvas
GraphicFilter filter;
// workaround buggy metafiles, which have wrong mfSize set (n#705956 for example)
- SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), bUseWholeStream ? s.remainingSize() : dataSize - 16, STREAM_READ);
+ SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), bUseWholeStream ? s.remainingSize() : dataSize - 16, StreamMode::READ);
filter.ImportGraphic (graphic, OUString(), mfStream);
@@ -1147,7 +1147,7 @@ namespace cppcanvas
OUString emfp_debug_filename = "/tmp/emf-embedded-stream" +
OUString::number(emfp_debug_stream_number++) + ".emf";
- SvFileStream file( emfp_debug_filename, STREAM_WRITE | STREAM_TRUNC );
+ SvFileStream file( emfp_debug_filename, StreamMode::WRITE | StreamMode::TRUNC );
mfStream.WriteStream(file);
file.Flush();
@@ -1809,7 +1809,7 @@ namespace cppcanvas
OutDevState& rState, const CanvasSharedPtr& rCanvas )
{
sal_uInt32 length = pAct->GetDataSize ();
- SvMemoryStream rMF ((void*) pAct->GetData (), length, STREAM_READ);
+ SvMemoryStream rMF ((void*) pAct->GetData (), length, StreamMode::READ);
length -= 4;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 2bd0956..edc3a6e 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1661,7 +1661,7 @@ namespace cppcanvas
const sal_uInt8* pData = pAct->GetData();
if ( pData )
{
- SvMemoryStream aMemStm( (void*)pData, pAct->GetDataSize(), STREAM_READ );
+ SvMemoryStream aMemStm( (void*)pData, pAct->GetDataSize(), StreamMode::READ );
SvtGraphicFill aFill;
ReadSvtGraphicFill( aMemStm, aFill );
@@ -1788,7 +1788,7 @@ namespace cppcanvas
} else if( pAct->GetComment() == "EMF_PLUS_HEADER_INFO" ) {
SAL_INFO ("cppcanvas.emf", "EMF+ passed to canvas mtf renderer - header info, size: " << pAct->GetDataSize ());
- SvMemoryStream rMF ((void*) pAct->GetData (), pAct->GetDataSize (), STREAM_READ);
+ SvMemoryStream rMF ((void*) pAct->GetData (), pAct->GetDataSize (), StreamMode::READ);
rMF.ReadInt32( nFrameLeft ).ReadInt32( nFrameTop ).ReadInt32( nFrameRight ).ReadInt32( nFrameBottom );
SAL_INFO ("cppcanvas.emf", "EMF+ picture frame: " << nFrameLeft << "," << nFrameTop << " - " << nFrameRight << "," << nFrameBottom);
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 89d58e2..a51f603 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -301,7 +301,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
// check if file exists, warn before we overwrite it
{
com::sun::star::uno::Reference < com::sun::star::task::XInteractionHandler > xHandler;
- SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, xHandler );
+ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ, xHandler );
bool bOk = pIStm && ( pIStm->GetError() == 0);
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 76f1e2a..bf7ccd8 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -371,7 +371,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
gallery += "/gallery/personas/";
rtl::Bootstrap::expandMacros( gallery );
OUString aPersonasList = gallery + "personas_list.txt";
- SvFileStream aStream( aPersonasList, STREAM_READ );
+ SvFileStream aStream( aPersonasList, StreamMode::READ );
GraphicFilter aFilter;
Graphic aGraphic;
sal_Int32 nIndex = 0;
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index 5c0a6b6..1eebc22 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -130,7 +130,7 @@ SvFileStream* EmbeddedDBPerformanceTest::getWordListStream()
OUString wlPath;
createFileURL("wordlist", wlPath);
- SvFileStream *pFile(new SvFileStream(wlPath, STREAM_READ));
+ SvFileStream *pFile(new SvFileStream(wlPath, StreamMode::READ));
if (!pFile)
{
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index a47b6c8..03e94ba 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -444,7 +444,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
uno::Reference<XComponent> xCom(GetModel(),UNO_QUERY);
SfxMediumRef pMedium = new SfxMedium(
- sFileName, ( STREAM_READ | STREAM_NOCREATE ) );
+ sFileName, ( StreamMode::READ | StreamMode::NOCREATE ) );
uno::Reference< embed::XStorage > xStorage;
try
{
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 559f9be..5c26d3a 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -1070,7 +1070,7 @@ void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent)
{
SvMemoryStream aData( aBmpSequence.getArray(),
aBmpSequence.getLength(),
- STREAM_READ );
+ StreamMode::READ );
GraphicConverter::Import(aData,aGraphic);
}
diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
index 94a155d..215f54b 100644
--- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
@@ -305,7 +305,7 @@ namespace drawinglayer
if(bDoSaveForVisualControl)
{
- SvFileStream aNew( "c:\\content.bmp", STREAM_WRITE|STREAM_TRUNC);
+ SvFileStream aNew( "c:\\content.bmp", StreamMode::WRITE|StreamMode::TRUNC);
WriteDIB(aContent, aNew, false, true);
}
@@ -316,7 +316,7 @@ namespace drawinglayer
if(bDoSaveForVisualControl)
{
- SvFileStream aNew( "c:\\transparence.bmp", STREAM_WRITE|STREAM_TRUNC);
+ SvFileStream aNew( "c:\\transparence.bmp", StreamMode::WRITE|StreamMode::TRUNC);
WriteDIB(aAlphaMask.GetBitmap(), aNew, false, true);
}
@@ -329,7 +329,7 @@ namespace drawinglayer
if(bDoSaveForVisualControl)
{
- SvFileStream aNew( "c:\\mask.bmp", STREAM_WRITE|STREAM_TRUNC);
+ SvFileStream aNew( "c:\\mask.bmp", StreamMode::WRITE|StreamMode::TRUNC);
WriteDIB(aMask, aNew, false, true);
}
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index 0fbb6f9..188bfa9 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -102,7 +102,7 @@ namespace drawinglayer
#ifdef DBG_UTIL
if(bDoSaveForVisualControl)
{
- SvFileStream aNew(OUString("c:\\test_content.png"), STREAM_WRITE|STREAM_TRUNC);
+ SvFileStream aNew(OUString("c:\\test_content.png"), StreamMode::WRITE|StreamMode::TRUNC);
::vcl::PNGWriter aPNGWriter(aContent);
aPNGWriter.Write(aNew);
}
@@ -132,7 +132,7 @@ namespace drawinglayer
#ifdef DBG_UTIL
if(bDoSaveForVisualControl)
{
- SvFileStream aNew(OUString("c:\\test_alpha.png"), STREAM_WRITE|STREAM_TRUNC);
+ SvFileStream aNew(OUString("c:\\test_alpha.png"), StreamMode::WRITE|StreamMode::TRUNC);
::vcl::PNGWriter aPNGWriter(aAlpha);
aPNGWriter.Write(aNew);
}
@@ -143,7 +143,7 @@ namespace drawinglayer
#ifdef DBG_UTIL
if(bDoSaveForVisualControl)
{
- SvFileStream aNew(OUString("c:\\test_combined.png"), STREAM_WRITE|STREAM_TRUNC);
+ SvFileStream aNew(OUString("c:\\test_combined.png"), StreamMode::WRITE|StreamMode::TRUNC);
::vcl::PNGWriter aPNGWriter(aRetval);
aPNGWriter.Write(aNew);
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 1e2c2fc..1b8993f 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3480,7 +3480,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer
uno::Sequence< sal_Int8 > aSeq;
aData >>= aSeq;
{
- SvMemoryStream aBinStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ );
+ SvMemoryStream aBinStream( aSeq.getArray(), aSeq.getLength(), StreamMode::READ );
aNewSelection = Read( aBinStream, rBaseURL, EE_FORMAT_BIN, rPaM );
}
bDone = true;
@@ -3502,7 +3502,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer
uno::Sequence< sal_Int8 > aSeq;
aData >>= aSeq;
{
- SvMemoryStream aRTFStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ );
+ SvMemoryStream aRTFStream( aSeq.getArray(), aSeq.getLength(), StreamMode::READ );
aNewSelection = Read( aRTFStream, rBaseURL, EE_FORMAT_RTF, rPaM );
}
bDone = true;
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 0f2467c..943e518 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1997,7 +1997,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
if( rStg.Is() && rStg->IsStream( sStrmName ) )
{
SvStorageStreamRef xStrm = rStg->OpenSotStream( sTmp,
- ( STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE ) );
+ ( StreamMode::READ | StreamMode::SHARE_DENYWRITE | StreamMode::NOCREATE ) );
if( SVSTREAM_OK != xStrm->GetError())
{
xStrm.Clear();
@@ -2071,7 +2071,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
else
{
SotStorageStreamRef xStrm = rStg->OpenSotStream( sStrmName,
- ( STREAM_READ | STREAM_WRITE | STREAM_SHARE_DENYWRITE ) );
+ ( StreamMode::READ | StreamMode::WRITE | StreamMode::SHARE_DENYWRITE ) );
if( xStrm.Is() )
{
xStrm->SetSize( 0 );
@@ -2229,7 +2229,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList()
{
try
{
- SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True );
+ SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE, sal_True );
OUString sTemp ( pXMLImplCplStt_ExcptLstStr );
if( xStg.Is() && xStg->IsContained( sTemp ) )
LoadXMLExceptList_Imp( pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2273,7 +2273,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList()
{
try
{
- SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True );
+ SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE, sal_True );
OUString sTemp ( pXMLImplWrdStt_ExcptLstStr );
if( xStg.Is() && xStg->IsContained( sTemp ) )
LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2388,8 +2388,8 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
}
if (bConvert && !bError)
{
- SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), STREAM_READ, sal_True );
- SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, STREAM_WRITE, sal_True );
+ SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), StreamMode::READ, sal_True );
+ SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, StreamMode::WRITE, sal_True );
if( xSrcStg.Is() && xDstStg.Is() )
{
@@ -2442,7 +2442,7 @@ bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
if( !bRemove )
{
SvStorageStreamRef refList = rStg.OpenSotStream( sStrmName,
- ( STREAM_READ | STREAM_WRITE | STREAM_SHARE_DENYWRITE ) );
+ ( StreamMode::READ | StreamMode::WRITE | StreamMode::SHARE_DENYWRITE ) );
if( refList.Is() )
{
refList->SetSize( 0 );
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 85f1f76..5d72034 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -417,7 +417,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
/* testcode
const OUString aURL( "file:///e:/test.xml" );
- SfxMedium aMedium( aURL, STREAM_WRITE | STREAM_TRUNC, sal_True );
+ SfxMedium aMedium( aURL, StreamMode::WRITE | STREAM_TRUNC, sal_True );
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) );
*/
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index ff6e9674..1461c11 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -167,7 +167,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
/* testcode
const OUString aURL( "file:///e:/test.xml" );
- SfxMedium aMedium( aURL, STREAM_READ | STREAM_NOCREATE, sal_True );
+ SfxMedium aMedium( aURL, StreamMode::READ | STREAM_NOCREATE, sal_True );
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) );
aMedium.GetInStream()->Seek( 0 );
diff --git a/embeddedobj/source/msole/graphconvert.cxx b/embeddedobj/source/msole/graphconvert.cxx
index 37aeb69..d6c93eb 100644
--- a/embeddedobj/source/msole/graphconvert.cxx
+++ b/embeddedobj/source/msole/graphconvert.cxx
@@ -50,7 +50,7 @@ sal_Bool ConvertBufferToFormat( void* pBuf,
if ( pBuf )
{
// First, in case the buffer is already in the requested format, then avoid a conversion.
- SvMemoryStream aMemoryStream(pBuf, nBufSize, STREAM_READ);
+ SvMemoryStream aMemoryStream(pBuf, nBufSize, StreamMode::READ);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
sal_uInt16 nRetFormat = 0;
if (rFilter.CanImportGraphic(OUString(), aMemoryStream, GRFILTER_FORMAT_DONTKNOW, &nRetFormat) == GRFILTER_OK &&
diff --git a/embeddedobj/test/mtexecutor/bitmapcreator.cxx b/embeddedobj/test/mtexecutor/bitmapcreator.cxx
index 1c75fd9..fc54728 100644
--- a/embeddedobj/test/mtexecutor/bitmapcreator.cxx
+++ b/embeddedobj/test/mtexecutor/bitmapcreator.cxx
@@ -74,7 +74,7 @@ uno::Reference< uno::XInterface > SAL_CALL VCLBitmapCreator::createInstanceWithA
throw uno::Exception(); // TODO
BitmapEx aBitmap;
- SvMemoryStream aStream( aOrigBitmap.getArray(), aOrigBitmap.getLength(), STREAM_READ );
+ SvMemoryStream aStream( aOrigBitmap.getArray(), aOrigBitmap.getLength(), StreamMode::READ );
aStream >> aBitmap;
if ( aStream.GetError() )
throw uno::Exception(); // TODO
diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx
index eaf5eab..d62d1fa 100644
--- a/extensions/source/plugin/base/context.cxx
+++ b/extensions/source/plugin/base/context.cxx
@@ -203,7 +203,7 @@ void XPluginContext_Impl::postURL(const Reference< ::com::sun::star::plugin::XPl
OUString aFileName( (char*)buf.getConstArray(), strlen((char*)buf.getConstArray()), m_aEncoding );
INetURLObject aFilePath( aFileName );
aFileName = aFilePath.PathToFileName();
- SvFileStream aStream( aFileName, STREAM_READ );
+ SvFileStream aStream( aFileName, StreamMode::READ );
if( aStream.IsOpen() )
{
sal_Int64 const nBytes = aStream.remainingSize();
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 1675d7e..74106a2 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -980,12 +980,12 @@ PluginInputStream::PluginInputStream( XPlugin_Impl* pPlugin,
{
aTmpFile += aExtension;
}
- m_aFileStream.Open( aTmpFile, STREAM_READ | STREAM_WRITE );
+ m_aFileStream.Open( aTmpFile, StreamMode::READ | StreamMode::WRITE );
if( ! m_aFileStream.IsOpen() )
{
// might be that the extension scrambled the whole filename
osl::FileBase::createTempFile( 0, 0, &aTmpFile );
- m_aFileStream.Open( aTmpFile, STREAM_READ | STREAM_WRITE );
+ m_aFileStream.Open( aTmpFile, StreamMode::READ | StreamMode::WRITE );
}
}
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index ca03b55..7eb6713 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -844,7 +844,7 @@ uno::Sequence< sal_Int8 > ScannerManager::getDIB() throw()
aRet = uno::Sequence< sal_Int8 >( sizeof( BITMAPFILEHEADER ) + nDIBSize );
sal_Int8* pBuf = aRet.getArray();
- SvMemoryStream* pMemStm = new SvMemoryStream( (char*) pBuf, sizeof( BITMAPFILEHEADER ), STREAM_WRITE );
+ SvMemoryStream* pMemStm = new SvMemoryStream( (char*) pBuf, sizeof( BITMAPFILEHEADER ), StreamMode::WRITE );
pMemStm->WriteChar( 'B' ).WriteChar( 'M' ).WriteUInt32( 0 ).WriteUInt32( 0 );
pMemStm->WriteUInt32( sizeof( BITMAPFILEHEADER ) + pBIH->biSize + ( nColEntries * sizeof( RGBQUAD ) ) );
diff --git a/filter/qa/cppunit/filters-dxf-test.cxx b/filter/qa/cppunit/filters-dxf-test.cxx
index 336b6cd..1d78a61 100644
--- a/filter/qa/cppunit/filters-dxf-test.cxx
+++ b/filter/qa/cppunit/filters-dxf-test.cxx
@@ -52,7 +52,7 @@ bool DxfFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/qa/cppunit/filters-eps-test.cxx b/filter/qa/cppunit/filters-eps-test.cxx
index f291d11..2167281 100644
--- a/filter/qa/cppunit/filters-eps-test.cxx
+++ b/filter/qa/cppunit/filters-eps-test.cxx
@@ -52,7 +52,7 @@ bool EpsFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/qa/cppunit/filters-met-test.cxx b/filter/qa/cppunit/filters-met-test.cxx
index b8fc340..4e551d2 100644
--- a/filter/qa/cppunit/filters-met-test.cxx
+++ b/filter/qa/cppunit/filters-met-test.cxx
@@ -52,7 +52,7 @@ bool MetFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/qa/cppunit/filters-pcd-test.cxx b/filter/qa/cppunit/filters-pcd-test.cxx
index 681dc7d..1658f4c 100644
--- a/filter/qa/cppunit/filters-pcd-test.cxx
+++ b/filter/qa/cppunit/filters-pcd-test.cxx
@@ -52,7 +52,7 @@ bool PcdFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/qa/cppunit/filters-pcx-test.cxx b/filter/qa/cppunit/filters-pcx-test.cxx
index 013d96d..92139b1 100644
--- a/filter/qa/cppunit/filters-pcx-test.cxx
+++ b/filter/qa/cppunit/filters-pcx-test.cxx
@@ -52,7 +52,7 @@ bool PcxFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/qa/cppunit/filters-pict-test.cxx b/filter/qa/cppunit/filters-pict-test.cxx
index 0512b9b..35fed61 100644
--- a/filter/qa/cppunit/filters-pict-test.cxx
+++ b/filter/qa/cppunit/filters-pict-test.cxx
@@ -66,7 +66,7 @@ bool PictFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
@@ -80,7 +80,7 @@ void PictFilterTest::testCVEs()
void PictFilterTest::testDontClipTooMuch()
{
- SvFileStream aFileStream(pictURL() + "clipping-problem.pct", STREAM_READ);
+ SvFileStream aFileStream(pictURL() + "clipping-problem.pct", StreamMode::READ);
GDIMetaFile aGDIMetaFile;
pict::ReadPictFile(aFileStream, aGDIMetaFile);
diff --git a/filter/qa/cppunit/filters-ppm-test.cxx b/filter/qa/cppunit/filters-ppm-test.cxx
index 9b281ab..9cdafcd 100644
--- a/filter/qa/cppunit/filters-ppm-test.cxx
+++ b/filter/qa/cppunit/filters-ppm-test.cxx
@@ -52,7 +52,7 @@ bool PpmFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/qa/cppunit/filters-psd-test.cxx b/filter/qa/cppunit/filters-psd-test.cxx
index 95ab882..0da3a9fa 100644
--- a/filter/qa/cppunit/filters-psd-test.cxx
+++ b/filter/qa/cppunit/filters-psd-test.cxx
@@ -52,7 +52,7 @@ bool PsdFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/qa/cppunit/filters-ras-test.cxx b/filter/qa/cppunit/filters-ras-test.cxx
index a4862e6..cbc7bdf 100644
--- a/filter/qa/cppunit/filters-ras-test.cxx
+++ b/filter/qa/cppunit/filters-ras-test.cxx
@@ -52,7 +52,7 @@ bool RasFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/qa/cppunit/filters-tga-test.cxx b/filter/qa/cppunit/filters-tga-test.cxx
index 615afbb..207e9ce 100644
--- a/filter/qa/cppunit/filters-tga-test.cxx
+++ b/filter/qa/cppunit/filters-tga-test.cxx
@@ -52,7 +52,7 @@ bool TgaFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/qa/cppunit/filters-tiff-test.cxx b/filter/qa/cppunit/filters-tiff-test.cxx
index a37ed17..2de6c8f 100644
--- a/filter/qa/cppunit/filters-tiff-test.cxx
+++ b/filter/qa/cppunit/filters-tiff-test.cxx
@@ -52,7 +52,7 @@ bool TiffFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
- SvFileStream aFileStream(rURL, STREAM_READ);
+ SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx
index b2bc39b..2d0feeb 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -705,7 +705,7 @@ bool FlashExporter::getMetaFile( Reference< XComponent >&xComponent, GDIMetaFile
Graphic aGraphic;
GraphicFilter aFilter(false);
- aFilter.ImportGraphic( aGraphic, aFile.GetURL(), *aFile.GetStream( STREAM_READ ) );
+ aFilter.ImportGraphic( aGraphic, aFile.GetURL(), *aFile.GetStream( StreamMode::READ ) );
BitmapEx rBitmapEx( aGraphic.GetBitmap(), Color(255,255,255) );
Rectangle clipRect;
@@ -733,7 +733,7 @@ bool FlashExporter::getMetaFile( Reference< XComponent >&xComponent, GDIMetaFile
}
else
{
- rMtf.Read( *aFile.GetStream( STREAM_READ ) );
+ rMtf.Read( *aFile.GetStream( StreamMode::READ ) );
if(usesClipActions(rMtf))
{
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index ded932b..4e20212 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -55,8 +55,8 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int
maMovieTempFile.EnableKillingFile();
maFontsTempFile.EnableKillingFile();
- mpMovieStream = maMovieTempFile.GetStream( STREAM_WRITE|STREAM_TRUNC );
- mpFontsStream = maFontsTempFile.GetStream( STREAM_WRITE|STREAM_TRUNC );
+ mpMovieStream = maMovieTempFile.GetStream( StreamMode::WRITE|StreamMode::TRUNC );
+ mpFontsStream = maFontsTempFile.GetStream( StreamMode::WRITE|StreamMode::TRUNC );
mnFrames = 0;
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index e2c34c1..ba7c610 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -1649,7 +1649,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
// the meta actions between the "XPATHFILL_SEQ_BEGIN" and "XPATHFILL_SEQ_END" comment.
SvtGraphicFill aFilling;
- SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), STREAM_READ );
+ SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), StreamMode::READ );
// read the fill info
ReadSvtGraphicFill( aMemStm, aFilling );
@@ -1679,7 +1679,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
// the meta actions between the "XPATHFILL_SEQ_BEGIN" and "XPATHFILL_SEQ_END" comment.
SvtGraphicStroke aStroke;
- SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), STREAM_READ );
+ SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), StreamMode::READ );
// read the fill info
ReadSvtGraphicStroke( aMemStm, aStroke );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index ff423e9..da5edcc 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -1291,7 +1291,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
const sal_uInt8* pData = pA->GetData();
if ( pData )
{
- SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), STREAM_READ );
+ SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), StreamMode::READ );
bool bSkipSequence = false;
OString sSeqEnd;
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index d00c40a..45ae54e 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -724,7 +724,7 @@ ImportCGM( OUString const & rFileName, uno::Reference< frame::XModel > const & r
{
if ( nMode & CGM_IMPORT_CGM )
{
- boost::scoped_ptr<SvStream> pIn(::utl::UcbStreamHelper::CreateStream( rFileName, STREAM_READ ));
+ boost::scoped_ptr<SvStream> pIn(::utl::UcbStreamHelper::CreateStream( rFileName, StreamMode::READ ));
if ( pIn )
{
pIn->SetEndian( SvStreamEndian::BIG );
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index db0b165..abd8e1c 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -205,7 +205,7 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
OUString input;
osl::FileBase::getSystemPathFromFileURL(aTempInput.GetURL(), input);
- SvStream* pInputStream = aTempInput.GetStream(STREAM_WRITE);
+ SvStream* pInputStream = aTempInput.GetStream(StreamMode::WRITE);
sal_uInt64 nCount = pInputStream->Write(pBuf, nBytesRead);
aTempInput.CloseStream();
@@ -258,7 +258,7 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
if (pErr) osl_closeFile(pErr);
if (nCount == nBytesRead && bEMFSupported)
{
- SvFileStream aFile(output, STREAM_READ);
+ SvFileStream aFile(output, StreamMode::READ);
if (GraphicConverter::Import(aFile, rGraphic, CVT_EMF) == ERRCODE_NONE)
bRet = true;
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 23fcc48..10b92ec 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1462,7 +1462,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
if ( pAry && nAryLen )
{
Graphic aGraphic;
- SvMemoryStream aTemp( (void*)pAry, nAryLen, STREAM_READ );
+ SvMemoryStream aTemp( (void*)pAry, nAryLen, StreamMode::READ );
sal_uInt32 nErrCode = GraphicConverter::Import( aTemp, aGraphic, CVT_WMF );
if ( nErrCode == ERRCODE_NONE )
{
@@ -1599,7 +1599,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
nFormat != GFF_EMF) )
{
boost::scoped_ptr<SvStream> pIn(::utl::UcbStreamHelper::CreateStream(
- aTmp.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ));
+ aTmp.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ));
if ( pIn )
{
Graphic aGraphic;
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index f575f5a..ba30b8a 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -257,7 +257,7 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( OUString("d:\\ashape.dbg"), aURLStr ) )
{
- boost::scoped_ptr<SvStream> pOut(::utl::UcbStreamHelper::CreateStream( aURLStr, STREAM_WRITE ));
+ boost::scoped_ptr<SvStream> pOut(::utl::UcbStreamHelper::CreateStream( aURLStr, StreamMode::WRITE ));
if( pOut )
{
@@ -6360,7 +6360,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
SAL_INFO("filter.ms", "dumping " << aURLStr);
- boost::scoped_ptr<SvStream> pDbgOut(::utl::UcbStreamHelper::CreateStream(aURLStr, STREAM_TRUNC | STREAM_WRITE));
+ boost::scoped_ptr<SvStream> pDbgOut(::utl::UcbStreamHelper::CreateStream(aURLStr, StreamMode::TRUNC | STREAM_WRITE));
if( pDbgOut )
{
@@ -6653,7 +6653,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
{
bool bMtfRead = false;
SotStorageStreamRef xOle10Stm = rDest->OpenSotStream( OUString("\1Ole10Native"),
- STREAM_WRITE| STREAM_SHARE_DENYALL );
+ StreamMode::WRITE| StreamMode::SHARE_DENYALL );
if( xOle10Stm->GetError() )
return false;
@@ -7033,7 +7033,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
{
SvStorageRef xObjStg = rSrcStorage->OpenSotStorage( rStorageName,
- STREAM_READWRITE| STREAM_SHARE_DENYALL );
+ STREAM_READWRITE| StreamMode::SHARE_DENYALL );
if( xObjStg.Is() )
{
{
@@ -7060,7 +7060,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
// TODO/LATER: should the caller be notified if the aspect changes in future?
SvStorageStreamRef xObjInfoSrc = xObjStg->OpenSotStream(
- OUString( "\3ObjInfo" ), STREAM_STD_READ | STREAM_NOCREATE );
+ OUString( "\3ObjInfo" ), STREAM_STD_READ | StreamMode::NOCREATE );
if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
{
sal_uInt8 nByte = 0;
@@ -7095,7 +7095,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
if ( xObjStor.Is() )
{
- SotStorageRef xSrcStor = rSrcStorage->OpenSotStorage( rStorageName, STREAM_READ );
+ SotStorageRef xSrcStor = rSrcStorage->OpenSotStorage( rStorageName, StreamMode::READ );
xSrcStor->CopyTo( xObjStor );
if( !xObjStor->GetError() )
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 744a7c3..1b09ed4 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1757,7 +1757,7 @@ bool SdrPowerPointOLEDecompress( SvStream& rOutput, SvStream& rInput, sal_uInt32
rInput.Read( pBuf.get(), nInputSize );
ZCodec aZCodec( 0x8000, 0x8000 );
aZCodec.BeginCompression();
- SvMemoryStream aSource( pBuf.get(), nInputSize, STREAM_READ );
+ SvMemoryStream aSource( pBuf.get(), nInputSize, StreamMode::READ );
aZCodec.Decompress( aSource, rOutput );
const bool bSuccess(0L != aZCodec.EndCompression());
rInput.Seek( nOldPos );
@@ -1819,13 +1819,13 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
if ( aTmpFile.IsValid() )
{
- boost::scoped_ptr<SvStream> pDest(::utl::UcbStreamHelper::CreateStream( aTmpFile.GetURL(), STREAM_TRUNC | STREAM_WRITE ));
+ boost::scoped_ptr<SvStream> pDest(::utl::UcbStreamHelper::CreateStream( aTmpFile.GetURL(), StreamMode::TRUNC | StreamMode::WRITE ));
if ( pDest )
bSuccess = SdrPowerPointOLEDecompress( *pDest, rStCtrl, nLen );
}
if ( bSuccess )
{
- boost::scoped_ptr<SvStream> pDest(::utl::UcbStreamHelper::CreateStream( aTmpFile.GetURL(), STREAM_READ ));
+ boost::scoped_ptr<SvStream> pDest(::utl::UcbStreamHelper::CreateStream( aTmpFile.GetURL(), StreamMode::READ ));
Storage* pObjStor = pDest ? new Storage( *pDest, true ) : NULL;
if ( pObjStor )
{
@@ -1843,7 +1843,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
bool bGetItAsOle = ( sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) );
if ( !bGetItAsOle )
{ // maybe there is a contentsstream in here
- xSrcTst = xObjStor->OpenSotStream( "Contents", STREAM_READWRITE | STREAM_NOCREATE );
+ xSrcTst = xObjStor->OpenSotStream( "Contents", STREAM_READWRITE | StreamMode::NOCREATE );
bGetItAsOle = ( xSrcTst.Is() && sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) );
}
if ( bGetItAsOle )
@@ -1999,7 +1999,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
{
// is this a visual basic storage ?
SotStorageRef xSubStorage = xSource->OpenSotStorage( "VBA",
- STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYALL );
+ STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL );
if( xSubStorage.Is() && ( SVSTREAM_OK == xSubStorage->GetError() ) )
{
SotStorageRef xMacros = xDest->OpenSotStorage( "MACROS" );
diff --git a/filter/source/msfilter/svxmsbas2.cxx b/filter/source/msfilter/svxmsbas2.cxx
index ae531a8..62be056 100644
--- a/filter/source/msfilter/svxmsbas2.cxx
+++ b/filter/source/msfilter/svxmsbas2.cxx
@@ -33,7 +33,7 @@ sal_uLong SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto,
uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
OUString aDstStgName( GetMSBasicStorageName() );
SotStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName,
- STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYALL ) );
+ STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL ) );
if( xVBAStg.Is() && !xVBAStg->GetError() )
{
xVBAStg = 0;
@@ -45,7 +45,7 @@ sal_uLong SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto,
nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE;
#endif
SotStorageRef xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, STREAM_STD_READ );
- SotStorageRef xDst = xRoot->OpenSotStorage( rStorageName, STREAM_READWRITE | STREAM_TRUNC );
+ SotStorageRef xDst = xRoot->OpenSotStorage( rStorageName, STREAM_READWRITE | StreamMode::TRUNC );
xSrc->CopyTo( xDst );
xDst->Commit();
ErrCode nError = xDst->GetError();
@@ -65,7 +65,7 @@ sal_uLong SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS
{
uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
SvStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(),
- STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL ));
+ StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL ));
return ( xVBAStg.Is() && !xVBAStg->GetError() )
? ERRCODE_SVX_VBASIC_STORAGE_EXIST
: ERRCODE_NONE;
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index cdaa4d5..3e1349b 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -113,7 +113,7 @@ bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
if( bRet )
{
- boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aTempFile.GetURL(), STREAM_READ ));
+ boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aTempFile.GetURL(), StreamMode::READ ));
if( pIStm )
{
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 9018cfc..db8a76c 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -544,7 +544,7 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
OUString aFileName;
pValue[ i ].Value >>= aFileName;
- pOStm.reset(::utl::UcbStreamHelper::CreateStream( aFileName, STREAM_WRITE | STREAM_TRUNC ));
+ pOStm.reset(::utl::UcbStreamHelper::CreateStream( aFileName, StreamMode::WRITE | StreamMode::TRUNC ));
if( pOStm )
xOStm = Reference< XOutputStream >( new ::utl::OOutputStreamWrapper ( *pOStm ) );
@@ -2070,7 +2070,7 @@ bool SVGFilter::implCreateObjectsFromBackground( const Reference< XDrawPage >& r
xExporter->setSourceDocument( Reference< XComponent >( rxDrawPage, UNO_QUERY ) );
xExporter->filter( aDescriptor );
- aMtf.Read( *aFile.GetStream( STREAM_READ ) );
+ aMtf.Read( *aFile.GetStream( StreamMode::READ ) );
(*mpObjects)[ rxDrawPage ] = ObjectRepresentation( rxDrawPage, aMtf );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 1ca787a..0eceaeb 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2998,7 +2998,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
mapCurShape.reset();
}
- SvMemoryStream aMemStm( (void*) pA->GetData(), pA->GetDataSize(), STREAM_READ );
+ SvMemoryStream aMemStm( (void*) pA->GetData(), pA->GetDataSize(), StreamMode::READ );
SvtGraphicFill aFill;
ReadSvtGraphicFill( aMemStm, aFill );
@@ -3074,7 +3074,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
( nWriteFlags & SVGWRITER_WRITE_FILL ) && !( nWriteFlags & SVGWRITER_NO_SHAPE_COMMENTS ) &&
pA->GetDataSize() )
{
- SvMemoryStream aMemStm( (void*) pA->GetData(), pA->GetDataSize(), STREAM_READ );
+ SvMemoryStream aMemStm( (void*) pA->GetData(), pA->GetDataSize(), StreamMode::READ );
SvtGraphicStroke aStroke;
tools::PolyPolygon aStartArrow, aEndArrow;
@@ -3636,7 +3636,7 @@ SVGWriter::~SVGWriter()
void SAL_CALL SVGWriter::write( const Reference<XDocumentHandler>& rxDocHandler,
const Sequence<sal_Int8>& rMtfSeq ) throw( RuntimeException, std::exception )
{
- SvMemoryStream aMemStm( (char*) rMtfSeq.getConstArray(), rMtfSeq.getLength(), STREAM_READ );
+ SvMemoryStream aMemStm( (char*) rMtfSeq.getConstArray(), rMtfSeq.getLength(), StreamMode::READ );
GDIMetaFile aMtf;
ReadGDIMetaFile( aMemStm, aMtf );
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index b56392e..3aa472c 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -131,7 +131,7 @@ void XMLFilterJarHelper::addFile( Reference< XInterface > xRootFolder, Reference
INetURLObject aURL( aFileURL );
OUString aName( aURL.getName() );
- SvFileStream* pStream = new SvFileStream(aFileURL, STREAM_READ );
+ SvFileStream* pStream = new SvFileStream(aFileURL, StreamMode::READ );
Reference< XInputStream > xInput( new utl::OSeekableInputStreamWrapper( pStream, true ) );
_addFile( xRootFolder, xFactory, xInput, aName );
}
@@ -213,7 +213,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt
aExporter.doExport(xOS,rFilters);
}
- Reference< XInputStream > XIS( new utl::OSeekableInputStreamWrapper( new SvFileStream(aTempFileURL, STREAM_READ ), true ) );
+ Reference< XInputStream > XIS( new utl::OSeekableInputStreamWrapper( new SvFileStream(aTempFileURL, StreamMode::READ ), true ) );
OUString szTypeDetection( "TypeDetection.xcu" );
_addFile( xRootFolder, xFactory, XIS, szTypeDetection );
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index c021300..d02fbed 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -485,9 +485,9 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
{
aDestURL += aSourceURL.GetName();
- SvFileStream aInputStream(pFilterEntry->maImportTemplate, STREAM_READ );
+ SvFileStream aInputStream(pFilterEntry->maImportTemplate, StreamMode::READ );
Reference< XInputStream > xIS( new utl::OInputStreamWrapper( aInputStream ) );
- SvFileStream aOutputStream(aDestURL, STREAM_WRITE );
+ SvFileStream aOutputStream(aDestURL, StreamMode::WRITE );
Reference< XOutputStream > xOS( new utl::OOutputStreamWrapper( aOutputStream ) );
if( copyStreams( xIS, xOS ) )
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index fe0c0d6..8c08946 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1047,7 +1047,7 @@ bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rN
if( INET_PROT_FILE == aURL.GetProtocol() )
{
aFileName = INetURLObject::decode(aURL.PathToFileName(), '%', INetURLObject::DECODE_UNAMBIGUOUS);
- pStream = ::utl::UcbStreamHelper::CreateStream(aFileName, STREAM_READ);
+ pStream = ::utl::UcbStreamHelper::CreateStream(aFileName, StreamMode::READ);
if (!pStream || (pStream->GetError() != ERRCODE_NONE))
{
delete pStream;
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index a770c5a..01bc858 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -419,7 +419,7 @@ bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, Val
}
else
{
- pImageStream.reset( ::utl::UcbStreamHelper::CreateStream( _rURL, STREAM_READ ) );
+ pImageStream.reset( ::utl::UcbStreamHelper::CreateStream( _rURL, StreamMode::READ ) );
bool bSetNull = ( pImageStream.get() == NULL ) || ( ERRCODE_NONE != pImageStream->GetErrorCode() );
if ( !bSetNull )
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index fe7ffe6..722bdef 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -242,7 +242,7 @@ namespace frm
{
OUString sFileName = aFP.GetPath();
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream(
- sFileName, ( bLoad ? STREAM_READ : STREAM_WRITE | STREAM_TRUNC ) | STREAM_SHARE_DENYALL
+ sFileName, ( bLoad ? StreamMode::READ : StreamMode::WRITE | StreamMode::TRUNC ) | StreamMode::SHARE_DENYALL
);
if ( pStream )
{
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 5e08e1e..c82b320 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2659,7 +2659,7 @@ void SvtFileDialog::setImage( sal_Int16 /*aImageFormat*/, const Any& rImage )
Bitmap aBmp;
SvMemoryStream aData( aBmpSequence.getArray(),
aBmpSequence.getLength(),
- STREAM_READ );
+ StreamMode::READ );
ReadDIB(aBmp, aData, true);
_pPrevBmp->SetBitmap( aBmp );
diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx
index 4e2796a..2c861ed 100644
--- a/framework/source/fwe/helper/actiontriggerhelper.cxx
+++ b/framework/source/fwe/helper/actiontriggerhelper.cxx
@@ -179,7 +179,7 @@ void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexC
Sequence< sal_Int8 > aDIBSeq;
{
aDIBSeq = xBitmap->getDIB();
- SvMemoryStream aMem( (void *)aDIBSeq.getConstArray(), aDIBSeq.getLength(), STREAM_READ );
+ SvMemoryStream aMem( (void *)aDIBSeq.getConstArray(), aDIBSeq.getLength(), StreamMode::READ );
ReadDIB(aBitmap, aMem, true);
}
@@ -187,7 +187,7 @@ void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexC
if ( aDIBSeq.getLength() > 0 )
{
Bitmap aMaskBitmap;
- SvMemoryStream aMem( (void *)aDIBSeq.getConstArray(), aDIBSeq.getLength(), STREAM_READ );
+ SvMemoryStream aMem( (void *)aDIBSeq.getConstArray(), aDIBSeq.getLength(), StreamMode::READ );
ReadDIB(aMaskBitmap, aMem, true);
aImage = Image( aBitmap, aMaskBitmap );
}
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx
index 4bf2358..0802436 100644
--- a/idl/source/cmptools/lex.cxx
+++ b/idl/source/cmptools/lex.cxx
@@ -96,7 +96,7 @@ void SvTokenStream::InitCtor()
}
SvTokenStream::SvTokenStream( const OUString & rFileName )
- : pInStream( new SvFileStream( rFileName, STREAM_STD_READ | STREAM_NOCREATE ) )
+ : pInStream( new SvFileStream( rFileName, STREAM_STD_READ | StreamMode::NOCREATE ) )
, rInStream( *pInStream )
, aFileName( rFileName )
{
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 6e19727..005c0f0 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -133,7 +133,7 @@ bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand )
{
OUString aFileName ( rCommand.aInFileList[ n ] );
pDataBase->AddDepFile(aFileName);
- SvFileStream aStm( aFileName, STREAM_STD_READ | STREAM_NOCREATE );
+ SvFileStream aStm( aFileName, STREAM_STD_READ | StreamMode::NOCREATE );
if( aStm.GetError() == SVSTREAM_OK )
{
SvTokenStream aTokStm( aStm, aFileName );
@@ -159,7 +159,7 @@ static bool ResponseFile( StringList * pList, int argc, char ** argv )
{
if( '@' == **(argv +i) )
{ // when @, then response file
- SvFileStream aStm( OUString::createFromAscii((*(argv +i)) +1), STREAM_STD_READ | STREAM_NOCREATE );
+ SvFileStream aStm( OUString::createFromAscii((*(argv +i)) +1), STREAM_STD_READ | StreamMode::NOCREATE );
if( aStm.GetError() != SVSTREAM_OK )
return false;
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index c6c37c5..98d0299 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -562,7 +562,7 @@ bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, bool bImported, const
{
osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName );
this->AddDepFile(aFullName);
- SvFileStream aStm( aFullName, STREAM_STD_READ | STREAM_NOCREATE );
+ SvFileStream aStm( aFullName, STREAM_STD_READ | StreamMode::NOCREATE );
SvTokenStream aTokStm( aStm, aFullName );
bOk = ReadSvIdl( aTokStm, true, rPath );
}
diff --git a/idl/source/prj/svidl.cxx b/idl/source/prj/svidl.cxx
index 852b6ba..ee1bb85 100644
--- a/idl/source/prj/svidl.cxx
+++ b/idl/source/prj/svidl.cxx
@@ -131,7 +131,7 @@ int main ( int argc, char ** argv)
if( nExit == 0 && !aCommand.aSlotMapFile.isEmpty() )
{
aTmpSlotMapFile = tempFileHelper(aCommand.aSlotMapFile);
- SvFileStream aOutStm( aTmpSlotMapFile, STREAM_READWRITE | STREAM_TRUNC );
+ SvFileStream aOutStm( aTmpSlotMapFile, STREAM_READWRITE | StreamMode::TRUNC );
if( !pDataBase->WriteSfx( aOutStm ) )
{
nExit = -1;
@@ -143,7 +143,7 @@ int main ( int argc, char ** argv)
if (nExit == 0 && !aCommand.m_DepFile.isEmpty())
{
aTmpDepFile = tempFileHelper(aCommand.m_DepFile);
- SvFileStream aOutStm( aTmpDepFile, STREAM_READWRITE | STREAM_TRUNC );
+ SvFileStream aOutStm( aTmpDepFile, STREAM_READWRITE | StreamMode::TRUNC );
pDataBase->WriteDepFile(aOutStm, aCommand.aTargetFile);
if( aOutStm.GetError() != SVSTREAM_OK )
{
@@ -196,7 +196,7 @@ int main ( int argc, char ** argv)
{
// stamp file, because idl passed through correctly
SvFileStream aOutStm( aCommand.aTargetFile,
- STREAM_READWRITE | STREAM_TRUNC );
+ STREAM_READWRITE | StreamMode::TRUNC );
}
}
}
diff --git a/include/svtools/imap.hxx b/include/svtools/imap.hxx
index 140aadc..4b2a407 100644
--- a/include/svtools/imap.hxx
+++ b/include/svtools/imap.hxx
@@ -126,9 +126,9 @@ public:
class IMapCompat
{
SvStream* pRWStm;
- sal_uLong nCompatPos;
- sal_uLong nTotalSize;
- sal_uInt16 nStmMode;
+ sal_uLong nCompatPos;
+ sal_uLong nTotalSize;
+ StreamMode nStmMode;
IMapCompat() {}
IMapCompat( const IMapCompat& ) {}
@@ -137,7 +137,7 @@ class IMapCompat
public:
- IMapCompat( SvStream& rStm, const sal_uInt16 nStreamMode );
+ IMapCompat( SvStream& rStm, const StreamMode nStreamMode );
~IMapCompat();
};
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index dd830ae..e80d097 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -27,6 +27,7 @@
#include <tools/ref.hxx>
#include <tools/rtti.hxx>
#include <rtl/string.hxx>
+#include <o3tl/typed_flags_set.hxx>
class StreamData;
@@ -40,34 +41,38 @@ inline rtl_TextEncoding GetStoreCharSet( rtl_TextEncoding eEncoding )
// StreamTypes
-typedef sal_uInt16 StreamMode;
-
// read, write, create,... options
-#define STREAM_READ 0x0001 ///< allow read accesses
-#define STREAM_WRITE 0x0002 ///< allow write accesses
+enum class StreamMode {
+ NONE = 0x0000,
+ READ = 0x0001, ///< allow read accesses
+ WRITE = 0x0002, ///< allow write accesses
// file i/o
-#define STREAM_NOCREATE 0x0004 ///< 1 == Dont create file
-#define STREAM_TRUNC 0x0008 ///< Truncate _existing_ file to zero length
-#define STREAM_COPY_ON_SYMLINK 0x0010 ///< copy-on-write for symlinks (Unix)
-
-#define STREAM_READWRITEBITS (STREAM_READ | STREAM_WRITE | \
- STREAM_NOCREATE | STREAM_TRUNC)
-
+ NOCREATE = 0x0004, ///< 1 == Dont create file
+ TRUNC = 0x0008, ///< Truncate _existing_ file to zero length
+ COPY_ON_SYMLINK = 0x0010, ///< copy-on-write for symlinks (Unix)
// sharing options
-#define STREAM_SHARE_DENYNONE 0x0100
-#define STREAM_SHARE_DENYREAD 0x0200 // overrides denynone
-#define STREAM_SHARE_DENYWRITE 0x0400 // overrides denynone
-#define STREAM_SHARE_DENYALL 0x0800 // overrides denyread,write,none
+ SHARE_DENYNONE = 0x0100,
+ SHARE_DENYREAD = 0x0200, // overrides denynone
+ SHARE_DENYWRITE = 0x0400, // overrides denynone
+ SHARE_DENYALL = 0x0800, // overrides denyread,write,none
+};
+namespace o3tl
+{
+ template<> struct typed_flags<StreamMode> : is_typed_flags<StreamMode, 0x003f> {};
+}
+
+#define STREAM_READWRITEBITS (StreamMode::READ | StreamMode::WRITE | \
+ StreamMode::NOCREATE | StreamMode::TRUNC)
-#define STREAM_SHAREBITS (STREAM_SHARE_DENYNONE | STREAM_SHARE_DENYREAD |\
- STREAM_SHARE_DENYWRITE | STREAM_SHARE_DENYALL)
+#define STREAM_SHAREBITS (StreamMode::SHARE_DENYNONE | StreamMode::SHARE_DENYREAD |\
+ StreamMode::SHARE_DENYWRITE | StreamMode::SHARE_DENYALL)
-#define STREAM_READWRITE (STREAM_READ | STREAM_WRITE)
-#define STREAM_SHARE_DENYREADWRITE (STREAM_SHARE_DENYREAD | STREAM_SHARE_DENYWRITE)
+#define STREAM_READWRITE (StreamMode::READ | StreamMode::WRITE)
+#define STREAM_SHARE_DENYREADWRITE (StreamMode::SHARE_DENYREAD | StreamMode::SHARE_DENYWRITE)
-#define STREAM_STD_READ (STREAM_READ | STREAM_SHARE_DENYNONE | STREAM_NOCREATE)
-#define STREAM_STD_WRITE (STREAM_WRITE | STREAM_SHARE_DENYALL)
-#define STREAM_STD_READWRITE (STREAM_READWRITE | STREAM_SHARE_DENYALL)
+#define STREAM_STD_READ (StreamMode::READ | StreamMode::SHARE_DENYNONE | StreamMode::NOCREATE)
+#define STREAM_STD_WRITE (StreamMode::WRITE | StreamMode::SHARE_DENYALL)
+#define STREAM_STD_READWRITE (STREAM_READWRITE | StreamMode::SHARE_DENYALL)
#define STREAM_SEEK_TO_BEGIN 0L
#define STREAM_SEEK_TO_END SAL_MAX_UINT64
@@ -236,7 +241,7 @@ private:
protected:
sal_uInt64 m_nBufFilePos; ///< File position of pBuf[0]
- sal_uInt16 eStreamMode;
+ StreamMode eStreamMode;
bool bIsWritable;
virtual sal_Size GetData( void* pData, sal_Size nSize );
diff --git a/include/tools/vcompat.hxx b/include/tools/vcompat.hxx
index 2d0412f..b8dfe7f 100644
--- a/include/tools/vcompat.hxx
+++ b/include/tools/vcompat.hxx
@@ -28,13 +28,14 @@
((sal_uInt32)(char)(char4))<<24UL))
class SvStream;
+enum class StreamMode;
class TOOLS_DLLPUBLIC VersionCompat
{
SvStream* mpRWStm;
sal_uInt32 mnCompatPos;
sal_uInt32 mnTotalSize;
- sal_uInt16 mnStmMode;
+ StreamMode mnStmMode;
sal_uInt16 mnVersion;
VersionCompat() {}
@@ -44,7 +45,7 @@ class TOOLS_DLLPUBLIC VersionCompat
public:
- VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion = 1 );
+ VersionCompat( SvStream& rStm, StreamMode nStreamMode, sal_uInt16 nVersion = 1 );
~VersionCompat();
sal_uInt16 GetVersion() const { return mnVersion; }
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx
index d6529f5..0b9b288 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -93,7 +93,7 @@ static void dumpRGBABitmap( const OUString& rPath, const unsigned char* pBuffer,
BitmapEx aBitmapEx( aBitmap );
vcl::PNGWriter aWriter( aBitmapEx );
- SvFileStream sOutput( rPath, STREAM_WRITE );
+ SvFileStream sOutput( rPath, StreamMode::WRITE );
aWriter.Write( sOutput );
sOutput.Close();
}
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index d3ee02a..91c9b13 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
@@ -74,7 +74,7 @@ bool SAL_CALL LotusWordProImportFilter::importImpl( const Sequence< ::com::sun::
pValue[i].Value >>= sURL;
}
- SvFileStream inputStream( sURL, STREAM_READ );
+ SvFileStream inputStream( sURL, StreamMode::READ );
if ( inputStream.IsEof() || ( inputStream.GetError() != SVSTREAM_OK ) )
return false;
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index 14951bf3..e70923e 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -358,7 +358,7 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p
delete pS;
}
- pMemStream = new SvMemoryStream(pBuf, nLen, STREAM_READ);
+ pMemStream = new SvMemoryStream(pBuf, nLen, StreamMode::READ);
assert(pMemStream != NULL);
pStream = pMemStream;
diff --git a/oox/source/drawingml/customshapepresetdata.cxx b/oox/source/drawingml/customshapepresetdata.cxx
index 945825e..1215a6d 100644
--- a/oox/source/drawingml/customshapepresetdata.cxx
+++ b/oox/source/drawingml/customshapepresetdata.cxx
@@ -717,7 +717,7 @@ void CustomShapeProperties::initializePresetDataMap()
{
OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-cs-presets");
rtl::Bootstrap::expandMacros(aPath);
- SvFileStream aStream(aPath, STREAM_READ);
+ SvFileStream aStream(aPath, StreamMode::READ);
if (aStream.GetError() != ERRCODE_NONE)
SAL_WARN("oox", "failed to open oox-drawingml-cs-presets");
OString aLine;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index e2ba6df..b66b78a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2011,7 +2011,7 @@ std::map< OString, std::vector<OString> > lcl_getAdjNames()
OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-adj-names");
rtl::Bootstrap::expandMacros(aPath);
- SvFileStream aStream(aPath, STREAM_READ);
+ SvFileStream aStream(aPath, StreamMode::READ);
if (aStream.GetError() != ERRCODE_NONE)
SAL_WARN("oox", "failed to open oox-drawingml-adj-names");
OString aLine;
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index a0a1ac7..067697e 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -945,7 +945,7 @@ std::vector<OString> lcl_getShapeTypes()
OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/vml-shape-types");
rtl::Bootstrap::expandMacros(aPath);
- SvFileStream aStream(aPath, STREAM_READ);
+ SvFileStream aStream(aPath, StreamMode::READ);
if (aStream.GetError() != ERRCODE_NONE)
SAL_WARN("oox", "failed to open vml-shape-types");
OString aLine;
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 84e53dc..39a3801 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -459,7 +459,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
uno::Reference<XComponent> xCom(GetModel(),UNO_QUERY);
SfxMediumRef pMedium = new SfxMedium(
- sFileName, ( STREAM_READ | STREAM_NOCREATE ) );
+ sFileName, ( StreamMode::READ | StreamMode::NOCREATE ) );
if( pMedium )
{
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 402fb67..5abce91 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -837,8 +837,8 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile,
const OUString& rSrsInPath,
const OUString& rSrsOutPath )
{
- SvFileStream aIStm( rSrsInPath, STREAM_READ );
- SvFileStream aOStm( rSrsOutPath, STREAM_WRITE | STREAM_TRUNC );
+ SvFileStream aIStm( rSrsInPath, StreamMode::READ );
+ SvFileStream aOStm( rSrsOutPath, StreamMode::WRITE | StreamMode::TRUNC );
::std::vector< OString > aMissingImages;
FILE* pSysListFile = rContext.aOutputSysList.isEmpty() ? NULL : fopen( rContext.aOutputSysList.getStr(), "ab" );
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index e9265b9..ac81ac5 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -1011,7 +1011,7 @@ bool ScAutoFormat::Load()
aURL.setFinalSlash();
aURL.Append( OUString( sAutoTblFmtName ) );
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READ );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::READ );
SvStream* pStream = aMedium.GetInStream();
bool bRet = (pStream && pStream->GetError() == 0);
if (bRet)
@@ -1072,7 +1072,7 @@ bool ScAutoFormat::Save()
aURL.setFinalSlash();
aURL.Append(sAutoTblFmtName);
- 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/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx
index 32d3d96..f7566fe 100644
--- a/sc/source/core/tool/rechead.cxx
+++ b/sc/source/core/tool/rechead.cxx
@@ -52,7 +52,7 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
rStream.ReadUInt32( nSizeTableLen );
pBuf = new sal_uInt8[nSizeTableLen];
rStream.Read( pBuf, nSizeTableLen );
- pMemStream = new SvMemoryStream( (char*)pBuf, nSizeTableLen, STREAM_READ );
+ pMemStream = new SvMemoryStream( (char*)pBuf, nSizeTableLen, StreamMode::READ );
}
nEndPos = rStream.Tell();
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index ae83bca..e9aa7a6 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -390,7 +390,7 @@ void ImportExcel8::ReadBasic( void )
rFilterOpt.IsLoadExcelBasicExecutable() )
{
// see if we have the XCB stream
- SvStorageStreamRef xXCB = xRootStrg->OpenSotStream( OUString("XCB"), STREAM_STD_READ | STREAM_NOCREATE );
+ SvStorageStreamRef 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/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 23adece..f23fdd5 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -195,7 +195,7 @@ SotStorageStreamRef ScfTools::OpenStorageStreamWrite( SotStorageRef xStrg, const
OSL_ENSURE( !xStrg || !xStrg->IsContained( rStrmName ), "ScfTools::OpenStorageStreamWrite - stream exists already" );
SotStorageStreamRef xStrm;
if( xStrg.Is() )
- xStrm = xStrg->OpenSotStream( rStrmName, STREAM_STD_WRITE | STREAM_TRUNC );
+ xStrm = xStrg->OpenSotStream( rStrmName, STREAM_STD_WRITE | StreamMode::TRUNC );
return xStrm;
}
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index aa4c010..614af46 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1257,7 +1257,7 @@ bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm,
pFileNameMap.reset( new std::map<OUString, OUString>() );
}
- SvFileStream aTmp( aFileUrl.PathToFileName(), STREAM_READ );
+ SvFileStream aTmp( aFileUrl.PathToFileName(), StreamMode::READ );
OUString aSrc = rFileNm;
OUString aDest = aTargetUrl.GetPartBeforeLastName();
@@ -1266,7 +1266,7 @@ bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm,
if( bFileToFile )
{
INetURLObject aCpyURL( aDest );
- SvFileStream aCpy( aCpyURL.PathToFileName(), STREAM_WRITE );
+ SvFileStream aCpy( aCpyURL.PathToFileName(), StreamMode::WRITE );
aCpy.WriteStream( aTmp );
aCpy.Close();
@@ -1274,10 +1274,10 @@ bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm,
}
else
{
- SfxMedium aMedium( aDest, STREAM_WRITE | STREAM_SHARE_DENYNONE );
+ SfxMedium aMedium( aDest, StreamMode::WRITE | StreamMode::SHARE_DENYNONE );
{
- SvFileStream aCpy( aMedium.GetPhysicalName(), STREAM_WRITE );
+ SvFileStream aCpy( aMedium.GetPhysicalName(), StreamMode::WRITE );
aCpy.WriteStream( aTmp );
}
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 9a306b4..9ed9f94 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -892,7 +892,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm )
sprintf( aBuf, "%08X", static_cast< unsigned int >( nPictureId ) );
aStorageName += OUString::createFromAscii(aBuf);
SotStorageRef xOleStg = pRootStorage->OpenSotStorage( aStorageName,
- STREAM_READWRITE| STREAM_SHARE_DENYALL );
+ STREAM_READWRITE| StreamMode::SHARE_DENYALL );
if( xOleStg.Is() )
{
uno::Reference < embed::XEmbeddedObject > xObj( static_cast<const SdrOle2Obj&>(rOleObj).GetObjRef() );
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index afbc7ae..745e238 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -567,7 +567,7 @@ bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
if ( xTransact.is() )
xTransact->commit();
- SvStream* pSrcStm = ::utl::UcbStreamHelper::CreateStream( aTempFile.GetURL(), STREAM_READ );
+ SvStream* pSrcStm = ::utl::UcbStreamHelper::CreateStream( aTempFile.GetURL(), StreamMode::READ );
if( pSrcStm )
{
rxOStm->SetBufferSize( 0xff00 );
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index cb822e2..1d7f57c 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -455,7 +455,7 @@ bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject,
if ( xTransact.is() )
xTransact->commit();
- SvStream* pSrcStm = ::utl::UcbStreamHelper::CreateStream( aTempFile.GetURL(), STREAM_READ );
+ SvStream* pSrcStm = ::utl::UcbStreamHelper::CreateStream( aTempFile.GetURL(), StreamMode::READ );
if( pSrcStm )
{
rxOStm->SetBufferSize( 0xff00 );
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 92f9519..b859d0b 100644
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list