diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-20 16:41:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-05 06:51:20 +0000 |
commit | 954f752cf10fc6a8777af2a6a93e496688464687 (patch) | |
tree | 0fc776cdcb6ad9b1d2b9673ac044bb5b4f496972 /svx/source/dialog/_contdlg.cxx | |
parent | c1e18e05a53c1d55afe36a887ca25f74f3f1d32d (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 'svx/source/dialog/_contdlg.cxx')
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index faedbde8feb0..2f316de609d3 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -273,7 +273,7 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow * m_pTbx1->SetSizePixel( aTbxSize ); m_pTbx1->SetSelectHdl( LINK( this, SvxSuperContourDlg, Tbx1ClickHdl ) ); - aPos.X() += aTbxSize.Width() + LogicToPixel( Size( 3, 0 ), MapMode( MAP_APPFONT ) ).Width(); + aPos.X() += aTbxSize.Width() + LogicToPixel( Size( 3, 0 ), MapMode( MapUnit::MapAppFont ) ).Width(); m_pMtfTolerance->SetPosPixel( aPos ); m_pMtfTolerance->SetValue( 10L ); @@ -355,10 +355,10 @@ void SvxSuperContourDlg::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly ) DBG_ASSERT( m_pContourWnd->GetGraphic().GetType() != GraphicType::NONE, "Graphic must've been set first!" ); tools::PolyPolygon aPolyPoly( rPolyPoly ); - const MapMode aMap100( MAP_100TH_MM ); + const MapMode aMap100( MapUnit::Map100thMM ); const MapMode aGrfMap( aGraphic.GetPrefMapMode() ); OutputDevice* pOutDev = Application::GetDefaultDevice(); - bool bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL; + bool bPixelMap = aGrfMap.GetMapUnit() == MapUnit::MapPixel; for ( sal_uInt16 j = 0, nPolyCount = aPolyPoly.Count(); j < nPolyCount; j++ ) { @@ -383,10 +383,10 @@ tools::PolyPolygon SvxSuperContourDlg::GetPolyPolygon() { tools::PolyPolygon aRetPolyPoly( m_pContourWnd->GetPolyPolygon() ); - const MapMode aMap100( MAP_100TH_MM ); + const MapMode aMap100( MapUnit::Map100thMM ); const MapMode aGrfMap( aGraphic.GetPrefMapMode() ); OutputDevice* pOutDev = Application::GetDefaultDevice(); - bool bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL; + bool bPixelMap = aGrfMap.GetMapUnit() == MapUnit::MapPixel; for ( sal_uInt16 j = 0, nPolyCount = aRetPolyPoly.Count(); j < nPolyCount; j++ ) { @@ -598,7 +598,7 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, CreateHdl, Idle *, void) { aCreateIdle.Stop(); - const Rectangle aWorkRect = m_pContourWnd->LogicToPixel( m_pContourWnd->GetWorkRect(), MapMode( MAP_100TH_MM ) ); + const Rectangle aWorkRect = m_pContourWnd->LogicToPixel( m_pContourWnd->GetWorkRect(), MapMode( MapUnit::Map100thMM ) ); const Graphic& rGraphic = m_pContourWnd->GetGraphic(); const bool bValid = aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom(); |