diff options
author | Jaume Pujantell <jaume.pujantell@collabora.com> | 2024-03-08 16:24:11 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-03-11 09:17:21 +0100 |
commit | 3ca938a25439d6f23bbd6830a96e5180ff94f757 (patch) | |
tree | 8cadc47db3cece79d8f8c7fea16676fe90f1e552 /svx | |
parent | b44a1fdd7e0f5f7be02665407ebbc15b977d2f7b (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>
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 18abfa1160e3..4b786a421ad3 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -921,9 +921,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 { |