[Libreoffice-commits] core.git: vcl/opengl vcl/qa vcl/source vcl/unx vcl/workben

Noel Grandin noel.grandin at collabora.co.uk
Wed Jun 28 06:55:56 UTC 2017


 vcl/opengl/program.cxx                         |    3 -
 vcl/qa/cppunit/app/test_IconThemeInfo.cxx      |   21 +++----
 vcl/qa/cppunit/app/test_IconThemeScanner.cxx   |    6 --
 vcl/source/app/svapp.cxx                       |    3 -
 vcl/source/control/button.cxx                  |   28 ++++------
 vcl/source/control/spinfld.cxx                 |    9 +--
 vcl/source/control/tabctrl.cxx                 |    3 -
 vcl/source/edit/textview.cxx                   |    3 -
 vcl/source/filter/FilterConfigCache.cxx        |   14 ++---
 vcl/source/filter/FilterConfigItem.cxx         |    3 -
 vcl/source/filter/graphicfilter.cxx            |    3 -
 vcl/source/filter/wmf/emfwr.cxx                |    6 --
 vcl/source/filter/wmf/enhwmf.cxx               |    3 -
 vcl/source/font/font.cxx                       |    3 -
 vcl/source/fontsubset/sft.cxx                  |    4 -
 vcl/source/gdi/CommonSalLayout.cxx             |    2 
 vcl/source/gdi/alpha.cxx                       |    3 -
 vcl/source/gdi/bitmap.cxx                      |    3 -
 vcl/source/gdi/jobset.cxx                      |    4 -
 vcl/source/gdi/pdfextoutdevdata.cxx            |    4 -
 vcl/source/gdi/pdfwriter_impl.cxx              |    9 +--
 vcl/source/gdi/pdfwriter_impl2.cxx             |    6 --
 vcl/source/gdi/pngwrite.cxx                    |    3 -
 vcl/source/gdi/svmconverter.cxx                |    4 -
 vcl/source/opengl/OpenGLHelper.cxx             |    3 -
 vcl/source/outdev/gradient.cxx                 |   10 +--
 vcl/source/outdev/text.cxx                     |    3 -
 vcl/source/window/decoview.cxx                 |    3 -
 vcl/source/window/dialog.cxx                   |    3 -
 vcl/source/window/event.cxx                    |    3 -
 vcl/source/window/menu.cxx                     |   10 +--
 vcl/source/window/paint.cxx                    |    3 -
 vcl/source/window/seleng.cxx                   |    3 -
 vcl/source/window/syschild.cxx                 |    3 -
 vcl/source/window/tabpage.cxx                  |    3 -
 vcl/source/window/toolbox.cxx                  |   15 +----
 vcl/source/window/window2.cxx                  |    8 +--
 vcl/source/window/winproc.cxx                  |   66 +++++++++++--------------
 vcl/unx/generic/app/gensys.cxx                 |    3 -
 vcl/unx/generic/gdi/gdiimpl.cxx                |    2 
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |    5 -
 vcl/unx/generic/print/bitmap_gfx.cxx           |    3 -
 vcl/unx/generic/printer/ppdparser.cxx          |    3 -
 vcl/unx/gtk/a11y/atklistener.cxx               |    6 --
 vcl/unx/gtk/salprn-gtk.cxx                     |    3 -
 vcl/workben/svptest.cxx                        |    3 -
 vcl/workben/vcldemo.cxx                        |   12 +---
 47 files changed, 130 insertions(+), 196 deletions(-)

New commits:
commit d2d85921605415908c553e84db654628f9f0c0b1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Jun 27 14:06:38 2017 +0200

    loplugin:oncevar in vcl
    
    Change-Id: I37a6dacda12e1c2910737d74aa344c7e2e195aeb
    Reviewed-on: https://gerrit.libreoffice.org/39328
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/opengl/program.cxx b/vcl/opengl/program.cxx
index 0dab8b02e1f6..c3e32e627044 100644
--- a/vcl/opengl/program.cxx
+++ b/vcl/opengl/program.cxx
@@ -344,8 +344,7 @@ void OpenGLProgram::ApplyMatrix(float fWidth, float fHeight, float fPixelOffset)
     mfLastHeight = fHeight;
     mfLastPixelOffset = fPixelOffset;
 
-    OString sProjectionMatrix("mvp");
-    GLuint nUniform = GetUniformLocation(sProjectionMatrix);
+    GLuint nUniform = GetUniformLocation("mvp");
 
     glm::mat4 aMVP = glm::ortho(0.0f, fWidth, fHeight, 0.0f, 0.0f, 1.0f);
 
diff --git a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
index 812bfe5229f5..3ab740e5bc15 100644
--- a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
@@ -65,7 +65,7 @@ class IconThemeInfoTest : public CppUnit::TestFixture
 void
 IconThemeInfoTest::UpperCaseDisplayNameIsReturnedForNonDefaultId()
 {
-    OUString id("katze");
+    OUString const id("katze");
     OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName(id);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("theme id is properly uppercased", OUString("Katze"), displayName);
 }
@@ -73,15 +73,14 @@ IconThemeInfoTest::UpperCaseDisplayNameIsReturnedForNonDefaultId()
 void
 IconThemeInfoTest::ImagesZipIsNotValid()
 {
-    OUString id("file://images.zip");
-    bool valid = vcl::IconThemeInfo::UrlCanBeParsed(id);
+    bool valid = vcl::IconThemeInfo::UrlCanBeParsed("file://images.zip");
     CPPUNIT_ASSERT_EQUAL_MESSAGE("images.zip is not a valid theme name", false, valid);
 }
 
 void
 IconThemeInfoTest::ImagesOxygenZipIsValid()
 {
-    OUString id("file://images_oxygen.zip");
+    OUString const id("file://images_oxygen.zip");
     bool valid = vcl::IconThemeInfo::UrlCanBeParsed(id);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("images_oxygen.zip is a valid theme name", true, valid);
 }
@@ -89,7 +88,7 @@ IconThemeInfoTest::ImagesOxygenZipIsValid()
 void
 IconThemeInfoTest::ThemeIdIsDetectedFromFileNameWithUnderscore()
 {
-    OUString fname("images_oxygen.zip");
+    OUString const fname("images_oxygen.zip");
     OUString sname = vcl::IconThemeInfo::FileNameToThemeId(fname);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("'oxygen' theme id is returned for 'images_oxygen.zip'", OUString("oxygen"), sname);
 }
