cppcanvas/source/inc/implrenderer.hxx | 6 +-- cppcanvas/source/mtfrenderer/emfplus.cxx | 6 +-- drawinglayer/source/processor2d/hittestprocessor2d.cxx | 4 +- drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 2 - drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx | 2 - drawinglayer/source/processor3d/defaultprocessor3d.cxx | 4 +- drawinglayer/source/processor3d/zbufferprocessor3d.cxx | 2 - drawinglayer/source/tools/emfpfont.hxx | 8 ++--- drawinglayer/source/tools/emfphelperdata.cxx | 6 +-- drawinglayer/source/tools/emfphelperdata.hxx | 6 +-- drawinglayer/source/tools/emfpstringformat.hxx | 20 ++++++------- include/drawinglayer/processor2d/hittestprocessor2d.hxx | 4 +- include/drawinglayer/processor3d/defaultprocessor3d.hxx | 4 +- 13 files changed, 37 insertions(+), 37 deletions(-)
New commits: commit 7795907fa9434441a86e878799b04149700fe622 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Thu Nov 2 15:17:06 2017 +0200 loplugin:constmethod in drawinglayer Change-Id: I6a33765f6589fc2941162eb2dcaa4e0a2d9e46e1 Reviewed-on: https://gerrit.libreoffice.org/44214 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index e61f3407169a..295da4ee73d7 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -195,9 +195,9 @@ namespace cppcanvas /* EMF+ */ static void ReadRectangle (SvStream& s, float& x, float& y, float &width, float& height, bool bCompressed = false); static void ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 flags); - void MapToDevice (double &x, double &y); - ::basegfx::B2DPoint Map (double ix, double iy); - ::basegfx::B2DSize MapSize (double iwidth, double iheight); + void MapToDevice (double &x, double &y) const; + ::basegfx::B2DPoint Map (double ix, double iy) const; + ::basegfx::B2DSize MapSize (double iwidth, double iheight) const; void GraphicStatePush (GraphicStateMap& map, sal_Int32 index, OutDevState const & rState); void GraphicStatePop (GraphicStateMap& map, sal_Int32 index, OutDevState& rState); diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 60f9f51b3e15..369ac9ccb3b9 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -251,14 +251,14 @@ namespace cppcanvas s.ReadFloat( x ).ReadFloat( y ); } - void ImplRenderer::MapToDevice (double& x, double& y) + void ImplRenderer::MapToDevice (double& x, double& y) const { // TODO: other units x = 100*nMmX*x/nPixX; y = 100*nMmY*y/nPixY; } - ::basegfx::B2DPoint ImplRenderer::Map (double ix, double iy) + ::basegfx::B2DPoint ImplRenderer::Map (double ix, double iy) const { double x, y; @@ -276,7 +276,7 @@ namespace cppcanvas return ::basegfx::B2DPoint (x, y); } - ::basegfx::B2DSize ImplRenderer::MapSize (double iwidth, double iheight) + ::basegfx::B2DSize ImplRenderer::MapSize (double iwidth, double iheight) const { double w, h; 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;} }; } diff --git a/include/drawinglayer/processor2d/hittestprocessor2d.hxx b/include/drawinglayer/processor2d/hittestprocessor2d.hxx index e5002cb6cf2f..452873e66c09 100644 --- a/include/drawinglayer/processor2d/hittestprocessor2d.hxx +++ b/include/drawinglayer/processor2d/hittestprocessor2d.hxx @@ -62,10 +62,10 @@ namespace drawinglayer void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override; bool checkHairlineHitWithTolerance( const basegfx::B2DPolygon& rPolygon, - double fDiscreteHitTolerance); + double fDiscreteHitTolerance) const; bool checkFillHitWithTolerance( const basegfx::B2DPolyPolygon& rPolyPolygon, - double fDiscreteHitTolerance); + double fDiscreteHitTolerance) const; void check3DHit(const primitive2d::ScenePrimitive2D& rCandidate); public: diff --git a/include/drawinglayer/processor3d/defaultprocessor3d.hxx b/include/drawinglayer/processor3d/defaultprocessor3d.hxx index cbe6a613292c..a400343ac4f6 100644 --- a/include/drawinglayer/processor3d/defaultprocessor3d.hxx +++ b/include/drawinglayer/processor3d/defaultprocessor3d.hxx @@ -107,8 +107,8 @@ namespace drawinglayer void impRenderHatchTexturePrimitive3D(const primitive3d::HatchTexturePrimitive3D& rPrimitive); void impRenderBitmapTexturePrimitive3D(const primitive3d::BitmapTexturePrimitive3D& rPrimitive); void impRenderModifiedColorPrimitive3D(const primitive3d::ModifiedColorPrimitive3D& rModifiedCandidate); - void impRenderPolygonHairlinePrimitive3D(const primitive3d::PolygonHairlinePrimitive3D& rPrimitive); - void impRenderPolyPolygonMaterialPrimitive3D(const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive); + void impRenderPolygonHairlinePrimitive3D(const primitive3d::PolygonHairlinePrimitive3D& rPrimitive) const; + void impRenderPolyPolygonMaterialPrimitive3D(const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive) const; void impRenderTransformPrimitive3D(const primitive3d::TransformPrimitive3D& rTransformCandidate); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits