summaryrefslogtreecommitdiff
path: root/vcl/source/control/button.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-20 16:41:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-05 06:51:20 +0000
commit954f752cf10fc6a8777af2a6a93e496688464687 (patch)
tree0fc776cdcb6ad9b1d2b9673ac044bb5b4f496972 /vcl/source/control/button.cxx
parentc1e18e05a53c1d55afe36a887ca25f74f3f1d32d (diff)
convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control/button.cxx')
-rw-r--r--vcl/source/control/button.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 658a8b0d19c1..4e5904eb56c0 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1081,7 +1081,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
// prepare single line hint (needed on mac to decide between normal push button and
// rectangular bevel button look)
Size aFontSize(Application::GetSettings().GetStyleSettings().GetPushButtonFont().GetFontSize());
- aFontSize = rRenderContext.LogicToPixel(aFontSize, MapMode(MAP_POINT));
+ aFontSize = rRenderContext.LogicToPixel(aFontSize, MapMode(MapUnit::MapPoint));
Size aInRectSize(rRenderContext.LogicToPixel(Size(aInRect.GetWidth(), aInRect.GetHeight())));
aControlValue.mbSingleLine = (aInRectSize.Height() < 2 * aFontSize.Height());
@@ -2471,7 +2471,7 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
{
if ( !maImage )
{
- MapMode aResMapMode( MAP_100TH_MM );
+ MapMode aResMapMode( MapUnit::Map100thMM );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
Size aImageSize = pDev->LogicToPixel( Size( 300, 300 ), aResMapMode );
@@ -2866,7 +2866,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, DrawButtonFlags
void RadioButton::ImplSetMinimumNWFSize()
{
Push( PushFlags::MAPMODE );
- SetMapMode( MAP_PIXEL );
+ SetMapMode( MapUnit::MapPixel );
ImplControlValue aControlValue;
Size aCurSize( GetSizePixel() );
@@ -3358,7 +3358,7 @@ void CheckBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
DrawFlags nFlags )
{
- MapMode aResMapMode( MAP_100TH_MM );
+ MapMode aResMapMode( MapUnit::Map100thMM );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
Size aImageSize = pDev->LogicToPixel( Size( 300, 300 ), aResMapMode );
@@ -3729,7 +3729,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, DrawButtonFlags nFl
void CheckBox::ImplSetMinimumNWFSize()
{
Push( PushFlags::MAPMODE );
- SetMapMode( MAP_PIXEL );
+ SetMapMode( MapUnit::MapPixel );
ImplControlValue aControlValue;
Size aCurSize( GetSizePixel() );