@@ -98,7 +97,7 @@ void
 IconThemeInfoTest::ExceptionIsThrownWhenIdCannotBeDetermined1()
 {
     bool thrown = false;
-    OUString fname("images_oxygen");
+    OUString const fname("images_oxygen");
     try {
         vcl::IconThemeInfo::FileNameToThemeId(fname);
     }
@@ -112,7 +111,7 @@ void
 IconThemeInfoTest::ExceptionIsThrownWhenIdCannotBeDetermined2()
 {
     bool thrown = false;
-    OUString fname("image_oxygen.zip");
+    OUString const fname("image_oxygen.zip");
     try {
         vcl::IconThemeInfo::FileNameToThemeId(fname);
     }
@@ -125,8 +124,8 @@ IconThemeInfoTest::ExceptionIsThrownWhenIdCannotBeDetermined2()
 void
 IconThemeInfoTest::DisplayNameForHicontrastIsHighContrast()
 {
-    OUString id("hicontrast");
-    OUString expected("High Contrast");
+    OUString const id("hicontrast");
+    OUString const expected("High Contrast");
     OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName(id);
     CPPUNIT_ASSERT_EQUAL(expected, displayName);
 }
@@ -134,8 +133,8 @@ IconThemeInfoTest::DisplayNameForHicontrastIsHighContrast()
 void
 IconThemeInfoTest::DisplayNameForTango_testingIsTangoTesting()
 {
-    OUString id("tango_testing");
-    OUString expected("Tango Testing");
+    OUString const id("tango_testing");
+    OUString const expected("Tango Testing");
     OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName(id);
     CPPUNIT_ASSERT_EQUAL(expected, displayName);
 }
diff --git a/vcl/qa/cppunit/app/test_IconThemeScanner.cxx b/vcl/qa/cppunit/app/test_IconThemeScanner.cxx
index 857f65551365..6fc2993c7a8d 100644
--- a/vcl/qa/cppunit/app/test_IconThemeScanner.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeScanner.cxx
@@ -45,8 +45,7 @@ void
 IconThemeScannerTest::AddedThemeIsFoundById()
 {
     vcl::IconThemeScanner scanner;
-    OUString theme("file:://images_katze.zip");
-    scanner.AddIconThemeByPath(theme);
+    scanner.AddIconThemeByPath("file:://images_katze.zip");
     OUString id = vcl::IconThemeInfo::FileNameToThemeId("images_katze.zip");
     bool found = scanner.IconThemeIsInstalled(id);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("icon theme could be added by url", true, found);
@@ -67,8 +66,7 @@ void
 IconThemeScannerTest::ExceptionIsThrownIfInvalidInfoIsRequested()
 {
     vcl::IconThemeScanner scanner;
-    OUString theme("file:://images_katze.zip");
-    scanner.AddIconThemeByPath(theme);
+    scanner.AddIconThemeByPath("file:://images_katze.zip");
     bool thrown = false;
     try
     {
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 585428809bc6..c4d22d397013 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1480,8 +1480,7 @@ UnoWrapperBase* Application::GetUnoWrapper( bool bCreateIfNotExist )
     {
 #ifndef DISABLE_DYNLOADING
         osl::Module aTkLib;
-        OUString aLibName(TK_DLL_NAME);
-        aTkLib.loadRelative(&thisModule, aLibName);
+        aTkLib.loadRelative(&thisModule, TK_DLL_NAME);
         if (aTkLib.is())
         {
             FN_TkCreateUnoWrapper fnCreateWrapper = reinterpret_cast<FN_TkCreateUnoWrapper>(aTkLib.getFunctionSymbol("CreateUnoWrapper"));
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 89abc984b459..a5e64593cdee 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1138,17 +1138,16 @@ void PushButton::ImplSetDefButton( bool bSet )
     if ( IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire) )
     {
         tools::Rectangle aBound, aCont;
-        tools::Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
+        tools::Rectangle aCtrlRegion( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
                                              // will not work if the theme has dynamic adornment sizes
         ImplControlValue aControlValue;
-        tools::Rectangle        aCtrlRegion( aCtrlRect );
-        ControlState     nState = ControlState::DEFAULT|ControlState::ENABLED;
 
         // get native size of a 'default' button
         // and adjust the VCL button if more space for adornment is required
         if( GetNativeControlRegion( ControlType::Pushbutton, ControlPart::Entire, aCtrlRegion,
-                                nState, aControlValue,
-                                aBound, aCont ) )
+                                    ControlState::DEFAULT|ControlState::ENABLED,
+                                    aControlValue,
+                                    aBound, aCont ) )
         {
             dLeft = aCont.Left() - aBound.Left();
             dTop = aCont.Top() - aBound.Top();
@@ -1949,13 +1948,12 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
             tools::Rectangle aImageRect  = maStateRect;
             Size aImageSize = maImage.GetSizePixel();
             bool bEnabled = IsEnabled();
-            DrawFrameStyle nButtonStyle = DrawFrameStyle::DoubleIn;
 
             aImageSize.Width()  = CalcZoom(aImageSize.Width());
             aImageSize.Height() = CalcZoom(aImageSize.Height());
 
             // display border and selection status
-            aImageRect = aDecoView.DrawFrame(aImageRect, nButtonStyle);
+            aImageRect = aDecoView.DrawFrame(aImageRect, DrawFrameStyle::DoubleIn);
             if ((ImplGetButtonState() & DrawButtonFlags::Pressed) || !bEnabled)
                 rRenderContext.SetFillColor( rStyleSettings.GetFaceColor());
             else
@@ -2719,14 +2717,14 @@ Size RadioButton::ImplGetRadioImageSize() const
     if( IsNativeControlSupported( ControlType::Radiobutton, ControlPart::Entire ) )
     {
         ImplControlValue aControlValue;
-        tools::Rectangle        aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
-        ControlState     nState = ControlState::DEFAULT|ControlState::ENABLED;
+        tools::Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
         tools::Rectangle aBoundingRgn, aContentRgn;
 
         // get native size of a radio button
         if( GetNativeControlRegion( ControlType::Radiobutton, ControlPart::Entire, aCtrlRegion,
-                                           nState, aControlValue,
-                                           aBoundingRgn, aContentRgn ) )
+                                    ControlState::DEFAULT|ControlState::ENABLED,
+                                    aControlValue,
+                                    aBoundingRgn, aContentRgn ) )
         {
             aSize = aContentRgn.GetSize();
             bDefaultSize = false;
@@ -3591,14 +3589,14 @@ Size CheckBox::ImplGetCheckImageSize() const
     if( IsNativeControlSupported( ControlType::Checkbox, ControlPart::Entire ) )
     {
         ImplControlValue aControlValue;
-        tools::Rectangle        aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
-        ControlState     nState = ControlState::DEFAULT|ControlState::ENABLED;
+        tools::Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
         tools::Rectangle aBoundingRgn, aContentRgn;
 
         // get native size of a check box
         if( GetNativeControlRegion( ControlType::Checkbox, ControlPart::Entire, aCtrlRegion,
-                                           nState, aControlValue,
-                                           aBoundingRgn, aContentRgn ) )
+                                    ControlState::DEFAULT|ControlState::ENABLED,
+                                    aControlValue,
+                                    aBoundingRgn, aContentRgn ) )
         {
             aSize = aContentRgn.GetSize();
             bDefaultSize = false;
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 88e20bbfe09c..353e936f596b 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -598,9 +598,8 @@ void SpinField::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
             nStyle |= DrawButtonFlags::Pressed;
         tools::Rectangle aInnerRect = aView.DrawButton(maDropDownRect, nStyle);
 
-        SymbolType eSymbol = SymbolType::SPIN_DOWN;
         DrawSymbolFlags nSymbolStyle = IsEnabled() ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable;
-        aView.DrawSymbol(aInnerRect, eSymbol, rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor(), nSymbolStyle);
+        aView.DrawSymbol(aInnerRect, SymbolType::SPIN_DOWN, rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor(), nSymbolStyle);
     }
 
     Edit::Paint(rRenderContext, rRect);
@@ -998,11 +997,9 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D
         if (GetStyle() & WB_DROPDOWN)
         {
             DecorationView aView( pDev );
-            DrawButtonFlags nStyle = DrawButtonFlags::NoLightBorder;
-            tools::Rectangle aInnerRect = aView.DrawButton( aDD, nStyle );
-            SymbolType eSymbol = SymbolType::SPIN_DOWN;
+            tools::Rectangle aInnerRect = aView.DrawButton( aDD, DrawButtonFlags::NoLightBorder );
             DrawSymbolFlags nSymbolStyle = (IsEnabled() || (nFlags & DrawFlags::NoDisable)) ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable;
-            aView.DrawSymbol(aInnerRect, eSymbol, aButtonTextColor, nSymbolStyle);
+            aView.DrawSymbol(aInnerRect, SymbolType::SPIN_DOWN, aButtonTextColor, nSymbolStyle);
         }
 
         if (GetStyle() & WB_SPIN)
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index a20282e153f0..e8b70ec389be 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -649,8 +649,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
 
         if ( pOldPage && pOldPage->HasChildPathFocus() )
         {
-            sal_uInt16  n = 0;
-            vcl::Window* pFirstChild = pPage->ImplGetDlgWindow( n, GetDlgWindowType::First );
+            vcl::Window* pFirstChild = pPage->ImplGetDlgWindow( 0, GetDlgWindowType::First );
             if ( pFirstChild )
                 pFirstChild->ImplControlFocus( GetFocusFlags::Init );
             else
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 217ccfb1e321..12403b0d5180 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -1925,7 +1925,6 @@ void TextView::drop( const css::datatransfer::dnd::DropTargetDropEvent& rDTDE )
 {
     SolarMutexGuard aVclGuard;
 
-    bool bChanges = false;
     if ( !mpImpl->mbReadOnly && mpImpl->mpDDInfo )
     {
         ImpHideDDCursor();
@@ -2024,7 +2023,7 @@ void TextView::drop( const css::datatransfer::dnd::DropTargetDropEvent& rDTDE )
 
         mpImpl->mpTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
     }
-    rDTDE.Context->dropComplete( bChanges );
+    rDTDE.Context->dropComplete( false/*bChanges*/ );
 }
 
 void TextView::dragEnter( const css::datatransfer::dnd::DropTargetDragEnterEvent& )
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index 8c3fbecb1acb..60a1a0e927cd 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -151,13 +151,13 @@ Reference< XInterface > openConfig(const char* sPackage)
 
 void FilterConfigCache::ImplInit()
 {
-    OUString STYPE                ( "Type"                );
-    OUString SUINAME              ( "UIName"              );
-    OUString SFLAGS               ( "Flags"               );
-    OUString SMEDIATYPE           ( "MediaType"           );
-    OUString SEXTENSIONS          ( "Extensions"          );
-    OUString SFORMATNAME          ( "FormatName"          );
-    OUString SREALFILTERNAME      ( "RealFilterName"      );
+    OUString const STYPE                ( "Type"                );
+    OUString const SUINAME              ( "UIName"              );
+    OUString const SFLAGS               ( "Flags"               );
+    OUString const SMEDIATYPE           ( "MediaType"           );
+    OUString const SEXTENSIONS          ( "Extensions"          );
+    OUString const SFORMATNAME          ( "FormatName"          );
+    OUString const SREALFILTERNAME      ( "RealFilterName"      );
 
     // get access to config
     Reference< XNameAccess > xTypeAccess  ( openConfig("types"  ), UNO_QUERY );
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index fc8ed69d9bae..9e41fa56acde 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -117,9 +117,8 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree )
 
         // creation arguments: commit mode
         PropertyValue aModeArgument;
-        bool bAsynchron = true;
         aModeArgument.Name = "lazywrite";
-        aModeArgument.Value <<= bAsynchron;
+        aModeArgument.Value <<= true;
 
         Sequence< Any > aArguments( 2 );
         aArguments[ 0 ] <<= aPathArgument;
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 69ac5b1cc527..b78c2fdddafa 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -808,8 +808,7 @@ ErrCode GraphicFilter::ImpTestOrFindFormat( const OUString& rPath, SvStream& rSt
                 nBase = 1;
             else if ( pConfig->GetImportFilterType( rFormat ).equalsIgnoreAsciiCase( "pcd_Photo_CD_Base16" ) )
                 nBase = 0;
-            OUString aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" );
-            FilterConfigItem aFilterConfigItem( aFilterConfigPath );
+            FilterConfigItem aFilterConfigItem( "Office.Common/Filter/Graphic/Import/PCD" );
             aFilterConfigItem.WriteInt32( "Resolution", nBase );
         }
     }
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 0091aa1e8fe9..5438652aef72 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -415,10 +415,9 @@ void EMFWriter::ImplCheckLineAttr()
     if( mbLineChanged && ImplPrepareHandleSelect( mnLineHandle, LINE_SELECT ) )
     {
         sal_uInt32 nStyle = maVDev->IsLineColor() ? 0 : 5;
-        sal_uInt32 nWidth = 0, nHeight = 0;
 
         ImplBeginRecord( WIN_EMR_CREATEPEN );
-        m_rStm.WriteUInt32( mnLineHandle ).WriteUInt32( nStyle ).WriteUInt32( nWidth ).WriteUInt32( nHeight );
+        m_rStm.WriteUInt32( mnLineHandle ).WriteUInt32( nStyle ).WriteUInt32( 0/*nWidth*/ ).WriteUInt32( 0/*nHeight*/ );
         ImplWriteColor( maVDev->GetLineColor() );
         ImplEndRecord();
 
@@ -433,12 +432,11 @@ void EMFWriter::ImplCheckFillAttr()
     if( mbFillChanged && ImplPrepareHandleSelect( mnFillHandle, FILL_SELECT ) )
     {
         sal_uInt32 nStyle = maVDev->IsFillColor() ? 0 : 1;
-        sal_uInt32 nPatternStyle = 0;
 
         ImplBeginRecord( WIN_EMR_CREATEBRUSHINDIRECT );
         m_rStm.WriteUInt32( mnFillHandle ).WriteUInt32( nStyle );
         ImplWriteColor( maVDev->GetFillColor() );
-        m_rStm.WriteUInt32( nPatternStyle );
+        m_rStm.WriteUInt32( 0/*nPatternStyle*/ );
         ImplEndRecord();
 
         ImplBeginRecord( WIN_EMR_SELECTOBJECT );
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 0a22ab3762fd..12ee4ddb86b6 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1270,7 +1270,6 @@ bool EnhWMFReader::ReadEnhWMF()
                     pWMF->ReadUInt32( BkColorSrc ).ReadUInt32( iUsageSrc ).ReadUInt32( offBmiSrc ).ReadUInt32( cbBmiSrc )
                                .ReadUInt32( offBitsSrc ).ReadUInt32( cbBitsSrc ).ReadInt32( cxSrc ).ReadInt32( cySrc ) ;
 
-                    sal_uInt32  dwRop = SRCAND|SRCINVERT;
                     tools::Rectangle   aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) );
 
                     if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) )
@@ -1382,7 +1381,7 @@ bool EnhWMFReader::ReadEnhWMF()
                                     aPNGWriter.Write(aNew);
                                 }
 #endif
-                                aBmpSaveList.emplace_back(new BSaveStruct(aBitmapEx, aRect, dwRop));
+                                aBmpSaveList.emplace_back(new BSaveStruct(aBitmapEx, aRect, SRCAND|SRCINVERT));
                             }
                         }
                     }
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index 4dc242e7abbd..3214652064f4 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -559,7 +559,6 @@ namespace
 
     bool identifyType1Font( const char* i_pBuffer, sal_uInt32 i_nSize, Font& o_rResult )
     {
-        bool bResult = false;
         // might be a type1, find eexec
         const char* pStream = i_pBuffer;
         const char* const pExec = "eexec";
@@ -639,7 +638,7 @@ namespace
                     o_rResult.SetPitch( PITCH_VARIABLE );
             }
         }
