summaryrefslogtreecommitdiff
path: root/vcl/source/window/toolbox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/toolbox.cxx')
-rw-r--r--vcl/source/window/toolbox.cxx246
1 files changed, 123 insertions, 123 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 3bfbe0eff6b3..e46fd4a0cee8 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -340,12 +340,12 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext)
if (mnWinHeight > mnMaxItemHeight)
nLineSize = mnWinHeight;
- aLineSz.Height() = nLineSize;
+ aLineSz.setHeight( nLineSize );
}
else
{
nLineSize = mnMaxItemWidth;
- aLineSz.Width() = nLineSize;
+ aLineSz.setWidth( nLineSize );
}
}
@@ -359,19 +359,19 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext)
{
if (mbHorz)
{
- aTopLineSz.Height() += TB_BORDER_OFFSET2 + nTop;
- aBottomLineSz.Height() += TB_BORDER_OFFSET2 + nBottom;
+ aTopLineSz.AdjustHeight(TB_BORDER_OFFSET2 + nTop );
+ aBottomLineSz.AdjustHeight(TB_BORDER_OFFSET2 + nBottom );
if (mnCurLines == 1)
- aTopLineSz.Height() += TB_BORDER_OFFSET2 + nBottom;
+ aTopLineSz.AdjustHeight(TB_BORDER_OFFSET2 + nBottom );
}
else
{
- aTopLineSz.Width() += TB_BORDER_OFFSET1 + nLeft;
- aBottomLineSz.Width() += TB_BORDER_OFFSET1 + nRight;
+ aTopLineSz.AdjustWidth(TB_BORDER_OFFSET1 + nLeft );
+ aBottomLineSz.AdjustWidth(TB_BORDER_OFFSET1 + nRight );
if (mnCurLines == 1)
- aTopLineSz.Width() += TB_BORDER_OFFSET1 + nLeft;
+ aTopLineSz.AdjustWidth(TB_BORDER_OFFSET1 + nLeft );
}
}
@@ -379,15 +379,15 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext)
{
if (mbHorz)
{
- aLineSz.Height() += TB_LINESPACING;
+ aLineSz.AdjustHeight(TB_LINESPACING );
if (mnCurLines > 1)
- aTopLineSz.Height() += TB_LINESPACING;
+ aTopLineSz.AdjustHeight(TB_LINESPACING );
}
else
{
- aLineSz.Width() += TB_LINESPACING;
+ aLineSz.AdjustWidth(TB_LINESPACING );
if (mnCurLines > 1)
- aTopLineSz.Width() += TB_LINESPACING;
+ aTopLineSz.AdjustWidth(TB_LINESPACING );
}
}
@@ -690,41 +690,41 @@ Size ToolBox::ImplCalcSize( ImplToolItems::size_type nCalcLines, sal_uInt16 nCal
if ( mbHorz )
{
if ( mnWinHeight > mnMaxItemHeight )
- aSize.Height() = nCalcLines * mnWinHeight;
+ aSize.setHeight( nCalcLines * mnWinHeight );
else
- aSize.Height() = nCalcLines * mnMaxItemHeight;
+ aSize.setHeight( nCalcLines * mnMaxItemHeight );
if ( mnWinStyle & WB_LINESPACING )
- aSize.Height() += (nCalcLines-1)*TB_LINESPACING;
+ aSize.AdjustHeight((nCalcLines-1)*TB_LINESPACING );
if ( mnWinStyle & WB_BORDER )
- aSize.Height() += (TB_BORDER_OFFSET2*2) + nTop + nBottom;
+ aSize.AdjustHeight((TB_BORDER_OFFSET2*2) + nTop + nBottom );
nMax = 0;
ImplCalcBreaks( TB_MAXNOSCROLL, &nMax, mbHorz );
if ( nMax )
- aSize.Width() += nMax;
+ aSize.AdjustWidth(nMax );
if ( mnWinStyle & WB_BORDER )
- aSize.Width() += (TB_BORDER_OFFSET1*2) + nLeft + nRight;
+ aSize.AdjustWidth((TB_BORDER_OFFSET1*2) + nLeft + nRight );
}
else
{
- aSize.Width() = nCalcLines * mnMaxItemWidth;
+ aSize.setWidth( nCalcLines * mnMaxItemWidth );
if ( mnWinStyle & WB_LINESPACING )
- aSize.Width() += (nCalcLines-1)*TB_LINESPACING;
+ aSize.AdjustWidth((nCalcLines-1)*TB_LINESPACING );
if ( mnWinStyle & WB_BORDER )
- aSize.Width() += (TB_BORDER_OFFSET2*2) + nLeft + nRight;
+ aSize.AdjustWidth((TB_BORDER_OFFSET2*2) + nLeft + nRight );
nMax = 0;
ImplCalcBreaks( TB_MAXNOSCROLL, &nMax, mbHorz );
if ( nMax )
- aSize.Height() += nMax;
+ aSize.AdjustHeight(nMax );
if ( mnWinStyle & WB_BORDER )
- aSize.Height() += (TB_BORDER_OFFSET1*2) + nTop + nBottom;
+ aSize.AdjustHeight((TB_BORDER_OFFSET1*2) + nTop + nBottom );
}
}
// restore previous values
@@ -838,14 +838,14 @@ void ToolBox::ImplCalcMinMaxFloatSize( Size& rMinSize, Size& rMaxSize )
while ( ++i < maFloatSizes.size() )
{
if( maFloatSizes[i].mnWidth < rMinSize.Width() )
- rMinSize.Width() = maFloatSizes[i].mnWidth;
+ rMinSize.setWidth( maFloatSizes[i].mnWidth );
if( maFloatSizes[i].mnHeight < rMinSize.Height() )
- rMinSize.Height() = maFloatSizes[i].mnHeight;
+ rMinSize.setHeight( maFloatSizes[i].mnHeight );
if( maFloatSizes[i].mnWidth > rMaxSize.Width() )
- rMaxSize.Width() = maFloatSizes[i].mnWidth;
+ rMaxSize.setWidth( maFloatSizes[i].mnWidth );
if( maFloatSizes[i].mnHeight > rMaxSize.Height() )
- rMaxSize.Height() = maFloatSizes[i].mnHeight;
+ rMaxSize.setHeight( maFloatSizes[i].mnHeight );
}
}
@@ -1013,13 +1013,13 @@ void ToolBox::ImplLineSizing( const Point& rPos, tools::Rectangle& rRect, sal_uI
}
if ( nLineMode & DOCK_LINERIGHT )
- rRect.Right() = rRect.Left()+nSize-1;
+ rRect.SetRight( rRect.Left()+nSize-1 );
else if ( nLineMode & DOCK_LINEBOTTOM )
- rRect.Bottom() = rRect.Top()+nSize-1;
+ rRect.SetBottom( rRect.Top()+nSize-1 );
else if ( nLineMode & DOCK_LINELEFT )
- rRect.Left() = rRect.Right()-nSize;
+ rRect.SetLeft( rRect.Right()-nSize );
else
- rRect.Top() = rRect.Bottom()-nSize;
+ rRect.SetTop( rRect.Bottom()-nSize );
mnDockLines = i;
}
@@ -1047,8 +1047,8 @@ void ImplTBDragMgr::StartDragging( ToolBox* pToolBox,
mnStartLines = pToolBox->mnDockLines;
// MouseOffset berechnen
- maMouseOff.X() = rRect.Left() - rPos.X();
- maMouseOff.Y() = rRect.Top() - rPos.Y();
+ maMouseOff.setX( rRect.Left() - rPos.X() );
+ maMouseOff.setY( rRect.Top() - rPos.Y() );
maRect = rRect;
maStartRect = rRect;
pToolBox->ShowTracking( maRect );
@@ -1545,30 +1545,30 @@ bool ToolBox::ImplCalcItem()
else
{
// we're drawing images and text
- item.maItemSize.Width() = bText ? GetCtrlTextWidth( item.maText )+TB_TEXTOFFSET : 0;
- item.maItemSize.Height() = bText ? GetTextHeight() : 0;
+ item.maItemSize.setWidth( bText ? GetCtrlTextWidth( item.maText )+TB_TEXTOFFSET : 0 );
+ item.maItemSize.setHeight( bText ? GetTextHeight() : 0 );
if ( meTextPosition == ToolBoxTextPosition::Right )
{
// leave space between image and text
if( bText )
- item.maItemSize.Width() += TB_IMAGETEXTOFFSET;
+ item.maItemSize.AdjustWidth(TB_IMAGETEXTOFFSET );
// image and text side by side
- item.maItemSize.Width() += item.maImage.GetSizePixel().Width();
+ item.maItemSize.AdjustWidth(item.maImage.GetSizePixel().Width() );
if ( item.maImage.GetSizePixel().Height() > item.maItemSize.Height() )
- item.maItemSize.Height() = item.maImage.GetSizePixel().Height();
+ item.maItemSize.setHeight( item.maImage.GetSizePixel().Height() );
}
else
{
// leave space between image and text
if( bText )
- item.maItemSize.Height() += TB_IMAGETEXTOFFSET;
+ item.maItemSize.AdjustHeight(TB_IMAGETEXTOFFSET );
// text below image
- item.maItemSize.Height() += item.maImage.GetSizePixel().Height();
+ item.maItemSize.AdjustHeight(item.maImage.GetSizePixel().Height() );
if ( item.maImage.GetSizePixel().Width() > item.maItemSize.Width() )
- item.maItemSize.Width() = item.maImage.GetSizePixel().Width();
+ item.maItemSize.setWidth( item.maImage.GetSizePixel().Width() );
}
item.mbVisibleText = bText;
@@ -1596,12 +1596,12 @@ bool ToolBox::ImplCalcItem()
{
if ( meTextPosition == ToolBoxTextPosition::Right )
{
- item.maItemSize.Width() += nDropDownArrowWidth;
+ item.maItemSize.AdjustWidth(nDropDownArrowWidth );
item.mnDropDownArrowWidth = nDropDownArrowWidth;
}
else
{
- item.maItemSize.Height() += nDropDownArrowWidth;
+ item.maItemSize.AdjustHeight(nDropDownArrowWidth );
item.mnDropDownArrowWidth = nDropDownArrowWidth;
}
}
@@ -1611,12 +1611,12 @@ bool ToolBox::ImplCalcItem()
if( item.mbVisibleText && !mbHorz )
{
long tmp = item.maItemSize.Width();
- item.maItemSize.Width() = item.maItemSize.Height();
- item.maItemSize.Height() = tmp;
+ item.maItemSize.setWidth( item.maItemSize.Height() );
+ item.maItemSize.setHeight( tmp );
tmp = item.maContentSize.Width();
- item.maContentSize.Width() = item.maContentSize.Height();
- item.maContentSize.Height() = tmp;
+ item.maContentSize.setWidth( item.maContentSize.Height() );
+ item.maContentSize.setHeight( tmp );
}
}
else if ( item.meType == ToolBoxItemType::SPACE )
@@ -1641,17 +1641,17 @@ bool ToolBox::ImplCalcItem()
if( item.maItemSize.Width() < nMinW )
{
nGrowContentWidth = nMinW - item.maItemSize.Width();
- item.maItemSize.Width() = nMinW;
+ item.maItemSize.setWidth( nMinW );
}
if( item.maItemSize.Height() < nMinH )
{
nGrowContentHeight = nMinH - item.maItemSize.Height();
- item.maItemSize.Height() = nMinH;
+ item.maItemSize.setHeight( nMinH );
}
// grow the content size by the additional available space
- item.maContentSize.Width() += nGrowContentWidth;
- item.maContentSize.Height() += nGrowContentHeight;
+ item.maContentSize.AdjustWidth(nGrowContentWidth );
+ item.maContentSize.AdjustHeight(nGrowContentHeight );
}
// keep track of max item size
@@ -1882,12 +1882,12 @@ Size ToolBox::ImplGetOptimalFloatingSize()
ImplToolItems::size_type manyLines = 1000;
Size aMinimalFloatSize = ImplCalcFloatSize( manyLines );
- aSz.Height() = nBorderY + nLineHeight * nLines;
+ aSz.setHeight( nBorderY + nLineHeight * nLines );
// line space when more than one line
if ( mnWinStyle & WB_LINESPACING )
- aSz.Height() += (nLines-1)*TB_LINESPACING;
+ aSz.AdjustHeight((nLines-1)*TB_LINESPACING );
- aSz.Width() = nBorderX + maxX;
+ aSz.setWidth( nBorderX + maxX );
// avoid clipping of any items
if( aSz.Width() < aMinimalFloatSize.Width() )
@@ -2135,29 +2135,29 @@ void ToolBox::ImplFormat( bool bResize )
{
if( !ImplIsFloatingMode() )
{
- mpData->maMenubuttonItem.maRect.Right() = mnDX - 2;
- mpData->maMenubuttonItem.maRect.Top() = nTop;
- mpData->maMenubuttonItem.maRect.Bottom() = mnDY-mnBottomBorder-TB_BORDER_OFFSET2-1;
+ mpData->maMenubuttonItem.maRect.SetRight( mnDX - 2 );
+ mpData->maMenubuttonItem.maRect.SetTop( nTop );
+ mpData->maMenubuttonItem.maRect.SetBottom( mnDY-mnBottomBorder-TB_BORDER_OFFSET2-1 );
}
else
{
- mpData->maMenubuttonItem.maRect.Right() = mnDX - mnRightBorder-TB_BORDER_OFFSET1-1;
- mpData->maMenubuttonItem.maRect.Top() = nTop;
- mpData->maMenubuttonItem.maRect.Bottom() = mnDY-mnBottomBorder-TB_BORDER_OFFSET2-1;
+ mpData->maMenubuttonItem.maRect.SetRight( mnDX - mnRightBorder-TB_BORDER_OFFSET1-1 );
+ mpData->maMenubuttonItem.maRect.SetTop( nTop );
+ mpData->maMenubuttonItem.maRect.SetBottom( mnDY-mnBottomBorder-TB_BORDER_OFFSET2-1 );
}
- mpData->maMenubuttonItem.maRect.Left() = mpData->maMenubuttonItem.maRect.Right() - mpData->mnMenuButtonWidth;
+ mpData->maMenubuttonItem.maRect.SetLeft( mpData->maMenubuttonItem.maRect.Right() - mpData->mnMenuButtonWidth );
}
else
{
- maUpperRect.Left() = nLeft+nMax+TB_SPIN_OFFSET;
- maUpperRect.Right() = maUpperRect.Left()+TB_SPIN_SIZE-1;
- maUpperRect.Top() = nTop;
- maLowerRect.Bottom() = mnDY-mnBottomBorder-TB_BORDER_OFFSET2-1;
- maLowerRect.Left() = maUpperRect.Left();
- maLowerRect.Right() = maUpperRect.Right();
- maUpperRect.Bottom() = maUpperRect.Top() +
- (maLowerRect.Bottom()-maUpperRect.Top())/2;
- maLowerRect.Top() = maUpperRect.Bottom();
+ maUpperRect.SetLeft( nLeft+nMax+TB_SPIN_OFFSET );
+ maUpperRect.SetRight( maUpperRect.Left()+TB_SPIN_SIZE-1 );
+ maUpperRect.SetTop( nTop );
+ maLowerRect.SetBottom( mnDY-mnBottomBorder-TB_BORDER_OFFSET2-1 );
+ maLowerRect.SetLeft( maUpperRect.Left() );
+ maLowerRect.SetRight( maUpperRect.Right() );
+ maUpperRect.SetBottom( maUpperRect.Top() +
+ (maLowerRect.Bottom()-maUpperRect.Top())/2 );
+ maLowerRect.SetTop( maUpperRect.Bottom() );
}
}
else
@@ -2166,29 +2166,29 @@ void ToolBox::ImplFormat( bool bResize )
{
if( !ImplIsFloatingMode() )
{
- mpData->maMenubuttonItem.maRect.Bottom() = mnDY - 2;
- mpData->maMenubuttonItem.maRect.Left() = nLeft;
- mpData->maMenubuttonItem.maRect.Right() = mnDX-mnRightBorder-TB_BORDER_OFFSET2-1;
+ mpData->maMenubuttonItem.maRect.SetBottom( mnDY - 2 );
+ mpData->maMenubuttonItem.maRect.SetLeft( nLeft );
+ mpData->maMenubuttonItem.maRect.SetRight( mnDX-mnRightBorder-TB_BORDER_OFFSET2-1 );
}
else
{
- mpData->maMenubuttonItem.maRect.Bottom() = mnDY - mnBottomBorder-TB_BORDER_OFFSET1-1;
- mpData->maMenubuttonItem.maRect.Left() = nLeft;
- mpData->maMenubuttonItem.maRect.Right() = mnDX-mnRightBorder-TB_BORDER_OFFSET2-1;
+ mpData->maMenubuttonItem.maRect.SetBottom( mnDY - mnBottomBorder-TB_BORDER_OFFSET1-1 );
+ mpData->maMenubuttonItem.maRect.SetLeft( nLeft );
+ mpData->maMenubuttonItem.maRect.SetRight( mnDX-mnRightBorder-TB_BORDER_OFFSET2-1 );
}
- mpData->maMenubuttonItem.maRect.Top() = mpData->maMenubuttonItem.maRect.Bottom() - mpData->mnMenuButtonWidth;
+ mpData->maMenubuttonItem.maRect.SetTop( mpData->maMenubuttonItem.maRect.Bottom() - mpData->mnMenuButtonWidth );
}
else
{
- maUpperRect.Top() = nTop+nMax+TB_SPIN_OFFSET;
- maUpperRect.Bottom() = maUpperRect.Top()+TB_SPIN_SIZE-1;
- maUpperRect.Left() = nLeft;
- maLowerRect.Right() = mnDX-mnRightBorder-TB_BORDER_OFFSET2-1;
- maLowerRect.Top() = maUpperRect.Top();
- maLowerRect.Bottom() = maUpperRect.Bottom();
- maUpperRect.Right() = maUpperRect.Left() +
- (maLowerRect.Right()-maUpperRect.Left())/2;
- maLowerRect.Left() = maUpperRect.Right();
+ maUpperRect.SetTop( nTop+nMax+TB_SPIN_OFFSET );
+ maUpperRect.SetBottom( maUpperRect.Top()+TB_SPIN_SIZE-1 );
+ maUpperRect.SetLeft( nLeft );
+ maLowerRect.SetRight( mnDX-mnRightBorder-TB_BORDER_OFFSET2-1 );
+ maLowerRect.SetTop( maUpperRect.Top() );
+ maLowerRect.SetBottom( maUpperRect.Bottom() );
+ maUpperRect.SetRight( maUpperRect.Left() +
+ (maLowerRect.Right()-maUpperRect.Left())/2 );
+ maLowerRect.SetLeft( maUpperRect.Right() );
}
}
}
@@ -2251,7 +2251,7 @@ void ToolBox::ImplFormat( bool bResize )
// advance nX and nY accordingly
if ( mbHorz )
{
- item.maCalcRect.Left() = nX;
+ item.maCalcRect.SetLeft( nX );
// if special ToolBoxLayoutMode::LockVert lock vertical position
// don't recalculate the vertical position of the item
if ( meLayoutMode == ToolBoxLayoutMode::LockVert && mnLines == 1 )
@@ -2269,25 +2269,25 @@ void ToolBox::ImplFormat( bool bResize )
if ( item.maRect.Top() ||
(item.mpWindow && item.mpWindow->GetType() == WindowType::CALCINPUTLINE) ) // tdf#83099
{
- item.maCalcRect.Top() = item.maRect.Top();
+ item.maCalcRect.SetTop( item.maRect.Top() );
}
else
{
- item.maCalcRect.Top() = nY+(mnMaxItemHeight-aCurrentItemSize.Height())/2;
+ item.maCalcRect.SetTop( nY+(mnMaxItemHeight-aCurrentItemSize.Height())/2 );
}
}
else
- item.maCalcRect.Top() = nY+(nLineSize-aCurrentItemSize.Height())/2;
- item.maCalcRect.Right() = nX+aCurrentItemSize.Width()-1;
- item.maCalcRect.Bottom() = item.maCalcRect.Top()+aCurrentItemSize.Height()-1;
+ item.maCalcRect.SetTop( nY+(nLineSize-aCurrentItemSize.Height())/2 );
+ item.maCalcRect.SetRight( nX+aCurrentItemSize.Width()-1 );
+ item.maCalcRect.SetBottom( item.maCalcRect.Top()+aCurrentItemSize.Height()-1 );
nX += aCurrentItemSize.Width();
}
else
{
- item.maCalcRect.Left() = nX+(nLineSize-aCurrentItemSize.Width())/2;
- item.maCalcRect.Top() = nY;
- item.maCalcRect.Right() = item.maCalcRect.Left()+aCurrentItemSize.Width()-1;
- item.maCalcRect.Bottom() = nY+aCurrentItemSize.Height()-1;
+ item.maCalcRect.SetLeft( nX+(nLineSize-aCurrentItemSize.Width())/2 );
+ item.maCalcRect.SetTop( nY );
+ item.maCalcRect.SetRight( item.maCalcRect.Left()+aCurrentItemSize.Width()-1 );
+ item.maCalcRect.SetBottom( nY+aCurrentItemSize.Height()-1 );
nY += aCurrentItemSize.Height();
}
}
@@ -2320,18 +2320,18 @@ void ToolBox::ImplFormat( bool bResize )
if ( mbHorz )
{
- rIt.maRect.Left() = nX+TB_MENUBUTTON_OFFSET;
- rIt.maRect.Top() = nY;
- rIt.maRect.Right() = rIt.maRect.Left() + mpData->mnMenuButtonWidth;
- rIt.maRect.Bottom() = nY+nLineSize-1;
+ rIt.maRect.SetLeft( nX+TB_MENUBUTTON_OFFSET );
+ rIt.maRect.SetTop( nY );
+ rIt.maRect.SetRight( rIt.maRect.Left() + mpData->mnMenuButtonWidth );
+ rIt.maRect.SetBottom( nY+nLineSize-1 );
nX += rIt.maItemSize.Width();
}
else
{
- rIt.maRect.Left() = nX;
- rIt.maRect.Top() = nY+TB_MENUBUTTON_OFFSET;
- rIt.maRect.Right() = nX+nLineSize-1;
- rIt.maRect.Bottom() = rIt.maRect.Top() + mpData->mnMenuButtonWidth;
+ rIt.maRect.SetLeft( nX );
+ rIt.maRect.SetTop( nY+TB_MENUBUTTON_OFFSET );
+ rIt.maRect.SetRight( nX+nLineSize-1 );
+ rIt.maRect.SetBottom( rIt.maRect.Top() + mpData->mnMenuButtonWidth );
nY += rIt.maItemSize.Height();
}
}
@@ -2717,10 +2717,10 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
{
tools::Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) );
if( aArrowRect.Top() == pItem->maRect.Top() ) // dropdown arrow on right side
- aBtnSize.Width() -= aArrowRect.GetWidth();
+ aBtnSize.AdjustWidth( -(aArrowRect.GetWidth()) );
else if ( !( (meTextPosition == ToolBoxTextPosition::Bottom)
&& ((pItem->mnBits & ToolBoxItemBits::DROPDOWNONLY) == ToolBoxItemBits::DROPDOWNONLY) ) )
- aBtnSize.Height() -= aArrowRect.GetHeight(); // dropdown arrow on bottom side
+ aBtnSize.AdjustHeight( -(aArrowRect.GetHeight()) ); // dropdown arrow on bottom side
}
}
@@ -2786,8 +2786,8 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
if ( bText )
{
- aTxtSize.Width() = GetCtrlTextWidth( pItem->maText );
- aTxtSize.Height() = GetTextHeight();
+ aTxtSize.setWidth( GetCtrlTextWidth( pItem->maText ) );
+ aTxtSize.setHeight( GetTextHeight() );
}
if ( bImage )
@@ -2954,25 +2954,25 @@ void ToolBox::ImplDrawFloatwinBorder(vcl::RenderContext& rRenderContext, ImplToo
Point p1, p2;
p1 = pItem->maRect.TopLeft();
- p1.X()++;
+ p1.AdjustX( 1 );
p2 = pItem->maRect.TopRight();
- p2.X()--;
+ p2.AdjustX( -1 );
rRenderContext.DrawLine( p1, p2);
p1 = pItem->maRect.BottomLeft();
- p1.X()++;
+ p1.AdjustX( 1 );
p2 = pItem->maRect.BottomRight();
- p2.X()--;
+ p2.AdjustX( -1 );
rRenderContext.DrawLine( p1, p2);
p1 = pItem->maRect.TopLeft();
- p1.Y()++;
+ p1.AdjustY( 1 );
p2 = pItem->maRect.BottomLeft();
- p2.Y()--;
+ p2.AdjustY( -1 );
rRenderContext.DrawLine( p1, p2);
p1 = pItem->maRect.TopRight();
- p1.Y()++;
+ p1.AdjustY( 1 );
p2 = pItem->maRect.BottomRight();
- p2.Y()--;
+ p2.AdjustY( -1 );
rRenderContext.DrawLine( p1, p2);
}
@@ -3749,7 +3749,7 @@ void ToolBox::Resize()
continue;
Size aWinSize(pWindow->GetSizePixel());
Size aPrefSize(pWindow->get_preferred_size());
- aWinSize.Width() = aPrefSize.Width();
+ aWinSize.setWidth( aPrefSize.Width() );
pWindow->SetSizePixel(aWinSize);
aExpandables.push_back(i);
}
@@ -3785,7 +3785,7 @@ void ToolBox::Resize()
vcl::Window *pWindow = mpData->m_aItems[nIndex].mpWindow;
Size aWinSize(pWindow->GetSizePixel());
Size aPrefSize(pWindow->get_preferred_size());
- aWinSize.Width() = aPrefSize.Width() + nDiff;
+ aWinSize.setWidth( aPrefSize.Width() + nDiff );
pWindow->SetSizePixel(aWinSize);
}
@@ -3875,11 +3875,11 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
// get rectangle
tools::Rectangle aTempRect = GetItemRect( nItemId );
Point aPt = OutputToScreenPixel( aTempRect.TopLeft() );
- aTempRect.Left() = aPt.X();
- aTempRect.Top() = aPt.Y();
+ aTempRect.SetLeft( aPt.X() );
+ aTempRect.SetTop( aPt.Y() );
aPt = OutputToScreenPixel( aTempRect.BottomRight() );
- aTempRect.Right() = aPt.X();
- aTempRect.Bottom() = aPt.Y();
+ aTempRect.SetRight( aPt.X() );
+ aTempRect.SetBottom( aPt.Y() );
// get text and display it
OUString aStr = GetQuickHelpText( nItemId );
@@ -4278,7 +4278,7 @@ Size ToolBox::GetOptimalSize() const
Size aWinSize(pWindow->GetSizePixel());
aExpandables[pWindow] = aWinSize;
Size aPrefSize(pWindow->get_preferred_size());
- aWinSize.Width() = aPrefSize.Width();
+ aWinSize.setWidth( aPrefSize.Width() );
pWindow->SetSizePixel(aWinSize);
}
}