diff options
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/presenter/PresenterFrameworkObserver.cxx | 17 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterFrameworkObserver.hxx | 7 |
2 files changed, 3 insertions, 21 deletions
diff --git a/sdext/source/presenter/PresenterFrameworkObserver.cxx b/sdext/source/presenter/PresenterFrameworkObserver.cxx index b153f385acf8..55e0bf891da9 100644 --- a/sdext/source/presenter/PresenterFrameworkObserver.cxx +++ b/sdext/source/presenter/PresenterFrameworkObserver.cxx @@ -29,11 +29,9 @@ namespace sdext { namespace presenter { PresenterFrameworkObserver::PresenterFrameworkObserver ( const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController, - const Predicate& rPredicate, const Action& rAction) : PresenterFrameworkObserverInterfaceBase(m_aMutex), mxConfigurationController(rxController), - maPredicate(rPredicate), maAction(rAction) { if ( ! mxConfigurationController.is()) @@ -48,7 +46,7 @@ PresenterFrameworkObserver::PresenterFrameworkObserver ( } else { - rAction(maPredicate()); + rAction(true); } } @@ -62,15 +60,9 @@ void PresenterFrameworkObserver::RunOnUpdateEnd ( { new PresenterFrameworkObserver( rxController, - &PresenterFrameworkObserver::True, rAction); } -bool PresenterFrameworkObserver::True() -{ - return true; -} - void SAL_CALL PresenterFrameworkObserver::disposing() { if (maAction) @@ -81,8 +73,6 @@ void SAL_CALL PresenterFrameworkObserver::disposing() void PresenterFrameworkObserver::Shutdown() { maAction = Action(); - maPredicate = Predicate(); - if (mxConfigurationController != nullptr) { mxConfigurationController->removeConfigurationChangeListener(this); @@ -109,14 +99,13 @@ void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange ( bool bDispose(false); Action aAction (maAction); - Predicate aPredicate (maPredicate); if (rEvent.Type == "ConfigurationUpdateEnd") { Shutdown(); - aAction(aPredicate()); + aAction(true); bDispose = true; } - else if (aPredicate()) + else { Shutdown(); aAction(true); diff --git a/sdext/source/presenter/PresenterFrameworkObserver.hxx b/sdext/source/presenter/PresenterFrameworkObserver.hxx index 33e8e4fff31d..c5614229adf3 100644 --- a/sdext/source/presenter/PresenterFrameworkObserver.hxx +++ b/sdext/source/presenter/PresenterFrameworkObserver.hxx @@ -41,7 +41,6 @@ class PresenterFrameworkObserver public PresenterFrameworkObserverInterfaceBase { public: - typedef ::std::function<bool ()> Predicate; typedef ::std::function<void (bool)> Action; PresenterFrameworkObserver(const PresenterFrameworkObserver&) = delete; @@ -58,7 +57,6 @@ public: private: css::uno::Reference<css::drawing::framework::XConfigurationController> mxConfigurationController; - Predicate maPredicate; Action maAction; /** Create a new PresenterFrameworkObserver object. @@ -70,15 +68,10 @@ private: */ PresenterFrameworkObserver ( const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController, - const Predicate& rPredicate, const Action& rAction); virtual ~PresenterFrameworkObserver() override; void Shutdown(); - - /** Predicate that always returns true. - */ - static bool True(); }; } } // end of namespace ::sdext::presenter |