[Libreoffice-commits] core.git: cui/source svx/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 12 12:06:54 UTC 2021


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

New commits:
commit ed6c5803cfe942932a1c7a6042808d68c2017559
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Mon Jan 11 13:34:05 2021 -0900
Commit:     Jim Raykowski <raykowj at gmail.com>
CommitDate: Tue Jan 12 13:06:16 2021 +0100

    tdf#83618 Make line spacing values agree crash fix
    
    The intent of this patch is to fix the crash reported at https://
    bugzilla.redhat.com/show_bug.cgi?id=1913828 by reverting changes made to
    cui/source/tabpages/paragraph.cxx in commit
    849b837d1a3b185a8dd893a8f6eaed53605bcab1 and changing the change made to
    svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx to use the
    already available pointer to the current SfxViewFrame instead of calling
    the SfxViewFrame::Current function again.
    
    Change-Id: I0c440c576c2afe4fb98ed54d51d91ea16a7f902a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109152
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 6ad843bdc9b3..eaa0daf23cfe 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -51,8 +51,6 @@
 #include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
 
-#include <sfx2/viewfrm.hxx>
-
 const sal_uInt16 SvxStdParagraphTabPage::pStdRanges[] =
 {
     SID_ATTR_PARA_LINESPACE,        // 10033
@@ -232,7 +230,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
            m_xLineDistAtMetricBox->get_value_changed_from_saved() ) )
     {
         nWhich = GetWhich( SID_ATTR_PARA_LINESPACE );
-        MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( nWhich );
+        MapUnit eUnit = pPool->GetMetric( nWhich );
         SvxLineSpacingItem aSpacing(
             static_cast<const SvxLineSpacingItem&>(GetItemSet().Get( nWhich )) );
 
@@ -722,7 +720,7 @@ void SvxStdParagraphTabPage::SetLineSpacing_Impl
     const SvxLineSpacingItem &rAttr
 )
 {
-    MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( rAttr.Which() );
+    MapUnit eUnit = GetItemSet().GetPool()->GetMetric( rAttr.Which() );
 
     switch( rAttr.GetLineSpaceRule() )
     {
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 3066d8f08e32..2efea182c0d4 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -115,7 +115,7 @@ void ParaLineSpacingControl::Initialize()
 
     if( eState >= SfxItemState::DEFAULT )
     {
-        MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( currSPItem->Which() );
+        MapUnit eUnit = pCurrent->GetPool().GetMetric(currSPItem->Which());
         meLNSpaceUnit = eUnit;
 
         switch( currSPItem->GetLineSpaceRule() )


More information about the Libreoffice-commits mailing list