[Libreoffice-commits] .: sc/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Wed Mar 21 08:21:11 PDT 2012
sc/source/ui/inc/formula.hxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 706ac4779de1870cf0d922f1cc3f6d4470392403
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Mar 21 16:14:45 2012 +0100
Make sure one base class does not use another one after destruction
The original code lead to invoking a pure virtual function in Calc when
doing Ctrl-F2, ESC.
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 07b86ff..f8969c5 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -56,9 +56,12 @@ class SvLBoxEntry;
typedef ScTabViewShell* PtrTabViewShell;
//============================================================================
-class ScFormulaDlg : public formula::FormulaDlg,
- public IAnyRefDialog,
- public formula::IFormulaEditorHelper
+// Order of base classes is important, as pointer to IFormulaEditorHelper base
+// is passed into constructor of FormulaDlg base, which expects the former to
+// outlive itself:
+class ScFormulaDlg : public formula::IFormulaEditorHelper,
+ public formula::FormulaDlg,
+ public IAnyRefDialog
{
ScFormulaReferenceHelper m_aHelper;
ScFormulaCell* pCell;
More information about the Libreoffice-commits
mailing list