summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-02 15:17:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-03 08:21:59 +0100
commit7795907fa9434441a86e878799b04149700fe622 (patch)
tree50ce9190f1855252c14b55f8152c885f063a98c0 /drawinglayer
parent0d4891b6d1346191b56f0f8f4991cb6372e10c1d (diff)
loplugin:constmethod in drawinglayer
Change-Id: I6a33765f6589fc2941162eb2dcaa4e0a2d9e46e1 Reviewed-on: https://gerrit.libreoffice.org/44214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/hittestprocessor2d.cxx4
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx2
-rw-r--r--drawinglayer/source/processor3d/defaultprocessor3d.cxx4
-rw-r--r--drawinglayer/source/processor3d/zbufferprocessor3d.cxx2
-rw-r--r--drawinglayer/source/tools/emfpfont.hxx8
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx6
-rw-r--r--drawinglayer/source/tools/emfphelperdata.hxx6
-rw-r--r--drawinglayer/source/tools/emfpstringformat.hxx20
9 files changed, 27 insertions, 27 deletions
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index ef512060cf06..d0d428370d41 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -75,7 +75,7 @@ namespace drawinglayer
bool HitTestProcessor2D::checkHairlineHitWithTolerance(
const basegfx::B2DPolygon& rPolygon,
- double fDiscreteHitTolerance)
+ double fDiscreteHitTolerance) const
{
basegfx::B2DPolygon aLocalPolygon(rPolygon);
aLocalPolygon.transform(getViewInformation2D().getObjectToViewTransformation());
@@ -103,7 +103,7 @@ namespace drawinglayer
bool HitTestProcessor2D::checkFillHitWithTolerance(
const basegfx::B2DPolyPolygon& rPolyPolygon,
- double fDiscreteHitTolerance)
+ double fDiscreteHitTolerance) const
{
bool bRetval(false);
basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolyPolygon);
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index e9473c3e4d23..eb984b5d9c65 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -282,7 +282,7 @@ namespace drawinglayer
void VclMetafileProcessor2D::impConvertFillGradientAttributeToVCLGradient(
Gradient& o_rVCLGradient,
const attribute::FillGradientAttribute& rFiGrAtt,
- bool bIsTransparenceGradient)
+ bool bIsTransparenceGradient) const
{
if(bIsTransparenceGradient)
{
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
index 951510277c7b..122cafa47978 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
@@ -78,7 +78,7 @@ namespace drawinglayer
void impConvertFillGradientAttributeToVCLGradient(
Gradient& o_rVCLGradient,
const attribute::FillGradientAttribute& rFiGrAtt,
- bool bIsTransparenceGradient);
+ bool bIsTransparenceGradient) const;
void impStartSvtGraphicFill(SvtGraphicFill const * pSvtGraphicFill);
void impEndSvtGraphicFill(SvtGraphicFill* pSvtGraphicFill);
SvtGraphicStroke* impTryToCreateSvtGraphicStroke(
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index a055a3e71aef..2ee459617553 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -317,7 +317,7 @@ namespace drawinglayer
}
}
- void DefaultProcessor3D::impRenderPolygonHairlinePrimitive3D(const primitive3d::PolygonHairlinePrimitive3D& rPrimitive)
+ void DefaultProcessor3D::impRenderPolygonHairlinePrimitive3D(const primitive3d::PolygonHairlinePrimitive3D& rPrimitive) const
{
basegfx::B3DPolygon aHairline(rPrimitive.getB3DPolygon());
@@ -342,7 +342,7 @@ namespace drawinglayer
}
}
- void DefaultProcessor3D::impRenderPolyPolygonMaterialPrimitive3D(const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive)
+ void DefaultProcessor3D::impRenderPolyPolygonMaterialPrimitive3D(const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive) const
{
basegfx::B3DPolyPolygon aFill(rPrimitive.getB3DPolyPolygon());
basegfx::BColor aObjectColor(rPrimitive.getMaterial().getColor());
diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
index 8f08a70d8dbe..af2b31e399fb 100644
--- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
@@ -101,7 +101,7 @@ private:
}
}
- double decideColorAndOpacity(basegfx::BColor& rColor)
+ double decideColorAndOpacity(basegfx::BColor& rColor) const
{
// init values with full opacity and material color
OSL_ENSURE(nullptr != mpCurrentMaterial, "CurrentMaterial not set (!)");
diff --git a/drawinglayer/source/tools/emfpfont.hxx b/drawinglayer/source/tools/emfpfont.hxx
index 9abeff344728..ce5760546e87 100644
--- a/drawinglayer/source/tools/emfpfont.hxx
+++ b/drawinglayer/source/tools/emfpfont.hxx
@@ -33,10 +33,10 @@ namespace emfplushelper
void Read(SvMemoryStream &s);
- bool Bold() { return fontFlags & 0x1; }
- bool Italic() { return fontFlags & 0x2; }
- bool Underline(){ return fontFlags & 0x4; }
- bool Strikeout(){ return fontFlags & 0x8; }
+ bool Bold() const { return fontFlags & 0x1; }
+ bool Italic() const { return fontFlags & 0x2; }
+ bool Underline() const { return fontFlags & 0x4; }
+ bool Strikeout() const { return fontFlags & 0x8; }
};
}
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index ad67d6994d06..f3e2cf9832ff 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -283,19 +283,19 @@ namespace emfplushelper
maMapTransform *= basegfx::utils::createScaleB2DHomMatrix(maBaseTransform.get(0, 0), maBaseTransform.get(1, 1));
}
- ::basegfx::B2DPoint EmfPlusHelperData::Map(double ix, double iy)
+ ::basegfx::B2DPoint EmfPlusHelperData::Map(double ix, double iy) const
{
// map in one step using complete MapTransform (see mappingChanged)
return maMapTransform * ::basegfx::B2DPoint(ix, iy);
}
- ::basegfx::B2DSize EmfPlusHelperData::MapSize(double iwidth, double iheight)
+ ::basegfx::B2DSize EmfPlusHelperData::MapSize(double iwidth, double iheight) const
{
// map in one step using complete MapTransform (see mappingChanged)
return maMapTransform * ::basegfx::B2DSize(iwidth, iheight);
}
- ::basegfx::BColor EmfPlusHelperData::EMFPGetBrushColorOrARGBColor(sal_uInt16 flags, sal_uInt32 brushIndexOrColor){
+ ::basegfx::BColor EmfPlusHelperData::EMFPGetBrushColorOrARGBColor(sal_uInt16 flags, sal_uInt32 brushIndexOrColor) const {
basegfx::BColor color;
if (flags & 0x8000) // we use a color
{
diff --git a/drawinglayer/source/tools/emfphelperdata.hxx b/drawinglayer/source/tools/emfphelperdata.hxx
index 082ad1ae4c69..bfb79c8e7853 100644
--- a/drawinglayer/source/tools/emfphelperdata.hxx
+++ b/drawinglayer/source/tools/emfphelperdata.hxx
@@ -241,7 +241,7 @@ namespace emfplushelper
void EMFPPlusFillPolygon(const ::basegfx::B2DPolyPolygon& polygon, bool isColor, sal_uInt32 brushIndexOrColor);
// helper functions
- ::basegfx::BColor EMFPGetBrushColorOrARGBColor(sal_uInt16 flags, sal_uInt32 brushIndexOrColor);
+ ::basegfx::BColor EMFPGetBrushColorOrARGBColor(sal_uInt16 flags, sal_uInt32 brushIndexOrColor) const;
public:
EmfPlusHelperData(
@@ -255,8 +255,8 @@ namespace emfplushelper
const drawinglayer::geometry::ViewInformation2D& rViewInformation);
// mappers
- ::basegfx::B2DPoint Map(double ix, double iy);
- ::basegfx::B2DSize MapSize(double iwidth, double iheight);
+ ::basegfx::B2DPoint Map(double ix, double iy) const;
+ ::basegfx::B2DSize MapSize(double iwidth, double iheight) const;
// readers
static void ReadRectangle(SvStream& s, float& x, float& y, float &width, float& height, bool bCompressed = false);
diff --git a/drawinglayer/source/tools/emfpstringformat.hxx b/drawinglayer/source/tools/emfpstringformat.hxx
index 0797c25ff7af..2a05f6dd75a3 100644
--- a/drawinglayer/source/tools/emfpstringformat.hxx
+++ b/drawinglayer/source/tools/emfpstringformat.hxx
@@ -46,16 +46,16 @@ namespace emfplushelper
void Read(SvMemoryStream &s);
// flags table from MS-EMFPLUS doc
- bool DirectionRightToLeft() { return stringFormatFlags & 0x00000001;}
- bool DirectionVertical() { return stringFormatFlags & 0x00000002;}
- bool NoFitBlackBox() { return stringFormatFlags & 0x00000004;}
- bool DisplayFormatControl() { return stringFormatFlags & 0x00000020;}
- bool NoFontFallback() { return stringFormatFlags & 0x00000400;}
- bool MeasureTrailingSpaces(){ return stringFormatFlags & 0x00000800;}
- bool NoWrap() { return stringFormatFlags & 0x00001000;}
- bool LineLimit() { return stringFormatFlags & 0x00002000;}
- bool NoClip() { return stringFormatFlags & 0x00004000;}
- bool BypassGDI() { return stringFormatFlags & 0x80000000;}
+ bool DirectionRightToLeft() const { return stringFormatFlags & 0x00000001;}
+ bool DirectionVertical() const { return stringFormatFlags & 0x00000002;}
+ bool NoFitBlackBox() const { return stringFormatFlags & 0x00000004;}
+ bool DisplayFormatControl() const { return stringFormatFlags & 0x00000020;}
+ bool NoFontFallback() const { return stringFormatFlags & 0x00000400;}
+ bool MeasureTrailingSpaces() const { return stringFormatFlags & 0x00000800;}
+ bool NoWrap() const { return stringFormatFlags & 0x00001000;}
+ bool LineLimit() const { return stringFormatFlags & 0x00002000;}
+ bool NoClip() const { return stringFormatFlags & 0x00004000;}
+ bool BypassGDI() const { return stringFormatFlags & 0x80000000;}
};
}