summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/dialog/_bmpmask.cxx4
-rw-r--r--svx/source/dialog/_contdlg.cxx14
-rw-r--r--svx/source/dialog/contwnd.cxx2
-rw-r--r--svx/source/dialog/graphctl.cxx4
-rw-r--r--svx/source/dialog/grfflt.cxx4
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--svx/source/gallery2/galobj.cxx4
-rw-r--r--svx/source/gallery2/galtheme.cxx4
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx4
-rw-r--r--svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx4
-rw-r--r--svx/source/svdraw/svddrgmt.cxx2
-rw-r--r--svx/source/svdraw/svdograf.cxx38
-rw-r--r--svx/source/svdraw/svdxcgv.cxx4
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx8
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx2
-rw-r--r--svx/source/unodraw/unobrushitemhelper.cxx2
-rw-r--r--svx/source/unodraw/unoshap2.cxx2
-rw-r--r--svx/source/xml/xmlgrhlp.cxx24
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx10
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx4
21 files changed, 72 insertions, 72 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index e9a7e4c0f229..f947e7aeb7e7 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -1016,7 +1016,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
switch( rGraphic.GetType() )
{
- case GRAPHIC_BITMAP:
+ case GraphicType::Bitmap:
{
if( rGraphic.IsAnimated() )
{
@@ -1081,7 +1081,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
}
break;
- case GRAPHIC_GDIMETAFILE:
+ case GraphicType::GdiMetafile:
{
GDIMetaFile aMtf( aGraphic.GetGDIMetaFile() );
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 096511471c29..b27af8a111bd 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -108,7 +108,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
Bitmap aBmp;
XOutFlags nContourFlags = XOutFlags::ContourHorz;
- if ( rGraphic.GetType() == GRAPHIC_BITMAP )
+ if ( rGraphic.GetType() == GraphicType::Bitmap )
{
if( rGraphic.IsAnimated() )
{
@@ -148,7 +148,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
nContourFlags |= XOutFlags::ContourEdgeDetect;
}
}
- else if( rGraphic.GetType() != GRAPHIC_NONE )
+ else if( rGraphic.GetType() != GraphicType::NONE )
{
const Graphic aTmpGrf( rGraphic.GetGDIMetaFile().GetMonochromeMtf( Color( COL_BLACK ) ) );
ScopedVclPtrInstance< VirtualDevice > pVDev;
@@ -352,7 +352,7 @@ void SvxSuperContourDlg::SetGraphic( const Graphic& rGraphic )
void SvxSuperContourDlg::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly )
{
- DBG_ASSERT( m_pContourWnd->GetGraphic().GetType() != GRAPHIC_NONE, "Graphic must've been set first!" );
+ DBG_ASSERT( m_pContourWnd->GetGraphic().GetType() != GraphicType::NONE, "Graphic must've been set first!" );
tools::PolyPolygon aPolyPoly( rPolyPoly );
const MapMode aMap100( MAP_100TH_MM );
@@ -423,12 +423,12 @@ void SvxSuperContourDlg::UpdateGraphic( const Graphic& rGraphic, bool _bGraphicL
bool SvxSuperContourDlg::IsUndoPossible() const
{
- return aUndoGraphic.GetType() != GRAPHIC_NONE;
+ return aUndoGraphic.GetType() != GraphicType::NONE;
}
bool SvxSuperContourDlg::IsRedoPossible() const
{
- return aRedoGraphic.GetType() != GRAPHIC_NONE;
+ return aRedoGraphic.GetType() != GraphicType::NONE;
}
// Click handler for ToolBox
@@ -613,7 +613,7 @@ IMPL_LINK_TYPED( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void )
const bool bPipette = m_pTbx1->IsItemChecked(mnPipetteId);
const bool bWorkplace = m_pTbx1->IsItemChecked(mnWorkSpaceId);
const bool bDontHide = !( bPipette || bWorkplace );
- const bool bBitmap = pWnd->GetGraphic().GetType() == GRAPHIC_BITMAP;
+ const bool bBitmap = pWnd->GetGraphic().GetType() == GraphicType::Bitmap;
m_pTbx1->EnableItem(mnApplyId, bDontHide && bExecState && pWnd->IsChanged());
@@ -690,7 +690,7 @@ IMPL_LINK_TYPED( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void
EnterWait();
- if( aGraphic.GetType() == GRAPHIC_BITMAP )
+ if( aGraphic.GetType() == GraphicType::Bitmap )
{
Bitmap aBmp( aGraphic.GetBitmap() );
const long nTol = static_cast<long>(m_pMtfTolerance->GetValue() * 255L / 100L);
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index 6b560012db53..e0faf2d196e0 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -230,7 +230,7 @@ void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r
rTarget.DrawRect( Rectangle( Point(), GetGraphicSize() ) );
rTarget.Pop();
- if (rGraphic.GetType() != GRAPHIC_NONE)
+ if (rGraphic.GetType() != GraphicType::NONE)
rGraphic.Draw(&rTarget, Point(), GetGraphicSize());
if (aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom())
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 8dca9a941530..fac0708ce3fe 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -173,7 +173,7 @@ void GraphCtrl::InitSdrModel()
void GraphCtrl::SetGraphic( const Graphic& rGraphic, bool bNewModel )
{
// If possible we dither bitmaps for the display
- if ( !bAnim && ( rGraphic.GetType() == GRAPHIC_BITMAP ) )
+ if ( !bAnim && ( rGraphic.GetType() == GraphicType::Bitmap ) )
{
if ( rGraphic.IsTransparent() )
{
@@ -251,7 +251,7 @@ void GraphCtrl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRec
{
// #i72889# used splitted repaint to be able to paint an own background
// even to the buffered view
- const bool bGraphicValid(GRAPHIC_NONE != aGraphic.GetType());
+ const bool bGraphicValid(GraphicType::NONE != aGraphic.GetType());
if (bSdrMode)
{
diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx
index 7451f079df82..ce305c6f15b5 100644
--- a/svx/source/dialog/grfflt.cxx
+++ b/svx/source/dialog/grfflt.cxx
@@ -35,7 +35,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
const Graphic& rGraphic = rFilterObject.GetGraphic();
sal_uIntPtr nRet = SVX_GRAPHICFILTER_UNSUPPORTED_GRAPHICTYPE;
- if( rGraphic.GetType() == GRAPHIC_BITMAP )
+ if( rGraphic.GetType() == GraphicType::Bitmap )
{
SfxViewFrame* pViewFrame = SfxViewFrame::Current();
SfxObjectShell* pShell = pViewFrame ? pViewFrame->GetObjectShell() : nullptr;
@@ -262,7 +262,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
break;
}
- if( aGraphic.GetType() != GRAPHIC_NONE )
+ if( aGraphic.GetType() != GraphicType::NONE )
{
rFilterObject.SetGraphic( aGraphic );
nRet = SVX_GRAPHICFILTER_ERRCODE_NONE;
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 0b71adc0f7ba..f7c86ab81f0e 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -494,7 +494,7 @@ void GalleryTransferable::AddSupportedFormats()
{
AddFormat( SotClipboardFormatId::SVXB );
- if( mpGraphicObject->GetType() == GRAPHIC_GDIMETAFILE )
+ if( mpGraphicObject->GetType() == GraphicType::GdiMetafile )
{
AddFormat( SotClipboardFormatId::GDIMETAFILE );
AddFormat( SotClipboardFormatId::BITMAP );
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 81393ea2098d..d83c1e747960 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -93,7 +93,7 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
{
bool bRet = false;
- if( rGraphic.GetType() == GRAPHIC_BITMAP )
+ if( rGraphic.GetType() == GraphicType::Bitmap )
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
Size aBmpSize( aBmpEx.GetSizePixel() );
@@ -144,7 +144,7 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
}
}
}
- else if( rGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+ else if( rGraphic.GetType() == GraphicType::GdiMetafile )
{
const Size aPrefSize( rGraphic.GetPrefSize() );
const double fFactor = (double)aPrefSize.Width() / (double)aPrefSize.Height();
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index bd3ea97c6e7f..507d990c36b3 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -843,7 +843,7 @@ bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPo
{
bool bRet = false;
- if( rGraphic.GetType() != GRAPHIC_NONE )
+ if( rGraphic.GetType() != GraphicType::NONE )
{
ConvertDataFormat nExportFormat = ConvertDataFormat::Unknown;
const GfxLink aGfxLink( ( (Graphic&) rGraphic ).GetLink() );
@@ -872,7 +872,7 @@ bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPo
}
else
{
- if( rGraphic.GetType() == GRAPHIC_BITMAP )
+ if( rGraphic.GetType() == GraphicType::Bitmap )
{
if( rGraphic.IsAnimated() )
nExportFormat = ConvertDataFormat::GIF;
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index e76f47d704a5..ba0988978df7 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -426,7 +426,7 @@ namespace sdr
return true;
// draft when no graphic
- if(GRAPHIC_NONE == rGraphicObject.GetType() || GRAPHIC_DEFAULT == rGraphicObject.GetType())
+ if(GraphicType::NONE == rGraphicObject.GetType() || GraphicType::Default == rGraphicObject.GetType())
return true;
return false;
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 79fdbf9f61fd..0452910b5e5a 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -629,7 +629,7 @@ namespace drawinglayer
{
Graphic aGraphic(static_cast<const XFillBitmapItem&>(rSet.Get(XATTR_FILLBITMAP)).GetGraphicObject().GetGraphic());
- if(!(GRAPHIC_BITMAP == aGraphic.GetType() || GRAPHIC_GDIMETAFILE == aGraphic.GetType()))
+ if(!(GraphicType::Bitmap == aGraphic.GetType() || GraphicType::GdiMetafile == aGraphic.GetType()))
{
// no content if not bitmap or metafile
OSL_ENSURE(false, "No fill graphic in SfxItemSet (!)");
@@ -641,7 +641,7 @@ namespace drawinglayer
if(!aPrefSize.Width() || !aPrefSize.Height())
{
// if there is no logical size, create a size from pixel size and set MapMode accordingly
- if(GRAPHIC_BITMAP == aGraphic.GetType())
+ if(GraphicType::Bitmap == aGraphic.GetType())
{
aGraphic.SetPrefSize(aGraphic.GetBitmapEx().GetSizePixel());
aGraphic.SetPrefMapMode(MAP_PIXEL);
diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
index 235c0a62ec73..276f68d98452 100644
--- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
@@ -51,14 +51,14 @@ namespace drawinglayer
}
}
#ifdef _WIN32 // Little point in displaying the "broken OLE" graphic on OSes that don't have real OLE, maybe?
- if(GRAPHIC_NONE == aGraphic.GetType())
+ if(GraphicType::NONE == aGraphic.GetType())
{
// no source, use fallback resource empty OLE graphic
aGraphic = SdrOle2Obj::GetEmptyOLEReplacementGraphic();
bScaleContent = true;
}
#endif
- if(GRAPHIC_NONE != aGraphic.GetType())
+ if(GraphicType::NONE != aGraphic.GetType())
{
const GraphicObject aGraphicObject(aGraphic);
const GraphicAttr aGraphicAttr;
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index fc96f3d74f5c..2a636e190912 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -3787,7 +3787,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
// This part of code handles the case where pSdrObject is SdrGrafObj
SdrGrafObj* pObj = dynamic_cast<SdrGrafObj*>( pSdrObject );
- if( !pObj || (pObj->GetGraphicType() == GRAPHIC_NONE) || (pObj->GetGraphicType() == GRAPHIC_DEFAULT) )
+ if( !pObj || (pObj->GetGraphicType() == GraphicType::NONE) || (pObj->GetGraphicType() == GraphicType::Default) )
return false;
const GraphicObject& rGraphicObject = pObj->GetGraphicObject();
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index c67599d3a8a3..6655c4f88f34 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -481,14 +481,14 @@ Graphic SdrGrafObj::GetTransformedGraphic( SdrGrafObjTransformsAttrs nTransformF
const Size aDestSize( GetLogicRect().GetSize() );
const bool bMirror = bool( nTransformFlags & SdrGrafObjTransformsAttrs::MIRROR );
const bool bRotate = bool( nTransformFlags & SdrGrafObjTransformsAttrs::ROTATE ) &&
- ( aGeo.nRotationAngle && aGeo.nRotationAngle != 18000 ) && ( GRAPHIC_NONE != eType );
+ ( aGeo.nRotationAngle && aGeo.nRotationAngle != 18000 ) && ( GraphicType::NONE != eType );
// Need cropping info earlier
const_cast<SdrGrafObj*>(this)->ImpSetAttrToGrafInfo();
GraphicAttr aActAttr;
if( SdrGrafObjTransformsAttrs::NONE != nTransformFlags &&
- GRAPHIC_NONE != eType )
+ GraphicType::NONE != eType )
{
// Actually transform the graphic only in this case.
// Cropping always happens, though.
@@ -595,8 +595,8 @@ void SdrGrafObj::ForceSwapIn() const
pGraphic->FireSwapInRequest();
if( pGraphic->IsSwappedOut() ||
- ( pGraphic->GetType() == GRAPHIC_NONE ) ||
- ( pGraphic->GetType() == GRAPHIC_DEFAULT ) )
+ ( pGraphic->GetType() == GraphicType::NONE ) ||
+ ( pGraphic->GetType() == GraphicType::Default ) )
{
Graphic aDefaultGraphic;
aDefaultGraphic.SetDefaultType();
@@ -659,7 +659,7 @@ bool SdrGrafObj::IsLinkedGraphic() const
void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
{
- bool bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj;
+ bool bNoPresGrf = ( pGraphic->GetType() != GraphicType::NONE ) && !bEmptyPresObj;
rInfo.bResizeFreeAllowed = aGeo.nRotationAngle % 9000 == 0 ||
aGeo.nRotationAngle % 18000 == 0 ||
@@ -733,7 +733,7 @@ OUString SdrGrafObj::TakeObjNameSingul() const
{
switch( pGraphic->GetType() )
{
- case GRAPHIC_BITMAP:
+ case GraphicType::Bitmap:
{
const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || static_cast<const SdrGrafTransparenceItem&>( GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPTRANSLNK : STR_ObjNameSingulGRAFBMPTRANS ) :
@@ -743,11 +743,11 @@ OUString SdrGrafObj::TakeObjNameSingul() const
}
break;
- case GRAPHIC_GDIMETAFILE:
+ case GraphicType::GdiMetafile:
sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNameSingulGRAFMTFLNK : STR_ObjNameSingulGRAFMTF));
break;
- case GRAPHIC_NONE:
+ case GraphicType::NONE:
sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNameSingulGRAFNONELNK : STR_ObjNameSingulGRAFNONE));
break;
@@ -786,7 +786,7 @@ OUString SdrGrafObj::TakeObjNamePlural() const
{
switch( pGraphic->GetType() )
{
- case GRAPHIC_BITMAP:
+ case GraphicType::Bitmap:
{
const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || static_cast<const SdrGrafTransparenceItem&>( GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) :
@@ -796,11 +796,11 @@ OUString SdrGrafObj::TakeObjNamePlural() const
}
break;
- case GRAPHIC_GDIMETAFILE:
+ case GraphicType::GdiMetafile:
sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNamePluralGRAFMTFLNK : STR_ObjNamePluralGRAFMTF));
break;
- case GRAPHIC_NONE:
+ case GraphicType::NONE:
sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNamePluralGRAFNONELNK : STR_ObjNamePluralGRAFNONE));
break;
@@ -1027,12 +1027,12 @@ void SdrGrafObj::StartAnimation( OutputDevice* /*pOutDev*/, const Point& /*rPoin
bool SdrGrafObj::HasGDIMetaFile() const
{
- return( pGraphic->GetType() == GRAPHIC_GDIMETAFILE );
+ return( pGraphic->GetType() == GraphicType::GdiMetafile );
}
bool SdrGrafObj::isEmbeddedSvg() const
{
- return GRAPHIC_BITMAP == GetGraphicType() && GetGraphic().getSvgData().get();
+ return GraphicType::Bitmap == GetGraphicType() && GetGraphic().getSvgData().get();
}
GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedSvg() const
@@ -1073,16 +1073,16 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
// use the old converter path over the MetaFile mechanism. Create Metafile from Svg
// primitives here pretty directly
aMtf = getMetafileFromEmbeddedSvg();
- aGraphicType = GRAPHIC_GDIMETAFILE;
+ aGraphicType = GraphicType::GdiMetafile;
}
- else if(GRAPHIC_GDIMETAFILE == aGraphicType)
+ else if(GraphicType::GdiMetafile == aGraphicType)
{
aMtf = GetTransformedGraphic(SdrGrafObjTransformsAttrs::COLOR|SdrGrafObjTransformsAttrs::MIRROR).GetGDIMetaFile();
}
switch(aGraphicType)
{
- case GRAPHIC_GDIMETAFILE:
+ case GraphicType::GdiMetafile:
{
// Sort into group and return ONLY those objects that can be created from the MetaFile.
ImpSdrGDIMetaFileImport aFilter(*GetModel(), GetLayer(), maRect);
@@ -1168,7 +1168,7 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
break;
}
- case GRAPHIC_BITMAP:
+ case GraphicType::Bitmap:
{
// create basic object and add fill
pRetval = SdrRectObj::DoConvertToPolyObj(bBezier, bAddText);
@@ -1188,8 +1188,8 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
}
break;
}
- case GRAPHIC_NONE:
- case GRAPHIC_DEFAULT:
+ case GraphicType::NONE:
+ case GraphicType::Default:
{
pRetval = SdrRectObj::DoConvertToPolyObj(bBezier, bAddText);
break;
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index c50cd7fee065..6e7cc853e543 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -455,7 +455,7 @@ BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked) const
SdrObject* pGrafObjTmp = GetMarkedObjectByIndex( 0 );
SdrGrafObj* pGrafObj = dynamic_cast<SdrGrafObj*>( pGrafObjTmp );
- if( pGrafObj && ( pGrafObj->GetGraphicType() == GRAPHIC_BITMAP ) )
+ if( pGrafObj && ( pGrafObj->GetGraphicType() == GraphicType::Bitmap ) )
{
aBmp = pGrafObj->GetTransformedGraphic().GetBitmapEx();
}
@@ -630,7 +630,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject*
}
// if graphic could not be retrieved => go the hard way and create a MetaFile
- if( ( GRAPHIC_NONE == aRet.GetType() ) || ( GRAPHIC_DEFAULT == aRet.GetType() ) )
+ if( ( GraphicType::NONE == aRet.GetType() ) || ( GraphicType::Default == aRet.GetType() ) )
{
ScopedVclPtrInstance< VirtualDevice > pOut;
GDIMetaFile aMtf;
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 27b23b8840ff..c4a10e74d2ff 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -657,8 +657,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
SdrGrafObj* pObj = static_cast<SdrGrafObj*>( rMarkList.GetMark( 0 )->GetMarkedSdrObj() );
if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr &&
- ( pObj->GetGraphicType() != GRAPHIC_NONE ) &&
- ( pObj->GetGraphicType() != GRAPHIC_DEFAULT ) )
+ ( pObj->GetGraphicType() != GraphicType::NONE ) &&
+ ( pObj->GetGraphicType() != GraphicType::Default ) )
{
SfxItemSet aGrfAttr( rPool, SDRATTR_GRAFCROP, SDRATTR_GRAFCROP, 0 );
const SfxMapUnit eOldMetric = rPool.GetMetric( 0 );
@@ -833,8 +833,8 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
SdrGrafObj* pGrafObj = dynamic_cast< SdrGrafObj* >( rMarkList.GetMark( i )->GetMarkedSdrObj() );
if( !pGrafObj ||
- ( pGrafObj->GetGraphicType() == GRAPHIC_NONE ) ||
- ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT ))
+ ( pGrafObj->GetGraphicType() == GraphicType::NONE ) ||
+ ( pGrafObj->GetGraphicType() == GraphicType::Default ))
{
bEnableColors = bEnableTransparency = bEnableCrop = false;
break;
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 061ca7acfc59..8dd270a08969 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -834,7 +834,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && !static_cast<SdrGrafObj*>(pObj)->HasText() )
{
aGraphic = static_cast<SdrGrafObj*>(pObj)->GetTransformedGraphic();
- if ( aGraphic.GetType() == GRAPHIC_BITMAP )
+ if ( aGraphic.GetType() == GraphicType::Bitmap )
{
Size aSizePixel( aGraphic.GetSizePixel() );
if( rSettings.mnWidth && rSettings.mnHeight &&
diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx
index fef98fb558c4..ca484bc93a1e 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -292,7 +292,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
const XFillBitmapItem& rBmpItm = static_cast< const XFillBitmapItem& >(rSourceSet.Get(XATTR_FILLBITMAP, bSearchInParents));
const Graphic aGraphic(rBmpItm.GetGraphicObject().GetGraphic());
- // continue idependent of evtl. GRAPHIC_NONE as aGraphic.GetType(), we still need to rescue positions
+ // continue idependent of evtl. GraphicType::NONE as aGraphic.GetType(), we still need to rescue positions
SvxGraphicPosition aSvxGraphicPosition(GPOS_NONE);
const XFillBmpStretchItem& rStretchItem = static_cast< const XFillBmpStretchItem& >(rSourceSet.Get(XATTR_FILLBMP_STRETCH, bSearchInParents));
const XFillBmpTileItem& rTileItem = static_cast< const XFillBmpTileItem& >(rSourceSet.Get(XATTR_FILLBMP_TILE, bSearchInParents));
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 246ec629ab38..1bf2fa472fbc 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1567,7 +1567,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte
{
const Graphic& rGraphic = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphic();
- if(rGraphic.GetType() != GRAPHIC_GDIMETAFILE)
+ if(rGraphic.GetType() != GraphicType::GdiMetafile)
{
// pack object in a bitmap
Reference< css::awt::XBitmap > xBitmap( VCLUnoHelper::CreateBitmap(static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphic().GetBitmapEx()) );
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 28f6b4733dff..a7bbd7418cb6 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -102,7 +102,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
maTmp.EnableKillingFile();
- if( aGrfObject.GetType() != GRAPHIC_NONE )
+ if( aGrfObject.GetType() != GraphicType::NONE )
{
SvStream* pStm = ::utl::UcbStreamHelper::CreateStream( maTmp.GetURL(), StreamMode::WRITE | StreamMode::TRUNC );
@@ -119,7 +119,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
}
else
{
- if( aGraphic.GetType() == GRAPHIC_BITMAP )
+ if( aGraphic.GetType() == GraphicType::Bitmap )
{
GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
OUString aFormat;
@@ -131,7 +131,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStm, rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
}
- else if( aGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+ else if( aGraphic.GetType() == GraphicType::GdiMetafile )
{
pStm->SetVersion( SOFFICE_FILEFORMAT_8 );
pStm->SetCompressMode( SvStreamCompressFlags::ZBITMAP );
@@ -277,7 +277,7 @@ void SAL_CALL SvXMLGraphicOutputStream::closeOutput()
const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject()
{
- if( mbClosed && ( maGrfObj.GetType() == GRAPHIC_NONE ) && mpOStm )
+ if( mbClosed && ( maGrfObj.GetType() == GraphicType::NONE ) && mpOStm )
{
Graphic aGraphic;
@@ -335,7 +335,7 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject()
}
maGrfObj = aGraphic;
- if( maGrfObj.GetType() != GRAPHIC_NONE )
+ if( maGrfObj.GetType() != GraphicType::NONE )
{
delete mpOStm;
mpOStm = nullptr;
@@ -516,7 +516,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
GraphicObject aGrfObject( OUStringToOString(rGraphicId, RTL_TEXTENCODING_ASCII_US) );
bool bRet = false;
- if( aGrfObject.GetType() != GRAPHIC_NONE )
+ if( aGrfObject.GetType() != GraphicType::NONE )
{
SvxGraphicHelperStream_Impl aStream( ImplGetGraphicStream( rPictureStorageName, rPictureStreamName ) );
if( aStream.xStream.is() )
@@ -566,7 +566,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
pStream->Write( aGfxLink.GetData(), aGfxLink.GetDataSize() );
else
{
- if( aGraphic.GetType() == GRAPHIC_BITMAP )
+ if( aGraphic.GetType() == GraphicType::Bitmap )
{
GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
OUString aFormat;
@@ -579,7 +579,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStream,
rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
}
- else if( aGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+ else if( aGraphic.GetType() == GraphicType::GdiMetafile )
{
pStream->SetVersion( SOFFICE_FILEFORMAT_8 );
pStream->SetCompressMode( SvStreamCompressFlags::ZBITMAP );
@@ -639,7 +639,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt
{
const GraphicObject aObj( ImplReadGraphic( aPictureStorageName, aPictureStreamName ) );
- if( aObj.GetType() != GRAPHIC_NONE )
+ if( aObj.GetType() != GraphicType::NONE )
{
maGrfObjs.push_back( aObj );
OUString aBaseURL( XML_GRAPHICOBJECT_URL_BASE );
@@ -655,7 +655,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt
{
const OString aAsciiObjectID(OUStringToOString(aPictureStreamName, RTL_TEXTENCODING_ASCII_US));
const GraphicObject aGrfObject( aAsciiObjectID );
- if( aGrfObject.GetType() != GRAPHIC_NONE )
+ if( aGrfObject.GetType() != GraphicType::NONE )
{
OUString aStreamName( aPictureStreamName );
Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() );
@@ -699,14 +699,14 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt
}
else
{
- if( aGrfObject.GetType() == GRAPHIC_BITMAP )
+ if( aGrfObject.GetType() == GraphicType::Bitmap )
{
if( aGrfObject.IsAnimated() )
aExtension = ".gif";
else
aExtension = ".png";
}
- else if( aGrfObject.GetType() == GRAPHIC_GDIMETAFILE )
+ else if( aGrfObject.GetType() == GraphicType::GdiMetafile )
{
// SJ: first check if this metafile is just a eps file, then we will store the eps instead of svm
GDIMetaFile& rMtf( (GDIMetaFile&)aGraphic.GetGDIMetaFile() );
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 8750a2d15087..3cad60b39290 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -119,7 +119,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
const OUString& rFilterName, const XOutFlags nFlags,
const Size* pMtfSize_100TH_MM )
{
- if( rGraphic.GetType() != GRAPHIC_NONE )
+ if( rGraphic.GetType() != GraphicType::NONE )
{
INetURLObject aURL( rFileName );
Graphic aGraphic;
@@ -177,7 +177,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
if( ( nFlags & XOutFlags::UseNativeIfPossible ) &&
!( nFlags & XOutFlags::MirrorHorz ) &&
!( nFlags & XOutFlags::MirrorVert ) &&
- ( rGraphic.GetType() != GRAPHIC_GDIMETAFILE ) && rGraphic.IsLink() )
+ ( rGraphic.GetType() != GraphicType::GdiMetafile ) && rGraphic.IsLink() )
{
// try to write native link
const GfxLink aGfxLink( ( (Graphic&) rGraphic ).GetLink() );
@@ -249,7 +249,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
aGraphic = rGraphic;
else
{
- if( pMtfSize_100TH_MM && ( rGraphic.GetType() != GRAPHIC_BITMAP ) )
+ if( pMtfSize_100TH_MM && ( rGraphic.GetType() != GraphicType::Bitmap ) )
{
ScopedVclPtrInstance< VirtualDevice > pVDev;
const Size aSize( pVDev->LogicToPixel( *pMtfSize_100TH_MM, MAP_100TH_MM ) );
@@ -282,7 +282,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
}
else
{
- if( pMtfSize_100TH_MM && ( rGraphic.GetType() != GRAPHIC_BITMAP ) )
+ if( pMtfSize_100TH_MM && ( rGraphic.GetType() != GraphicType::Bitmap ) )
{
ScopedVclPtrInstance< VirtualDevice > pVDev;
const Size aSize( pVDev->LogicToPixel( *pMtfSize_100TH_MM, MAP_100TH_MM ) );
@@ -310,7 +310,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
aGraphic = MirrorGraphic( aGraphic, nBmpMirrorFlags );
}
- if( ( GRFILTER_FORMAT_NOTFOUND != nFilter ) && ( aGraphic.GetType() != GRAPHIC_NONE ) )
+ if( ( GRFILTER_FORMAT_NOTFOUND != nFilter ) && ( aGraphic.GetType() != GraphicType::NONE ) )
{
if( !(nFlags & XOutFlags::DontAddExtension) )
aURL.setExtension( aExt );
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 9fc5d04cb8ed..3e8dbf75ab6b 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -481,11 +481,11 @@ bool XFillBitmapItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
if( bSetURL )
{
GraphicObject aGraphicObject = GraphicObject::CreateGraphicObjectFromURL(aURL);
- if( aGraphicObject.GetType() != GRAPHIC_NONE )
+ if( aGraphicObject.GetType() != GraphicType::NONE )
maGraphicObject = aGraphicObject;
// #121194# Prefer GraphicObject over bitmap object if both are provided
- if(bSetBitmap && GRAPHIC_NONE != maGraphicObject.GetType())
+ if(bSetBitmap && GraphicType::NONE != maGraphicObject.GetType())
{
bSetBitmap = false;
}