summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-27 17:07:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-02 07:24:36 +0100
commit312c0abcff23a5bc7cf4442359ec48187ec06d48 (patch)
tree9f4b8be273c1560018f035a73294fcab9b1476a7 /vcl/source
parent451ed3d595c5e2a32d820e1751e890f894832a9c (diff)
drop old tools/gen methods in vcl
Change-Id: I863ce5ae46ae90f06780261fa17b087a7153c807 Reviewed-on: https://gerrit.libreoffice.org/50445 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/scrbar.cxx12
-rw-r--r--vcl/source/edit/texteng.cxx3
-rw-r--r--vcl/source/edit/textview.cxx3
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx3
-rw-r--r--vcl/source/gdi/print.cxx4
-rw-r--r--vcl/source/gdi/salgdilayout.cxx8
-rw-r--r--vcl/source/outdev/font.cxx2
-rw-r--r--vcl/source/outdev/outdev.cxx3
-rw-r--r--vcl/source/outdev/text.cxx16
-rw-r--r--vcl/source/window/mouse.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx6
-rw-r--r--vcl/source/window/window.cxx2
12 files changed, 39 insertions, 25 deletions
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index d7ba1353b531..f34201af2a03 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -272,9 +272,9 @@ void ScrollBar::ImplCalc( bool bUpdate )
if( mnThumbPixRange > 0 )
{
maPage1Rect.SetLeft( maTrackRect.Left() );
- maPage1Rect.Bottom() =
- maPage2Rect.Bottom() =
- maThumbRect.Bottom() = maTrackRect.Bottom();
+ maPage1Rect.SetBottom( maTrackRect.Bottom() );
+ maPage2Rect.SetBottom (maTrackRect.Bottom() );
+ maThumbRect.SetBottom( maTrackRect.Bottom() );
}
else
{
@@ -313,9 +313,9 @@ void ScrollBar::ImplCalc( bool bUpdate )
if( mnThumbPixRange > 0 )
{
maPage1Rect.SetTop( maTrackRect.Top() );
- maPage1Rect.Right() =
- maPage2Rect.Right() =
- maThumbRect.Right() = maTrackRect.Right();
+ maPage1Rect.SetRight( maTrackRect.Right() );
+ maPage2Rect.SetRight( maTrackRect.Right() );
+ maThumbRect.SetRight( maTrackRect.Right() );
}
else
{
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index e7c0d6d2614d..e382a514ee4c 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -911,7 +911,8 @@ tools::Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial,
// search within the line
long nX = ImpGetXPos( rPaM.GetPara(), pLine, rPaM.GetIndex(), bPreferPortionStart );
- aEditCursor.Left() = aEditCursor.Right() = nX;
+ aEditCursor.SetLeft(nX);
+ aEditCursor.SetRight(nX);
return aEditCursor;
}
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 6485a91a7039..64ba0d31a8ce 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -1595,7 +1595,8 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec
if ( !pNode->GetText().isEmpty() && ( aPaM.GetIndex() < pNode->GetText().getLength() ) )
{
// If we are behind a portion, and the next portion has other direction, we must change position...
- aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, false, true ).Left();
+ aEditCursor.SetLeft( mpImpl->mpTextEngine->GetEditCursor( aPaM, false, true ).Left() );
+ aEditCursor.SetRight( aEditCursor.Left() );
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index defecaa88642..bb9c819c4799 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -8776,7 +8776,8 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject )
// Determination of shading axis
// See: OutputDevice::ImplDrawLinearGradient for reference
tools::Rectangle aRect;
- aRect.Left() = aRect.Top() = 0;
+ aRect.SetLeft(0);
+ aRect.SetTop(0);
aRect.SetRight( aSize.Width() );
aRect.SetBottom( aSize.Height() );
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index e4a50bb36283..6286f3a67c2e 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -871,8 +871,8 @@ void Printer::ImplUpdatePageData()
mpGraphics->GetResolution( mnDPIX, mnDPIY );
mpInfoPrinter->GetPageInfo( &maJobSetup.ImplGetConstData(),
mnOutWidth, mnOutHeight,
- maPageOffset.X(), maPageOffset.Y(),
- maPaperSize.Width(), maPaperSize.Height() );
+ maPageOffset,
+ maPaperSize );
}
void Printer::ImplUpdateFontList()
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 4efc812a0fce..48fb33ed5a6c 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -106,6 +106,12 @@ bool SalGraphics::drawTransformedBitmap(
return false;
}
+long SalGraphics::mirror2( long x, const OutputDevice *pOutDev ) const
+{
+ mirror(x, pOutDev);
+ return x;
+}
+
void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) const
{
long w;
@@ -647,7 +653,7 @@ bool SalGraphics::HitTestNativeScrollbar( ControlPart nPart, const tools::Rectan
{
Point pt( aPos );
tools::Rectangle rgn( rControlRegion );
- mirror( pt.X(), pOutDev );
+ pt.setX( mirror2( pt.X(), pOutDev ) );
mirror( rgn, pOutDev );
return hitTestNativeControl( ControlType::Scrollbar, nPart, rgn, pt, rIsInside );
}
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index f9a74da0988a..67fd6dcdf7ee 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1279,7 +1279,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
if ( mpFontInstance->mnOrientation )
{
Point aOriginPt(0, 0);
- aOriginPt.RotateAround( aAdjPoint.X(), aAdjPoint.Y(), mpFontInstance->mnOrientation );
+ aOriginPt.RotateAround( aAdjPoint, mpFontInstance->mnOrientation );
}
aOutPoint += aAdjPoint;
aOutPoint -= Point( nEmphasisWidth2, nEmphasisHeight2 );
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index d68fe55ad53b..4c556a10e08b 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -337,7 +337,8 @@ void OutputDevice::SetRefPoint()
mpMetaFile->AddAction( new MetaRefPointAction( Point(), false ) );
mbRefPoint = false;
- maRefPoint.X() = maRefPoint.Y() = 0;
+ maRefPoint.setX(0);
+ maRefPoint.setY(0);
if( mpAlphaVDev )
mpAlphaVDev->SetRefPoint();
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index c897afeb6f10..ef7f4c249642 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -2384,14 +2384,14 @@ bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect,
if( nWidthFactor > 1 )
{
double fFactor = 1.0 / nWidthFactor;
- aPixelRect.Left()
- = static_cast< long >(aPixelRect.Left() * fFactor);
- aPixelRect.Right()
- = static_cast< long >(aPixelRect.Right() * fFactor);
- aPixelRect.Top()
- = static_cast< long >(aPixelRect.Top() * fFactor);
- aPixelRect.Bottom()
- = static_cast< long >(aPixelRect.Bottom() * fFactor);
+ aPixelRect.SetLeft(
+ static_cast< long >(aPixelRect.Left() * fFactor) );
+ aPixelRect.SetRight(
+ static_cast< long >(aPixelRect.Right() * fFactor) );
+ aPixelRect.SetTop(
+ static_cast< long >(aPixelRect.Top() * fFactor) );
+ aPixelRect.SetBottom(
+ static_cast< long >(aPixelRect.Bottom() * fFactor) );
}
Point aRotatedOfs( mnTextOffX, mnTextOffY );
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 2804bc1ceb54..8ce2cec21168 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -531,7 +531,7 @@ void Window::SetPointerPosPixel( const Point& rPos )
pOutDev->ReMirror( aPos );
}
// mirroring is required here, SetPointerPos bypasses SalGraphics
- mpGraphics->mirror( aPos.X(), this );
+ aPos.setX( mpGraphics->mirror2( aPos.X(), this ) );
}
else if( ImplIsAntiparallel() )
{
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index da263ec2a7b8..35c8e3a7c2af 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1625,7 +1625,11 @@ bool ToolBox::ImplCalcItem()
if ( item.meType == ToolBoxItemType::BUTTON || item.meType == ToolBoxItemType::SPACE )
{
// add borders
- ImplAddButtonBorder( item.maItemSize.Width(), item.maItemSize.Height(), mpData->mbNativeButtons );
+ long w = item.maItemSize.Width();
+ long h = item.maItemSize.Height();
+ ImplAddButtonBorder( w, h, mpData->mbNativeButtons );
+ item.maItemSize.setWidth(w);
+ item.maItemSize.setHeight(h);
if( item.meType == ToolBoxItemType::BUTTON )
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 51861d6c3dff..e02328d17938 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1502,7 +1502,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
OutputDevice *pOutDev = GetOutDev();
if( pOutDev->HasMirroredGraphics() )
{
- mpGraphics->mirror( aPtDev.X(), this );
+ aPtDev.setX( mpGraphics->mirror2( aPtDev.X(), this ) );
// #106948# always mirror our pos if our parent is not mirroring, even
// if we are also not mirroring