summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/accessibility/charmapacc.cxx3
-rw-r--r--svx/source/dialog/connctrl.cxx3
-rw-r--r--svx/source/dialog/contwnd.cxx3
-rw-r--r--svx/source/dialog/imapwnd.cxx3
-rw-r--r--svx/source/sidebar/line/LineWidthValueSet.cxx3
-rw-r--r--svx/source/svdraw/svdhdl.cxx3
-rw-r--r--svx/source/svdraw/svdoashp.cxx3
-rw-r--r--svx/source/svdraw/svdotext.cxx3
-rw-r--r--svx/source/svdraw/svdoutl.cxx3
-rw-r--r--svx/source/table/svdotable.cxx3
-rw-r--r--svx/source/uitest/sdrobject.cxx7
-rw-r--r--svx/source/xml/xmlgrhlp.cxx3
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx3
13 files changed, 14 insertions, 29 deletions
diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx
index c8b820939565..02b67240f626 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -738,8 +738,7 @@ awt::Rectangle SvxShowCharSetItemAcc::implGetBounds( )
if( mpParent )
{
tools::Rectangle aRect( mpParent->maRect );
- Point aOrigin;
- tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() );
+ tools::Rectangle aParentRect( Point(), mpParent->mrParent.GetOutputSizePixel() );
aRect.Intersection( aParentRect );
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index f9eebf9f8a70..b9a8ea76b1bd 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -134,8 +134,7 @@ void SvxXConnectionPreview::AdaptSize()
aDisplayMap.SetOrigin( aNewPos );
SetMapMode( aDisplayMap );
- Point aPos;
- MouseEvent aMEvt( aPos, 1, MouseEventModifiers::NONE, MOUSE_RIGHT );
+ MouseEvent aMEvt( Point(), 1, MouseEventModifiers::NONE, MOUSE_RIGHT );
MouseButtonDown( aMEvt );
}
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index 4f9f14e88064..b25c123f27b6 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -174,8 +174,7 @@ void ContourWindow::MouseMove( const MouseEvent& rMEvt )
void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt)
{
- Point aTmpPoint;
- const tools::Rectangle aGraphRect( aTmpPoint, GetGraphicSize() );
+ const tools::Rectangle aGraphRect( Point(), GetGraphicSize() );
const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) );
bClickValid = aGraphRect.IsInside( aLogPt );
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 392467718611..69686edce864 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -182,8 +182,7 @@ void IMapWindow::SetTargetList( TargetList& rTargetList )
SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
{
- Point aPoint;
- tools::Rectangle aClipRect( aPoint, GetGraphicSize() );
+ tools::Rectangle aClipRect( Point(), GetGraphicSize() );
SdrObject* pSdrObj = nullptr;
IMapObjectPtr pCloneIMapObj;
diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx
index 8aaeb8005cfb..9e497c6ca1d4 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.cxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.cxx
@@ -129,11 +129,10 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt )
{
if( nSelItem == nItemId )
{
- Color aBackColor(50,107,197);
tools::Rectangle aBackRect = aRect;
aBackRect.AdjustTop(3 );
aBackRect.AdjustBottom( -2 );
- pDev->SetFillColor(aBackColor);
+ pDev->SetFillColor(Color(50,107,197));
pDev->DrawRect(aBackRect);
}
else
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index cd3bc2f5fcb6..63b42083fe4b 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -585,7 +585,6 @@ void SdrHdl::CreateB2dIAObject()
float fScalingFactor = rOutDev.GetDPIScaleFactor();
basegfx::B2DSize aB2DSize(fSize * fScalingFactor, fSize * fScalingFactor);
- Color aHandleStrokeColor(COL_BLACK);
Color aHandleFillColor(COL_LIGHTGREEN);
switch (eColIndex)
{
@@ -607,7 +606,7 @@ void SdrHdl::CreateB2dIAObject()
default:
break;
}
- pNewOverlayObject = new sdr::overlay::OverlayHandle(aPosition, aB2DSize, aHandleStrokeColor, aHandleFillColor);
+ pNewOverlayObject = new sdr::overlay::OverlayHandle(aPosition, aB2DSize, /*HandleStrokeColor*/COL_BLACK, aHandleFillColor);
}
else
{
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 7b6dddf2fabd..70c9faf7978b 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -2957,13 +2957,12 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix,
}
// build and set BaseRect (use scale)
- Point aPoint;
Size aSize(FRound(aScale.getX()), FRound(aScale.getY()));
// fdo#47434 We need a valid rectangle here
if( !aSize.Height() ) aSize.setHeight( 1 );
if( !aSize.Width() ) aSize.setWidth( 1 );
- tools::Rectangle aBaseRect(aPoint, aSize);
+ tools::Rectangle aBaseRect(Point(), aSize);
SetSnapRect(aBaseRect);
// shear?
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 5449c5f8c877..cf4448fac249 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1204,9 +1204,8 @@ void SdrTextObj::ImpInitDrawOutliner( SdrOutliner& rOutl ) const
EEControlBits nStat=rOutl.GetControlWord();
nStat &= ~EEControlBits(EEControlBits::STRETCHING|EEControlBits::AUTOPAGESIZE);
rOutl.SetControlWord(nStat);
- Size aNullSize;
Size aMaxSize(100000,100000);
- rOutl.SetMinAutoPaperSize(aNullSize);
+ rOutl.SetMinAutoPaperSize(Size());
rOutl.SetMaxAutoPaperSize(aMaxSize);
rOutl.SetPaperSize(aMaxSize);
rOutl.ClearPolygon();
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index 5ed3a5d0a761..bebb82b76c54 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -56,9 +56,8 @@ void SdrOutliner::SetTextObj( const SdrTextObj* pObj )
nStat &= ~EEControlBits( EEControlBits::STRETCHING | EEControlBits::AUTOPAGESIZE );
SetControlWord(nStat);
- Size aNullSize;
Size aMaxSize( 100000,100000 );
- SetMinAutoPaperSize( aNullSize );
+ SetMinAutoPaperSize( Size() );
SetMaxAutoPaperSize( aMaxSize );
SetPaperSize( aMaxSize );
ClearPolygon();
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 14f9896e9259..dab61a948e33 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1393,10 +1393,9 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, too
SdrTextVertAdjust eVAdj=xCell->GetTextVerticalAdjust();
EEControlBits nStat0=rOutliner.GetControlWord();
- Size aNullSize;
nStat0 |= EEControlBits::AUTOPAGESIZE;
rOutliner.SetControlWord(nStat0);
- rOutliner.SetMinAutoPaperSize(aNullSize);
+ rOutliner.SetMinAutoPaperSize(Size());
rOutliner.SetMaxAutoPaperSize(aAnkRect.GetSize());
rOutliner.SetPaperSize(aAnkRect.GetSize());
diff --git a/svx/source/uitest/sdrobject.cxx b/svx/source/uitest/sdrobject.cxx
index 4fdd4c315764..2f0b05096a04 100644
--- a/svx/source/uitest/sdrobject.cxx
+++ b/svx/source/uitest/sdrobject.cxx
@@ -148,14 +148,11 @@ void SdrUIObject::execute(const OUString& rAction,
}
else if (rAction == "Mirror")
{
- Point aPos;
- Point aPos2;
- pObj->Mirror(aPos, aPos2);
+ pObj->Mirror(Point(), Point());
}
else if (rAction == "SHEAR")
{
- Point aPos;
- pObj->Shear(aPos, 0.0/*nAngle*/, 0, false);
+ pObj->Shear(Point(), 0.0/*nAngle*/, 0, false);
}
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index ffdf60a21972..ddac8dbbe812 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -1060,9 +1060,8 @@ OUString SAL_CALL SvXMLGraphicHelper::saveGraphicByName(css::uno::Reference<css:
OUString SAL_CALL SvXMLGraphicHelper::saveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic)
{
- OUString aEmpty;
OUString aOutMimeType;
- return implSaveGraphic(rxGraphic, aOutMimeType, aEmpty);
+ return implSaveGraphic(rxGraphic, aOutMimeType, OUString());
}
OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 6b8b2211f693..3700b3618f7d 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -532,8 +532,7 @@ tools::Polygon XOutBitmap::GetContour( const Bitmap& rBmp, const XOutFlags nFlag
{
Bitmap aWorkBmp;
tools::Polygon aRetPoly;
- Point aTmpPoint;
- tools::Rectangle aWorkRect( aTmpPoint, rBmp.GetSizePixel() );
+ tools::Rectangle aWorkRect( Point(), rBmp.GetSizePixel() );
if( pWorkRectPixel )
aWorkRect.Intersection( *pWorkRectPixel );