diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-20 13:00:06 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-21 09:01:57 +0000 |
commit | 431598b97b47b13c8b241f587b5eea21bf134893 (patch) | |
tree | f94011f51ec2ab79679e7df6133e6ac8f52ba808 /include | |
parent | 0cd2895e70eb96083ea78b1350583fe791b4237a (diff) |
convert CVT constants to scoped enum
Change-Id: I7703816b6a1df2bf24c06cdf9992f9982ae724e8
Reviewed-on: https://gerrit.libreoffice.org/15826
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/galtheme.hxx | 2 | ||||
-rw-r--r-- | include/vcl/cvtgrf.hxx | 4 | ||||
-rw-r--r-- | include/vcl/salctype.hxx | 35 |
3 files changed, 22 insertions, 19 deletions
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx index f542593d0d35..4a00c8c5ef85 100644 --- a/include/svx/galtheme.hxx +++ b/include/svx/galtheme.hxx @@ -121,7 +121,7 @@ private: return size_t(-1); } SAL_DLLPRIVATE INetURLObject ImplGetURL( const GalleryObject* pObject ) const; - SAL_DLLPRIVATE INetURLObject ImplCreateUniqueURL( SgaObjKind eObjKind, sal_uIntPtr nFormat = CVT_UNKNOWN ); + SAL_DLLPRIVATE INetURLObject ImplCreateUniqueURL( SgaObjKind eObjKind, ConvertDataFormat nFormat = ConvertDataFormat::Unknown ); SAL_DLLPRIVATE void ImplSetModified( bool bModified ); SAL_DLLPRIVATE void ImplBroadcast( sal_uIntPtr nUpdatePos ); diff --git a/include/vcl/cvtgrf.hxx b/include/vcl/cvtgrf.hxx index a714b227c69d..e311c39b6936 100644 --- a/include/vcl/cvtgrf.hxx +++ b/include/vcl/cvtgrf.hxx @@ -43,8 +43,8 @@ public: GraphicConverter(); ~GraphicConverter(); - static sal_uLong Import( SvStream& rIStm, Graphic& rGraphic, sal_uLong nFormat = CVT_UNKNOWN ); - static sal_uLong Export( SvStream& rOStm, const Graphic& rGraphic, sal_uLong nFormat ); + static sal_uLong Import( SvStream& rIStm, Graphic& rGraphic, ConvertDataFormat nFormat = ConvertDataFormat::Unknown ); + static sal_uLong Export( SvStream& rOStm, const Graphic& rGraphic, ConvertDataFormat nFormat ); ConvertData* GetConvertData() { return mpConvertData; } diff --git a/include/vcl/salctype.hxx b/include/vcl/salctype.hxx index 801815d8da26..4fdc6a8ba75a 100644 --- a/include/vcl/salctype.hxx +++ b/include/vcl/salctype.hxx @@ -24,18 +24,21 @@ #include <vcl/graph.hxx> -#define CVT_UNKNOWN (0x00000000UL) -#define CVT_BMP (0x00000001UL) -#define CVT_GIF (0x00000002UL) -#define CVT_JPG (0x00000003UL) -#define CVT_MET (0x00000004UL) -#define CVT_PCT (0x00000005UL) -#define CVT_PNG (0x00000006UL) -#define CVT_SVM (0x00000007UL) -#define CVT_TIF (0x00000008UL) -#define CVT_WMF (0x00000009UL) -#define CVT_EMF (0x0000000aUL) -#define CVT_SVG (0x0000000bUL) +enum class ConvertDataFormat +{ + Unknown, + BMP, + GIF, + JPG, + MET, + PCT, + PNG, + SVM, + TIF, + WMF, + EMF, + SVG +}; class SvStream; @@ -49,16 +52,16 @@ public: Graphic maGraphic; SvStream& mrStm; - sal_uLong mnFormat; + ConvertDataFormat mnFormat; - ConvertData( const Graphic& rGraphic, SvStream& rStm, sal_uLong nFormat ) : + ConvertData( const Graphic& rGraphic, SvStream& rStm, ConvertDataFormat nFormat ) : maGraphic( rGraphic ), mrStm( rStm ), mnFormat( nFormat ) {} ~ConvertData() {} }; typedef sal_uLong (*SALGRFCVTPROC)( void* pInst, - sal_uLong nInFormat, void* pInBuffer, sal_uLong nInBufSize, - sal_uLong nOutFormat, void** ppOutBuffer ); + ConvertDataFormat nInFormat, void* pInBuffer, sal_uLong nInBufSize, + ConvertDataFormat nOutFormat, void** ppOutBuffer ); #endif // INCLUDED_VCL_SALCTYPE_HXX |