From 11d2f3d6e1b6c9baf43d8521293c53525108436d Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 26 Oct 2017 23:15:06 +0200 Subject: vcl: make MapMode constructor explicit Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988 --- cui/source/customize/acccfg.cxx | 10 +++++----- cui/source/customize/cfg.cxx | 2 +- cui/source/customize/eventdlg.cxx | 2 +- cui/source/dialogs/SpellDialog.cxx | 2 +- cui/source/dialogs/colorpicker.cxx | 2 +- cui/source/dialogs/cuigaldlg.cxx | 2 +- cui/source/dialogs/cuigrfflt.cxx | 4 ++-- cui/source/dialogs/hlmarkwn.cxx | 2 +- cui/source/dialogs/linkdlg.cxx | 8 ++++---- cui/source/dialogs/multipat.cxx | 4 ++-- cui/source/dialogs/screenshotannotationdlg.cxx | 2 +- cui/source/options/certpath.cxx | 2 +- cui/source/options/connpooloptions.cxx | 8 ++++---- cui/source/options/dbregister.cxx | 2 +- cui/source/options/fontsubs.cxx | 4 ++-- cui/source/options/optaboutconfig.cxx | 4 ++-- cui/source/options/optfltr.cxx | 2 +- cui/source/options/optjava.cxx | 4 ++-- cui/source/options/optlingu.cxx | 2 +- cui/source/options/optpath.cxx | 2 +- cui/source/options/treeopt.cxx | 2 +- cui/source/tabpages/autocdlg.cxx | 8 ++++---- cui/source/tabpages/grfpage.cxx | 2 +- cui/source/tabpages/labdlg.cxx | 2 +- cui/source/tabpages/numpages.cxx | 4 ++-- cui/source/tabpages/page.cxx | 6 +++--- cui/source/tabpages/tpcolor.cxx | 4 ++-- cui/source/tabpages/tpline.cxx | 6 +++--- 28 files changed, 52 insertions(+), 52 deletions(-) (limited to 'cui') diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index b314af956459..bf1635051f98 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -742,20 +742,20 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const get(m_pSaveButton, "save"); get(m_pResetButton, "reset"); get(m_pEntriesBox, "shortcuts"); - Size aSize(LogicToPixel(Size(174, 100), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(174, 100), MapMode(MapUnit::MapAppFont))); m_pEntriesBox->set_width_request(aSize.Width()); m_pEntriesBox->set_height_request(aSize.Height()); m_pEntriesBox->SetAccelConfigPage(this); get(m_pGroupLBox, "category"); - aSize = LogicToPixel(Size(78 , 91), MapUnit::MapAppFont); + aSize = LogicToPixel(Size(78 , 91), MapMode(MapUnit::MapAppFont)); m_pGroupLBox->set_width_request(aSize.Width()); m_pGroupLBox->set_height_request(aSize.Height()); get(m_pFunctionBox, "function"); - aSize = LogicToPixel(Size(88, 91), MapUnit::MapAppFont); + aSize = LogicToPixel(Size(88, 91), MapMode(MapUnit::MapAppFont)); m_pFunctionBox->set_width_request(aSize.Width()); m_pFunctionBox->set_height_request(aSize.Height()); get(m_pKeyBox, "keys"); - aSize = LogicToPixel(Size(80, 91), MapUnit::MapAppFont); + aSize = LogicToPixel(Size(80, 91), MapMode(MapUnit::MapAppFont)); m_pKeyBox->set_width_request(aSize.Width()); m_pKeyBox->set_height_request(aSize.Height()); get(m_pSearchEdit, "searchEntry"); @@ -795,7 +795,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const nMaxWidth = nTmp; } // recalc second tab - long nNewTab = PixelToLogic( Size( nMaxWidth, 0 ), MapUnit::MapAppFont ).Width(); + long nNewTab = PixelToLogic(Size(nMaxWidth, 0), MapMode(MapUnit::MapAppFont)).Width(); nNewTab = nNewTab + 5; // additional space m_pEntriesBox->SetTab( 1, nNewTab ); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index d1ba1b61f5a5..d6aa0b1eabab 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1168,7 +1168,7 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const SfxItemSet& rSet) get(m_pDescriptionField, "desc"); m_pDescriptionField->set_height_request(m_pDescriptionField->GetTextHeight()*2.9); get(m_pEntries, "entries"); - Size aSize(LogicToPixel(Size(108, 115), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(108, 115), MapMode(MapUnit::MapAppFont))); m_pEntries->set_height_request(aSize.Height()); m_pEntries->set_width_request(aSize.Width()); m_pFunctions->set_height_request(aSize.Height()); diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 02b8961e033d..d96325931e71 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -63,7 +63,7 @@ SvxEventConfigPage::SvxEventConfigPage(vcl::Window *pParent, const SfxItemSet& r mpImpl->sStrEvent = get("eventft")->GetText(); mpImpl->sAssignedMacro = get("actionft")->GetText(); get(mpImpl->pEventLB, "events"); - Size aSize(LogicToPixel(Size(205, 229), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(205, 229), MapMode(MapUnit::MapAppFont))); mpImpl->pEventLB->set_width_request(aSize.Width()); mpImpl->pEventLB->set_height_request(aSize.Height()); get(mpImpl->pAssignPB, "macro"); diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a86acf2a5405..a81b3ede251a 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -183,7 +183,7 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow, get(m_pExplainLink, "explainlink"); get(m_pNotInDictFT, "notindictft"); get(m_pSentenceED, "sentence"); - Size aEdSize(LogicToPixel(Size(197, 48), MapUnit::MapAppFont)); + Size aEdSize(LogicToPixel(Size(197, 48), MapMode(MapUnit::MapAppFont))); m_pSentenceED->set_width_request(aEdSize.Width()); m_pSentenceED->set_height_request(aEdSize.Height()); get(m_pSuggestionFT, "suggestionsft"); diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 5546573e0645..2d9d0c4e53ed 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -259,7 +259,7 @@ VCL_BUILDER_FACTORY_CONSTRUCTOR(ColorFieldControl, 0) Size ColorFieldControl::GetOptimalSize() const { - return LogicToPixel(Size(158, 158), MapUnit::MapAppFont); + return LogicToPixel(Size(158, 158), MapMode(MapUnit::MapAppFont)); } void ColorFieldControl::UpdateBitmap() diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 5685b48d333a..edd5e8ac8fe6 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -718,7 +718,7 @@ TPGalleryThemeProperties::TPGalleryThemeProperties( vcl::Window* pWindow, const { get(m_pCbbFileType, "filetype"); get(m_pLbxFound, "files"); - Size aSize(LogicToPixel(Size(172, 156), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(172, 156), MapMode(MapUnit::MapAppFont))); m_pLbxFound->set_width_request(aSize.Width()); m_pLbxFound->set_height_request(aSize.Height()); m_pLbxFound->EnableMultiSelection(true); diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 5ad65ac327ba..4c1d3fcf6cc9 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -41,7 +41,7 @@ VCL_BUILDER_FACTORY_CONSTRUCTOR(GraphicPreviewWindow, WB_TABSTOP) Size GraphicPreviewWindow::GetOptimalSize() const { - return LogicToPixel(Size(81, 73), MapUnit::MapAppFont); + return LogicToPixel(Size(81, 73), MapMode(MapUnit::MapAppFont)); } @@ -525,7 +525,7 @@ void EmbossControl::MouseButtonDown( const MouseEvent& rEvt ) Size EmbossControl::GetOptimalSize() const { - return LogicToPixel(Size(77, 60), MapUnit::MapAppFont); + return LogicToPixel(Size(77, 60), MapMode(MapUnit::MapAppFont)); } diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 579181dcea5f..0af200e7a955 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -89,7 +89,7 @@ VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxHlmarkTreeLBox, WB_TABSTOP) Size SvxHlmarkTreeLBox::GetOptimalSize() const { - return LogicToPixel(Size(103, 162), MapUnit::MapAppFont); + return LogicToPixel(Size(103, 162), MapMode(MapUnit::MapAppFont)); } void SvxHlmarkTreeLBox::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 4a5538922c95..86a2963014dd 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -99,7 +99,7 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b aUpdateIdle("cui SvBaseLinksDlg UpdateIdle") { get(m_pTbLinks, "TB_LINKS"); - Size aSize(LogicToPixel(Size(257, 87), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(257, 87), MapMode(MapUnit::MapAppFont))); m_pTbLinks->set_width_request(aSize.Width()); m_pTbLinks->set_height_request(aSize.Height()); get(m_pFtFullFileName, "FULL_FILE_NAME"); @@ -115,11 +115,11 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b m_pTbLinks->SetSelectionMode( SelectionMode::Multiple ); m_pTbLinks->SetTabs( &nTabs[0] ); FixedText *pFtFiles = get("FILES"); - pFtFiles->set_width_request(LogicToPixel(Size(nTabs[2] - nTabs[1] - 2, 0), MapUnit::MapAppFont).Width()); + pFtFiles->set_width_request(LogicToPixel(Size(nTabs[2] - nTabs[1] - 2, 0), MapMode(MapUnit::MapAppFont)).Width()); FixedText *pFtLinks = get("LINKS"); - pFtLinks->set_width_request(LogicToPixel(Size(nTabs[3] - nTabs[2] - 2, 0), MapUnit::MapAppFont).Width()); + pFtLinks->set_width_request(LogicToPixel(Size(nTabs[3] - nTabs[2] - 2, 0), MapMode(MapUnit::MapAppFont)).Width()); FixedText *pFtTypes = get("TYPE"); - pFtTypes->set_width_request(LogicToPixel(Size(nTabs[4] - nTabs[3] - 2, 0), MapUnit::MapAppFont).Width()); + pFtTypes->set_width_request(LogicToPixel(Size(nTabs[4] - nTabs[3] - 2, 0), MapMode(MapUnit::MapAppFont)).Width()); m_pTbLinks->Resize(); // OS: hack for correct selection // UpdateTimer for DDE-/Grf-links, which are waited for diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 69ecf270d382..e52bdd06b11b 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -179,7 +179,7 @@ SvxMultiPathDialog::SvxMultiPathDialog(vcl::Window* pParent) get(m_pDelBtn, "delete"); SvSimpleTableContainer* pRadioLBContainer = get("paths"); - Size aSize(LogicToPixel(Size(195, 77), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(195, 77), MapMode(MapUnit::MapAppFont))); pRadioLBContainer->set_width_request(aSize.Width()); pRadioLBContainer->set_height_request(aSize.Height()); m_pRadioLB = VclPtr::Create(*pRadioLBContainer, 0); @@ -207,7 +207,7 @@ SvxPathSelectDialog::SvxPathSelectDialog(vcl::Window* pParent) get(m_pAddBtn, "add"); get(m_pDelBtn, "delete"); get(m_pPathLB, "paths"); - Size aSize(LogicToPixel(Size(189, 80), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(189, 80), MapMode(MapUnit::MapAppFont))); m_pPathLB->set_width_request(aSize.Width()); m_pPathLB->set_height_request(aSize.Height()); diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx index e75957c1848b..49ffbc98e2ca 100644 --- a/cui/source/dialogs/screenshotannotationdlg.cxx +++ b/cui/source/dialogs/screenshotannotationdlg.cxx @@ -265,7 +265,7 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl( mpText->set_width_request(400); mpText->set_height_request( mpText->GetTextHeight() * 10 ); OUString aHelpId = OStringToOUString( mrParentDialog.GetHelpId(), RTL_TEXTENCODING_UTF8 ); - Size aSizeCm = mrParentDialog.PixelToLogic( maParentDialogSize, MapUnit::MapCM ); + Size aSizeCm = mrParentDialog.PixelToLogic(maParentDialogSize, MapMode(MapUnit::MapCM)); maMainMarkupText = lcl_ParagraphWithImage( aHelpId, aSizeCm ); mpText->SetText( maMainMarkupText ); mpText->SetReadOnly(); 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("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::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("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::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); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 9b356317e54a..8292c7c27120 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -437,7 +437,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( vcl::Window* pParent, SvSimpleTableContainer* pCheckLBContainer(get("list")); Size aControlSize(248 , 149); - aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont); + aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont)); pCheckLBContainer->set_width_request(aControlSize.Width()); pCheckLBContainer->set_height_request(aControlSize.Height()); m_pCheckLB = VclPtr::Create(*pCheckLBContainer); @@ -1819,7 +1819,7 @@ OfaQuoteTabPage::OfaQuoteTabPage(vcl::Window* pParent, const SfxItemSet& rSet) SvSimpleTableContainer *pListContainer = get("list"); Size aControlSize(252 , 85); - aControlSize = LogicToPixel(aControlSize, MapUnit::MapAppFont); + aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont)); pListContainer->set_width_request(aControlSize.Width()); pListContainer->set_height_request(aControlSize.Height()); m_pSwCheckLB = VclPtr::Create(*pListContainer); @@ -2186,7 +2186,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage(vcl::Window* pParent, get(m_pNFMaxEntries, "maxentries"); get(m_pLBEntries, "entries"); m_pLBEntries->SetPage(this); - aSize = LogicToPixel(Size(121, 158), MapUnit::MapAppFont); + aSize = LogicToPixel(Size(121, 158), MapMode(MapUnit::MapAppFont)); m_pLBEntries->set_width_request(aSize.Width()); m_pLBEntries->set_height_request(aSize.Height()); get(m_pPBEntries, "delete"); @@ -2464,7 +2464,7 @@ OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage( vcl::Window* pParent, // some options for the list box: m_pSmartTagTypesLB->SetStyle( m_pSmartTagTypesLB->GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); m_pSmartTagTypesLB->SetHighlightRange(); - Size aControlSize(LogicToPixel(Size(172, 154), MapUnit::MapAppFont)); + Size aControlSize(LogicToPixel(Size(172, 154), MapMode(MapUnit::MapAppFont))); m_pSmartTagTypesLB->set_width_request(aControlSize.Width()); m_pSmartTagTypesLB->set_height_request(aControlSize.Height()); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 3661f5b74de4..6009f92f9749 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -771,7 +771,7 @@ SvxCropExample::SvxCropExample( vcl::Window* pPar, WinBits nStyle ) Size SvxCropExample::GetOptimalSize() const { - return LogicToPixel(Size(78, 78), MapUnit::MapAppFont); + return LogicToPixel(Size(78, 78), MapMode(MapUnit::MapAppFont)); } VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxCropExample, 0) diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index dfc7e0f74342..f16c4c81b4e4 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -86,7 +86,7 @@ SvxCaptionTabPage::SvxCaptionTabPage(vcl::Window* pParent, const SfxItemSet& rIn { get(m_pCT_CAPTTYPE, "valueset"); - Size aSize(m_pCT_CAPTTYPE->LogicToPixel(Size(187, 38), MapUnit::MapAppFont)); + Size aSize(m_pCT_CAPTTYPE->LogicToPixel(Size(187, 38), MapMode(MapUnit::MapAppFont))); m_pCT_CAPTTYPE->set_width_request(aSize.Width()); m_pCT_CAPTTYPE->set_height_request(aSize.Height()); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index ad8078fe6602..bfed9705b462 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -963,7 +963,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, NumSelectHdl_Impl, ValueSet*, void) { Size aSize = SvxNumberFormat::GetGraphicSizeMM100(&aGraphic); sal_Int16 eOrient = text::VertOrientation::LINE_CENTER; - aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, eCoreUnit); + aSize = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(eCoreUnit)); SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH ); aFmt.SetGraphicBrush( &aBrush, &aSize, &eOrient ); } @@ -1980,7 +1980,7 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton, void ) } if(bSucc) { - aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, eCoreUnit); + aSize = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(eCoreUnit)); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 90612b428267..4e895fa09ff7 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -264,7 +264,7 @@ SvxPageDescPage::SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rAttr } MapMode aOldMode = mpDefPrinter->GetMapMode(); - mpDefPrinter->SetMapMode( MapUnit::MapTwip ); + mpDefPrinter->SetMapMode(MapMode(MapUnit::MapTwip)); // set first- and last-values for the margins Size aPaperSize = mpDefPrinter->GetPaperSize(); @@ -509,7 +509,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) m_pBspWin->SetSize( Size( ConvertLong_Impl( aPaperSize.Width(), eUnit ), ConvertLong_Impl( aPaperSize.Height(), eUnit ) ) ); - aPaperSize = OutputDevice::LogicToLogic(aPaperSize, eUnit, MapUnit::Map100thMM); + aPaperSize = OutputDevice::LogicToLogic(aPaperSize, MapMode(eUnit), MapMode(MapUnit::Map100thMM)); if ( bLandscape ) Swap( aPaperSize ); @@ -1039,7 +1039,7 @@ void SvxPageDescPage::SwapFirstValues_Impl( bool bSet ) eOri = Orientation::Landscape; Orientation eOldOri = mpDefPrinter->GetOrientation(); mpDefPrinter->SetOrientation( eOri ); - mpDefPrinter->SetMapMode( MapUnit::MapTwip ); + mpDefPrinter->SetMapMode(MapMode(MapUnit::MapTwip)); // set first- and last-values for margins Size aPaperSize = mpDefPrinter->GetPaperSize(); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 1b4b88ea6da3..8b43dd6830bc 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -68,13 +68,13 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr { get(m_pSelectPalette, "paletteselector"); get(m_pValSetColorList, "colorset"); - Size aSize = LogicToPixel(Size(100 , 120), MapUnit::MapAppFont); + Size aSize = LogicToPixel(Size(100 , 120), MapMode(MapUnit::MapAppFont)); m_pValSetColorList->set_width_request(aSize.Width()); m_pValSetColorList->set_height_request(aSize.Height()); get(m_pValSetRecentList, "recentcolorset"); get(m_pCtlPreviewOld, "oldpreview"); get(m_pCtlPreviewNew, "newpreview"); - aSize = LogicToPixel(Size(34 , 25), MapUnit::MapAppFont); + aSize = LogicToPixel(Size(34 , 25), MapMode(MapUnit::MapAppFont)); m_pCtlPreviewOld->set_width_request(aSize.Width()); m_pCtlPreviewOld->set_height_request(aSize.Height()); m_pCtlPreviewNew->set_width_request(aSize.Width()); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index cf23d73813dc..7c238dfeeba6 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -485,7 +485,7 @@ void SvxLineTabPage::SymbolSelected(MenuButton const * pButton) if(pGraphic) { Size aSize = SvxNumberFormat::GetGraphicSizeMM100(pGraphic); - aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, m_ePoolUnit); + aSize = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(m_ePoolUnit)); m_aSymbolGraphic=*pGraphic; if( bResetSize ) { @@ -1158,7 +1158,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) m_aSymbolGraphic=Graphic(aMeta); m_aSymbolSize=pObj->GetSnapRect().GetSize(); m_aSymbolGraphic.SetPrefSize(pInvisibleSquare->GetSnapRect().GetSize()); - m_aSymbolGraphic.SetPrefMapMode(MapUnit::Map100thMM); + m_aSymbolGraphic.SetPrefMapMode(MapMode(MapUnit::Map100thMM)); bPrevSym=true; bEnable=true; bIgnoreGraphic=true; @@ -1186,7 +1186,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) { m_aSymbolSize=OutputDevice::LogicToLogic( pGraphic->GetPrefSize(), pGraphic->GetPrefMapMode(), - MapUnit::Map100thMM ); + MapMode(MapUnit::Map100thMM)); } bPrevSym=true; } -- cgit