-        return bResult;
+        return false;
     }
 }
 
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index b925846dac14..d0a891b56a5b 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -492,7 +492,7 @@ static int GetSimpleTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoin
 static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint **pointArray, TTGlyphMetrics *metrics, std::vector< sal_uInt32 >& glyphlist)
 {
     sal_uInt16 flags, index;
-    sal_Int16 e, f, numberOfContours;
+    sal_Int16 e, f;
     const sal_uInt8* table = getTable( ttf, O_glyf );
     std::vector<ControlPoint> myPoints;
     ControlPoint *nextComponent, *pa;
@@ -506,7 +506,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
         return 0;
 
     const sal_uInt8* ptr = table + ttf->goffsets[glyphID];
-    if ((numberOfContours = GetInt16(ptr, 0)) != -1)   /*- glyph is not compound */
+    if (GetInt16(ptr, 0) != -1)   /* number of contours - glyph is not compound */
         return 0;
 
     if (metrics) {
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index 54a8dc312398..cbd30a0e6ba2 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -848,7 +848,7 @@ void CommonSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
 
             Point aPos(pGlyphIter->maLinearPos.X() - nTotalWidth, 0);
             int nCharPos = pGlyphIter->mnCharPos;
-            int nFlags = GlyphItem::IS_IN_CLUSTER | GlyphItem::IS_RTL_GLYPH;
+            int const nFlags = GlyphItem::IS_IN_CLUSTER | GlyphItem::IS_RTL_GLYPH;
             while (nCopies--)
             {
                 GlyphItem aKashida(nCharPos, nKashidaIndex, aPos, nFlags, nKashidaWidth);
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 6d628405373b..4f3200bbe41c 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -89,7 +89,6 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
 {
     Bitmap::ScopedReadAccess pMaskAcc( const_cast<Bitmap&>(rMask) );
     AlphaMask::ScopedWriteAccess pAcc(*this);
-    bool                bRet = false;
 
     if( pMaskAcc && pAcc )
     {
@@ -103,7 +102,7 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
                 if( pMaskAcc->GetPixel( nY, nX ) == aMaskWhite )
                     pAcc->SetPixel( nY, nX, aReplace );
     }
-    return bRet;
+    return false;
 }
 
 bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency )
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 71d5d73f15ab..f8aa444d8091 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -154,7 +154,8 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries )
         {
             if( !aGreyPalette16.GetEntryCount() )
             {
-                sal_uInt8 cGrey = 0, cGreyInc = 17;
+                sal_uInt8 cGrey = 0;
+                sal_uInt8 const cGreyInc = 17;
 
                 aGreyPalette16.SetEntryCount( 16 );
 
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index ecea840d2393..3117cee7f574 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -322,8 +322,6 @@ SvStream& WriteJobSetup( SvStream& rOStream, const JobSetup& rJobSetup )
             rOStream.WriteUInt16( nLen );
         else
         {
-            sal_uInt16 nSystem = JOBSET_FILE605_SYSTEM;
-
             const ImplJobSetup& rJobData = rJobSetup.ImplGetConstData();
             Impl364JobSetupData aOldJobData;
             sal_uInt16 nOldJobDataSize = sizeof( aOldJobData );
@@ -344,7 +342,7 @@ SvStream& WriteJobSetup( SvStream& rOStream, const JobSetup& rJobSetup )
             strncpy( aOldData.cDriverName, aDriverByteName.getStr(), 31 );
             int nPos = rOStream.Tell();
             rOStream.WriteUInt16( 0 );
-            rOStream.WriteUInt16( nSystem );
+            rOStream.WriteUInt16( JOBSET_FILE605_SYSTEM );
             rOStream.WriteBytes( &aOldData, sizeof( aOldData ) );
             rOStream.WriteBytes( &aOldJobData, nOldJobDataSize );
             rOStream.WriteBytes( rJobData.GetDriverData(), rJobData.GetDriverDataLen() );
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 67061939df3d..4fd05336e1f6 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -799,8 +799,6 @@ void PDFExtOutDevData::EndGroup( const Graphic&     rGraphic,
 // Avoids expensive de-compression and re-compression of large images.
 bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic ) const
 {
-    bool bReduceResolution = false;
-
     assert(rGraphic.IsLink() &&
            (rGraphic.GetLink().GetType() == GfxLinkType::NativeJpg ||
             rGraphic.GetLink().GetType() == GfxLinkType::NativePng ||
@@ -820,7 +818,7 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic ) const
                                rGraphic.GetLink().GetDataSize();
 
     if ( GetIsLosslessCompression() )
-        return !bReduceResolution && !GetIsReduceImageResolution();
+        return !GetIsReduceImageResolution();
     else
     {
         static const struct {
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index bd46a9289057..f45dd1685b64 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7490,7 +7490,7 @@ sal_Int32 PDFWriterImpl::emitOutputIntent()
     aLine.append( " 0 obj\n"
                   "<</Type/OutputIntent/S/GTS_PDFA1/OutputConditionIdentifier");
 
-    OUString aComment( "sRGB IEC61966-2.1"  );
+    OUString const aComment( "sRGB IEC61966-2.1"  );
     appendLiteralStringEncrypt( aComment ,nOIObject, aLine );
     aLine.append("/DestOutputProfile ");
     aLine.append( nICCObject );
@@ -8453,7 +8453,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
     bool bVertical = m_aCurrentPDFState.m_aFont.IsVertical();
     int nGlyphs;
     int nIndex = 0;
-    int nMinCharPos = 0, nMaxCharPos = rText.getLength()-1;
+    int nMaxCharPos = rText.getLength()-1;
     double fXScale = 1.0;
     double fSkew = 0.0;
     sal_Int32 nPixelFontHeight = m_pReferenceDevice->mpFontInstance->maFontSelData.mnHeight;
@@ -8584,7 +8584,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
         {
             // default case: 1 glyph is one unicode
             aCodeUnitsPerGlyph.push_back(1);
-            if (pGlyphs[i]->mnCharPos >= nMinCharPos && pGlyphs[i]->mnCharPos <= nMaxCharPos)
+            if (pGlyphs[i]->mnCharPos >= 0 && pGlyphs[i]->mnCharPos <= nMaxCharPos)
             {
                 int nChars = 1;
                 // try to handle ligatures and such
@@ -12783,8 +12783,7 @@ void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
                 std::list< sal_Int32 > aNewChildren;
 
                 // add Div in RoleMap, in case no one else did (TODO: is it needed? Is it dangerous?)
-                OStringBuffer aNameBuf( "Div" );
-                OString aAliasName( aNameBuf.makeStringAndClear() );
+                OString aAliasName( "Div" );
                 m_aRoleMap[ aAliasName ] = getStructureTag( PDFWriter::Division );
 
                 while( rEle.m_aKids.size() > ncMaxPDFArraySize )
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index d76d787f173e..aa405d3a6b5f 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -188,13 +188,12 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
                         aMask = aBitmapEx.GetMask();
                 }
                 Graphic         aGraphic( aBitmapEx.GetBitmap() );
-                sal_Int32       nColorMode = 0;
 
                 Sequence< PropertyValue > aFilterData( 2 );
                 aFilterData[ 0 ].Name = "Quality";
                 aFilterData[ 0 ].Value <<= sal_Int32(i_rContext.m_nJPEGQuality);
                 aFilterData[ 1 ].Name = "ColorMode";
-                aFilterData[ 1 ].Value <<= nColorMode;
+                aFilterData[ 1 ].Value <<= sal_Int32(0);
 
                 try
                 {
@@ -204,12 +203,11 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
                     uno::Reference< graphic::XGraphicProvider > xGraphicProvider( graphic::GraphicProvider::create(xContext) );
                     uno::Reference< graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() );
                     uno::Reference < io::XOutputStream > xOut( xStream->getOutputStream() );
-                    OUString aMimeType("image/jpeg");
                     uno::Sequence< beans::PropertyValue > aOutMediaProperties( 3 );
                     aOutMediaProperties[0].Name = "OutputStream";
                     aOutMediaProperties[0].Value <<= xOut;
                     aOutMediaProperties[1].Name = "MimeType";
-                    aOutMediaProperties[1].Value <<= aMimeType;
+                    aOutMediaProperties[1].Value <<= OUString("image/jpeg");
                     aOutMediaProperties[2].Name = "FilterData";
                     aOutMediaProperties[2].Value <<= aFilterData;
                     xGraphicProvider->storeGraphic( xGraphic, aOutMediaProperties );
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 68a66800b13b..c3f07eb06538 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -362,12 +362,11 @@ void PNGWriterImpl::ImplWritepHYs(const BitmapEx& rBmpEx)
         if (aPrefSize.Width() && aPrefSize.Height() && mnWidth && mnHeight)
         {
             ImplOpenChunk(PNGCHUNK_pHYs);
-            sal_uInt8 nMapUnit = 1;
             sal_uInt32 nPrefSizeX = static_cast<sal_uInt32>(100000.0 / (static_cast<double>(aPrefSize.Width()) / mnWidth) + 0.5);
             sal_uInt32 nPrefSizeY = static_cast<sal_uInt32>(100000.0 / (static_cast<double>(aPrefSize.Height()) / mnHeight) + 0.5);
             ImplWriteChunk(nPrefSizeX);
             ImplWriteChunk(nPrefSizeY);
-            ImplWriteChunk(nMapUnit);
+            ImplWriteChunk(sal_uInt8(1)); // nMapUnit
         }
     }
 }
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 56fa5330b363..fe7cfe2e3509 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -304,9 +304,7 @@ bool ImplWriteUnicodeComment( SvStream& rOStm, const OUString& rString )
     if ( nStringLen )
     {
         sal_uInt32  nSize = ( nStringLen << 1 ) + 4;
-        sal_uInt16  nType = GDI_UNICODE_COMMENT;
-
-        rOStm.WriteUInt16( nType ).WriteUInt32( nSize );
+        rOStm.WriteUInt16( GDI_UNICODE_COMMENT ).WriteUInt32( nSize );
         write_uInt16s_FromOUString(rOStm, rString);
     }
     return nStringLen != 0;
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 79bdc4afc273..f9443f708bd2 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -141,8 +141,7 @@ static void addPreamble(OString& rShaderSource, const OString& rPreamble)
     if (rPreamble.isEmpty())
         return;
 
-    OString aVersionStr("#version");
-    int nVersionStrStartPos = rShaderSource.indexOf(aVersionStr);
+    int nVersionStrStartPos = rShaderSource.indexOf("#version");
 
     if (nVersionStrStartPos == -1)
     {
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 0facd3be408e..864a3d91da7a 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -359,8 +359,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
     }
 
     // calculate step count
-    bool    bMtf = false;
-    long    nStepCount  = GetGradientSteps( rGradient, aRect, bMtf );
+    long    nStepCount  = GetGradientSteps( rGradient, aRect, false/*bMtf*/ );
 
     // minimal three steps and maximal as max color steps
     long   nAbsRedSteps   = std::abs( nEndRed   - nStartRed );
@@ -480,9 +479,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
     if ( UsePolyPolygonForComplexGradient() )
         xPolyPoly.reset(new tools::PolyPolygon( 2 ));
 
-    bool bMtf = false;
-    bool bComplex = true;
-    long nStepCount = GetGradientSteps( rGradient, rRect, bMtf, bComplex );
+    long nStepCount = GetGradientSteps( rGradient, rRect, false/*bMtf*/, true/*bComplex*/ );
 
     // at least three steps and at most the number of colour differences
     long nSteps = std::max( nStepCount, 2L );
@@ -712,8 +709,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
         }
     }
 
-    bool    bMtf = true;
-    long    nStepCount  = GetGradientSteps( rGradient, aRect, bMtf );
+    long    nStepCount  = GetGradientSteps( rGradient, aRect, true/*bMtf*/ );
 
     // minimal three steps and maximal as max color steps
     long   nAbsRedSteps   = std::abs( nEndRed   - nStartRed );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 00ae6906275b..7d4a729f3bd6 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1484,8 +1484,7 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
 
         // calculate hyphenated break position
         OUString aHyphenStr(nHyphenChar);
-        sal_Int32 nTempLen = 1;
-        SalLayout* pHyphenLayout = ImplLayout( aHyphenStr, 0, nTempLen );
+        SalLayout* pHyphenLayout = ImplLayout( aHyphenStr, 0, 1 );
         if( pHyphenLayout )
         {
             // calculate subpixel width of hyphenation character
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index ade16d0e2db6..f7879511b79b 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -1002,9 +1002,8 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
         ControlPart nPart = ( bVertical ? ControlPart::SeparatorVert : ControlPart::SeparatorHorz );
         bool nativeSupported = pWin->IsNativeControlSupported( ControlType::Fixedline, nPart );
         ImplControlValue    aValue;
-        ControlState        nState = ControlState::NONE;
         tools::Rectangle aRect(rStart,rStop);
-        if(nativeSupported && pWin->DrawNativeControl(ControlType::Fixedline,nPart,aRect,nState,aValue,OUString()))
+        if(nativeSupported && pWin->DrawNativeControl(ControlType::Fixedline,nPart,aRect,ControlState::NONE,aValue,OUString()))
             return;
     }
 
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 0cb24e9cdef9..1573e37dded8 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1111,8 +1111,7 @@ void Dialog::GrabFocusToFirstControl()
          !isVisibleInLayout(pFocusControl) ||
          !isEnabledInLayout(pFocusControl) || !pFocusControl->IsInputEnabled() )
     {
-        sal_uInt16 n = 0;
-        pFocusControl = ImplGetDlgWindow( n, GetDlgWindowType::First );
+        pFocusControl = ImplGetDlgWindow( 0, GetDlgWindowType::First );
     }
     if ( pFocusControl )
         pFocusControl->ImplControlFocus( GetFocusFlags::Init );
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index da6fc79a7c28..00662ac57722 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -186,8 +186,7 @@ bool Window::EventNotify( NotifyEvent& rNEvt )
             if ( (rNEvt.GetWindow() == this) && (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) &&
                  !(GetStyle() & WB_TABSTOP) && !(mpWindowImpl->mnDlgCtrlFlags & DialogControlFlags::WantFocus) )
             {
-                sal_uInt16 n = 0;
-                vcl::Window* pFirstChild = ImplGetDlgWindow( n, GetDlgWindowType::First );
+                vcl::Window* pFirstChild = ImplGetDlgWindow( 0, GetDlgWindowType::First );
                 if ( pFirstChild )
                     pFirstChild->ImplControlFocus();
             }
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ead4e91eff10..8142bb649cc5 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1594,13 +1594,12 @@ static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Wi
     if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Button))
     {
         ImplControlValue    aControlValue;
-        tools::Rectangle           aCtrlRegion( i_rRect );
-        ControlState        nState = ControlState::PRESSED | ControlState::ENABLED;
-
         aControlValue.setTristateVal(ButtonValue::On);
 
         bNativeOk = rRenderContext.DrawNativeControl(ControlType::Toolbar, ControlPart::Button,
-                                                     aCtrlRegion, nState, aControlValue,
+                                                     i_rRect,
+                                                     ControlState::PRESSED | ControlState::ENABLED,
+                                                     aControlValue,
                                                      OUString());
     }
 
@@ -2795,7 +2794,6 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
     tools::Rectangle aRect( rRect );
     aRect.SetPos( pW->OutputToScreenPixel( aRect.TopLeft() ) );
 
-    WinBits nStyle = WB_BORDER;
     if (bRealExecute)
         nPopupModeFlags |= FloatWinPopupFlags::NewLevel;
     nPopupModeFlags |= FloatWinPopupFlags::NoKeyClose | FloatWinPopupFlags::AllMouseButtonClose;
@@ -2845,7 +2843,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
         }
     }
 
