diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-10-26 23:15:06 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-10-26 23:17:45 +0200 |
commit | 11d2f3d6e1b6c9baf43d8521293c53525108436d (patch) | |
tree | ffe35d5d47713a11c93c3bf11f588eeaf492fc16 /cui/source/options | |
parent | 213f7c02d4f3ddbe2f52950575e2559c52d98ac2 (diff) |
vcl: make MapMode constructor explicit
Insert constructor everywhere, except a couple places that apparently
want to compare GetMapUnit().
Change-Id: I1910deb60562e5e949203435e827057f70a3f988
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/certpath.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/connpooloptions.cxx | 8 | ||||
-rw-r--r-- | cui/source/options/dbregister.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/fontsubs.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optaboutconfig.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optfltr.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optjava.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optpath.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 2 |
10 files changed, 16 insertions, 16 deletions
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index 3cd712174f75..cc2e6b99dad6 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -29,7 +29,7 @@ CertPathDialog::CertPathDialog(vcl::Window* pParent) get(m_pOKBtn, "ok"); get(m_pAddBtn, "add"); get(m_pCertPathListContainer, "paths"); - Size aSize(LogicToPixel(Size(210, 60), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(210, 60), MapMode(MapUnit::MapAppFont))); m_pCertPathListContainer->set_width_request(aSize.Width()); m_pCertPathListContainer->set_height_request(aSize.Height()); m_pCertPathList = diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 5e5da2593100..2b6767ff90c0 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -127,11 +127,11 @@ namespace offapp { EditBrowseBox::Init(); - Size aColWidth = LogicToPixel(Size(160, 0), MapUnit::MapAppFont); + Size aColWidth = LogicToPixel(Size(160, 0), MapMode(MapUnit::MapAppFont)); InsertDataColumn(1, CuiResId(RID_SVXSTR_DRIVER_NAME), aColWidth.Width()); - aColWidth = LogicToPixel(Size(30, 0), MapUnit::MapAppFont); + aColWidth = LogicToPixel(Size(30, 0), MapMode(MapUnit::MapAppFont)); InsertDataColumn(2, CuiResId(RID_SVXSTR_POOLED_FLAG), aColWidth.Width()); - aColWidth = LogicToPixel(Size(60, 0), MapUnit::MapAppFont); + aColWidth = LogicToPixel(Size(60, 0), MapMode(MapUnit::MapAppFont)); InsertDataColumn(3, CuiResId(RID_SVXSTR_POOL_TIMEOUT), aColWidth.Width()); // Attention: the resource of the string is local to the resource of the enclosing dialog! } @@ -303,7 +303,7 @@ namespace offapp get(m_pTimeout, "timeout"); Size aControlSize(248, 100); - aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont); + aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont)); m_pDriverList->set_width_request(aControlSize.Width()); m_pDriverList->set_height_request(aControlSize.Height()); m_pDriverList->Init(); diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index fc02372cdd48..4c334d9bcbe2 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -111,7 +111,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons { get(m_pPathCtrl, "pathctrl"); Size aControlSize(248, 147); - aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont); + aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont)); m_pPathCtrl->set_width_request(aControlSize.Width()); m_pPathCtrl->set_height_request(aControlSize.Height()); diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index eb67957b9588..b7ceda7a8576 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -57,7 +57,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( vcl::Window* pParent, SvSimpleTableContainer *pCheckLBContainer = get<SvSimpleTableContainer>("checklb"); Size aControlSize(248, 75); - aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont); + aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont)); pCheckLBContainer->set_width_request(aControlSize.Width()); pCheckLBContainer->set_height_request(aControlSize.Height()); @@ -418,7 +418,7 @@ void SvxFontSubstCheckListBox::setColSizes() long nW1 = rBar.GetTextWidth(rBar.GetItemText(3)); long nW2 = rBar.GetTextWidth(rBar.GetItemText(4)); long nMax = std::max( nW1, nW2 ) + 6; // width of the longest header + a little offset - long nMin = rBar.LogicToPixel(Size(10, 0), MapUnit::MapAppFont).Width(); + long nMin = rBar.LogicToPixel(Size(10, 0), MapMode(MapUnit::MapAppFont)).Width(); nMax = std::max( nMax, nMin ); const long nDoubleMax = 2*nMax; const long nRest = GetSizePixel().Width() - nDoubleMax; diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index df500a2c28b8..ca6ca3673353 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -137,7 +137,7 @@ void CuiCustomMultilineEdit::KeyInput( const KeyEvent& rKeyEvent ) Size CuiCustomMultilineEdit::GetOptimalSize() const { - return LogicToPixel(Size(150, GetTextHeight()), MapUnit::MapAppFont); + return LogicToPixel(Size(150, GetTextHeight()), MapMode(MapUnit::MapAppFont)); } CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const SfxItemSet& rItemSet*/ ) : @@ -150,7 +150,7 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const SfxI m_vectorOfModified(), m_pPrefBox( VclPtr<SvSimpleTable>::Create(*m_pPrefCtrl, WB_SCROLL | WB_HSCROLL | WB_VSCROLL ) ) { - Size aControlSize(LogicToPixel(Size(385, 230), MapUnit::MapAppFont)); + Size aControlSize(LogicToPixel(Size(385, 230), MapMode(MapUnit::MapAppFont))); m_pPrefCtrl->set_width_request(aControlSize.Width()); m_pPrefCtrl->set_height_request(aControlSize.Height()); diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 478aacb4bd89..d1fd93342264 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -157,7 +157,7 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet get( aShadingRB, "shading" ); Size aControlSize(248, 55); - aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont); + aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont)); m_pCheckLBContainer->set_width_request(aControlSize.Width()); m_pCheckLBContainer->set_height_request(aControlSize.Height()); diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index b226fc143739..b3443d7734c4 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -83,7 +83,7 @@ public: if (rBar.GetItemCount() < 4) return; long nCheckWidth = std::max(GetControlColumnWidth() + 12, - rBar.LogicToPixel(Size(15, 0), MapUnit::MapAppFont).Width()); + rBar.LogicToPixel(Size(15, 0), MapMode(MapUnit::MapAppFont)).Width()); long nVersionWidth = 12 + std::max(rBar.GetTextWidth(rBar.GetItemText(3)), GetTextWidth("0.0.0_00-icedtea")); @@ -131,7 +131,7 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* pParent, const SfxItemSet& SvSimpleTableContainer *pJavaListContainer = get<SvSimpleTableContainer>("javas"); Size aControlSize(177, 60); - aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont); + aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont)); pJavaListContainer->set_width_request(aControlSize.Width()); pJavaListContainer->set_height_request(aControlSize.Height()); m_pJavaList = VclPtr<SvxJavaListBox>::Create(*pJavaListContainer, m_sAccessibilityText); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index e02914813903..b8b80d3000ac 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1758,7 +1758,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rD get(m_pPrioDownPB, "down"); get(m_pPrioUpPB, "up"); get(m_pModulesCLB, "lingudicts"); - Size aListSize(m_pModulesCLB->LogicToPixel(Size(166, 120), MapUnit::MapAppFont)); + Size aListSize(m_pModulesCLB->LogicToPixel(Size(166, 120), MapMode(MapUnit::MapAppFont))); m_pModulesCLB->set_height_request(aListSize.Height()); m_pModulesCLB->set_width_request(aListSize.Width()); get(m_pLanguageLB, "language"); diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index ffe3d530f9c8..6651c2d22dff 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -204,7 +204,7 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pPathBtn->SetClickHdl( LINK( this, SvxPathTabPage, PathHdl_Impl ) ); Size aControlSize(236 , 147); - aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont); + aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont)); m_pPathCtrl->set_width_request(aControlSize.Width()); m_pPathCtrl->set_height_request(aControlSize.Height()); WinBits nBits = WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP; diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 07f469b2b307..898453f300bd 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -488,7 +488,7 @@ void OfaTreeOptionsDialog::InitWidgets() get(pBackPB, "revert"); get(pTreeLB, "pages"); get(pTabBox, "box"); - Size aSize(pTabBox->LogicToPixel(Size(278, 259), MapUnit::MapAppFont)); + Size aSize(pTabBox->LogicToPixel(Size(278, 259), MapMode(MapUnit::MapAppFont))); pTabBox->set_width_request(aSize.Width()); pTabBox->set_height_request(aSize.Height() - get_action_area()->get_preferred_size().Height()); pTreeLB->set_width_request(pTreeLB->approximate_char_width() * 25); |