summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-09-10 21:23:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-09-11 09:08:47 +0200
commitb3e4ba69b70a30bbcc32ac59ce90e2eda2bc76de (patch)
tree12453ac9bdf40752a5cf9d07e7c2d69fbcb9f20a /vcl/source
parent72b5478390457fa2dcf90e310bb3903e910ca8f2 (diff)
convert IMAP_FORMAT to scoped enum
Change-Id: I58090ced672267614ade2e3e81e6264d01b77901 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102405 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/treelist/imap2.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx
index 382a76c04822..5f8e8bb22531 100644
--- a/vcl/source/treelist/imap2.cxx
+++ b/vcl/source/treelist/imap2.cxx
@@ -139,13 +139,13 @@ void IMapPolygonObject::WriteNCSA( SvStream& rOStm ) const
rOStm.WriteLine(aStrBuf.makeStringAndClear());
}
-void ImageMap::Write( SvStream& rOStm, sal_uLong nFormat ) const
+void ImageMap::Write( SvStream& rOStm, IMapFormat nFormat ) const
{
switch( nFormat )
{
- case IMAP_FORMAT_BIN : Write( rOStm ); break;
- case IMAP_FORMAT_CERN : ImpWriteCERN( rOStm ); break;
- case IMAP_FORMAT_NCSA : ImpWriteNCSA( rOStm ); break;
+ case IMapFormat::Binary : Write( rOStm ); break;
+ case IMapFormat::CERN : ImpWriteCERN( rOStm ); break;
+ case IMapFormat::NCSA : ImpWriteNCSA( rOStm ); break;
default:
break;
@@ -208,18 +208,18 @@ void ImageMap::ImpWriteNCSA( SvStream& rOStm ) const
}
}
-sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat )
+sal_uLong ImageMap::Read( SvStream& rIStm, IMapFormat nFormat )
{
sal_uLong nRet = IMAP_ERR_FORMAT;
- if ( nFormat == IMAP_FORMAT_DETECT )
+ if ( nFormat == IMapFormat::Detect )
nFormat = ImpDetectFormat( rIStm );
switch ( nFormat )
{
- case IMAP_FORMAT_BIN : Read( rIStm ); break;
- case IMAP_FORMAT_CERN : ImpReadCERN( rIStm ); break;
- case IMAP_FORMAT_NCSA : ImpReadNCSA( rIStm ); break;
+ case IMapFormat::Binary : Read( rIStm ); break;
+ case IMapFormat::CERN : ImpReadCERN( rIStm ); break;
+ case IMapFormat::NCSA : ImpReadNCSA( rIStm ); break;
default:
break;
@@ -486,10 +486,10 @@ Point ImageMap::ImpReadNCSACoords( const char** ppStr )
return aPt;
}
-sal_uLong ImageMap::ImpDetectFormat( SvStream& rIStm )
+IMapFormat ImageMap::ImpDetectFormat( SvStream& rIStm )
{
sal_uInt64 nPos = rIStm.Tell();
- sal_uLong nRet = IMAP_FORMAT_BIN;
+ IMapFormat nRet = IMapFormat::Binary;
char cMagic[6];
rIStm.ReadBytes(cMagic, sizeof(cMagic));
@@ -513,10 +513,10 @@ sal_uLong ImageMap::ImpDetectFormat( SvStream& rIStm )
if ( ( aStr.indexOf('(') != -1 ) &&
( aStr.indexOf(')') != -1 ) )
{
- nRet = IMAP_FORMAT_CERN;
+ nRet = IMapFormat::CERN;
}
else
- nRet = IMAP_FORMAT_NCSA;
+ nRet = IMapFormat::NCSA;
break;
}