diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-29 08:58:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-29 15:12:26 +0100 |
commit | 41eeaace84b45c803fff3ebd5ab981f0ad09393b (patch) | |
tree | 0a0290bcc852507efa8241bd0853ebdd84ec9cbf /vcl | |
parent | a2f7678171618d958e3c387718cd389bea63eaeb (diff) |
loplugin:oncevar
Change-Id: Iba892694acb378887a1d15ab59104c55f591f0bd
Reviewed-on: https://gerrit.libreoffice.org/62498
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/FontFeatureTest.cxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/bitmapcolor.cxx | 12 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 3 |
3 files changed, 6 insertions, 11 deletions
diff --git a/vcl/qa/cppunit/FontFeatureTest.cxx b/vcl/qa/cppunit/FontFeatureTest.cxx index 7476162b976e..fca68240f0da 100644 --- a/vcl/qa/cppunit/FontFeatureTest.cxx +++ b/vcl/qa/cppunit/FontFeatureTest.cxx @@ -48,7 +48,7 @@ void FontFeatureTest::testGetFontFeatures() return; // Can't test this because the font is not available, so exit vcl::Font aFont = aVDev->GetFont(); - aFont.SetFamilyName("Linux Libertine G"); + aFont.SetFamilyName(aFontName); aFont.SetWeight(FontWeight::WEIGHT_NORMAL); aFont.SetItalic(FontItalic::ITALIC_NORMAL); aFont.SetWidthType(FontWidth::WIDTH_NORMAL); diff --git a/vcl/qa/cppunit/bitmapcolor.cxx b/vcl/qa/cppunit/bitmapcolor.cxx index 0544a0c53e41..879bc78d7d1d 100644 --- a/vcl/qa/cppunit/bitmapcolor.cxx +++ b/vcl/qa/cppunit/bitmapcolor.cxx @@ -102,8 +102,7 @@ void BitmapColorTest::colorValueConstructor() void BitmapColorTest::colorClassConstructor() { { - Color aColor(0, 0, 0); - BitmapColor aBmpColor(aColor); + BitmapColor aBmpColor(Color(0, 0, 0)); CPPUNIT_ASSERT_EQUAL_MESSAGE("Red wrong", static_cast<sal_uInt8>(0), aBmpColor.GetRed()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Green wrong", static_cast<sal_uInt8>(0), @@ -114,8 +113,7 @@ void BitmapColorTest::colorClassConstructor() } { - Color aColor(127, 127, 127); - BitmapColor aBmpColor(aColor); + BitmapColor aBmpColor(Color(127, 127, 127)); CPPUNIT_ASSERT_EQUAL_MESSAGE("Red wrong", static_cast<sal_uInt8>(127), aBmpColor.GetRed()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Green wrong", static_cast<sal_uInt8>(127), @@ -127,8 +125,7 @@ void BitmapColorTest::colorClassConstructor() } { - Color aColor(255, 255, 255); - BitmapColor aBmpColor(aColor); + BitmapColor aBmpColor(Color(255, 255, 255)); CPPUNIT_ASSERT_EQUAL_MESSAGE("Red wrong", static_cast<sal_uInt8>(255), aBmpColor.GetRed()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Green wrong", static_cast<sal_uInt8>(255), @@ -141,8 +138,7 @@ void BitmapColorTest::colorClassConstructor() // Transparency / Alpha { - Color aColor(255, 128, 64, 0); - BitmapColor aBmpColor(aColor); + BitmapColor aBmpColor(Color(255, 128, 64, 0)); CPPUNIT_ASSERT_EQUAL_MESSAGE("Red wrong", static_cast<sal_uInt8>(128), aBmpColor.GetRed()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Green wrong", static_cast<sal_uInt8>(64), diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index e736934d739c..5abb8998032f 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -7373,8 +7373,7 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon { appendStrokingColor(aColor, aLine); // stroke with text color aLine.append( " " ); - Color aNonStrokeColor(COL_WHITE); // fill with white - appendNonStrokingColor(aNonStrokeColor, aLine); + appendNonStrokingColor(COL_WHITE, aLine); // fill with white aLine.append( "\n" ); aLine.append( "0.25 w \n" ); // same line thickness as in drawLayout |