summaryrefslogtreecommitdiff
path: root/sfx2/source
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 /sfx2/source
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 'sfx2/source')
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/appl/workwin.cxx3
-rw-r--r--sfx2/source/control/thumbnailviewacc.cxx3
-rw-r--r--sfx2/source/doc/docfilt.cxx4
-rw-r--r--sfx2/source/doc/new.cxx9
-rw-r--r--sfx2/source/view/frame.cxx3
-rw-r--r--sfx2/source/view/viewfrm.cxx3
7 files changed, 10 insertions, 17 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 7fe8d968dbe7..fcf8c320397c 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -689,7 +689,7 @@ static bool impl_showOnlineHelp( const OUString& rURL )
static bool impl_showOfflineHelp( const OUString& rURL )
{
OUString aBaseInstallPath = getHelpRootURL();
- OUString aInternal( "vnd.sun.star.help://" );
+ OUString const aInternal( "vnd.sun.star.help://" );
OUString aHelpLink( aBaseInstallPath + "/" + utl::ConfigManager::getProductVersion() + "/index.html?" );
aHelpLink += rURL.copy( aInternal.getLength() );
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 48554dd8284d..f18c271cdeb8 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -2317,8 +2317,7 @@ void SfxWorkWindow::EndAutoShow_Impl( Point aPos )
if ( p && p->IsAutoHide(false) )
{
Point aLocalPos = p->ScreenToOutputPixel( aPos );
- Point aEmptyPoint;
- tools::Rectangle aRect( aEmptyPoint, p->GetSizePixel() );
+ tools::Rectangle aRect( Point(), p->GetSizePixel() );
if ( !aRect.IsInside( aLocalPos ) )
p->FadeOut();
}
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 4029b6792ce0..600e8d705e21 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -825,8 +825,7 @@ awt::Rectangle SAL_CALL ThumbnailViewItemAcc::getBounds()
if( mpParent )
{
tools::Rectangle aRect( mpParent->getDrawArea() );
- Point aOrigin;
- tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() );
+ tools::Rectangle aParentRect( Point(), mpParent->mrParent.GetOutputSizePixel() );
aRect.Intersection( aParentRect );
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index b3d931124f4c..0bfefd65a59b 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -175,9 +175,9 @@ OUString SfxFilter::GetTypeFromStorage(
SotClipboardFormatId nClipId = SotExchange::GetFormat( aDataFlavor );
if ( nClipId != SotClipboardFormatId::NONE )
{
- SfxFilterFlags nMust = SfxFilterFlags::IMPORT;
+ SfxFilterFlags const nMust = SfxFilterFlags::IMPORT;
// template filters shouldn't be detected if not explicitly asked for
- SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED | SfxFilterFlags::TEMPLATEPATH;
+ SfxFilterFlags const nDont = SFX_FILTER_NOTINSTALLED | SfxFilterFlags::TEMPLATEPATH;
// get filter from storage MediaType
std::shared_ptr<const SfxFilter> pFilter = aMatcher.GetFilter4ClipBoardId( nClipId, nMust, nDont );
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index cd78f4b524ca..9c363b02e17b 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -69,8 +69,7 @@ Size SfxPreviewBase_Impl::GetOptimalSize() const
void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, GDIMetaFile* pFile)
{
rRenderContext.SetLineColor();
- Color aLightGrayCol(COL_LIGHTGRAY);
- rRenderContext.SetFillColor(aLightGrayCol);
+ rRenderContext.SetFillColor(COL_LIGHTGRAY);
rRenderContext.DrawRect(tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize()));
Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1, 1);
@@ -101,10 +100,8 @@ void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, GDIMetaFil
if (pFile)
{
- Color aBlackCol(COL_BLACK);
- Color aWhiteCol(COL_WHITE);
- rRenderContext.SetLineColor(aBlackCol);
- rRenderContext.SetFillColor(aWhiteCol);
+ rRenderContext.SetLineColor(COL_BLACK);
+ rRenderContext.SetFillColor(COL_WHITE);
rRenderContext.DrawRect(tools::Rectangle(aPoint + Point(FRAME, FRAME), bPoint + Point(FRAME, FRAME)));
pFile->WindStart();
pFile->Play(&rRenderContext, aPoint + Point(FRAME, FRAME), aSize);
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 82facc714be5..08c404f6fb04 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -599,8 +599,7 @@ void SfxFrame::SetToolSpaceBorderPixel_Impl( const SvBorder& rBorder )
tools::Rectangle SfxFrame::GetTopOuterRectPixel_Impl() const
{
Size aSize( GetWindow().GetOutputSizePixel() );
- Point aPoint;
- return ( tools::Rectangle ( aPoint, aSize ) );
+ return tools::Rectangle( Point(), aSize );
}
SfxWorkWindow* SfxFrame::GetWorkWindow_Impl() const
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index a7874e1934b0..33978818fa44 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1168,8 +1168,7 @@ void SfxViewFrame::SetBorderPixelImpl
}
else
{
- Point aPoint;
- tools::Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() );
+ tools::Rectangle aEditArea( Point(), GetWindow().GetOutputSizePixel() );
aEditArea.AdjustLeft(rBorder.Left() );
aEditArea.AdjustRight( -(rBorder.Right()) );
aEditArea.AdjustTop(rBorder.Top() );