-    VclPtrInstance<MenuFloatingWindow> pWin( this, pW, nStyle | WB_SYSTEMWINDOW );
+    VclPtrInstance<MenuFloatingWindow> pWin( this, pW, WB_BORDER | WB_SYSTEMWINDOW );
     if( pSVData->maNWFData.mbFlatMenu )
         pWin->SetBorderStyle( WindowBorderStyle::NOBORDER );
     else
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index b54c37aa04c2..515078b3faa6 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1644,7 +1644,6 @@ void Window::ImplScroll( const tools::Rectangle& rRect,
         // so it has to be re-mirrored before calling the Paint-handler
         mpWindowImpl->mnPaintFlags |= ImplPaintFlags::CheckRtl;
 
-        InvalidateFlags nPaintFlags = InvalidateFlags::Children;
         if ( !bScrollChildren )
         {
             if ( nOrgFlags & ScrollFlags::NoChildren )
@@ -1652,7 +1651,7 @@ void Window::ImplScroll( const tools::Rectangle& rRect,
             else
                 ImplClipChildren( aInvalidateRegion );
         }
-        ImplInvalidateFrameRegion( &aInvalidateRegion, nPaintFlags );
+        ImplInvalidateFrameRegion( &aInvalidateRegion, InvalidateFlags::Children );
     }
 
     if ( bScrollChildren )
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 3b06d3d11623..0366202df3fb 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -335,8 +335,7 @@ void SelectionEngine::Reset()
     aWTimer.Stop();
     if ( nFlags & SelectionEngineFlags::IN_SEL )
         pWin->ReleaseMouse();
-    SelectionEngineFlags nMask = (SelectionEngineFlags::HAS_ANCH | SelectionEngineFlags::IN_SEL);
-    nFlags &= ~nMask;
+    nFlags &= ~SelectionEngineFlags(SelectionEngineFlags::HAS_ANCH | SelectionEngineFlags::IN_SEL);
     nLockedMods = 0;
 }
 
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 8cb32ab1a581..8424f82937d6 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -50,7 +50,6 @@ using namespace ::com::sun::star;
 long ImplSysChildProc( void* pInst, SalObjEvent nEvent )
 {
     VclPtr<SystemChildWindow> pWindow = static_cast<SystemChildWindow*>(pInst);
-    long nRet = 0;
 
     switch ( nEvent )
     {
@@ -99,7 +98,7 @@ long ImplSysChildProc( void* pInst, SalObjEvent nEvent )
         default: break;
     }
 
-    return nRet;
+    return 0;
 }
 
 void SystemChildWindow::ImplInitSysChild( vcl::Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow )
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 3e095a4d566a..f44385002574 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -134,7 +134,6 @@ void TabPage::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle&
         const ImplControlValue aControlValue;
 
         ControlState nState = ControlState::ENABLED;
