summaryrefslogtreecommitdiff
path: root/sd/source/ui/app/sdmod1.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-02-24 14:22:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-02-24 14:23:28 +0100
commit6a23af75c01afabadd82dded59602d52f5a0ef21 (patch)
tree1339e353be2aaebcfbc48a1da01c6734fc94d184 /sd/source/ui/app/sdmod1.cxx
parentc98f569d035861b6b8c74b469512fa2ae7c9576f (diff)
Ensure listener is removed during ~SdModule
Change-Id: I17fb441eac2593a0b43809f177250d46d6862a58
Diffstat (limited to 'sd/source/ui/app/sdmod1.cxx')
-rw-r--r--sd/source/ui/app/sdmod1.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index cba122f4c784..dad7b14889c4 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -315,8 +315,6 @@ bool SdModule::OutlineToImpress(SfxRequest& rRequest)
return rRequest.IsDone();
}
-static bool bOnce = false;
-
void SdModule::GetState(SfxItemSet& rItemSet)
{
// disable Autopilot during presentation
@@ -403,7 +401,7 @@ void SdModule::GetState(SfxItemSet& rItemSet)
rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE_CTL ), SID_ATTR_CHAR_CTL_LANGUAGE ) );
}
- if ( !bOnce )
+ if ( !mbEventListenerAdded )
{
::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current());
if( pDocShell ) // Impress or Draw ?
@@ -414,7 +412,7 @@ void SdModule::GetState(SfxItemSet& rItemSet)
{
// add our event listener as soon as possible
Application::AddEventListener( LINK( this, SdModule, EventListenerHdl ) );
- bOnce = true;
+ mbEventListenerAdded = true;
}
}
}