diff --git a/0001-AppendInfoBar-can-return-null.patch b/0001-AppendInfoBar-can-return-null.patch new file mode 100644 index 0000000..ccda25e --- /dev/null +++ b/0001-AppendInfoBar-can-return-null.patch @@ -0,0 +1,54 @@ +From 22005041f829d85e675ea27bdee1770af58a1ea0 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Mon, 3 Jun 2019 16:21:24 +0200 +Subject: [PATCH] AppendInfoBar can return null + +e.g., when opening the old help window ("Help - LibreOffice Help" in a build +configured with --with-help to "build the old local help" (configure.ac)) + +Change-Id: Icecd224774b98811ddf9545c5fa83a85fab259fc +Reviewed-on: https://gerrit.libreoffice.org/73390 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + sfx2/source/view/viewfrm.cxx | 24 ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) + +diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx +index 5620f4396e8f..ed8ffa200ef6 100644 +--- a/sfx2/source/view/viewfrm.cxx ++++ b/sfx2/source/view/viewfrm.cxx +@@ -1239,16 +1239,20 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) + if ((iCurrent > iLast) && !Application::IsHeadlessModeEnabled() && !bIsUITest) + { + VclPtr pInfoBar = AppendInfoBar("whatsnew", SfxResId(STR_WHATSNEW_TEXT), InfoBarType::Info); +- VclPtrInstance xWhatsNewButton(&GetWindow()); +- xWhatsNewButton->SetText(SfxResId(STR_WHATSNEW_BUTTON)); +- xWhatsNewButton->SetSizePixel(xWhatsNewButton->GetOptimalSize()); +- xWhatsNewButton->SetClickHdl(LINK(this, SfxViewFrame, WhatsNewHandler)); +- pInfoBar->addButton(xWhatsNewButton); +- +- //update lastversion +- std::shared_ptr batch(comphelper::ConfigurationChanges::create()); +- officecfg::Setup::Product::ooSetupLastVersion::set(sSetupVersion, batch); +- batch->commit(); ++ if (pInfoBar) ++ { ++ VclPtrInstance xWhatsNewButton(&GetWindow()); ++ xWhatsNewButton->SetText(SfxResId(STR_WHATSNEW_BUTTON)); ++ xWhatsNewButton->SetSizePixel(xWhatsNewButton->GetOptimalSize()); ++ xWhatsNewButton->SetClickHdl(LINK(this, SfxViewFrame, WhatsNewHandler)); ++ pInfoBar->addButton(xWhatsNewButton); ++ ++ //update lastversion ++ std::shared_ptr batch(comphelper::ConfigurationChanges::create()); ++ officecfg::Setup::Product::ooSetupLastVersion::set( ++ sSetupVersion, batch); ++ batch->commit(); ++ } + } + } + +-- +2.25.1 + diff --git a/libreoffice.spec b/libreoffice.spec index f8861db..c60061f 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -54,7 +54,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 3%{?libo_prerelease}%{?dist} +Release: 4%{?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 URL: http://www.libreoffice.org/ @@ -245,6 +245,7 @@ Patch3: 0001-Adapt-SAL_WARN-to-C-20-deleted-ostream-for-sal_Unico.patch Patch4: 0001-opengl-slide-transitions-not-working-with-glm-GLM-0..patch Patch5: 0001-rhbz-1810732-crash-assert-inserting-document-with-in.patch Patch6: 0001-selecting-multiple-slides-and-using-print.-doesn-t-s.patch +Patch7: 0001-AppendInfoBar-can-return-null.patch %if 0%{?rhel} # not upstreamed @@ -2148,6 +2149,10 @@ done %{_includedir}/LibreOfficeKit %changelog +* Wed Apr 01 2020 Caolán McNamara - 1:6.3.5.2-4 +- AppendInfoBar can return null, crash on visiting help before any + toplevel module has run once + * Fri Mar 27 2020 Caolán McNamara - 1:6.3.5.2-3 - selecting multiple slides and using print dlg doesn't fill in range