summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-24 13:47:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-26 07:21:04 +0100
commit08ab1f46b192a188935fdffbefdc9f3973583cdf (patch)
tree4c1ecb502f3c3b2a2a8865ea8f84a083b16d310e /svtools
parent9bc8714308b6f4b85a4c756229ac8b670d009f42 (diff)
loplugin:oncevar extend to tools/gen.hxx types
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2 Reviewed-on: https://gerrit.libreoffice.org/50283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/ivctrl.cxx3
-rw-r--r--svtools/source/contnr/svtabbx.cxx3
-rw-r--r--svtools/source/contnr/treelistbox.cxx3
-rw-r--r--svtools/source/control/calendar.cxx4
-rw-r--r--svtools/source/control/toolbarmenuacc.cxx3
-rw-r--r--svtools/source/control/valueacc.cxx3
-rw-r--r--svtools/source/graphic/grfmgr2.cxx3
-rw-r--r--svtools/source/hatchwindow/ipwin.cxx6
-rw-r--r--svtools/source/misc/langhelp.cxx2
9 files changed, 11 insertions, 19 deletions
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 16dfe2749f72..796579b0a838 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -349,8 +349,7 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper )
WallpaperStyle eStyle = aBackground.GetStyle();
Color aBack( aBackground.GetColor());
- Color aTrans( COL_TRANSPARENT );
- if( aBack == aTrans &&
+ if( aBack == COL_TRANSPARENT &&
(!aBackground.IsBitmap() ||
aBackground.GetBitmap().IsTransparent() ||
(eStyle != WallpaperStyle::Tile && eStyle != WallpaperStyle::Scale)) )
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 21b458212319..9a804adb162b 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -1143,8 +1143,7 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessible()
tools::Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32)
{
- tools::Rectangle aRect;
- return aRect;
+ return tools::Rectangle();
}
sal_Int32 SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 0a68c3405e18..aa070ff36a88 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3472,8 +3472,7 @@ void SvTreeListBox::EnableAsyncDrag( bool b )
SvTreeListEntry* SvTreeListBox::GetFirstEntryInView() const
{
- Point aPos;
- return GetEntry( aPos );
+ return GetEntry( Point() );
}
SvTreeListEntry* SvTreeListBox::GetNextEntryInView(SvTreeListEntry* pEntry ) const
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index efd07162ce05..e89605313e54 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -220,7 +220,7 @@ void Calendar::ImplFormat()
if ( (aOutSize.Width() <= 1) || (aOutSize.Height() <= 1) )
return;
- OUString a99Text("99");
+ OUString const a99Text("99");
vcl::Font aOldFont = GetFont();
@@ -1577,7 +1577,7 @@ void Calendar::EndSelection()
Size Calendar::CalcWindowSizePixel() const
{
- OUString a99Text("99");
+ OUString const a99Text("99");
vcl::Font aOldFont = GetFont();
Size aSize;
diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx
index eca17d9a53ca..74d91e584b29 100644
--- a/svtools/source/control/toolbarmenuacc.cxx
+++ b/svtools/source/control/toolbarmenuacc.cxx
@@ -762,8 +762,7 @@ awt::Rectangle SAL_CALL ToolbarMenuEntryAcc::getBounds()
if( mpParent )
{
tools::Rectangle aRect( mpParent->maRect );
- Point aOrigin;
- tools::Rectangle aParentRect( aOrigin, mpParent->mrMenu.GetOutputSizePixel() );
+ tools::Rectangle aParentRect( Point(), mpParent->mrMenu.GetOutputSizePixel() );
aRect.Intersection( aParentRect );
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index e6e8e6b909e0..4abbb3a4c645 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -951,8 +951,7 @@ awt::Rectangle SAL_CALL ValueItemAcc::getBounds()
if( mpParent )
{
tools::Rectangle aRect( mpParent->mrParent.GetItemRect(mpParent->mnId) );
- Point aOrigin;
- tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() );
+ tools::Rectangle aParentRect( Point(), mpParent->mrParent.GetOutputSizePixel() );
aRect.Intersection( aParentRect );
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index bc3dab23f454..2c9429f01be6 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -921,8 +921,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice,
// calculate output sizes
if( !pBmpEx )
{
- Point aPt;
- tools::Rectangle aOutRect( aPt, pOutputDevice->GetOutputSizePixel() );
+ tools::Rectangle aOutRect( Point(), pOutputDevice->GetOutputSizePixel() );
tools::Rectangle aBmpRect( aOutputPointPix, aOutputSizePix );
if( pOutputDevice->GetOutDevType() == OUTDEV_WINDOW )
diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx
index 9da230d76dbf..20d49a243516 100644
--- a/svtools/source/hatchwindow/ipwin.cxx
+++ b/svtools/source/hatchwindow/ipwin.cxx
@@ -109,10 +109,8 @@ void SvResizeHelper::Draw(vcl::RenderContext& rRenderContext)
{
rRenderContext.Push();
rRenderContext.SetMapMode( MapMode() );
- Color aColBlack;
- Color aFillColor( COL_LIGHTGRAY );
- rRenderContext.SetFillColor( aFillColor );
+ rRenderContext.SetFillColor( COL_LIGHTGRAY );
rRenderContext.SetLineColor();
tools::Rectangle aMoveRects[ 4 ];
@@ -121,7 +119,7 @@ void SvResizeHelper::Draw(vcl::RenderContext& rRenderContext)
for (i = 0; i < 4; i++)
rRenderContext.DrawRect(aMoveRects[i]);
// draw handles
- rRenderContext.SetFillColor(aColBlack);
+ rRenderContext.SetFillColor(Color()); // black
tools::Rectangle aRects[ 8 ];
FillHandleRectsPixel(aRects);
for (i = 0; i < 8; i++)
diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx
index 55643af50621..75ce24b589a3 100644
--- a/svtools/source/misc/langhelp.cxx
+++ b/svtools/source/misc/langhelp.cxx
@@ -115,7 +115,7 @@ OUString getInstalledLocaleForSystemUILanguage(const css::uno::Sequence<OUString
{
// Get the list of langpacks that this build was configured to include
std::vector<OUString> aPackages;
- OUString sAvailableLocales(WITH_LANG);
+ OUString const sAvailableLocales(WITH_LANG);
std::vector<OUString> aAvailable;
sal_Int32 nIndex = 0;
do