summaryrefslogtreecommitdiff
path: root/sc/source/ui/cctrl/checklistmenu.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/cctrl/checklistmenu.cxx')
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx40
1 files changed, 20 insertions, 20 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 43c607a2f15f..1bc8a827008f 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -344,8 +344,8 @@ Size ScMenuFloatingWindow::getMenuSize() const
Point aPos;
Size aSize;
getMenuItemPosSize(nLastPos, aPos, aSize);
- aPos.X() += nTextWidth + 15;
- aPos.Y() += aSize.Height() + 5;
+ aPos.setX( aPos.X() + nTextWidth + 15 );
+ aPos.setY( aPos.Y() + aSize.Height() + 5 );
return Size(aPos.X(), aPos.Y());
}
@@ -369,8 +369,8 @@ void ScMenuFloatingWindow::drawMenuItem(vcl::RenderContext& rRenderContext, size
{
long nFontHeight = maLabelFont.GetFontHeight();
Point aMarkerPos = aPos;
- aMarkerPos.Y() += aSize.Height() / 2 - nFontHeight / 4 + 1;
- aMarkerPos.X() += aSize.Width() - nFontHeight + nFontHeight / 4;
+ aMarkerPos.setY( aMarkerPos.Y() + aSize.Height() / 2 - nFontHeight / 4 + 1 );
+ aMarkerPos.setX( aMarkerPos.X() + aSize.Width() - nFontHeight + nFontHeight / 4 );
Size aMarkerSize(nFontHeight / 2, nFontHeight / 2);
aDecoView.DrawSymbol(tools::Rectangle(aMarkerPos, aMarkerSize), SymbolType::SPIN_RIGHT, GetTextColor());
}
@@ -410,7 +410,7 @@ void ScMenuFloatingWindow::drawSeparator(vcl::RenderContext& rRenderContext, siz
{
const StyleSettings& rStyle = rRenderContext.GetSettings().GetStyleSettings();
Point aTmpPos = aPos;
- aTmpPos.Y() += aSize.Height() / 2;
+ aTmpPos.setY( aTmpPos.Y() + aSize.Height() / 2 );
rRenderContext.SetLineColor(rStyle.GetShadowColor());
rRenderContext.DrawLine(aTmpPos, Point(aSize.Width() + aTmpPos.X(), aTmpPos.Y()));
++aTmpPos.Y();
@@ -728,7 +728,7 @@ void ScMenuFloatingWindow::getMenuItemPosSize(size_t nPos, Point& rPos, Size& rS
Point aPos1(nLeftMargin, nTopMargin);
rPos = aPos1;
for (size_t i = 0; i < nPos; ++i)
- rPos.Y() += maMenuItems[i].mbSeparator ? nSepHeight : nMenuItemHeight;
+ rPos.setY( rPos.Y() + (maMenuItems[i].mbSeparator ? nSepHeight : nMenuItemHeight) );
Size aWndSize = GetSizePixel();
sal_uInt16 nH = maMenuItems[nPos].mbSeparator ? nSepHeight : nMenuItemHeight;
@@ -979,12 +979,12 @@ void ScCheckListMenuWindow::getSectionPosSize(
case LISTBOX_AREA_INNER:
{
rPos = Point(nListBoxMargin, nTopMargin + nMenuHeight + nMenuListMargin + nSearchBoxHeight + nSearchBoxMargin);
- rPos.X() += nListBoxInnerPadding;
- rPos.Y() += nListBoxInnerPadding;
+ rPos.setX( rPos.X() + nListBoxInnerPadding );
+ rPos.setY( rPos.Y() + nListBoxInnerPadding );
rSize = Size(nListBoxWidth, nListBoxHeight);
- rSize.Width() -= nListBoxInnerPadding*2;
- rSize.Height() -= nListBoxInnerPadding*2;
+ rSize.setWidth( rSize.Width() - nListBoxInnerPadding*2 );
+ rSize.setHeight( rSize.Height() - nListBoxInnerPadding*2 );
}
break;
case SINGLE_BTN_AREA:
@@ -997,8 +997,8 @@ void ScCheckListMenuWindow::getSectionPosSize(
{
long h = std::min(maChkToggleAll->CalcMinimumSize().Height(), 26L);
rPos = Point(nListBoxMargin, nSingleBtnAreaY);
- rPos.X() += 5;
- rPos.Y() += (nSingleItemBtnAreaHeight - h)/2;
+ rPos.setX( rPos.X() + 5 );
+ rPos.setY( rPos.Y() + (nSingleItemBtnAreaHeight - h)/2 );
rSize = Size(70, h);
}
break;
@@ -1006,8 +1006,8 @@ void ScCheckListMenuWindow::getSectionPosSize(
{
long h = 26 * fScaleFactor;
rPos = Point(nListBoxMargin, nSingleBtnAreaY);
- rPos.X() += nListBoxWidth - h - 10 - h - 10;
- rPos.Y() += (nSingleItemBtnAreaHeight - h)/2;
+ rPos.setX( rPos.X() + nListBoxWidth - h - 10 - h - 10 );
+ rPos.setY( rPos.Y() + (nSingleItemBtnAreaHeight - h)/2 );
rSize = Size(h, h);
}
break;
@@ -1015,8 +1015,8 @@ void ScCheckListMenuWindow::getSectionPosSize(
{
long h = 26 * fScaleFactor;
rPos = Point(nListBoxMargin, nSingleBtnAreaY);
- rPos.X() += nListBoxWidth - h - 10;
- rPos.Y() += (nSingleItemBtnAreaHeight - h)/2;
+ rPos.setX( rPos.X() + nListBoxWidth - h - 10 );
+ rPos.setY( rPos.Y() + (nSingleItemBtnAreaHeight - h)/2 );
rSize = Size(h, h);
}
break;
@@ -1047,11 +1047,11 @@ void ScCheckListMenuWindow::packWindow()
if (maWndSize.Width() < maMenuSize.Width())
// Widen the window to fit the menu items.
- maWndSize.Width() = maMenuSize.Width();
+ maWndSize.setWidth( maMenuSize.Width() );
// Set proper window height based on the number of menu items.
if (maWndSize.Height() < maMenuSize.Height()*2.8)
- maWndSize.Height() = maMenuSize.Height()*2.8;
+ maWndSize.setHeight( maMenuSize.Height()*2.8 );
// TODO: Make sure the window height never exceeds the height of the
// screen. Also do adjustment based on the number of check box items.
@@ -1988,7 +1988,7 @@ void ScCheckListMenuWindow::launch(const tools::Rectangle& rRect)
{
// In RTL mode, the logical "left" is visual "right".
long nLeft = aRect.Left() - aRect.GetWidth();
- aRect.Left() = nLeft;
+ aRect.SetLeft( nLeft );
}
else if (maWndSize.Width() < aRect.GetWidth())
{
@@ -1996,7 +1996,7 @@ void ScCheckListMenuWindow::launch(const tools::Rectangle& rRect)
// Simulate right-aligned launch by modifying the target rectangle
// size.
long nDiff = aRect.GetWidth() - maWndSize.Width();
- aRect.Left() += nDiff;
+ aRect.SetLeft( aRect.Left() + nDiff );
}
StartPopupMode(aRect, (FloatWinPopupFlags::Down | FloatWinPopupFlags::GrabFocus));