Kaydet (Commit) 9a42c593 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 9f01ba1b
......@@ -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. */
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment