summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-09-15 09:17:14 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-09-15 09:30:05 +0200
commit538635e089cac31ddf433f650e86de5e2b7f03cc (patch)
tree1f0e246954203f0d480e5ec61c049feec0ec76f1 /svtools
parentc3c4ae5fdac0341f01eeed8d5c633d203eed8b2a (diff)
Make OGenericUnoDialog::destoryDialog non-virtual
...it is only ever called: * either from dtors, where the virtual-ness doesn't acutally help (and would trigger loplugin:fragiledestructor if that were enabled) * or, in module filter, from executeDialog members of (final) classes directly derived from OGenericUnODialog without overriding destroyDialog Change-Id: If9a7370385a27952189423e5632b3f01e18ddbb5
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx45
1 files changed, 18 insertions, 27 deletions
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index eaa4ad6faf51..492bbb9c0d27 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -133,7 +133,6 @@ namespace {
protected:
virtual VclPtr<Dialog> createDialog( vcl::Window* _pParent ) override;
- virtual void destroyDialog() override;
private:
css::uno::Sequence< css::uno::Sequence< sal_Int16 > > m_aWizardSteps;
@@ -146,16 +145,32 @@ namespace {
{
}
+ namespace {
+
+ OUString lcl_getHelpURL( const OString& sHelpId )
+ {
+ OUStringBuffer aBuffer;
+ OUString aTmp(
+ OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) );
+ INetURLObject aHID( aTmp );
+ if ( aHID.GetProtocol() == INetProtocol::NotValid )
+ aBuffer.append( INET_HID_SCHEME );
+ aBuffer.append( aTmp.getStr() );
+ return aBuffer.makeStringAndClear();
+ }
+
+ }
Wizard::~Wizard()
{
- // we do this here cause the base class' call to destroyDialog won't reach us anymore: we're within an dtor,
- // so this virtual-method-call the base class does not work, we're already dead then...
if ( m_pDialog )
{
::osl::MutexGuard aGuard( m_aMutex );
if ( m_pDialog )
+ {
+ m_sHelpURL = lcl_getHelpURL( m_pDialog->GetHelpId() );
destroyDialog();
+ }
}
}
@@ -250,20 +265,6 @@ namespace {
return OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 );
}
-
- OUString lcl_getHelpURL( const OString& sHelpId )
- {
- OUStringBuffer aBuffer;
- OUString aTmp(
- OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) );
- INetURLObject aHID( aTmp );
- if ( aHID.GetProtocol() == INetProtocol::NotValid )
- aBuffer.append( INET_HID_SCHEME );
- aBuffer.append( aTmp.getStr() );
- return aBuffer.makeStringAndClear();
- }
-
-
VclPtr<Dialog> Wizard::createDialog( vcl::Window* i_pParent )
{
VclPtrInstance<WizardShell> pDialog( i_pParent, m_xController, m_aWizardSteps );
@@ -272,16 +273,6 @@ namespace {
return pDialog.get();
}
-
- void Wizard::destroyDialog()
- {
- if ( m_pDialog )
- m_sHelpURL = lcl_getHelpURL( m_pDialog->GetHelpId() );
-
- Wizard_Base::destroyDialog();
- }
-
-
OUString SAL_CALL Wizard::getImplementationName() throw(RuntimeException, std::exception)
{
return OUString("com.sun.star.comp.svtools.uno.Wizard");