summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-20 17:02:33 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-20 17:02:59 +0200
commit9a42c5939485732c031f6e6d30394b5414f6ad61 (patch)
treef3233b3067aeea834de6633d5262ae23cb9607dc /sc
parent9f01ba1b78edf6a08d36be39658327451120d613 (diff)
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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/dbgui/validate.cxx17
-rw-r--r--sc/source/ui/inc/validate.hxx19
2 files changed, 17 insertions, 19 deletions
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 6cfaafa88fbd..c4b9514ddc98 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 edda7dc26bad..12db0e7736c1 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: