diff options
author | Jaume Pujantell <jaume.pujantell@collabora.com> | 2024-03-08 16:24:11 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-03-12 08:34:39 +0100 |
commit | e2708fecb34fb4084f8db5f2c5ffb4d8923002ca (patch) | |
tree | 6318a70d7187c0282d55ded6690fba931ee67d67 /svx | |
parent | d9e0d89114193226d3ef9c148fdc81141bdee840 (diff) |
lok: use locale units in dialogs and sidebar
When oepning tha same doucment with different locales, the dailogs and
sidebar show units (cm/inch) of the first locale (or the locale used in
preloading, en-US) for all the views.
This patch changes the units used according to the LOK locale.
Change-Id: I3d515873bde661f2d9048bbc405843e83134cca7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164589
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 3ca938a25439d6f23bbd6830a96e5180ff94f757)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164619
Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 20e05096d6c4..8e88bdc2c656 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -374,9 +374,7 @@ FieldUnit ParaPropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPoolI SfxModule* pModule = pSh->GetModule(); if ( pModule ) { - const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC ); - if ( pItem ) - eUnit = static_cast<FieldUnit>(static_cast<const SfxUInt16Item*>(pItem)->GetValue()); + eUnit = pModule->GetFieldUnit(); } else { diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index a902804dc9a0..5d0fa038d478 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -942,9 +942,7 @@ FieldUnit PosSizePropertyPanel::GetCurrentUnit( SfxItemState eState, const SfxPo SfxModule* pModule = pSh->GetModule(); if ( pModule ) { - const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC ); - if ( pItem ) - eUnit = static_cast<FieldUnit>(static_cast<const SfxUInt16Item*>(pItem)->GetValue()); + eUnit = pModule->GetFieldUnit(); } else { |