From ef531e85d95fe18d553bce1a6926d24c08ffe2bf Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 27 Jun 2017 14:05:39 +0200 Subject: loplugin:oncevar in test..tools Change-Id: I7b3ccc8f227100ff7fedeaca96a12f135da60bab Reviewed-on: https://gerrit.libreoffice.org/39326 Tested-by: Jenkins Reviewed-by: Noel Grandin --- tools/qa/cppunit/test_reversemap.cxx | 2 +- tools/source/generic/b3dtrans.cxx | 3 +-- tools/source/generic/color.cxx | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/qa/cppunit/test_reversemap.cxx b/tools/qa/cppunit/test_reversemap.cxx index 1f1f7c3b9fb0..d6da18a570fd 100644 --- a/tools/qa/cppunit/test_reversemap.cxx +++ b/tools/qa/cppunit/test_reversemap.cxx @@ -60,7 +60,7 @@ namespace aAllChars[i-1] = static_cast(i); //Some slots are unused, so don't map to private, just set them to 'X' - sal_uInt32 convertFlags = OUSTRING_TO_OSTRING_CVTFLAGS ^ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE; + sal_uInt32 const convertFlags = OUSTRING_TO_OSTRING_CVTFLAGS ^ RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE; OUString sOrigText(&aAllChars[0], aAllChars.size(), eEncoding, convertFlags); sOrigText = sOrigText.replace( 0xfffd, 'X' ); diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx index bc830767c280..a28abe320868 100644 --- a/tools/source/generic/b3dtrans.cxx +++ b/tools/source/generic/b3dtrans.cxx @@ -447,7 +447,6 @@ void B3dCamera::CalcNewViewportValues() bool B3dCamera::CalcFocalLength() { double fWidth = GetDeviceRectangleWidth(); - bool bRetval = false; // Adjust focal length based on given position basegfx::B3DPoint aOldPosition; @@ -456,7 +455,7 @@ bool B3dCamera::CalcFocalLength() fFocalLength = aOldPosition.getZ() / fWidth * 35.0; if(fFocalLength < 5.0) fFocalLength = 5.0; - return bRetval; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx index c1055885ab76..a58f29e71307 100644 --- a/tools/source/generic/color.cxx +++ b/tools/source/generic/color.cxx @@ -296,7 +296,6 @@ void Color::ApplyTintOrShade(sal_Int16 n100thPercent) SvStream& WriteColor( SvStream& rOStream, const Color& rColor ) { - sal_uInt16 nColorName = COL_NAME_USER; sal_uInt16 nRed = rColor.GetRed(); sal_uInt16 nGreen = rColor.GetGreen(); sal_uInt16 nBlue = rColor.GetBlue(); @@ -304,7 +303,7 @@ SvStream& WriteColor( SvStream& rOStream, const Color& rColor ) nGreen = (nGreen<<8) + nGreen; nBlue = (nBlue<<8) + nBlue; - rOStream.WriteUInt16( nColorName ); + rOStream.WriteUInt16( COL_NAME_USER ); rOStream.WriteUInt16( nRed ); rOStream.WriteUInt16( nGreen ); rOStream.WriteUInt16( nBlue ); -- cgit