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 /dbaccess/source/ui/dlg | |
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 'dbaccess/source/ui/dlg')
-rw-r--r-- | dbaccess/source/ui/dlg/adminpages.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/adtabdlg.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbfindex.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwiz.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 12 |
7 files changed, 13 insertions, 13 deletions
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 0a5f62e811bb..2b3100c3a460 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -278,7 +278,7 @@ namespace dbaui aReference.Y() += _rReference.GetSizePixel().Height(); const vcl::Window* pConverter = _rControl.GetParent(); - Size aOffset = pConverter->LogicToPixel( Size( _nIndentAppFont, ( _eRelation == RelatedControls ? 3 : 6 ) ), MAP_APPFONT ); + Size aOffset = pConverter->LogicToPixel( Size( _nIndentAppFont, ( _eRelation == RelatedControls ? 3 : 6 ) ), MapUnit::MapAppFont ); Point aControlPos( aReference.X() + aOffset.Width(), aReference.Y() + aOffset.Height() ); _rControl.SetPosPixel( aControlPos ); diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 71e5f26e9b18..1aa01c2182c0 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -322,7 +322,7 @@ OAddTableDlg::OAddTableDlg( vcl::Window* pParent, IAddTableDialogContext& _rCont get(m_pTableList, "tablelist"); get(m_pQueryList, "querylist"); - Size aSize(LogicToPixel(Size(106 , 122), MAP_APPFONT)); + Size aSize(LogicToPixel(Size(106 , 122), MapUnit::MapAppFont)); m_pTableList->set_height_request(aSize.Height()); m_pTableList->set_width_request(aSize.Width()); get(m_pQueryList, "querylist"); diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 3ed234ce954d..2495ff2316df 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -50,7 +50,7 @@ ODbaseIndexDialog::ODbaseIndexDialog(vcl::Window * pParent, const OUString& aDat get(m_pIndexes, "frame"); get(m_pLB_TableIndexes, "tableindex"); get(m_pLB_FreeIndexes, "freeindex"); - Size aSize(LogicToPixel(Size(76, 98), MAP_APPFONT)); + Size aSize(LogicToPixel(Size(76, 98), MapUnit::MapAppFont)); m_pLB_TableIndexes->set_height_request(aSize.Height()); m_pLB_TableIndexes->set_width_request(aSize.Width()); m_pLB_FreeIndexes->set_height_request(aSize.Height()); diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 2062b4269d4f..3eb5c8055dfc 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -78,7 +78,7 @@ ODbTypeWizDialog::ODbTypeWizDialog(vcl::Window* _pParent m_pImpl->translateProperties(xDatasource, *m_pOutSet); m_eType = dbaui::ODbDataSourceAdministrationHelper::getDatasourceType(*m_pOutSet); - SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT)); + SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MapUnit::MapAppFont)); defaultButton(WizardButtonFlags::NEXT); enableButtons(WizardButtonFlags::FINISH, false); enableAutomaticNextButtonState(); diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 3e1c2200216b..523a0a314090 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -145,7 +145,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* _pParent m_pImpl->translateProperties(xDatasource, *m_pOutSet); - SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MAP_APPFONT)); + SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MapUnit::MapAppFont)); defaultButton(WizardButtonFlags::NEXT); enableButtons(WizardButtonFlags::FINISH, true); enableAutomaticNextButtonState(); diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 53ecfa10e867..d2758b0d51ac 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -193,7 +193,7 @@ namespace dbaui maLcResetCmdImg = get<FixedImage>("image5")->GetImage(); get(m_pIndexList, "INDEX_LIST"); - Size aSize(LogicToPixel(Size(70, 97), MAP_APPFONT)); + Size aSize(LogicToPixel(Size(70, 97), MapUnit::MapAppFont)); m_pIndexList->set_width_request(aSize.Width()); m_pIndexList->set_height_request(aSize.Height()); get(m_pIndexDetails, "INDEX_DETAILS"); @@ -202,7 +202,7 @@ namespace dbaui get(m_pUnique, "UNIQUE"); get(m_pFieldsLabel, "FIELDS_LABEL"); get(m_pFields, "FIELDS"); - aSize = LogicToPixel(Size(128, 61), MAP_APPFONT); + aSize = LogicToPixel(Size(128, 61), MapUnit::MapAppFont); m_pFields->set_width_request(aSize.Width()); m_pFields->set_height_request(aSize.Height()); get(m_pClose, "close"); diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 3a5cd53d4c82..2d4660d03f3e 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -303,11 +303,11 @@ OExceptionChainDialog::OExceptionChainDialog(vcl::Window* pParent, const Excepti , m_aExceptions(_rExceptions) { get(m_pExceptionList, "list"); - Size aListSize(LogicToPixel(Size(85, 93), MAP_APPFONT)); + Size aListSize(LogicToPixel(Size(85, 93), MapUnit::MapAppFont)); m_pExceptionList->set_width_request(aListSize.Width()); m_pExceptionList->set_height_request(aListSize.Height()); get(m_pExceptionText, "description"); - Size aTextSize(LogicToPixel(Size(125 , 93), MAP_APPFONT)); + Size aTextSize(LogicToPixel(Size(125 , 93), MapUnit::MapAppFont)); m_pExceptionText->set_width_request(aTextSize.Width()); m_pExceptionText->set_height_request(aTextSize.Height()); @@ -398,8 +398,8 @@ namespace { void lcl_positionInAppFont( const vcl::Window& _rParent, vcl::Window& _rChild, long _nX, long _nY, long Width, long Height ) { - Point aPos = _rParent.LogicToPixel( Point( _nX, _nY ), MAP_APPFONT ); - Size aSize = _rParent.LogicToPixel( Size( Width, Height ), MAP_APPFONT ); + Point aPos = _rParent.LogicToPixel( Point( _nX, _nY ), MapUnit::MapAppFont ); + Size aSize = _rParent.LogicToPixel( Size( Width, Height ), MapUnit::MapAppFont ); _rChild.SetPosSizePixel( aPos, aSize ); } @@ -512,8 +512,8 @@ void OSQLMessageBox::impl_positionControls() // adjust dialog size accordingly const Rectangle& rBottomTextRect( bHaveSecondaryText ? aSecondaryRect : aPrimaryRect ); - Size aBorderSize = LogicToPixel( Size( OUTER_MARGIN, OUTER_MARGIN ), MAP_APPFONT ); - Size aDialogSize( LogicToPixel( Size( DIALOG_WIDTH, 30 ), MAP_APPFONT ) ); + Size aBorderSize = LogicToPixel( Size( OUTER_MARGIN, OUTER_MARGIN ), MapUnit::MapAppFont ); + Size aDialogSize( LogicToPixel( Size( DIALOG_WIDTH, 30 ), MapUnit::MapAppFont ) ); aDialogSize.Height() = rBottomTextRect.Bottom() + aBorderSize.Height(); aDialogSize.Width() = aPrimaryRect.Right() + aBorderSize.Width(); |