-        ControlPart part = ControlPart::Entire;
         if ( !IsEnabled() )
             nState &= ~ControlState::ENABLED;
         if ( HasFocus() )
@@ -142,7 +141,7 @@ void TabPage::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle&
         // pass the whole window region to NWF as the tab body might be a gradient or bitmap
         // that has to be scaled properly, clipping makes sure that we do not paint too much
         tools::Rectangle aCtrlRegion( Point(), GetOutputSizePixel() );
-        rRenderContext.DrawNativeControl( ControlType::TabBody, part, aCtrlRegion, nState,
+        rRenderContext.DrawNativeControl( ControlType::TabBody, ControlPart::Entire, aCtrlRegion, nState,
                 aControlValue, OUString() );
     }
 }
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 69f1b604de1b..4475353a65a2 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -249,10 +249,9 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext,
 
         Point aPt;
         tools::Rectangle aCtrlRegion(aPt, aSz);
-        ControlState nState = ControlState::ENABLED;
 
         bNativeOk = rRenderContext.DrawNativeControl( ControlType::Toolbar, ePart,
-                                        aCtrlRegion, nState, aToolbarValue, OUString() );
+                                        aCtrlRegion, ControlState::ENABLED, aToolbarValue, OUString() );
     }
 
     if( bNativeOk )
