[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Wed Mar 21 19:33:33 PDT 2012


 sc/source/ui/inc/formula.hxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 3ca642e58251ffbb8fc30f85ae29cc75d97e4802
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.
    
    Signed-off-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 306aaa5..1a62e6d 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -62,9 +62,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