summaryrefslogtreecommitdiff
path: root/framework/source/jobs/jobexecutor.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-30 14:02:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-31 15:31:36 +0100
commit0ac9a10d312dc8f12a74720ce211823ce4addf7b (patch)
tree2c812432eca9315170af8b5b6b7ae5bcbf828d5b /framework/source/jobs/jobexecutor.cxx
parentd27c92961b78da138d3563ab596cca416af9eb38 (diff)
fdo#46808, Deprecate configuration::ConfigurationProvider old-style service
...in favor of existing new-style configuration::theDefaultProvider singleton. Theoretically, ConfigurationProvider instances can be created with specific Locale and EnableAsync arguments, but this is hardly used in practice, and thus effectively all uses of the ConfigurationProvider service use the theDefaultProvider instance, anyway. theDefaultProvider is restricted to the XMultiServiceFactory interface, while ConfigurationProvider also makes available XComponent. However, dispose must not be called manually on theDefaultProvider singleton anyway, and calls to add-/removeEventListener are so few (and in dubious code that should better be cleaned up) that requiring an explicit queryInterface does not really hurt there. This commit originated as a patch by Noel Grandin to "Adapt configuration::ConfigurationProvider UNO service to new style [by creating] a merged XConfigurationProvider interface for this service to implement." It was then modified by Stephan Bergmann by deprecating ConfigurationProvider instead of adding XConfigurationProvider and by replacing calls to ConfigurationProvider::create with calls to theDefaultProvider::get. Change-Id: I9c16700afe0faff1ef6f20338a66bd7a9af990bd
Diffstat (limited to 'framework/source/jobs/jobexecutor.cxx')
-rw-r--r--framework/source/jobs/jobexecutor.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx
index 5df32396eded..e3e6c58c800b 100644
--- a/framework/source/jobs/jobexecutor.cxx
+++ b/framework/source/jobs/jobexecutor.cxx
@@ -126,7 +126,7 @@ JobExecutor::JobExecutor( /*IN*/ const css::uno::Reference< css::lang::XMultiSer
, ::cppu::OWeakObject ( )
, m_xSMGR (xSMGR )
, m_xModuleManager ( )
- , m_aConfig (xSMGR, ::rtl::OUString::createFromAscii(JobData::EVENTCFG_ROOT) )
+ , m_aConfig (comphelper::getComponentContext(xSMGR), ::rtl::OUString::createFromAscii(JobData::EVENTCFG_ROOT) )
{
// Don't do any reference related code here! Do it inside special
// impl_ method() ... see DEFINE_INIT_SERVICE() macro for further informations.
@@ -166,7 +166,7 @@ void SAL_CALL JobExecutor::trigger( const ::rtl::OUString& sEvent ) throw(css::u
// get list of all enabled jobs
// The called static helper methods read it from the configuration and
// filter disabled jobs using it's time stamp values.
- css::uno::Sequence< ::rtl::OUString > lJobs = JobData::getEnabledJobsForEvent(m_xSMGR, sEvent);
+ css::uno::Sequence< ::rtl::OUString > lJobs = JobData::getEnabledJobsForEvent(comphelper::getComponentContext(m_xSMGR), sEvent);
aReadLock.unlock();
/* } SAFE */
@@ -178,7 +178,7 @@ void SAL_CALL JobExecutor::trigger( const ::rtl::OUString& sEvent ) throw(css::u
/* SAFE { */
aReadLock.lock();
- JobData aCfg(m_xSMGR);
+ JobData aCfg(comphelper::getComponentContext(m_xSMGR));
aCfg.setEvent(sEvent, lJobs[j]);
aCfg.setEnvironment(JobData::E_EXECUTION);
@@ -235,7 +235,7 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent
)
{
if (m_lEvents.find(EVENT_ON_DOCUMENT_OPENED) != m_lEvents.end())
- JobData::appendEnabledJobsForEvent(m_xSMGR, EVENT_ON_DOCUMENT_OPENED, lJobs);
+ JobData::appendEnabledJobsForEvent(comphelper::getComponentContext(m_xSMGR), EVENT_ON_DOCUMENT_OPENED, lJobs);
}
// Special feature: If the events "OnCreate" or "OnLoadFinished" occures - we generate our own event "onDocumentAdded".
@@ -245,12 +245,12 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent
)
{
if (m_lEvents.find(EVENT_ON_DOCUMENT_ADDED) != m_lEvents.end())
- JobData::appendEnabledJobsForEvent(m_xSMGR, EVENT_ON_DOCUMENT_ADDED, lJobs);
+ JobData::appendEnabledJobsForEvent(comphelper::getComponentContext(m_xSMGR), EVENT_ON_DOCUMENT_ADDED, lJobs);
}
// Add all jobs for "real" notified event too .-)
if (m_lEvents.find(aEvent.EventName) != m_lEvents.end())
- JobData::appendEnabledJobsForEvent(m_xSMGR, aEvent.EventName, lJobs);
+ JobData::appendEnabledJobsForEvent(comphelper::getComponentContext(m_xSMGR), aEvent.EventName, lJobs);
aReadLock.unlock();
/* } SAFE */
@@ -266,7 +266,7 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent
const JobData::TJob2DocEventBinding& rBinding = *pIt;
- JobData aCfg(m_xSMGR);
+ JobData aCfg(comphelper::getComponentContext(m_xSMGR));
aCfg.setEvent(rBinding.m_sDocEvent, rBinding.m_sJobName);
aCfg.setEnvironment(JobData::E_DOCUMENTEVENT);