diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-06-06 21:56:21 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-06-07 10:45:36 +0200 |
commit | d424a5578ae50382ba7062aa9624dae584601c73 (patch) | |
tree | fbbdd3de8c6874279c89d537b1830e189a149dec /svx | |
parent | d90cc3035443464432bf74538e8a2ad6e3fafe3b (diff) |
svx: fix loplugin errors
Change-Id: Ic13bc488f2c8137eae3687d72732533ba5542998
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdpdf.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index 609a6c0cddd7..6721f463f53c 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -93,9 +93,9 @@ namespace /// dimensions are in inches, with 72 points / inch. /// Here we effectively render at 96 DPI (to match /// the image rendered in vcl::ImportPDF in pdfread.cxx). -static inline double lcl_PointToPixel(double fPoint) { return fPoint * 96. / 72.; } +inline double lcl_PointToPixel(double fPoint) { return fPoint * 96. / 72.; } /// Convert from pixels to logic (twips). -static inline long lcl_ToLogic(double value) +inline long lcl_ToLogic(double value) { // Convert to integral preserving two dp. const long in = static_cast<long>(value * 100.); @@ -103,12 +103,12 @@ static inline long lcl_ToLogic(double value) return out / 100; } -static inline double sqrt2(double a, double b) { return sqrt(a * a + b * b); } +inline double sqrt2(double a, double b) { return sqrt(a * a + b * b); } } struct FPDFBitmapDeleter { - inline void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); } + void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); } }; using namespace com::sun::star; @@ -1193,7 +1193,7 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int /*nPageObjectI mnLineWidth = lcl_ToLogic(lcl_PointToPixel(dWidth)); int nFillMode = FPDF_FILLMODE_ALTERNATE; - FPDF_BOOL bStroke = true; + FPDF_BOOL bStroke = 1; // Assume we have to draw, unless told otherwise. if (FPDFPath_GetDrawMode(pPageObject, &nFillMode, &bStroke)) { if (nFillMode == FPDF_FILLMODE_ALTERNATE) @@ -1219,8 +1219,7 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int /*nPageObjectI else mpVD->SetLineColor(COL_TRANSPARENT); - if (!mbLastObjWasPolyWithoutLine - || !CheckLastPolyLineAndFillMerge(basegfx::B2DPolyPolygon(aPolyPoly))) + if (!mbLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(aPolyPoly)) { SdrPathObj* pPath = new SdrPathObj(*mpModel, OBJ_POLY, aPolyPoly); SetAttributes(pPath); |