[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - cui/source svx/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 8 09:20:38 UTC 2019


 cui/source/tabpages/paragrph.cxx                        |    6 ++++--
 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx |    4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit fe3c08b5905a837cb63f57cefc8e43787c96b9c6
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Tue Jun 4 15:49:12 2019 -0800
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Oct 8 11:19:53 2019 +0200

    tdf#83618 Make line spacing values agree
    
    Change-Id: I372a673bbad442d28314498248b12ce7f86fce09
    Reviewed-on: https://gerrit.libreoffice.org/73737
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>
    (cherry picked from commit 849b837d1a3b185a8dd893a8f6eaed53605bcab1)
    Reviewed-on: https://gerrit.libreoffice.org/80314
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 9c9bca1963c8..67e1817b1c0e 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -54,6 +54,8 @@
 #include <sfx2/request.hxx>
 #include <svl/intitem.hxx>
 
+#include <sfx2/viewfrm.hxx>
+
 const sal_uInt16 SvxStdParagraphTabPage::pStdRanges[] =
 {
     SID_ATTR_PARA_LINESPACE,        // 10033
@@ -228,7 +230,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
            m_xLineDistAtMetricBox->get_value_changed_from_saved() ) )
     {
         nWhich = GetWhich( SID_ATTR_PARA_LINESPACE );
-        MapUnit eUnit = pPool->GetMetric( nWhich );
+        MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( nWhich );
         SvxLineSpacingItem aSpacing(
             static_cast<const SvxLineSpacingItem&>(GetItemSet().Get( nWhich )) );
 
@@ -719,7 +721,7 @@ void SvxStdParagraphTabPage::SetLineSpacing_Impl
     const SvxLineSpacingItem &rAttr
 )
 {
-    MapUnit eUnit = GetItemSet().GetPool()->GetMetric( rAttr.Which() );
+    MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( rAttr.Which() );
 
     switch( rAttr.GetLineSpaceRule() )
     {
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 7bd655740926..2f582d9d8335 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -30,6 +30,8 @@
 #include <vcl/button.hxx>
 #include <vcl/fixed.hxx>
 
+#include <svl/itempool.hxx>
+
 #define DEFAULT_LINE_SPACING  200
 #define FIX_DIST_DEF          283
 #define LINESPACE_1           100
@@ -125,7 +127,7 @@ void ParaLineSpacingControl::Initialize()
 
     if( eState >= SfxItemState::DEFAULT )
     {
-        MapUnit eUnit = MapUnit::Map100thMM;
+        MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( currSPItem->Which() );
         meLNSpaceUnit = eUnit;
 
         switch( currSPItem->GetLineSpaceRule() )


More information about the Libreoffice-commits mailing list