Kaydet (Commit) 8e9ee47d authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS presenterscreen (1.3.10); FILE MERGED

2008/04/23 11:54:34 af 1.3.10.2: #i18486# Added Shutdown() method.
2008/04/22 08:32:24 af 1.3.10.1: #i18486# Added RunOnUpdateEnd() method.
üst 4042eed1
......@@ -8,7 +8,7 @@
*
* $RCSfile: PresenterFrameworkObserver.cxx,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
......@@ -58,10 +58,13 @@ PresenterFrameworkObserver::PresenterFrameworkObserver (
if (mxConfigurationController->hasPendingRequests())
{
mxConfigurationController->addConfigurationChangeListener(
this,
rsEventName,
Any());
if (rsEventName.getLength() > 0)
{
mxConfigurationController->addConfigurationChangeListener(
this,
rsEventName,
Any());
}
mxConfigurationController->addConfigurationChangeListener(
this,
A2S("ConfigurationUpdateEnd"),
......@@ -98,6 +101,20 @@ void PresenterFrameworkObserver::RunOnResourceActivation (
void PresenterFrameworkObserver::RunOnUpdateEnd (
const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController,
const Action& rAction)
{
new PresenterFrameworkObserver(
rxController,
OUString(),
&PresenterFrameworkObserver::True,
rAction);
}
bool PresenterFrameworkObserver::HasResource (
const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId)
......@@ -108,10 +125,34 @@ bool PresenterFrameworkObserver::HasResource (
bool PresenterFrameworkObserver::True (void)
{
return true;
}
bool PresenterFrameworkObserver::False (void)
{
return false;
}
void SAL_CALL PresenterFrameworkObserver::disposing (void)
{
if ( ! maAction.empty())
maAction(false);
Shutdown();
}
void PresenterFrameworkObserver::Shutdown (void)
{
maAction = Action();
maPredicate = Predicate();
......@@ -148,14 +189,18 @@ void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange (
{
bool bDispose(false);
Action aAction (maAction);
Predicate aPredicate (maPredicate);
if (rEvent.Type.equals(A2S("ConfigurationUpdateEnd")))
{
maAction(maPredicate);
Shutdown();
aAction(aPredicate);
bDispose = true;
}
else if (maPredicate())
else if (aPredicate())
{
maAction(true);
Shutdown();
aAction(true);
bDispose = true;
}
......
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