From a00449bebdcfc491539867862da41133312fcd88 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 23 Sep 2019 12:10:27 +0100 Subject: replace LogicToPixel uses in SfxTabPages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic2ea87bd5bcb8ccee58818b638e70a561fc8f95b Reviewed-on: https://gerrit.libreoffice.org/79410 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/ui/fldui/flddb.cxx | 2 +- sw/source/ui/fldui/flddinf.cxx | 2 +- sw/source/ui/fldui/flddok.cxx | 2 +- sw/source/ui/fldui/fldfunc.cxx | 2 +- sw/source/ui/fldui/fldpage.hxx | 2 +- sw/source/ui/fldui/fldref.cxx | 2 +- sw/source/ui/fldui/fldvar.cxx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index b8a1cff07158..37fc878eddc8 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -55,7 +55,7 @@ SwFieldDBPage::SwFieldDBPage(TabPageParent pParent, const SfxItemSet *const pCor m_xTypeLB->make_sorted(); m_xFormatLB->make_sorted(); - auto nWidth = LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width(); + auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; auto nHeight = m_xTypeLB->get_height_rows(14); m_xTypeLB->set_size_request(nWidth, nHeight); m_xDatabaseTLB->set_size_request(nWidth*2, nHeight); diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 1e4a70f9c5cb..bcdbbbfec664 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -65,7 +65,7 @@ SwFieldDokInfPage::SwFieldDokInfPage(TabPageParent pParent, const SfxItemSet *co m_xTypeTLB->make_sorted(); FillFieldSelect(*m_xSelectionLB); - auto nWidth = LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width(); + auto nWidth = m_xTypeTLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; auto nHeight = m_xTypeTLB->get_height_rows(20); m_xTypeTLB->set_size_request(nWidth, nHeight); m_xFormatLB->get_widget().set_size_request(nWidth, nHeight); diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 1744b6d19f67..6d6b9ff7e98c 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -55,7 +55,7 @@ SwFieldDokPage::SwFieldDokPage(TabPageParent pParent, const SfxItemSet *const pC m_xTypeLB->make_sorted(); m_xFormatLB->make_sorted(); - auto nWidth = LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width(); + auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; auto nHeight = m_xTypeLB->get_height_rows(20); m_xTypeLB->set_size_request(nWidth, nHeight); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 2517ba7e684a..01612125b427 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -73,7 +73,7 @@ SwFieldFuncPage::SwFieldFuncPage(TabPageParent pParent, const SfxItemSet *const m_xListItemsLB->set_size_request(m_xListItemED->get_preferred_size().Width(), m_xListItemsLB->get_height_rows(5)); - auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH / 8; + auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; auto nHeight = m_xTypeLB->get_height_rows(20); m_xTypeLB->set_size_request(nWidth, nHeight); m_xFormatLB->set_size_request(nWidth, nHeight); diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx index 4cb0115f3d35..5fd94297244a 100644 --- a/sw/source/ui/fldui/fldpage.hxx +++ b/sw/source/ui/fldui/fldpage.hxx @@ -22,7 +22,7 @@ #include #include -#define FIELD_COLUMN_WIDTH 76 +#define FIELD_COLUMN_WIDTH 19 const int coLBCount = 3; diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index ca2ed6d5cb1e..dc5d36977044 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -84,7 +84,7 @@ SwFieldRefPage::SwFieldRefPage(TabPageParent pParent, const SfxItemSet *const pC sNumItemText = m_xTypeLB->get_text(4); auto nHeight = m_xTypeLB->get_height_rows(8); - auto nWidth = LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width(); + auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; m_xTypeLB->set_size_request(nWidth, nHeight); m_xFormatLB->set_size_request(nWidth, nHeight); m_xSelection->set_size_request(nWidth * 2, nHeight); diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index c22517e3cf4d..e2431cff384c 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -65,7 +65,7 @@ SwFieldVarPage::SwFieldVarPage(TabPageParent pParent, const SfxItemSet *const pC m_xSelectionLB->make_sorted(); FillFieldSelect(*m_xFormatLB); - auto nWidth = LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).Width(); + auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; auto nHeight = m_xTypeLB->get_height_rows(20); m_xTypeLB->set_size_request(nWidth, nHeight); m_xSelectionLB->set_size_request(nWidth, nHeight); -- cgit