From 462883404f6dc1b381de43accabe022e851cc703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 5 Feb 2016 13:30:19 +0000 Subject: [PATCH] more build fixing --- ...e-virtual-ScValidationDlg-non-inline.patch | 58 +++++++++++++++++++ libreoffice.spec | 1 + 2 files changed, 59 insertions(+) create mode 100644 0001-Make-virtual-ScValidationDlg-non-inline.patch diff --git a/0001-Make-virtual-ScValidationDlg-non-inline.patch b/0001-Make-virtual-ScValidationDlg-non-inline.patch new file mode 100644 index 0000000..c9b944c --- /dev/null +++ b/0001-Make-virtual-ScValidationDlg-non-inline.patch @@ -0,0 +1,58 @@ +From a6a65ecdef3a577b537b5d9fccb9d41e585b9f14 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 19 Jan 2016 10:58:44 +0100 +Subject: [PATCH] Make virtual ~ScValidationDlg non-inline + +...otherwise, GCC 6 would aggressively inline ScValidationDlg destruction of the +VclPtr in ScValidityRefChildWin::ScValidityRefChildWin +(sc/source/ui/view/reffact.cxx, in sc library), checking whether the vtable +points at ~ScValidationDlg (instead of a derived class dtor) to directly inline +the ~ScValidationDlg code, which requires the ScValidateionDlg vtable (to store +it in the object's vtable during destruction), which requires the code of inline +virtual ScValidationDlg::dispose and ScValidationDlg::Close, which in turn need +the addresses of (non-inline) ScValidationDlg::RemoveRefDlg and +ScTPValidationValue::RemoveRefDlg, both defined in the scui library and not +exported from there. + +Change-Id: I7eb96f42deb5edd844d91e999aa5511679302c01 +(cherry picked from commit 8d1a24dae03690b576310e3539369916f31ac475) +Reviewed-on: https://gerrit.libreoffice.org/21637 +Reviewed-by: Eike Rathke +Tested-by: Eike Rathke +--- + sc/source/ui/dbgui/validate.cxx | 5 +++++ + sc/source/ui/inc/validate.hxx | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx +index 459c5d7..db73012 100644 +--- a/sc/source/ui/dbgui/validate.cxx ++++ b/sc/source/ui/dbgui/validate.cxx +@@ -96,6 +96,11 @@ ScValidationDlg::ScValidationDlg(vcl::Window* pParent, const SfxItemSet* pArgSet + get(m_pHBox, "refinputbox"); + } + ++ScValidationDlg::~ScValidationDlg() ++{ ++ disposeOnce(); ++} ++ + void ScTPValidationValue::SetReferenceHdl( const ScRange&rRange , ScDocument* pDoc ) + { + if ( rRange.aStart != rRange.aEnd ) +diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx +index d39b99b..1e785b7 100644 +--- a/sc/source/ui/inc/validate.hxx ++++ b/sc/source/ui/inc/validate.hxx +@@ -182,7 +182,7 @@ class ScValidationDlg + + public: + explicit ScValidationDlg( vcl::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = nullptr ); +- virtual ~ScValidationDlg() { disposeOnce(); } ++ virtual ~ScValidationDlg(); + virtual void dispose() override + { + if( m_bOwnRefHdlr ) +-- +2.5.0 + diff --git a/libreoffice.spec b/libreoffice.spec index 0b2b8e7..4d4f3ee 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -258,6 +258,7 @@ Patch20: 0001-Missing-include.patch Patch21: 0001-fix-gcc-build-error.patch Patch22: 0001-hack-out-optimization-to-build.patch Patch23: 0001-generate-better-unit-test-assert-message.patch +Patch24: 0001-Make-virtual-ScValidationDlg-non-inline.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice