summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-13 15:49:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-14 07:27:50 +0100
commit2096aac8b958db66b3ddce16b06dca87edc8ba0a (patch)
tree68f5972ea90c5f434deaa1e29f5ce1e710634fa4 /extensions
parenta9ca38bdf7ff9d15529b5903e640987fc14c0fa7 (diff)
loplugin:changetoolsgen in editeng..extensions
Change-Id: I476fd8b988216a300c57fcf184ea3742139363fe Reviewed-on: https://gerrit.libreoffice.org/49656 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/toolbar.cxx6
-rw-r--r--extensions/source/propctrlr/browserline.cxx8
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx12
-rw-r--r--extensions/source/propctrlr/inspectorhelpwindow.cxx4
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx2
-rw-r--r--extensions/source/scanner/grid.cxx22
-rw-r--r--extensions/source/scanner/sanedlg.cxx84
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx8
8 files changed, 73 insertions, 73 deletions
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 04a8f6f960e6..feac99a016e5 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -192,7 +192,7 @@ BibToolBar::BibToolBar(vcl::Window* pParent, Link<void*,void> aLink)
SetOutStyle(TOOLBOX_STYLE_FLAT);
Size a2Size(GetOutputSizePixel());
- a2Size.Width()=100;
+ a2Size.setWidth(100 );
aLBSource->SetSizePixel(a2Size);
aLBSource->SetDropDownLineCount(9);
aLBSource->Show();
@@ -584,9 +584,9 @@ void BibToolBar::AdjustToolBox()
Size aOldSize = GetSizePixel();
Size aSize = CalcWindowSizePixel();
if ( !aSize.Width() )
- aSize.Width() = aOldSize.Width();
+ aSize.setWidth( aOldSize.Width() );
else if ( !aSize.Height() )
- aSize.Height() = aOldSize.Height();
+ aSize.setHeight( aOldSize.Height() );
Size aTbSize = GetSizePixel();
if (
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index 67b9d6801dda..65e4396bcbfa 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -210,8 +210,8 @@ namespace pcr
if ( m_bIndentTitle )
{
Size aIndent( m_pTheParent->LogicToPixel(Size(8, 0), MapMode(MapUnit::MapAppFont)) );
- aTitlePos.X() += aIndent.Width();
- aTitleSize.Width() -= aIndent.Width();
+ aTitlePos.setX( aTitlePos.X() + aIndent.Width() );
+ aTitleSize.setWidth( aTitleSize.Width() - aIndent.Width() );
}
m_aFtTitle->SetPosSizePixel( aTitlePos, aTitleSize );
}
@@ -225,7 +225,7 @@ namespace pcr
Size aControlSize( m_aOutputSize.Width() - 4 - m_nNameWidth - nBrowseButtonSize - 4, m_pControlWindow->GetSizePixel().Height() );
if ( m_pAdditionalBrowseButton )
- aControlSize.Width() -= nBrowseButtonSize + 4;
+ aControlSize.setWidth( aControlSize.Width() - nBrowseButtonSize + 4 );
m_pControlWindow->SetSizePixel( aControlSize );
}
@@ -237,7 +237,7 @@ namespace pcr
if ( m_pAdditionalBrowseButton )
{
- aButtonPos.X() -= nBrowseButtonSize + 4;
+ aButtonPos.setX( aButtonPos.X() - nBrowseButtonSize + 4 );
m_pAdditionalBrowseButton->SetPosSizePixel( aButtonPos, aButtonSize );
}
}
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index 07a39b20988a..091102090dce 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -426,7 +426,7 @@ namespace pcr
tools::Rectangle aLinesArea( aPlayground );
if ( bPositionHelpWindow )
{
- aLinesArea.Bottom() -= nHelpWindowHeight;
+ aLinesArea.SetBottom( aLinesArea.Bottom() - nHelpWindowHeight );
aLinesArea.Bottom() -= aHelpWindowDistance.Height();
}
m_aLinesPlayground->SetPosSizePixel( aLinesArea.TopLeft(), aLinesArea.GetSize() );
@@ -447,11 +447,11 @@ namespace pcr
Size aVScrollSize( m_aVScroll->GetSizePixel() );
// adjust the playground's width
- aLinesArea.Right() -= aVScrollSize.Width();
+ aLinesArea.SetRight( aLinesArea.Right() - aVScrollSize.Width() );
m_aLinesPlayground->SetPosSizePixel( aLinesArea.TopLeft(), aLinesArea.GetSize() );
// position the scrollbar
- aVScrollSize.Height() = aLinesArea.GetHeight();
+ aVScrollSize.setHeight( aLinesArea.GetHeight() );
Point aVScrollPos( aLinesArea.GetWidth(), 0 );
m_aVScroll->SetPosSizePixel( aVScrollPos, aVScrollSize );
}
@@ -472,7 +472,7 @@ namespace pcr
if ( bPositionHelpWindow )
{
tools::Rectangle aHelpArea( aPlayground );
- aHelpArea.Top() = aLinesArea.Bottom() + aHelpWindowDistance.Height();
+ aHelpArea.SetTop( aLinesArea.Bottom() + aHelpWindowDistance.Height() );
m_pHelpWindow->SetPosSizePixel( aHelpArea.TopLeft(), aHelpArea.GetSize() );
}
}
@@ -554,9 +554,9 @@ namespace pcr
Size aSize(m_aLinesPlayground->GetOutputSizePixel());
Point aPos(0, m_nYOffset);
- aSize.Height() = m_nRowHeight;
+ aSize.setHeight( m_nRowHeight );
- aPos.Y() += _nIndex * m_nRowHeight;
+ aPos.setY( aPos.Y() + _nIndex * m_nRowHeight );
if ( _nIndex < m_aLines.size() )
{
diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx
index 91ee10a9d886..68f8b944178a 100644
--- a/extensions/source/propctrlr/inspectorhelpwindow.cxx
+++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx
@@ -130,11 +130,11 @@ namespace pcr
tools::Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() );
tools::Rectangle aSeparatorArea( aPlayground );
- aSeparatorArea.Bottom() = aSeparatorArea.Top() + LogicToPixel(Size(0, 8), MapMode(MapUnit::MapAppFont)).Height();
+ aSeparatorArea.SetBottom( aSeparatorArea.Top() + LogicToPixel(Size(0, 8), MapMode(MapUnit::MapAppFont)).Height() );
m_aSeparator->SetPosSizePixel( aSeparatorArea.TopLeft(), aSeparatorArea.GetSize() );
tools::Rectangle aTextArea( aPlayground );
- aTextArea.Top() = aSeparatorArea.Bottom() + a3AppFont.Height();
+ aTextArea.SetTop( aSeparatorArea.Bottom() + a3AppFont.Height() );
m_aHelpText->SetPosSizePixel( aTextArea.TopLeft(), aTextArea.GetSize() );
}
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index b1c3152b80c9..cbe3735c4982 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -368,7 +368,7 @@ namespace pcr
if ( impl_textHitTest( rMEvt.GetPosPixel() ) )
m_aMouseButtonDownPos = rMEvt.GetPosPixel();
else
- m_aMouseButtonDownPos.X() = m_aMouseButtonDownPos.Y() = -1;
+ m_aMouseButtonDownPos.setX( m_aMouseButtonDownPos.Y() = -1 );
}
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 2daec50a5215..6cdfba834fd6 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -315,13 +315,13 @@ Point GridWindow::transform( double x, double y )
{
Point aRet;
- aRet.X() = static_cast<long>( ( x - m_fMinX ) *
+ aRet.setX( static_cast<long>( ( x - m_fMinX ) *
static_cast<double>(m_aGridArea.GetWidth()) / ( m_fMaxX - m_fMinX )
- + m_aGridArea.Left() );
- aRet.Y() = static_cast<long>(
+ + m_aGridArea.Left() ) );
+ aRet.setY( static_cast<long>(
m_aGridArea.Bottom() -
( y - m_fMinY ) *
- static_cast<double>(m_aGridArea.GetHeight()) / ( m_fMaxY - m_fMinY ) );
+ static_cast<double>(m_aGridArea.GetHeight()) / ( m_fMaxY - m_fMinY ) ) );
return aRet;
}
@@ -465,7 +465,7 @@ void GridWindow::drawGrid(vcl::RenderContext& rRenderContext)
std::sprintf(pBuf, "%g", fX);
OUString aMark(pBuf, strlen(pBuf), osl_getThreadTextEncoding());
Size aTextSize(rRenderContext.GetTextWidth(aMark), rRenderContext.GetTextHeight());
- aPt.X() -= aTextSize.Width() / 2;
+ aPt.setX( aPt.X() - aTextSize.Width() / 2 );
aPt.Y() += aTextSize.Height() / 2;
rRenderContext.DrawText(aPt, aMark);
}
@@ -478,7 +478,7 @@ void GridWindow::drawGrid(vcl::RenderContext& rRenderContext)
std::sprintf(pBuf, "%g", fY);
OUString aMark(pBuf, strlen(pBuf), osl_getThreadTextEncoding());
Size aTextSize(rRenderContext.GetTextWidth(aMark), rRenderContext.GetTextHeight());
- aPt.X() -= aTextSize.Width() + 2;
+ aPt.setX( aPt.X() - aTextSize.Width() + 2 );
aPt.Y() -= aTextSize.Height() / 2;
rRenderContext.DrawText(aPt, aMark);
}
@@ -545,20 +545,20 @@ void GridWindow::MouseMove( const MouseEvent& rEvt )
if( m_nDragIndex == 0 || m_nDragIndex == m_aHandles.size() - 1)
{
- aPoint.X() = m_aHandles[m_nDragIndex].maPos.X();
+ aPoint.setX( m_aHandles[m_nDragIndex].maPos.X() );
}
else
{
if(aPoint.X() < m_aGridArea.Left())
- aPoint.X() = m_aGridArea.Left();
+ aPoint.setX( m_aGridArea.Left() );
else if(aPoint.X() > m_aGridArea.Right())
- aPoint.X() = m_aGridArea.Right();
+ aPoint.setX( m_aGridArea.Right() );
}
if( aPoint.Y() < m_aGridArea.Top() )
- aPoint.Y() = m_aGridArea.Top();
+ aPoint.setY( m_aGridArea.Top() );
else if( aPoint.Y() > m_aGridArea.Bottom() )
- aPoint.Y() = m_aGridArea.Bottom();
+ aPoint.setY( m_aGridArea.Bottom() );
if( aPoint != m_aHandles[m_nDragIndex].maPos )
{
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 5a35b7f1026b..06d53fb23522 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -154,25 +154,25 @@ public:
{
Point aPoint(0, Y);
aPoint = GetPixelPos(aPoint);
- maTopLeft.Y() = aPoint.Y();
+ maTopLeft.setY( aPoint.Y() );
}
void ChangePreviewLogicTopLeftX(long X)
{
Point aPoint(X, 0);
aPoint = GetPixelPos(aPoint);
- maTopLeft.X() = aPoint.X();
+ maTopLeft.setX( aPoint.X() );
}
void ChangePreviewLogicBottomRightY(long Y)
{
Point aPoint(0, Y);
aPoint = GetPixelPos(aPoint);
- maBottomRight.Y() = aPoint.Y();
+ maBottomRight.setY( aPoint.Y() );
}
void ChangePreviewLogicBottomRightX(long X)
{
Point aPoint(X, 0);
aPoint = GetPixelPos(aPoint);
- maBottomRight.X() = aPoint.X();
+ maBottomRight.setX( aPoint.X() );
}
void SetPreviewLogicRect(const Point& rTopLeft, const Point &rBottomRight)
{
@@ -477,10 +477,10 @@ void SaneDlg::InitFields()
pField->SetCustomUnitText("Pixel");
}
switch( i ) {
- case 0: aTopLeft.X() = static_cast<int>(fValue);break;
- case 1: aTopLeft.Y() = static_cast<int>(fValue);break;
- case 2: aBottomRight.X() = static_cast<int>(fValue);break;
- case 3: aBottomRight.Y() = static_cast<int>(fValue);break;
+ case 0: aTopLeft.setX( static_cast<int>(fValue) );break;
+ case 1: aTopLeft.setY( static_cast<int>(fValue) );break;
+ case 2: aBottomRight.setX( static_cast<int>(fValue) );break;
+ case 3: aBottomRight.setY( static_cast<int>(fValue) );break;
}
}
double *pDouble = nullptr;
@@ -497,19 +497,19 @@ void SaneDlg::InitFields()
delete [] pDouble;
}
switch( i ) {
- case 0: aMinTopLeft.X() = pField->GetMin();break;
- case 1: aMinTopLeft.Y() = pField->GetMin();break;
- case 2: aMaxBottomRight.X() = pField->GetMax();break;
- case 3: aMaxBottomRight.Y() = pField->GetMax();break;
+ case 0: aMinTopLeft.setX( pField->GetMin() );break;
+ case 1: aMinTopLeft.setY( pField->GetMin() );break;
+ case 2: aMaxBottomRight.setX( pField->GetMax() );break;
+ case 3: aMaxBottomRight.setY( pField->GetMax() );break;
}
}
else
{
switch( i ) {
- case 0: aMinTopLeft.X() = static_cast<int>(fValue);break;
- case 1: aMinTopLeft.Y() = static_cast<int>(fValue);break;
- case 2: aMaxBottomRight.X() = static_cast<int>(fValue);break;
- case 3: aMaxBottomRight.Y() = static_cast<int>(fValue);break;
+ case 0: aMinTopLeft.setX( static_cast<int>(fValue) );break;
+ case 1: aMinTopLeft.setY( static_cast<int>(fValue) );break;
+ case 2: aMaxBottomRight.setX( static_cast<int>(fValue) );break;
+ case 3: aMaxBottomRight.setY( static_cast<int>(fValue) );break;
}
}
pField->Enable();
@@ -520,14 +520,14 @@ void SaneDlg::InitFields()
pField->SetMin( 0 );
switch( i ) {
case 0:
- aMinTopLeft.X() = 0;
- aTopLeft.X() = 0;
+ aMinTopLeft.setX( 0 );
+ aTopLeft.setX( 0 );
pField->SetMax( PREVIEW_WIDTH );
pField->SetValue( 0 );
break;
case 1:
- aMinTopLeft.Y() = 0;
- aTopLeft.Y() = 0;
+ aMinTopLeft.setY( 0 );
+ aTopLeft.setY( 0 );
pField->SetMax( PREVIEW_HEIGHT );
pField->SetValue( 0 );
break;
@@ -1096,33 +1096,33 @@ void ScanPreview::MouseMove(const MouseEvent& rMEvt)
switch( meDragDirection )
{
case TopLeft: maTopLeft = aMousePos; break;
- case Top: maTopLeft.Y() = aMousePos.Y(); break;
+ case Top: maTopLeft.setY( aMousePos.Y() ); break;
case TopRight:
- maTopLeft.Y() = aMousePos.Y();
- maBottomRight.X() = aMousePos.X();
+ maTopLeft.setY( aMousePos.Y() );
+ maBottomRight.setX( aMousePos.X() );
break;
- case Right: maBottomRight.X() = aMousePos.X(); break;
+ case Right: maBottomRight.setX( aMousePos.X() ); break;
case BottomRight: maBottomRight = aMousePos; break;
- case Bottom: maBottomRight.Y() = aMousePos.Y(); break;
+ case Bottom: maBottomRight.setY( aMousePos.Y() ); break;
case BottomLeft:
- maTopLeft.X() = aMousePos.X();
- maBottomRight.Y() = aMousePos.Y();
+ maTopLeft.setX( aMousePos.X() );
+ maBottomRight.setY( aMousePos.Y() );
break;
- case Left: maTopLeft.X() = aMousePos.X(); break;
+ case Left: maTopLeft.setX( aMousePos.X() ); break;
default: break;
}
int nSwap;
if( maTopLeft.X() > maBottomRight.X() )
{
nSwap = maTopLeft.X();
- maTopLeft.X() = maBottomRight.X();
- maBottomRight.X() = nSwap;
+ maTopLeft.setX( maBottomRight.X() );
+ maBottomRight.setX( nSwap );
}
if( maTopLeft.Y() > maBottomRight.Y() )
{
nSwap = maTopLeft.Y();
- maTopLeft.Y() = maBottomRight.Y();
- maBottomRight.Y() = nSwap;
+ maTopLeft.setY( maBottomRight.Y() );
+ maBottomRight.setY( nSwap );
}
Invalidate();
mpParentDialog->UpdateScanArea(false);
@@ -1152,7 +1152,7 @@ void ScanPreview::MouseButtonDown( const MouseEvent& rMEvt )
aMousePixel.X() < nMiddleX + RECT_SIZE_PIX )
{
meDragDirection = Top;
- aMousePixel.Y() = maTopLeft.Y();
+ aMousePixel.setY( maTopLeft.Y() );
mbIsDragging = true;
}
else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX &&
@@ -1170,14 +1170,14 @@ void ScanPreview::MouseButtonDown( const MouseEvent& rMEvt )
aMousePixel.X() < maTopLeft.X() + RECT_SIZE_PIX )
{
meDragDirection = Left;
- aMousePixel.X() = maTopLeft.X();
+ aMousePixel.setX( maTopLeft.X() );
mbIsDragging = true;
}
else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX &&
aMousePixel.X() <= maBottomRight.X() )
{
meDragDirection = Right;
- aMousePixel.X() = maBottomRight.X();
+ aMousePixel.setX( maBottomRight.X() );
mbIsDragging = true;
}
}
@@ -1195,7 +1195,7 @@ void ScanPreview::MouseButtonDown( const MouseEvent& rMEvt )
aMousePixel.X() < nMiddleX + RECT_SIZE_PIX )
{
meDragDirection = Bottom;
- aMousePixel.Y() = maBottomRight.Y();
+ aMousePixel.setY( maBottomRight.Y() );
mbIsDragging = true;
}
else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX &&
@@ -1266,17 +1266,17 @@ Point ScanPreview::GetLogicPos(const Point& rIn) const
{
Point aConvert = PixelToLogic(rIn, MapMode(MapUnit::MapAppFont));
if( aConvert.X() < 0 )
- aConvert.X() = 0;
+ aConvert.setX( 0 );
if( aConvert.X() >= PREVIEW_WIDTH )
- aConvert.X() = PREVIEW_WIDTH-1;
+ aConvert.setX( PREVIEW_WIDTH-1 );
if( aConvert.Y() < 0 )
- aConvert.Y() = 0;
+ aConvert.setY( 0 );
if( aConvert.Y() >= PREVIEW_HEIGHT )
- aConvert.Y() = PREVIEW_HEIGHT-1;
+ aConvert.setY( PREVIEW_HEIGHT-1 );
- aConvert.X() *= ( maMaxBottomRight.X() - maMinTopLeft.X() );
+ aConvert.setX( aConvert.X() * ( maMaxBottomRight.X() - maMinTopLeft.X() ) );
aConvert.X() /= PREVIEW_WIDTH;
- aConvert.Y() *= ( maMaxBottomRight.Y() - maMinTopLeft.Y() );
+ aConvert.setY( aConvert.Y() * ( maMaxBottomRight.Y() - maMinTopLeft.Y() ) );
aConvert.Y() /= PREVIEW_HEIGHT;
return aConvert;
}
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index ebfa1bf42a4d..9f202fb20170 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -837,12 +837,12 @@ void BubbleWindow::Show( bool bVisible, ShowFlags nFlags )
Point aPos;
aPos.X() = maTipPos.X() - aWindowSize.Width() + TIP_RIGHT_OFFSET;
- aPos.Y() = maTipPos.Y();
+ aPos.setY( maTipPos.Y() );
Point aScreenPos = GetParent()->OutputToAbsoluteScreenPixel( aPos );
if ( aScreenPos.X() < 0 )
{
mnTipOffset = aScreenPos.X();
- aPos.X() -= mnTipOffset;
+ aPos.setX( aPos.X() - mnTipOffset );
}
SetPosSizePixel( aPos, aWindowSize );
@@ -881,8 +881,8 @@ void BubbleWindow::RecalcTextRects()
3 * BUBBLE_BORDER + TIP_HEIGHT );
if ( aTotalSize.Height() > maMaxTextSize.Height() )
{
- maMaxTextSize.Width() = maMaxTextSize.Width() * 3 / 2;
- maMaxTextSize.Height() = maMaxTextSize.Height() * 3 / 2;
+ maMaxTextSize.setWidth( maMaxTextSize.Width() * 3 / 2 );
+ maMaxTextSize.setHeight( maMaxTextSize.Height() * 3 / 2 );
}
else
bFinished = true;