@@ -432,10 +431,9 @@ bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext)
     // use NWF
     Point aPt;
     tools::Rectangle aCtrlRegion(aPt, GetOutputSizePixel());
-    ControlState  nState = ControlState::ENABLED;
 
     return rRenderContext.DrawNativeControl( ControlType::Toolbar, mbHorz ? ControlPart::DrawBackgroundHorz : ControlPart::DrawBackgroundVert,
-                                    aCtrlRegion, nState, ImplControlValue(), OUString() );
+                                    aCtrlRegion, ControlState::ENABLED, ImplControlValue(), OUString() );
 }
 
 void ToolBox::ImplDrawTransparentBackground(const vcl::Region &rRegion)
@@ -2641,8 +2639,7 @@ void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItem
     if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, nPart))
     {
         ImplControlValue aControlValue;
-        ControlState     nState = ControlState::NONE;
-        bNativeOk = rRenderContext.DrawNativeControl(ControlType::Toolbar, nPart, rRect, nState, aControlValue, OUString());
+        bNativeOk = rRenderContext.DrawNativeControl(ControlType::Toolbar, nPart, rRect, ControlState::NONE, aControlValue, OUString());
     }
 
     /* Draw the widget only if it can't be drawn natively. */
@@ -4538,8 +4535,7 @@ void ToolBox::LoseFocus()
 void ToolBox::TriggerItem( sal_uInt16 nItemId )
 {
     mnHighItemId = nItemId;
-    sal_uInt16 nModifier = 0;
-    vcl::KeyCode aKeyCode( 0, nModifier );
+    vcl::KeyCode aKeyCode( 0, 0 );
     ImplActivateItem( aKeyCode );
 }
 
