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 /sc/source/ui/namedlg | |
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 'sc/source/ui/namedlg')
-rw-r--r-- | sc/source/ui/namedlg/namemgrtable.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/namedlg/namepast.cxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx index a1ee00b1c441..99689657e747 100644 --- a/sc/source/ui/namedlg/namemgrtable.cxx +++ b/sc/source/ui/namedlg/namemgrtable.cxx @@ -44,7 +44,7 @@ ScRangeManagerTable::ScRangeManagerTable(SvSimpleTableContainer& rParent, , mpInitListener(nullptr) { static long aStaticTabs[] = {3, 0, 0, 0 }; - SetTabs( &aStaticTabs[0], MAP_PIXEL ); + SetTabs( &aStaticTabs[0], MapUnit::MapPixel ); OUString aNameStr(ScGlobal::GetRscString(STR_HEADER_NAME)); OUString aRangeStr(ScGlobal::GetRscString(STR_HEADER_RANGE_OR_EXPR)); @@ -99,7 +99,7 @@ void ScRangeManagerTable::setColWidths() rHeaderBar.SetItemSize( ITEMID_RANGE, nTabSize); rHeaderBar.SetItemSize( ITEMID_SCOPE, nTabSize); static long aStaticTabs[] = {3, 0, nTabSize, 2*nTabSize }; - SetTabs( &aStaticTabs[0], MAP_PIXEL ); + SetTabs( &aStaticTabs[0], MapUnit::MapPixel ); HeaderEndDragHdl(nullptr); } @@ -295,9 +295,9 @@ IMPL_LINK_NOARG(ScRangeManagerTable, HeaderEndDragHdl, HeaderBar*, void) rHeaderBar.SetItemSize(ITEMID_SCOPE, nItemScopeSize); SetTab(0, 0); - SetTab(1, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width() ); + SetTab(1, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() ); aSz.Width() += nItemRangeSize; - SetTab(2, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width() ); + SetTab(2, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() ); } IMPL_LINK_NOARG(ScRangeManagerTable, ScrollHdl, SvTreeListBox*, void) diff --git a/sc/source/ui/namedlg/namepast.cxx b/sc/source/ui/namedlg/namepast.cxx index 48bb5888301a..c47b56a14de2 100644 --- a/sc/source/ui/namedlg/namepast.cxx +++ b/sc/source/ui/namedlg/namepast.cxx @@ -49,7 +49,7 @@ ScNamePasteDlg::ScNamePasteDlg( vcl::Window * pParent, ScDocShell* pShell, bool ScAddress aPos(pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo()); SvSimpleTableContainer *pContainer = get<SvSimpleTableContainer>("ctrl"); Size aControlSize(210, 0); - aControlSize = LogicToPixel(aControlSize, MAP_APPFONT); + aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont); pContainer->set_width_request(aControlSize.Width()); pContainer->set_height_request(10 * GetTextHeight()); mpTable = VclPtr<ScRangeManagerTable>::Create(*pContainer, m_RangeMap, aPos); |