summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@gmx.com>2012-10-28 23:23:53 +0100
committerMichael Stahl <mstahl@redhat.com>2012-11-20 19:32:43 +0000
commit53ad646f54f8aa33b86c696c04500fd08ea6f3b6 (patch)
tree3eef1a050a5cf7b8b531f56e125d7252f4aab8fe /vcl/source/window
parent5e5c11c664f67ff9fd1120905b09a32bea3b2f6c (diff)
Enforce use of accessors on gen.hxx structures
Change-Id: Icd1b2937fdeaba6de1877258731f53ddf996002e Reviewed-on: https://gerrit.libreoffice.org/936 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/brdwin.cxx14
-rw-r--r--vcl/source/window/dockmgr.cxx36
-rw-r--r--vcl/source/window/splitwin.cxx8
-rw-r--r--vcl/source/window/syswin.cxx8
-rw-r--r--vcl/source/window/window.cxx10
5 files changed, 40 insertions, 36 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 34ae191b772f..9fea710b10b2 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -134,10 +134,10 @@ static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev,
sal_True, sal_False );
}
aTempRect = rRect;
- aTempRect.nLeft+=3;
- aTempRect.nRight-=4;
- aTempRect.nTop+=3;
- aTempRect.nBottom-=4;
+ aTempRect.Left()+=3;
+ aTempRect.Right()-=4;
+ aTempRect.Top()+=3;
+ aTempRect.Bottom()-=4;
}
else
{
@@ -1690,8 +1690,10 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p
pDev->SetLineColor( aFrameColor );
pDev->SetFillColor();
pDev->DrawRect( aInRect );
- aInRect.nLeft++; aInRect.nRight--;
- aInRect.nTop++; aInRect.nBottom--;
+ ++aInRect.Left();
+ --aInRect.Right();
+ ++aInRect.Top();
+ --aInRect.Bottom();
// restore
if ( pData->mnTitleType == BORDERWINDOW_TITLE_POPUP )
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index e523025fbfda..c48a7f8f0de5 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -190,9 +190,9 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl)
sal_Int32 nLeft, nTop, nRight, nBottom;
GetBorder( nLeft, nTop, nRight, nBottom );
// limit borderrect to the caption part only and without the resizing borders
- aBorderRect.nBottom = aBorderRect.nTop + nTop;
- aBorderRect.nLeft += nLeft;
- aBorderRect.nRight -= nRight;
+ aBorderRect.Bottom() = aBorderRect.Top() + nTop;
+ aBorderRect.Left() += nLeft;
+ aBorderRect.Right() -= nRight;
PointerState aBorderState = pBorder->GetPointerState();
if( aBorderRect.IsInside( aBorderState.maPos ) )
@@ -675,10 +675,10 @@ void ImplPopupFloatWin::DrawGrip()
// draw background
Rectangle aRect( GetDragRect() );
- aRect.nTop += POPUP_DRAGBORDER;
- aRect.nBottom -= POPUP_DRAGBORDER;
- aRect.nLeft+=3;
- aRect.nRight-=3;
+ aRect.Top() += POPUP_DRAGBORDER;
+ aRect.Bottom() -= POPUP_DRAGBORDER;
+ aRect.Left()+=3;
+ aRect.Right()-=3;
if( mbHighlight )
{
@@ -701,16 +701,18 @@ void ImplPopupFloatWin::DrawGrip()
aLineInfo.SetDashLen( 12 );
aLineInfo.SetDashCount( 1 );
- aRect.nLeft+=2; aRect.nRight-=2;
+ aRect.Left()+=2;
+ aRect.Right()-=2;
- aRect.nTop+=2;
- aRect.nBottom = aRect.nTop;
+ aRect.Top()+=2;
+ aRect.Bottom() = aRect.Top();
SetLineColor( GetSettings().GetStyleSettings().GetDarkShadowColor() );
DrawLine( aRect.TopLeft(), aRect.TopRight(), aLineInfo );
if( !mbHighlight )
{
- aRect.nTop++; aRect.nBottom++;
+ ++aRect.Top();
+ ++aRect.Bottom();
SetLineColor( GetSettings().GetStyleSettings().GetLightColor() );
DrawLine( aRect.TopLeft(), aRect.TopRight(), aLineInfo );
}
@@ -718,8 +720,8 @@ void ImplPopupFloatWin::DrawGrip()
#else
// draw several grip lines
SetFillColor( GetSettings().GetStyleSettings().GetShadowColor() );
- aRect.nTop++;
- aRect.nBottom = aRect.nTop;
+ aRect.Top()++;
+ aRect.Bottom() = aRect.Top();
int width = POPUP_DRAGWIDTH;
while( width >= aRect.getWidth() )
@@ -727,15 +729,15 @@ void ImplPopupFloatWin::DrawGrip()
if( width <= 0 )
width = aRect.getWidth();
//aRect.nLeft = aRect.nLeft + (aRect.getWidth() - width) / 2;
- aRect.nLeft = (aRect.nLeft + aRect.nRight - width) / 2;
- aRect.nRight = aRect.nLeft + width;
+ aRect.Left() = (aRect.Left() + aRect.Right() - width) / 2;
+ aRect.Right() = aRect.Left() + width;
int i=0;
while( i< POPUP_DRAGGRIP )
{
DrawRect( aRect );
- aRect.nTop+=2;
- aRect.nBottom+=2;
+ aRect.Top()+=2;
+ aRect.Bottom()+=2;
i+=2;
}
#endif
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 22d26462481a..e3eb5c139fb2 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1973,9 +1973,9 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool
if( bHorz )
{
int width = (int) (0.5 * rRect.getWidth() + 0.5);
- int i = rRect.nLeft + (rRect.getWidth() - width) / 2;
+ int i = rRect.Left() + (rRect.getWidth() - width) / 2;
width += i;
- const int y = rRect.nTop + 1;
+ const int y = rRect.Top() + 1;
ImplDrawFadeArrow( Point( i-8, y), bHorz, bLeft );
while( i <= width )
{
@@ -1996,9 +1996,9 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool
else
{
int height = (int) (0.5 * rRect.getHeight() + 0.5);
- int i = rRect.nTop + (rRect.getHeight() - height) / 2;
+ int i = rRect.Top() + (rRect.getHeight() - height) / 2;
height += i;
- const int x = rRect.nLeft + 1;
+ const int x = rRect.Left() + 1;
ImplDrawFadeArrow( Point( x, i-8), bHorz, bLeft );
while( i <= height )
{
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 835d87415ec3..6338236c6c40 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -718,15 +718,15 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if( abs(g.nX-aState.mnX) < 2 && abs(g.nY-aState.mnY) < 5 )
{
long displacement = g.nTopDecoration ? g.nTopDecoration : 20;
- if( (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.nRight ||
- (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.nBottom )
+ if( (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.Right() ||
+ (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.Bottom() )
{
// displacing would leave screen
aState.mnX = g.nLeftDecoration ? g.nLeftDecoration : 10; // should result in (0,0)
aState.mnY = displacement;
if( bWrapped ||
- (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.nRight ||
- (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.nBottom )
+ (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.Right() ||
+ (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.Bottom() )
break; // further displacement not possible -> break
// avoid endless testing
bWrapped = sal_True;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 661462eb510d..22c35fa01282 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -7101,7 +7101,7 @@ void Window::setPosSizePixel( long nX, long nY,
// --- RTL --- (re-mirror at parent window)
Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) );
GetParent()->ImplReMirror( aRect );
- nX = aRect.nLeft;
+ nX = aRect.Left();
}
}
if( !(nFlags & WINDOW_POSSIZE_X) && bHasValidSize && pWindow->mpWindowImpl->mpFrame->maGeometry.nWidth )
@@ -9103,10 +9103,10 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
Rectangle aRect( rRect );
if( bDrawExtBorderOnly )
{
- aRect.nLeft -= 1;
- aRect.nTop -= 1;
- aRect.nRight += 1;
- aRect.nBottom += 1;
+ --aRect.Left();
+ --aRect.Top();
+ ++aRect.Right();
+ ++aRect.Bottom();
}
Color oldFillCol = GetFillColor();
Color oldLineCol = GetLineColor();