@@ -4839,8 +4835,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
     // #107251# move focus away if this toolbox was disabled during keyinput
     if (HasFocus() && mpData->mbKeyInputDisabled && bParentIsContainer)
     {
-        sal_uInt16 n = 0;
-        vcl::Window *pFocusControl = pParent->ImplGetDlgWindow( n, GetDlgWindowType::First );
+        vcl::Window *pFocusControl = pParent->ImplGetDlgWindow( 0, GetDlgWindowType::First );
         if ( pFocusControl && pFocusControl != this )
             pFocusControl->ImplControlFocus( GetFocusFlags::Init );
     }
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 0a54ea7fe31c..56359bad3ce4 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -773,9 +773,9 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
                             if ( deltaXInLogic)
                             {
 #ifndef IOS
-                                bool isMultiplyByLineSize = true;
+                                bool const isMultiplyByLineSize = true;
 #else
-                                bool isMultiplyByLineSize = false;
+                                bool const isMultiplyByLineSize = false;
 #endif
                                 lcl_HandleScrollHelper( pHScrl, deltaXInLogic, isMultiplyByLineSize );
                                 bRet = true;
@@ -804,9 +804,9 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
                             if ( deltaYInLogic )
                             {
 #ifndef IOS
-                                bool isMultiplyByLineSize = true;
+                                bool const isMultiplyByLineSize = true;
 #else
-                                bool isMultiplyByLineSize = false;
+                                bool const isMultiplyByLineSize = false;
 #endif
                                 lcl_HandleScrollHelper( pVScrl, deltaYInLogic, isMultiplyByLineSize );
 
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index a892734d97d2..9cfb68742127 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -299,7 +299,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
     pWinFrameData->mnLastMouseX = nX;
     pWinFrameData->mnLastMouseY = nY;
     pWinFrameData->mnMouseCode  = nCode;
-    MouseEventModifiers nTmpMask = MouseEventModifiers::SYNTHETIC | MouseEventModifiers::MODIFIERCHANGED;
+    MouseEventModifiers const nTmpMask = MouseEventModifiers::SYNTHETIC | MouseEventModifiers::MODIFIERCHANGED;
     pWinFrameData->mnMouseMode  = nMode & ~nTmpMask;
     if ( bMouseLeave )
     {
@@ -624,7 +624,6 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
     }
 
     // call handler
-    bool bDrag = false;
     bool bCallHelpRequest = true;
     SAL_WARN_IF( !pChild, "vcl", "ImplHandleMouseEvent: pChild is NULL" );
 
@@ -751,44 +750,41 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
     }
     else if ( (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) || (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP) )
     {
-        if ( !bDrag )
+        // Command-Events
+        if ( /*!bRet &&*/ (nClicks == 1) && (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) &&
+             (nCode == MOUSE_MIDDLE) )
         {
-            // Command-Events
-            if ( /*!bRet &&*/ (nClicks == 1) && (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) &&
-                 (nCode == MOUSE_MIDDLE) )
-            {
-                MouseMiddleButtonAction nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction();
-                if ( nMiddleAction == MouseMiddleButtonAction::AutoScroll )
-                    bRet = !ImplCallCommand( pChild, CommandEventId::StartAutoScroll, nullptr, true, &aChildPos );
-            }
-            else
+            MouseMiddleButtonAction nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction();
+            if ( nMiddleAction == MouseMiddleButtonAction::AutoScroll )
+                bRet = !ImplCallCommand( pChild, CommandEventId::StartAutoScroll, nullptr, true, &aChildPos );
+        }
+        else
+        {
+            // ContextMenu
+            const MouseSettings& rMSettings = pChild->GetSettings().GetMouseSettings();
+            if ( (nCode == rMSettings.GetContextMenuCode()) &&
+                 (nClicks == rMSettings.GetContextMenuClicks()) )
             {
-                // ContextMenu
-                const MouseSettings& rMSettings = pChild->GetSettings().GetMouseSettings();
-                if ( (nCode == rMSettings.GetContextMenuCode()) &&
-                     (nClicks == rMSettings.GetContextMenuClicks()) )
+                bool bContextMenu = (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN);
+                if ( bContextMenu )
                 {
-                    bool bContextMenu = (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN);
-                    if ( bContextMenu )
+                    if( pSVData->maAppData.mpActivePopupMenu )
                     {
-                        if( pSVData->maAppData.mpActivePopupMenu )
-                        {
-                            /*  #i34277# there already is a context menu open
-                            *   that was probably just closed with EndPopupMode.
-                            *   We need to give the eventual corresponding
-                            *   PopupMenu::Execute a chance to end properly.
-                            *   Therefore delay context menu command and
-                            *   issue only after popping one frame of the
-                            *   Yield stack.
-                            */
-                            ContextMenuEvent* pEv = new ContextMenuEvent;
-                            pEv->pWindow = pChild;
-                            pEv->aChildPos = aChildPos;
-                            Application::PostUserEvent( Link<void*,void>( pEv, ContextMenuEventLink ) );
-                        }
-                        else
-                            bRet = ! ImplCallCommand( pChild, CommandEventId::ContextMenu, nullptr, true, &aChildPos );
+                        /*  #i34277# there already is a context menu open
+                        *   that was probably just closed with EndPopupMode.
+                        *   We need to give the eventual corresponding
+                        *   PopupMenu::Execute a chance to end properly.
+                        *   Therefore delay context menu command and
+                        *   issue only after popping one frame of the
+                        *   Yield stack.
+                        */
+                        ContextMenuEvent* pEv = new ContextMenuEvent;
+                        pEv->pWindow = pChild;
+                        pEv->aChildPos = aChildPos;
+                        Application::PostUserEvent( Link<void*,void>( pEv, ContextMenuEventLink ) );
                     }
+                    else
+                        bRet = ! ImplCallCommand( pChild, CommandEventId::ContextMenu, nullptr, true, &aChildPos );
                 }
             }
         }
diff --git a/vcl/unx/generic/app/gensys.cxx b/vcl/unx/generic/app/gensys.cxx
index c5ab3db09b88..b336a90561eb 100644
--- a/vcl/unx/generic/app/gensys.cxx
+++ b/vcl/unx/generic/app/gensys.cxx
@@ -92,7 +92,6 @@ SalGenericSystem::~SalGenericSystem()
 
 int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUString& rMessage )
 {
-    int nDefButton = 0;
     std::list< OUString > aButtons;
     int nButtonIds[5] = {0}, nBut = 0;
 
@@ -100,7 +99,7 @@ int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUStri
 
     aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::OK, false/*bUseResources*/ ) );
     nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK;
-    int nResult = ShowNativeDialog( rTitle, rMessage, aButtons, nDefButton );
+    int nResult = ShowNativeDialog( rTitle, rMessage, aButtons, 0/*nDefButton*/ );
 
     return nResult != -1 ? nButtonIds[ nResult ] : 0;
 }
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 94c28de3d83a..5c6c68f275d5 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -363,7 +363,7 @@ GC X11SalGraphicsImpl::GetInvert50GC()
         values.function             = GXinvert;
         values.line_width           = 1;
         values.line_style           = LineSolid;
