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 /sw/source/ui/dbui | |
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 'sw/source/ui/dbui')
-rw-r--r-- | sw/source/ui/dbui/addresslistdialog.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/createaddresslistdialog.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/dbui/dbtablepreviewdialog.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmgreetingspage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmlayoutpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmoutputtypepage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/selectdbtabledialog.cxx | 2 |
8 files changed, 20 insertions, 20 deletions
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index aa6b09aa4304..3782b92bf1c1 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -195,7 +195,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) m_pTablePB->SetClickHdl(LINK( this, SwAddressListDialog, TableSelectHdl_Impl)); SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("sources"); - Size aSize = pHeaderTreeContainer->LogicToPixel(Size(182 , 102), MapUnit::MapAppFont); + Size aSize = pHeaderTreeContainer->LogicToPixel(Size(182 , 102), MapMode(MapUnit::MapAppFont)); pHeaderTreeContainer->set_width_request(aSize.Width()); pHeaderTreeContainer->set_height_request(aSize.Height()); m_pListLB = VclPtr<SwAddrSourceLB>::Create(*pHeaderTreeContainer); diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index 9960f0d978b2..199b093a4f8b 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -152,8 +152,8 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData) std::vector< OUString >::iterator aHeaderIter; - long nFTXPos = m_pWindow->LogicToPixel(Point(RSC_SP_CTRL_X, RSC_SP_CTRL_X), MapUnit::MapAppFont).X(); - long nFTHeight = m_pWindow->LogicToPixel(Size(RSC_BS_CHARHEIGHT, RSC_BS_CHARHEIGHT), MapUnit::MapAppFont).Height(); + long nFTXPos = m_pWindow->LogicToPixel(Point(RSC_SP_CTRL_X, RSC_SP_CTRL_X), MapMode(MapUnit::MapAppFont)).X(); + long nFTHeight = m_pWindow->LogicToPixel(Size(RSC_BS_CHARHEIGHT, RSC_BS_CHARHEIGHT), MapMode(MapUnit::MapAppFont)).Height(); long nFTWidth = 0; //determine the width of the FixedTexts @@ -168,12 +168,12 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData) //add some pixels nFTWidth += 2; long nEDXPos = nFTWidth + nFTXPos + - m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_X, RSC_SP_CTRL_DESC_X), MapUnit::MapAppFont).Width(); - long nEDHeight = m_pWindow->LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MapUnit::MapAppFont).Height(); + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_X, RSC_SP_CTRL_DESC_X), MapMode(MapUnit::MapAppFont)).Width(); + long nEDHeight = m_pWindow->LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MapMode(MapUnit::MapAppFont)).Height(); long nEDWidth = m_aWinOutputSize.Width() - nEDXPos - nFTXPos; - m_nLineHeight = nEDHeight + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapUnit::MapAppFont).Height(); + m_nLineHeight = nEDHeight + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapMode(MapUnit::MapAppFont)).Height(); - long nEDYPos = m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_Y, RSC_SP_CTRL_DESC_Y), MapUnit::MapAppFont).Height(); + long nEDYPos = m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_DESC_Y, RSC_SP_CTRL_DESC_Y), MapMode(MapUnit::MapAppFont)).Height(); long nFTYPos = nEDYPos + nEDHeight - nFTHeight; Link<Control&,void> aFocusLink = LINK(this, SwAddressControl_Impl, GotFocusHdl_Impl); @@ -210,7 +210,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData) { //the m_aWindow has to be at least as high as the ScrollBar and it must include the last Edit sal_Int32 nContentHeight = pLastEdit->GetPosPixel().Y() + nEDHeight + - m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapUnit::MapAppFont).Height(); + m_pWindow->LogicToPixel(Size(RSC_SP_CTRL_GROUP_Y, RSC_SP_CTRL_GROUP_Y), MapMode(MapUnit::MapAppFont)).Height(); if(nContentHeight < m_pScrollBar->GetSizePixel().Height()) { nContentHeight = m_pScrollBar->GetSizePixel().Height(); @@ -362,7 +362,7 @@ bool SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt ) Size SwAddressControl_Impl::GetOptimalSize() const { - return LogicToPixel(Size(250, 160), MapUnit::MapAppFont); + return LogicToPixel(Size(250, 160), MapMode(MapUnit::MapAppFont)); } void SwAddressControl_Impl::Resize() diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx index 347515038357..9676508fa7c6 100644 --- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx +++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx @@ -37,7 +37,7 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(vcl::Window* pParent, uno::Sequen { get(m_pDescriptionFI, "description"); get(m_pBeamerWIN, "beamer"); - Size aSize(LogicToPixel(Size(338, 150), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(338, 150), MapMode(MapUnit::MapAppFont))); m_pBeamerWIN->set_width_request(aSize.Width()); m_pBeamerWIN->set_height_request(aSize.Height()); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index df119fba54fc..e166f4d7d3e7 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -67,14 +67,14 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage( SwMailMergeWizard* _pP get(m_pSettingsFI, "settingsft"); get(m_pAddressCB, "address"); get(m_pSettingsWIN, "settingspreview"); - Size aSize(LogicToPixel(Size(164 , 45), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(164 , 45), MapMode(MapUnit::MapAppFont))); m_pSettingsWIN->set_width_request(aSize.Width()); m_pSettingsWIN->set_height_request(aSize.Height()); get(m_pSettingsPB, "settings"); get(m_pHideEmptyParagraphsCB, "hideempty"); get(m_pAssignPB, "assign"); get(m_pPreviewWIN, "addresspreview"); - aSize = LogicToPixel(Size(176, 46), MapUnit::MapAppFont); + aSize = LogicToPixel(Size(176, 46), MapMode(MapUnit::MapAppFont)); m_pPreviewWIN->set_width_request(aSize.Width()); m_pPreviewWIN->set_height_request(aSize.Height()); get(m_pDocumentIndexFI, "documentindex"); @@ -324,7 +324,7 @@ SwSelectAddressBlockDialog::SwSelectAddressBlockDialog( , m_rConfig(rConfig) { get(m_pPreview, "preview"); - Size aSize(m_pPreview->LogicToPixel(Size(192, 100), MapUnit::MapAppFont)); + Size aSize(m_pPreview->LogicToPixel(Size(192, 100), MapMode(MapUnit::MapAppFont))); m_pPreview->set_width_request(aSize.Width()); m_pPreview->set_height_request(aSize.Height()); get(m_pNewPB, "new"); @@ -868,7 +868,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(vcl::Window* pParent, WinBits nBits Size SwAssignFieldsControl::GetOptimalSize() const { - return LogicToPixel(Size(248 , 120), MapUnit::MapAppFont); + return LogicToPixel(Size(248, 120), MapMode(MapUnit::MapAppFont)); } void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem) @@ -1173,7 +1173,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog( get(m_pPreviewFI, "PREVIEW_LABEL"); get(m_pOK, "ok"); get(m_pPreviewWIN, "PREVIEW"); - Size aSize(LogicToPixel(Size(248 , 45), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(248, 45), MapMode(MapUnit::MapAppFont))); m_pPreviewWIN->set_width_request(aSize.Width()); m_pPreviewWIN->set_height_request(aSize.Height()); get(m_pFieldsControl, "FIELDS"); @@ -1328,7 +1328,7 @@ void AddressMultiLineEdit::dispose() Size AddressMultiLineEdit::GetOptimalSize() const { - return LogicToPixel(Size(160, 60), MapUnit::MapAppFont); + return LogicToPixel(Size(160, 60), MapMode(MapUnit::MapAppFont)); } diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index f5cbf1cea436..24bd60320a62 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -429,7 +429,7 @@ SwMailBodyDialog::SwMailBodyDialog(vcl::Window* pParent) : get(m_pBodyFT, "bodyft"); get(m_pBodyMLE, "bodymle"); m_pBodyMLE->SetStyle(m_pBodyMLE->GetStyle() | WB_HSCROLL | WB_VSCROLL | WB_IGNORETAB); - Size aSize(LogicToPixel(Size(180, 50), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(180, 50), MapMode(MapUnit::MapAppFont))); m_pBodyMLE->set_width_request(aSize.Width()); m_pBodyMLE->set_height_request(aSize.Height()); get(m_pOK, "ok"); diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index cf3e34411655..c37570d6d038 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -91,7 +91,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : get(m_pUpPB, "up"); get(m_pDownPB, "down"); get(m_pExampleContainerWIN, "example"); - Size aSize(LogicToPixel(Size(124, 159), MapUnit::MapAppFont)); + Size aSize(LogicToPixel(Size(124, 159), MapMode(MapUnit::MapAppFont))); m_pExampleContainerWIN->set_width_request(aSize.Width()); m_pExampleContainerWIN->set_height_request(aSize.Height()); get(m_pZoomLB, "zoom"); diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index 7697ea523cb4..0dd9bedcc917 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -263,7 +263,7 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem& m_nSendCount(0), m_nErrorCount(0) { - Size aSize = m_pContainer->LogicToPixel(Size(226, 80), MapUnit::MapAppFont); + Size aSize = m_pContainer->LogicToPixel(Size(226, 80), MapMode(MapUnit::MapAppFont)); m_pContainer->set_width_request(aSize.Width()); m_pContainer->set_height_request(aSize.Height()); m_pStatus = VclPtr<SvSimpleTable>::Create(*m_pContainer); diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 235411a90ed9..e1b5909817ea 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -102,7 +102,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent, get(m_pPreviewPB, "preview"); SvSimpleTableContainer *pHeaderTreeContainer = get<SvSimpleTableContainer>("table"); - Size aSize = pHeaderTreeContainer->LogicToPixel(Size(238 , 50), MapUnit::MapAppFont); + Size aSize = pHeaderTreeContainer->LogicToPixel(Size(238 , 50), MapMode(MapUnit::MapAppFont)); pHeaderTreeContainer->set_width_request(aSize.Width()); pHeaderTreeContainer->set_height_request(aSize.Height()); m_pTable = VclPtr<SwAddressTable>::Create(*pHeaderTreeContainer); |