summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-06-06 21:56:21 -0400
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-06-06 21:56:21 -0400
commit048bcef70252bf26f3917e455eaca4139d41a054 (patch)
tree50e6278b8a3cd3d726ea4625a80d663759701d27
parente8ed40a1aad32be21179afdb3b64a20be1f80d10 (diff)
svx: fix loplugin errors
Change-Id: Ic13bc488f2c8137eae3687d72732533ba5542998
-rw-r--r--svx/source/svdraw/svdpdf.cxx13
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);