summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJaume Pujantell <jaume.pujantell@collabora.com>2024-03-08 16:24:11 +0100
committerMiklos Vajna <vmiklos@collabora.com>2024-03-12 08:33:32 +0100
commit149080faa86e660d02c4b35a416b3a7169855897 (patch)
tree1d0697e0b52e9afe6274f807c0f6804a6b208949 /svx
parentcf234d0e546046cf481ed080bc5f6984a8aba36a (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/+/164620
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.cxx4
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx4
2 files changed, 2 insertions, 6 deletions
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index a5a341376838..6257c7cfbce8 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 45da8c792ed6..7e6109b87714 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
{