diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-27 08:45:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-02 08:59:17 +0200 |
commit | 019ab2b00fb022383eaa85e6be66d97504587088 (patch) | |
tree | bad7d8ce3da93f9a0bf283e80ebff1681c0a8c47 | |
parent | 6d729943c8c355ab6c172271004a20c633ab22e0 (diff) |
convert GFF_ constants to enum class
Change-Id: I88469e8d6afb3fcefdaf285a56b7acd576bc8520
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 18 | ||||
-rw-r--r-- | include/vcl/graphicfilter.hxx | 68 | ||||
-rw-r--r-- | svtools/source/graphic/descriptor.cxx | 54 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter2.cxx | 111 |
4 files changed, 127 insertions, 124 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 4c33d210f778..700c9f753aef 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1585,18 +1585,18 @@ bool EscherPropertyContainer::CreateGraphicProperties( INetURLObject aTmp( aGraphicUrl ); GraphicDescriptor aDescriptor(aTmp); aDescriptor.Detect(); - const sal_uInt16 nFormat = aDescriptor.GetFileFormat(); + const GraphicFileFormat nFormat = aDescriptor.GetFileFormat(); // can MSO handle it? if ( bMirrored || nAngle || nTransparency || nRed || nGreen || nBlue || (1.0 != fGamma) || - (nFormat != GFF_BMP && - nFormat != GFF_GIF && - nFormat != GFF_JPG && - nFormat != GFF_PNG && - nFormat != GFF_TIF && - nFormat != GFF_PCT && - nFormat != GFF_WMF && - nFormat != GFF_EMF) ) + (nFormat != GraphicFileFormat::BMP && + nFormat != GraphicFileFormat::GIF && + nFormat != GraphicFileFormat::JPG && + nFormat != GraphicFileFormat::PNG && + nFormat != GraphicFileFormat::TIF && + nFormat != GraphicFileFormat::PCT && + nFormat != GraphicFileFormat::WMF && + nFormat != GraphicFileFormat::EMF) ) { boost::scoped_ptr<SvStream> pIn(::utl::UcbStreamHelper::CreateStream( aTmp.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index 9ae0af810ea2..c26256308124 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -88,35 +88,37 @@ struct ConvertData; // Info class for all supported file formats -#define GFF_NOT ( (sal_uInt16)0x0000 ) -#define GFF_BMP ( (sal_uInt16)0x0001 ) -#define GFF_GIF ( (sal_uInt16)0x0002 ) -#define GFF_JPG ( (sal_uInt16)0x0003 ) -#define GFF_PCD ( (sal_uInt16)0x0004 ) -#define GFF_PCX ( (sal_uInt16)0x0005 ) -#define GFF_PNG ( (sal_uInt16)0x0006 ) -#define GFF_TIF ( (sal_uInt16)0x0007 ) -#define GFF_XBM ( (sal_uInt16)0x0008 ) -#define GFF_XPM ( (sal_uInt16)0x0009 ) -#define GFF_PBM ( (sal_uInt16)0x000a ) -#define GFF_PGM ( (sal_uInt16)0x000b ) -#define GFF_PPM ( (sal_uInt16)0x000c ) -#define GFF_RAS ( (sal_uInt16)0x000d ) -#define GFF_TGA ( (sal_uInt16)0x000e ) -#define GFF_PSD ( (sal_uInt16)0x000f ) -#define GFF_EPS ( (sal_uInt16)0x0010 ) -#define GFF_DXF ( (sal_uInt16)0x00f1 ) -#define GFF_MET ( (sal_uInt16)0x00f2 ) -#define GFF_PCT ( (sal_uInt16)0x00f3 ) -#define GFF_SGF ( (sal_uInt16)0x00f4 ) -#define GFF_SVM ( (sal_uInt16)0x00f5 ) -#define GFF_WMF ( (sal_uInt16)0x00f6 ) -#define GFF_SGV ( (sal_uInt16)0x00f7 ) -#define GFF_EMF ( (sal_uInt16)0x00f8 ) -#define GFF_SVG ( (sal_uInt16)0x00f9 ) -#define GFF_MOV ( (sal_uInt16)0x00fa ) -#define GFF_XXX ( (sal_uInt16)0xffff ) - +enum class GraphicFileFormat +{ + NOT = 0x0000, + BMP = 0x0001, + GIF = 0x0002, + JPG = 0x0003, + PCD = 0x0004, + PCX = 0x0005, + PNG = 0x0006, + TIF = 0x0007, + XBM = 0x0008, + XPM = 0x0009, + PBM = 0x000a, + PGM = 0x000b, + PPM = 0x000c, + RAS = 0x000d, + TGA = 0x000e, + PSD = 0x000f, + EPS = 0x0010, + DXF = 0x00f1, + MET = 0x00f2, + PCT = 0x00f3, + SGF = 0x00f4, + SVM = 0x00f5, + WMF = 0x00f6, + SGV = 0x00f7, + EMF = 0x00f8, + SVG = 0x00f9, + MOV = 0x00fa, + XXX = 0xffff +}; // - GraphicDescriptor - @@ -130,7 +132,7 @@ class VCL_DLLPUBLIC GraphicDescriptor Size aLogSize; sal_uInt16 nBitsPerPixel; sal_uInt16 nPlanes; - sal_uInt16 nFormat; + GraphicFileFormat nFormat; bool bCompressed; bool bOwnStream; @@ -190,8 +192,8 @@ public: as many properties as possible (size, color, etc.) */ bool Detect( bool bExtendedInfo = false ); - /** @return the file format, GFF_NOT if no format was recognized */ - sal_uInt16 GetFileFormat() const { return nFormat; } + /** @return the file format, GraphicFileFormat::NOT if no format was recognized */ + GraphicFileFormat GetFileFormat() const { return nFormat; } /** @return graphic size in pixels or 0 size */ const Size& GetSizePixel() const { return (Size&) aPixSize; } @@ -209,7 +211,7 @@ public: bool IsCompressed() const { return bCompressed; } /** @return filter number that is needed by the GraphFilter to read this format */ - static OUString GetImportFormatShortName( sal_uInt16 nFormat ); + static OUString GetImportFormatShortName( GraphicFileFormat nFormat ); }; /** Information about errors during the GraphicFilter operation. */ diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 75d30cafe0d1..d73cd740a82d 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -102,39 +102,39 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL ) mnBitsPerPixel = 0; mbTransparent = false; - if( aDescriptor.Detect( true ) && aDescriptor.GetFileFormat() != GFF_NOT ) + if( aDescriptor.Detect( true ) && aDescriptor.GetFileFormat() != GraphicFileFormat::NOT ) { const char* pMimeType = NULL; sal_uInt8 cType = graphic::GraphicType::EMPTY; switch( aDescriptor.GetFileFormat() ) { - case( GFF_BMP ): pMimeType = MIMETYPE_BMP; cType = graphic::GraphicType::PIXEL; break; - case( GFF_GIF ): pMimeType = MIMETYPE_GIF; cType = graphic::GraphicType::PIXEL; break; - case( GFF_JPG ): pMimeType = MIMETYPE_JPG; cType = graphic::GraphicType::PIXEL; break; - case( GFF_PCD ): pMimeType = MIMETYPE_PCD; cType = graphic::GraphicType::PIXEL; break; - case( GFF_PCX ): pMimeType = MIMETYPE_PCX; cType = graphic::GraphicType::PIXEL; break; - case( GFF_PNG ): pMimeType = MIMETYPE_PNG; cType = graphic::GraphicType::PIXEL; break; - case( GFF_TIF ): pMimeType = MIMETYPE_TIF; cType = graphic::GraphicType::PIXEL; break; - case( GFF_XBM ): pMimeType = MIMETYPE_XBM; cType = graphic::GraphicType::PIXEL; break; - case( GFF_XPM ): pMimeType = MIMETYPE_XPM; cType = graphic::GraphicType::PIXEL; break; - case( GFF_PBM ): pMimeType = MIMETYPE_PBM; cType = graphic::GraphicType::PIXEL; break; - case( GFF_PGM ): pMimeType = MIMETYPE_PGM; cType = graphic::GraphicType::PIXEL; break; - case( GFF_PPM ): pMimeType = MIMETYPE_PPM; cType = graphic::GraphicType::PIXEL; break; - case( GFF_RAS ): pMimeType = MIMETYPE_RAS; cType = graphic::GraphicType::PIXEL; break; - case( GFF_TGA ): pMimeType = MIMETYPE_TGA; cType = graphic::GraphicType::PIXEL; break; - case( GFF_PSD ): pMimeType = MIMETYPE_PSD; cType = graphic::GraphicType::PIXEL; break; - - case( GFF_EPS ): pMimeType = MIMETYPE_EPS; cType = graphic::GraphicType::VECTOR; break; - case( GFF_DXF ): pMimeType = MIMETYPE_DXF; cType = graphic::GraphicType::VECTOR; break; - case( GFF_MET ): pMimeType = MIMETYPE_MET; cType = graphic::GraphicType::VECTOR; break; - case( GFF_PCT ): pMimeType = MIMETYPE_PCT; cType = graphic::GraphicType::VECTOR; break; - case( GFF_SGF ): pMimeType = MIMETYPE_SGF; cType = graphic::GraphicType::VECTOR; break; - case( GFF_SVM ): pMimeType = MIMETYPE_SVM; cType = graphic::GraphicType::VECTOR; break; - case( GFF_WMF ): pMimeType = MIMETYPE_WMF; cType = graphic::GraphicType::VECTOR; break; - case( GFF_SGV ): pMimeType = MIMETYPE_SGV; cType = graphic::GraphicType::VECTOR; break; - case( GFF_EMF ): pMimeType = MIMETYPE_EMF; cType = graphic::GraphicType::VECTOR; break; - case( GFF_SVG ): pMimeType = MIMETYPE_SVG; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::BMP ): pMimeType = MIMETYPE_BMP; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::GIF ): pMimeType = MIMETYPE_GIF; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::JPG ): pMimeType = MIMETYPE_JPG; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::PCD ): pMimeType = MIMETYPE_PCD; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::PCX ): pMimeType = MIMETYPE_PCX; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::PNG ): pMimeType = MIMETYPE_PNG; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::TIF ): pMimeType = MIMETYPE_TIF; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::XBM ): pMimeType = MIMETYPE_XBM; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::XPM ): pMimeType = MIMETYPE_XPM; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::PBM ): pMimeType = MIMETYPE_PBM; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::PGM ): pMimeType = MIMETYPE_PGM; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::PPM ): pMimeType = MIMETYPE_PPM; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::RAS ): pMimeType = MIMETYPE_RAS; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::TGA ): pMimeType = MIMETYPE_TGA; cType = graphic::GraphicType::PIXEL; break; + case( GraphicFileFormat::PSD ): pMimeType = MIMETYPE_PSD; cType = graphic::GraphicType::PIXEL; break; + + case( GraphicFileFormat::EPS ): pMimeType = MIMETYPE_EPS; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::DXF ): pMimeType = MIMETYPE_DXF; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::MET ): pMimeType = MIMETYPE_MET; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::PCT ): pMimeType = MIMETYPE_PCT; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::SGF ): pMimeType = MIMETYPE_SGF; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::SVM ): pMimeType = MIMETYPE_SVM; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::WMF ): pMimeType = MIMETYPE_WMF; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::SGV ): pMimeType = MIMETYPE_SGV; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::EMF ): pMimeType = MIMETYPE_EMF; cType = graphic::GraphicType::VECTOR; break; + case( GraphicFileFormat::SVG ): pMimeType = MIMETYPE_SVG; cType = graphic::GraphicType::VECTOR; break; default: break; diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx index 7f35629468cd..21d584d6102c 100644 --- a/vcl/source/filter/graphicfilter2.cxx +++ b/vcl/source/filter/graphicfilter2.cxx @@ -96,7 +96,7 @@ bool GraphicDescriptor::Detect( bool bExtendedInfo ) void GraphicDescriptor::ImpConstruct() { - nFormat = GFF_NOT; + nFormat = GraphicFileFormat::NOT; nBitsPerPixel = 0; nPlanes = 0; bCompressed = false; @@ -121,7 +121,7 @@ bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, bool bExtendedInfo ) // Bitmap if ( nTemp16 == 0x4d42 ) { - nFormat = GFF_BMP; + nFormat = GraphicFileFormat::BMP; bRet = true; if ( bExtendedInfo ) @@ -166,7 +166,7 @@ bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, bool bExtendedInfo ) // further validation, check for rational values if ( ( nBitsPerPixel > 24 ) || ( nCompression > 3 ) ) { - nFormat = GFF_NOT; + nFormat = GraphicFileFormat::NOT; bRet = false; } } @@ -191,7 +191,7 @@ bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, bool bExtendedInfo ) rStm.ReadUInt16( n16 ); if ( ( n16 == 0x6137 ) || ( n16 == 0x6139 ) ) { - nFormat = GFF_GIF; + nFormat = GraphicFileFormat::GIF; bRet = true; if ( bExtendedInfo ) @@ -255,7 +255,7 @@ bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, bool bExtendedInfo ) // compare upper 24 bits if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) ) { - nFormat = GFF_JPG; + nFormat = GraphicFileFormat::JPG; bRet = true; if ( bExtendedInfo ) @@ -419,7 +419,7 @@ bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, bool ) ( nTemp16 == 0x5049 ) && ( cByte == 0x49 ) ) { - nFormat = GFF_PCD; + nFormat = GraphicFileFormat::PCD; bRet = true; } rStm.Seek( nStmPos ); @@ -443,7 +443,7 @@ bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, bool bExtendedInfo ) if ( cByte == 0x0a ) { - nFormat = GFF_PCX; + nFormat = GraphicFileFormat::PCX; bRet = true; if ( bExtendedInfo ) @@ -523,7 +523,7 @@ bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, bool bExtendedInfo ) rStm.ReadUInt32( nTemp32 ); if ( nTemp32 == 0x0d0a1a0a ) { - nFormat = GFF_PNG; + nFormat = GraphicFileFormat::PNG; bRet = true; if ( bExtendedInfo ) @@ -635,7 +635,7 @@ bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, bool bExtendedInfo ) rStm.ReadUInt16( nTemp16 ); if ( nTemp16 == 0x2a ) { - nFormat = GFF_TIF; + nFormat = GraphicFileFormat::TIF; bRet = true; if ( bExtendedInfo ) @@ -741,7 +741,7 @@ bool GraphicDescriptor::ImpDetectXBM( SvStream&, bool ) { bool bRet = aPathExt.startsWith( "xbm" ); if (bRet) - nFormat = GFF_XBM; + nFormat = GraphicFileFormat::XBM; return bRet; } @@ -750,7 +750,7 @@ bool GraphicDescriptor::ImpDetectXPM( SvStream&, bool ) { bool bRet = aPathExt.startsWith( "xpm" ); if (bRet) - nFormat = GFF_XPM; + nFormat = GraphicFileFormat::XPM; return bRet; } @@ -773,7 +773,7 @@ bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, bool ) } if ( bRet ) - nFormat = GFF_PBM; + nFormat = GraphicFileFormat::PBM; return bRet; } @@ -795,7 +795,7 @@ bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, bool ) } if ( bRet ) - nFormat = GFF_PGM; + nFormat = GraphicFileFormat::PGM; return bRet; } @@ -817,7 +817,7 @@ bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, bool ) } if ( bRet ) - nFormat = GFF_PPM; + nFormat = GraphicFileFormat::PPM; return bRet; } @@ -831,7 +831,7 @@ bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, bool ) rStm.ReadUInt32( nMagicNumber ); if ( nMagicNumber == 0x59a66a95 ) { - nFormat = GFF_RAS; + nFormat = GraphicFileFormat::RAS; bRet = true; } rStm.Seek( nStmPos ); @@ -842,7 +842,7 @@ bool GraphicDescriptor::ImpDetectTGA( SvStream&, bool ) { bool bRet = aPathExt.startsWith( "tga" ); if (bRet) - nFormat = GFF_TGA; + nFormat = GraphicFileFormat::TGA; return bRet; } @@ -895,7 +895,7 @@ bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, bool bExtendedInfo ) } if ( bRet ) - nFormat = GFF_PSD; + nFormat = GraphicFileFormat::PSD; rStm.Seek( nStmPos ); return bRet; } @@ -918,7 +918,7 @@ bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, bool ) ( ImplSearchEntry( nFirstBytes, reinterpret_cast<sal_uInt8 const *>("%!PS-Adobe"), 10, 10 ) && ImplSearchEntry( &nFirstBytes[15], reinterpret_cast<sal_uInt8 const *>("EPS"), 3, 3 ) ) ) { - nFormat = GFF_EPS; + nFormat = GraphicFileFormat::EPS; bRet = true; } rStm.Seek( nStmPos ); @@ -929,7 +929,7 @@ bool GraphicDescriptor::ImpDetectDXF( SvStream&, bool ) { bool bRet = aPathExt.startsWith( "dxf" ); if (bRet) - nFormat = GFF_DXF; + nFormat = GraphicFileFormat::DXF; return bRet; } @@ -938,7 +938,7 @@ bool GraphicDescriptor::ImpDetectMET( SvStream&, bool ) { bool bRet = aPathExt.startsWith( "met" ); if (bRet) - nFormat = GFF_MET; + nFormat = GraphicFileFormat::MET; return bRet; } @@ -947,7 +947,7 @@ bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, bool ) { bool bRet = aPathExt.startsWith( "pct" ); if (bRet) - nFormat = GFF_PCT; + nFormat = GraphicFileFormat::PCT; else { sal_Size nStreamPos = rStm.Tell(); @@ -955,7 +955,7 @@ bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, bool ) if (isPCT(rStm, nStreamPos, nStreamLen)) { bRet = true; - nFormat = GFF_PCT; + nFormat = GraphicFileFormat::PCT; } rStm.Seek(nStreamPos); } @@ -983,7 +983,7 @@ bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, bool ) } if( bRet ) - nFormat = GFF_SGF; + nFormat = GraphicFileFormat::SGF; return bRet; } @@ -992,7 +992,7 @@ bool GraphicDescriptor::ImpDetectSGV( SvStream&, bool ) { bool bRet = aPathExt.startsWith( "sgv" ); if (bRet) - nFormat = GFF_SGV; + nFormat = GraphicFileFormat::SGV; return bRet; } @@ -1012,7 +1012,7 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, bool bExtendedInfo ) rStm.ReadUChar( cByte ); if ( cByte == 0x49 ) { - nFormat = GFF_SVM; + nFormat = GraphicFileFormat::SVM; bRet = true; if ( bExtendedInfo ) @@ -1055,7 +1055,7 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, bool bExtendedInfo ) if( nTmp16 == 0x4654 ) { - nFormat = GFF_SVM; + nFormat = GraphicFileFormat::SVM; bRet = true; if( bExtendedInfo ) @@ -1078,7 +1078,7 @@ bool GraphicDescriptor::ImpDetectWMF( SvStream&, bool ) { bool bRet = aPathExt.startsWith( "wmf" ); if (bRet) - nFormat = GFF_WMF; + nFormat = GraphicFileFormat::WMF; return bRet; } @@ -1087,7 +1087,7 @@ bool GraphicDescriptor::ImpDetectEMF( SvStream&, bool ) { bool bRet = aPathExt.startsWith( "emf" ); if (bRet) - nFormat = GFF_EMF; + nFormat = GraphicFileFormat::EMF; return bRet; } @@ -1096,42 +1096,43 @@ bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, bool /*bExtendedInfo*/ { bool bRet = aPathExt.startsWith( "svg" ); if (bRet) - nFormat = GFF_SVG; + nFormat = GraphicFileFormat::SVG; return bRet; } -OUString GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat ) +OUString GraphicDescriptor::GetImportFormatShortName( GraphicFileFormat nFormat ) { const char *pKeyName = 0; switch( nFormat ) { - case( GFF_BMP ) : pKeyName = "bmp"; break; - case( GFF_GIF ) : pKeyName = "gif"; break; - case( GFF_JPG ) : pKeyName = "jpg"; break; - case( GFF_PCD ) : pKeyName = "pcd"; break; - case( GFF_PCX ) : pKeyName = "pcx"; break; - case( GFF_PNG ) : pKeyName = "png"; break; - case( GFF_XBM ) : pKeyName = "xbm"; break; - case( GFF_XPM ) : pKeyName = "xpm"; break; - case( GFF_PBM ) : pKeyName = "pbm"; break; - case( GFF_PGM ) : pKeyName = "pgm"; break; - case( GFF_PPM ) : pKeyName = "ppm"; break; - case( GFF_RAS ) : pKeyName = "ras"; break; - case( GFF_TGA ) : pKeyName = "tga"; break; - case( GFF_PSD ) : pKeyName = "psd"; break; - case( GFF_EPS ) : pKeyName = "eps"; break; - case( GFF_TIF ) : pKeyName = "tif"; break; - case( GFF_DXF ) : pKeyName = "dxf"; break; - case( GFF_MET ) : pKeyName = "met"; break; - case( GFF_PCT ) : pKeyName = "pct"; break; - case( GFF_SGF ) : pKeyName = "sgf"; break; - case( GFF_SGV ) : pKeyName = "sgv"; break; - case( GFF_SVM ) : pKeyName = "svm"; break; - case( GFF_WMF ) : pKeyName = "wmf"; break; - case( GFF_EMF ) : pKeyName = "emf"; break; - case( GFF_SVG ) : pKeyName = "svg"; break; + case( GraphicFileFormat::BMP ) : pKeyName = "bmp"; break; + case( GraphicFileFormat::GIF ) : pKeyName = "gif"; break; + case( GraphicFileFormat::JPG ) : pKeyName = "jpg"; break; + case( GraphicFileFormat::PCD ) : pKeyName = "pcd"; break; + case( GraphicFileFormat::PCX ) : pKeyName = "pcx"; break; + case( GraphicFileFormat::PNG ) : pKeyName = "png"; break; + case( GraphicFileFormat::XBM ) : pKeyName = "xbm"; break; + case( GraphicFileFormat::XPM ) : pKeyName = "xpm"; break; + case( GraphicFileFormat::PBM ) : pKeyName = "pbm"; break; + case( GraphicFileFormat::PGM ) : pKeyName = "pgm"; break; + case( GraphicFileFormat::PPM ) : pKeyName = "ppm"; break; + case( GraphicFileFormat::RAS ) : pKeyName = "ras"; break; + case( GraphicFileFormat::TGA ) : pKeyName = "tga"; break; + case( GraphicFileFormat::PSD ) : pKeyName = "psd"; break; + case( GraphicFileFormat::EPS ) : pKeyName = "eps"; break; + case( GraphicFileFormat::TIF ) : pKeyName = "tif"; break; + case( GraphicFileFormat::DXF ) : pKeyName = "dxf"; break; + case( GraphicFileFormat::MET ) : pKeyName = "met"; break; + case( GraphicFileFormat::PCT ) : pKeyName = "pct"; break; + case( GraphicFileFormat::SGF ) : pKeyName = "sgf"; break; + case( GraphicFileFormat::SGV ) : pKeyName = "sgv"; break; + case( GraphicFileFormat::SVM ) : pKeyName = "svm"; break; + case( GraphicFileFormat::WMF ) : pKeyName = "wmf"; break; + case( GraphicFileFormat::EMF ) : pKeyName = "emf"; break; + case( GraphicFileFormat::SVG ) : pKeyName = "svg"; break; + default: assert(false); } return OUString::createFromAscii(pKeyName); |