summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-27 09:43:22 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-27 12:59:23 +0000
commit850a8d27ca696f18ce0c529346f8bb8505499545 (patch)
tree5641e81912760029683e1c544e01af25eee23523 /filter
parent6c974272423ca19c94d8d5e182fec46836309d60 (diff)
Convert GRAPHIC to scoped enum
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea Reviewed-on: https://gerrit.libreoffice.org/25534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx14
-rw-r--r--filter/source/msfilter/msdffimp.cxx12
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--filter/source/svg/svgexport.cxx4
5 files changed, 17 insertions, 17 deletions
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 57859e55e830..c22e4695cf54 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -394,7 +394,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
// global default value setting
StackMember* pGS;
- if (rGraphic.GetType() == GRAPHIC_GDIMETAFILE)
+ if (rGraphic.GetType() == GraphicType::GdiMetafile)
pMTF = &rGraphic.GetGDIMetaFile();
else if (rGraphic.GetGDIMetaFile().GetActionSize())
pMTF = pAMTF = new GDIMetaFile( rGraphic.GetGDIMetaFile() );
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index fe04bc9bb0d8..00f3447a0a13 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1457,7 +1457,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
{
aGraphicObject = aGraphic;
aUniqueId = aGraphicObject.GetUniqueID();
- bIsGraphicMtf = aGraphicObject.GetType() == GRAPHIC_GDIMETAFILE;
+ bIsGraphicMtf = aGraphicObject.GetType() == GraphicType::GdiMetafile;
}
}
}
@@ -1474,7 +1474,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
Graphic aGraphic( aBitmapEx );
aGraphicObject = aGraphic;
aUniqueId = aGraphicObject.GetUniqueID();
- bIsGraphicMtf = aGraphicObject.GetType() == GRAPHIC_GDIMETAFILE;
+ bIsGraphicMtf = aGraphicObject.GetType() == GraphicType::GdiMetafile;
}
}
}
@@ -1507,7 +1507,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
aGraphicObject = lclDrawHatch( aHatch, aBackColor, bFillBackground, aRect );
aUniqueId = aGraphicObject.GetUniqueID();
eBitmapMode = css::drawing::BitmapMode_REPEAT;
- bIsGraphicMtf = aGraphicObject.GetType() == GRAPHIC_GDIMETAFILE;
+ bIsGraphicMtf = aGraphicObject.GetType() == GraphicType::GdiMetafile;
}
}
@@ -3992,7 +3992,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject
sal_uInt32 nLen = static_cast<sal_uInt32>(rId.getLength());
const sal_Char* pData = rId.getStr();
GraphicType eType( rObject.GetType() );
- if ( nLen && pData && ( eType != GRAPHIC_NONE ) )
+ if ( nLen && pData && ( eType != GraphicType::NONE ) )
{
mnIdentifier[ 0 ] = rtl_crc32( 0,pData, nLen );
mnIdentifier[ 1 ] = 0;
@@ -4293,11 +4293,11 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
if ( !bUseNativeGraphic )
{
GraphicType eGraphicType = aGraphic.GetType();
- if ( ( eGraphicType == GRAPHIC_BITMAP ) || ( eGraphicType == GRAPHIC_GDIMETAFILE ) )
+ if ( ( eGraphicType == GraphicType::Bitmap ) || ( eGraphicType == GraphicType::GdiMetafile ) )
{
sal_uInt32 nErrCode;
if ( !aGraphic.IsAnimated() )
- nErrCode = GraphicConverter::Export( aStream, aGraphic, ( eGraphicType == GRAPHIC_BITMAP ) ? ConvertDataFormat::PNG : ConvertDataFormat::EMF );
+ nErrCode = GraphicConverter::Export( aStream, aGraphic, ( eGraphicType == GraphicType::Bitmap ) ? ConvertDataFormat::PNG : ConvertDataFormat::EMF );
else
{ // to store a animation, a gif has to be included into the msOG chunk of a png #I5583#
GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
@@ -4325,7 +4325,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
}
if ( nErrCode == ERRCODE_NONE )
{
- p_EscherBlibEntry->meBlibType = ( eGraphicType == GRAPHIC_BITMAP ) ? PNG : EMF;
+ p_EscherBlibEntry->meBlibType = ( eGraphicType == GraphicType::Bitmap ) ? PNG : EMF;
aStream.Seek( STREAM_SEEK_TO_END );
p_EscherBlibEntry->mnSize = aStream.Tell();
pGraphicAry = static_cast<sal_uInt8 const *>(aStream.GetData());
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index cf802ecbdede..9753f6eec0fb 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3820,7 +3820,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
{
sal_uInt32 nTransColor = GetPropertyValue( DFF_Prop_pictureTransparent, 0 );
- if ( aGraf.GetType() == GRAPHIC_BITMAP )
+ if ( aGraf.GetType() == GraphicType::Bitmap )
{
BitmapEx aBitmapEx( aGraf.GetBitmapEx() );
Bitmap aBitmap( aBitmapEx.GetBitmap() );
@@ -3910,7 +3910,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
}
switch ( aGraf.GetType() )
{
- case GRAPHIC_BITMAP :
+ case GraphicType::Bitmap :
{
BitmapEx aBitmapEx( aGraf.GetBitmapEx() );
if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
@@ -3924,7 +3924,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
}
break;
- case GRAPHIC_GDIMETAFILE :
+ case GraphicType::GdiMetafile :
{
GDIMetaFile aGdiMetaFile( aGraf.GetGDIMetaFile() );
if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
@@ -6259,7 +6259,7 @@ bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* pVisA
to get the Graphic via GraphicObject */
GraphicObject aGraphicObject( iter->second );
rData = aGraphicObject.GetGraphic();
- if ( rData.GetType() != GRAPHIC_NONE )
+ if ( rData.GetType() != GraphicType::NONE )
bOk = true;
else
aEscherBlipCache.erase(iter);
@@ -6470,7 +6470,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
//
// For pict graphics we will furthermore scale the metafile, because font scaling leads to error if the
// dxarray is empty (this has been solved in wmf/emf but not for pict)
- if( bMtfBLIP && ( GRFILTER_OK == nRes ) && ( rData.GetType() == GRAPHIC_GDIMETAFILE ) && ( ( nInst & 0xFFFE ) == 0x542 ) )
+ if( bMtfBLIP && ( GRFILTER_OK == nRes ) && ( rData.GetType() == GraphicType::GdiMetafile ) && ( ( nInst & 0xFFFE ) == 0x542 ) )
{
if ( ( aMtfSize100.Width() >= 1000 ) && ( aMtfSize100.Height() >= 1000 ) )
{ // #75956#, scaling does not work properly, if the graphic is less than 1cm
@@ -6793,7 +6793,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
sal_uInt16 sz[4];
rStm.Read( sz, 8 );
Graphic aGraphic;
- if( ERRCODE_NONE == GraphicConverter::Import( rStm, aGraphic ) && aGraphic.GetType() )
+ if( ERRCODE_NONE == GraphicConverter::Import( rStm, aGraphic ) && aGraphic.GetType() != GraphicType::NONE )
{
const GDIMetaFile& rMtf = aGraphic.GetGDIMetaFile();
MakeContentStream( rDest, rMtf );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 39d15befbf7b..4ce59e45a1f2 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -614,7 +614,7 @@ void SdrEscherImport::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd,
void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraphic )
{
- if ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+ if ( rGraphic.GetType() == GraphicType::GdiMetafile )
{
sal_uInt16 nX, nGlobalColorsCount, nFillColorsCount;
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 96cb1fb5d7d3..61529dac55b8 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1969,9 +1969,9 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & rxPag
{
Graphic aGraphic( SdrExchangeView::GetObjGraphic( pObj->GetModel(), pObj ) );
- if( aGraphic.GetType() != GRAPHIC_NONE )
+ if( aGraphic.GetType() != GraphicType::NONE )
{
- if( aGraphic.GetType() == GRAPHIC_BITMAP )
+ if( aGraphic.GetType() == GraphicType::Bitmap )
{
GDIMetaFile aMtf;
const Point aNullPt;