[Libreoffice-commits] core.git: sc/source

Stephan Bergmann sbergman at redhat.com
Wed Aug 20 08:04:53 PDT 2014


 sc/source/ui/dbgui/validate.cxx |   17 -----------------
 sc/source/ui/inc/validate.hxx   |   19 +++++++++++++++++--
 2 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit 9a42c5939485732c031f6e6d30394b5414f6ad61
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Aug 20 17:02:33 2014 +0200

    Bad hack to enforce weakly emitted RTTI for ScValidationDlg
    
    ...(by inlining all its virtual functions), as otherwise -fsanitize=undefined
    makes sc require ScValidationDlg RTTI (to verify the cast to ScValidationDlg in
    the ScValidityRefChildWin ctor in sc/source/ui/view/reffact.cxx) but which would
    only be emitted in scui (against which sc cannot link).
    
    Change-Id: Id9e2bf0719ba3bba35e5ae1f0e58190d9fdb6dd4

diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 6cfaafa..c4b9514 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -156,23 +156,6 @@ void ScTPValidationValue::RefInputDonePostHdl()
 
 }
 
-bool ScValidationDlg::Close()
-{
-    if( m_bOwnRefHdlr )
-    {
-        if (SfxTabPage* pPage = GetTabPage(m_nValuePageId))
-            static_cast<ScTPValidationValue*>(pPage)->RemoveRefDlg();
-    }
-
-    return ScValidationDlgBase::Close();
-}
-
-ScValidationDlg::~ScValidationDlg()
-{
-    if( m_bOwnRefHdlr )
-        RemoveRefDlg( false );
-}
-
 namespace {
 
 /** Converts the passed ScValidationMode to the position in the list box. */
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index edda7dc..12db0e7 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -97,7 +97,11 @@ class ScValidationDlg
 
 public:
     explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = NULL );
-    virtual                     ~ScValidationDlg();
+    virtual                     ~ScValidationDlg()
+    {
+        if( m_bOwnRefHdlr )
+            RemoveRefDlg( false );
+    }
     static ScValidationDlg * Find1AliveObject( Window *pAncestor )
     {
         return static_cast<ScValidationDlg *>( SC_MOD()->Find1RefWindow( SLOTID, pAncestor ) );
@@ -169,7 +173,7 @@ public:
 
     enum { SLOTID = SID_VALIDITY_REFERENCE };
 
-    bool Close() SAL_OVERRIDE;
+    inline bool Close() SAL_OVERRIDE;
 };
 
 /** The tab page "Criteria" from the Validation dialog. */
@@ -257,6 +261,17 @@ public:
     void            RemoveRefDlg();
 };
 
+bool ScValidationDlg::Close()
+{
+    if( m_bOwnRefHdlr )
+    {
+        if (SfxTabPage* pPage = GetTabPage(m_nValuePageId))
+            static_cast<ScTPValidationValue*>(pPage)->RemoveRefDlg();
+    }
+
+    return ScValidationDlgBase::Close();
+}
+
 class ScTPValidationHelp : public SfxTabPage
 {
 private:


More information about the Libreoffice-commits mailing list