Resolves: rhbz#1913828 SfxViewFrame::Current() can return null

f41
Caolán McNamara 4 years ago
parent b6947acda5
commit ef0e60a87e

@ -0,0 +1,53 @@
From 308181f2bd6c512258c30b9487859767b2b40c0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 11 Jan 2021 10:22:06 +0000
Subject: [PATCH] rhbz#1913828 SfxViewFrame::Current() can return null
revert cui part of
commit 849b837d1a3b185a8dd893a8f6eaed53605bcab1
Date: Tue Jun 4 15:49:12 2019 -0800
tdf#83618 Make line spacing values agree
the reported problem seems still fixed after doing this
Change-Id: I4a3f938b4137e2c36ed450936e06ad1f02979976
---
cui/source/tabpages/paragrph.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
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() )
{
--
2.28.0

@ -50,7 +50,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice Name: libreoffice
Epoch: 1 Epoch: 1
Version: %{libo_version}.2 Version: %{libo_version}.2
Release: 2%{?libo_prerelease}%{?dist} Release: 3%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0 License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0
URL: http://www.libreoffice.org/ URL: http://www.libreoffice.org/
@ -253,6 +253,7 @@ Patch6: 0001-rhbz-1882616-move-cursor-one-step-at-a-time-in-the-d.patch
Patch7: 0001-export-HYPERLINK-target-in-html-clipboard-export.patch Patch7: 0001-export-HYPERLINK-target-in-html-clipboard-export.patch
Patch10: 0001-gcc11.patch Patch10: 0001-gcc11.patch
Patch11: 0001-disable-tests-that-don-t-work-without-pdfium.patch Patch11: 0001-disable-tests-that-don-t-work-without-pdfium.patch
Patch12: 0001-rhbz-1913828-SfxViewFrame-Current-can-return-null.patch
# Patches with numbers above 100 are applied conditionally # Patches with numbers above 100 are applied conditionally
Patch101: 0001-Upgrade-liborcus-to-0.16.0.patch Patch101: 0001-Upgrade-liborcus-to-0.16.0.patch
@ -2271,6 +2272,9 @@ done
%{_includedir}/LibreOfficeKit %{_includedir}/LibreOfficeKit
%changelog %changelog
* Mon Jan 11 2021 Caolán McNamara <caolanm@redhat.com> - 1:7.0.4.2-3
- Resolves: rhbz#1913828 SfxViewFrame::Current() can return null
* Sun Dec 20 2020 Caolán McNamara <caolanm@redhat.com> - 1:7.0.4.2-2 * Sun Dec 20 2020 Caolán McNamara <caolanm@redhat.com> - 1:7.0.4.2-2
- workaround for make check failure - workaround for make check failure

Loading…
Cancel
Save