-        unsigned long nValueMask =
+        unsigned long const nValueMask =
                                   GCGraphicsExposures
                                   | GCForeground
                                   | GCBackground
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 8ff1c72c8835..0d925b3d690a 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -642,11 +642,8 @@ void FreetypeFont::InitGlyphData(const GlyphItem& rGlyph, GlyphData& rGD ) const
 
 bool FreetypeFont::GetAntialiasAdvice() const
 {
-    if( GetFontSelData().mbNonAntialiased || (mnPrioAntiAlias<=0) )
-        return false;
-    bool bAdviseAA = true;
     // TODO: also use GASP info
-    return bAdviseAA;
+    return !GetFontSelData().mbNonAntialiased && (mnPrioAntiAlias > 0);
 }
 
 // determine unicode ranges in font
diff --git a/vcl/unx/generic/print/bitmap_gfx.cxx b/vcl/unx/generic/print/bitmap_gfx.cxx
index 95552d5b858d..13051c38db5a 100644
--- a/vcl/unx/generic/print/bitmap_gfx.cxx
+++ b/vcl/unx/generic/print/bitmap_gfx.cxx
@@ -530,7 +530,6 @@ PrinterGfx::writePS2ImageHeader (const tools::Rectangle& rArea, psp::ImageType n
         case psp::ImageType::MonochromeImage: nDictType = 3; break;
         default: break;
     }
-    sal_Int32 nCompressType = 1;
 
     nChar += psp::getValueOf (rArea.GetWidth(),  pImage + nChar);
     nChar += psp::appendStr  (" ",               pImage + nChar);
@@ -538,7 +537,7 @@ PrinterGfx::writePS2ImageHeader (const tools::Rectangle& rArea, psp::ImageType n
     nChar += psp::appendStr  (" ",               pImage + nChar);
     nChar += psp::getValueOf (nDictType,         pImage + nChar);
     nChar += psp::appendStr  (" ",               pImage + nChar);
-    nChar += psp::getValueOf (nCompressType,     pImage + nChar);
+    nChar += psp::getValueOf (sal_Int32(1),      pImage + nChar); // nCompressType
     nChar += psp::appendStr  (" psp_imagedict image\n", pImage + nChar);
 
     WritePS (mpPageBody, pImage, nChar);
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 0a427baf2592..54d9746451f2 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -364,12 +364,11 @@ OString PPDDecompressStream::ReadLine()
 
 static osl::FileBase::RC resolveLink( const OUString& i_rURL, OUString& o_rResolvedURL, OUString& o_rBaseName, osl::FileStatus::Type& o_rType)
 {
-    int nLinkLevel = 10;
     salhelper::LinkResolver aResolver(osl_FileStatus_Mask_FileName |
                                       osl_FileStatus_Mask_Type |
                                       osl_FileStatus_Mask_FileURL);
 
-    osl::FileBase::RC aRet = aResolver.fetchFileStatus(i_rURL, nLinkLevel);
+    osl::FileBase::RC aRet = aResolver.fetchFileStatus(i_rURL, 10/*nLinkLevel*/);
 
     if (aRet  == osl::FileBase::E_None)
     {
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx
index 7edc33726bae..117b02b7e145 100644
--- a/vcl/unx/gtk/a11y/atklistener.cxx
+++ b/vcl/unx/gtk/a11y/atklistener.cxx
@@ -526,8 +526,7 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven
             AtkObject *pChild = getObjFromAny( aEvent.NewValue );
             if( pChild )
             {
-                AtkStateType eExpandedState = ATK_STATE_EXPANDED;
-                atk_object_notify_state_change( pChild, eExpandedState, true );
+                atk_object_notify_state_change( pChild, ATK_STATE_EXPANDED, true );
                 g_object_unref( pChild );
             }
             break;
@@ -538,8 +537,7 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven
             AtkObject *pChild = getObjFromAny( aEvent.NewValue );
             if( pChild )
             {
-                AtkStateType eExpandedState = ATK_STATE_EXPANDED;
-                atk_object_notify_state_change( pChild, eExpandedState, false );
+                atk_object_notify_state_change( pChild, ATK_STATE_EXPANDED, false );
                 g_object_unref( pChild );
             }
             break;
diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx
index 310af20af8d3..bae9cba368bd 100644
--- a/vcl/unx/gtk/salprn-gtk.cxx
+++ b/vcl/unx/gtk/salprn-gtk.cxx
@@ -243,7 +243,6 @@ GtkSalPrinter::StartJob(
     if (!bDoJob)
         return false;
 #endif
-    int nCopies = 1;
     bool bCollate = false;
 
     //To-Do proper name, watch for encodings
@@ -254,7 +253,7 @@ GtkSalPrinter::StartJob(
 
     //To-Do, swap ps/pdf for gtk_printer_accepts_ps()/gtk_printer_accepts_pdf() ?
 
-    return impl_doJob(&aFileName, i_rJobName, i_rAppName, io_pSetupData, nCopies, bCollate, io_rController);
+    return impl_doJob(&aFileName, i_rJobName, i_rAppName, io_pSetupData, 1/*nCopies*/, bCollate, io_rController);
 }
 
 bool
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 2e679bb7f756..95ab4ad3db69 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -236,12 +236,11 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rR
         rRenderContext.SetTextColor(Color(nRed, nGreen, nBlue));
 
         OUStringBuffer aPrintText(1024);
-        long nMaxWidth = 0;
 
         aPrintText.append( "SVP test program" );
 
         rRenderContext.DrawText(tools::Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000),
-                                Size(aPaperSize.Width() - 2100 - nMaxWidth, aPaperSize.Height() - 4000)),
+                                Size(aPaperSize.Width() - 2100, aPaperSize.Height() - 4000)),
                                 aPrintText.makeStringAndClear(),
                                 DrawTextFlags::MultiLine);
     }
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 4cee52f526fa..5ceb6a7fd042 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -382,7 +382,7 @@ public:
         {
             rDev.SetClipRegion( vcl::Region(r) );
 
-            OUString aLatinText("Click any rect to zoom!!!!");
+            OUString const aLatinText("Click any rect to zoom!!!!");
 
             const unsigned char pTextUTF8[] = {
                 0xd9, 0x88, 0xd8, 0xa7, 0xd8, 0xad, 0xd9, 0x90,
@@ -419,9 +419,7 @@ public:
                 "Times", "Liberation Sans", "Arial", "Linux Biolinum G", "Linux Libertine Display G"
               };
 
-            size_t nNumFontNames = SAL_N_ELEMENTS(pNames);
-
-            for (size_t i = 0; i < nNumFontNames; i++)
+            for (size_t i = 0; i < SAL_N_ELEMENTS(pNames); i++)
                 aFontNames.push_back(OUString::createFromAscii(pNames[i]));
 
             if (bClip && !bRotate)
@@ -437,7 +435,7 @@ public:
 
                 if (nPrintNumCopies == 1)
                 {
-                    float nFontMagnitude = 0.25f;
+                    float const nFontMagnitude = 0.25f;
                     // random font size to avoid buffering
                     nFontHeight = 1 + nFontMagnitude * (0.9 + comphelper::rng::uniform_real_distribution(0.0, std::nextafter(0.1, DBL_MAX))) * (r.Bottom() - r.Top());
                     nFontIndex=0;
@@ -464,9 +462,7 @@ public:
                     aFontRect.Top() += nHeight/2;
                     aFontRect.Bottom() += nHeight;
 
-                    int nDegrees = 45;
-
-                    aFont.SetOrientation(nDegrees * 10);
+                    aFont.SetOrientation(45 * 10); // 45 degrees
 
                     rDev.SetFont(aFont);
                     rDev.DrawText(aFontRect, aText);


More information about the Libreoffice-commits mailing list