summaryrefslogtreecommitdiff
path: root/extensions/source/update
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/update')
-rw-r--r--extensions/source/update/check/makefile.mk2
-rw-r--r--extensions/source/update/check/updatecheckjob.cxx62
-rw-r--r--extensions/source/update/exports.map10
-rw-r--r--extensions/source/update/feed/makefile.mk2
-rw-r--r--extensions/source/update/ui/makefile.mk2
5 files changed, 26 insertions, 52 deletions
diff --git a/extensions/source/update/check/makefile.mk b/extensions/source/update/check/makefile.mk
index b87eb0377803..9f5f544102dd 100644
--- a/extensions/source/update/check/makefile.mk
+++ b/extensions/source/update/check/makefile.mk
@@ -82,7 +82,7 @@ SHL1STDLIBS= \
$(SHELL32LIB) \
$(OLE32LIB)
-SHL1VERSIONMAP=..$/exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index 3be38dd9888a..2444637515d4 100644
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -28,6 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_extensions.hxx"
+#include <memory>
+
#include "updatecheck.hxx"
#include "updatecheckconfig.hxx"
#include "updatehdl.hxx"
@@ -55,16 +57,12 @@ class InitUpdateCheckJobThread : public osl::Thread
{
public:
InitUpdateCheckJobThread( const uno::Reference< uno::XComponentContext > &xContext,
- const uno::Sequence< beans::NamedValue > &xParameters );
+ const uno::Sequence< beans::NamedValue > &xParameters,
+ bool bShowDialog );
virtual void SAL_CALL run();
- virtual void SAL_CALL onTerminated();
-
- void showDialog();
- void setTerminating() { m_bTerminating = true; }
-protected:
- ~InitUpdateCheckJobThread();
+ void setTerminating();
private:
osl::Condition m_aCondition;
@@ -115,7 +113,7 @@ public:
private:
uno::Reference<uno::XComponentContext> m_xContext;
uno::Reference< frame::XDesktop > m_xDesktop;
- InitUpdateCheckJobThread *m_pInitThread;
+ std::auto_ptr< InitUpdateCheckJobThread > m_pInitThread;
void handleExtensionUpdates( const uno::Sequence< beans::NamedValue > &rListProp );
};
@@ -125,29 +123,25 @@ private:
//------------------------------------------------------------------------------
InitUpdateCheckJobThread::InitUpdateCheckJobThread(
const uno::Reference< uno::XComponentContext > &xContext,
- const uno::Sequence< beans::NamedValue > &xParameters ) :
+ const uno::Sequence< beans::NamedValue > &xParameters,
+ bool bShowDialog ) :
m_xContext( xContext ),
m_xParameters( xParameters ),
- m_bShowDialog( false ),
+ m_bShowDialog( bShowDialog ),
m_bTerminating( false )
{
create();
}
//------------------------------------------------------------------------------
-InitUpdateCheckJobThread::~InitUpdateCheckJobThread()
-{
-}
-
-//------------------------------------------------------------------------------
void SAL_CALL InitUpdateCheckJobThread::run()
{
- TimeValue tv = { 25, 0 };
-
- m_aCondition.wait( &tv );
-
- if ( m_bTerminating )
- return;
+ if (!m_bShowDialog) {
+ TimeValue tv = { 25, 0 };
+ m_aCondition.wait( &tv );
+ if ( m_bTerminating )
+ return;
+ }
rtl::Reference< UpdateCheck > aController( UpdateCheck::get() );
aController->initialize( m_xParameters, m_xContext );
@@ -156,16 +150,8 @@ void SAL_CALL InitUpdateCheckJobThread::run()
aController->showDialog( true );
}
-//------------------------------------------------------------------------------
-void SAL_CALL InitUpdateCheckJobThread::onTerminated()
-{
- delete this;
-}
-
-//------------------------------------------------------------------------------
-void InitUpdateCheckJobThread::showDialog()
-{
- m_bShowDialog = true;
+void InitUpdateCheckJobThread::setTerminating() {
+ m_bTerminating = true;
m_aCondition.set();
}
@@ -174,8 +160,7 @@ void InitUpdateCheckJobThread::showDialog()
//------------------------------------------------------------------------------
UpdateCheckJob::UpdateCheckJob( const uno::Reference<uno::XComponentContext>& xContext ) :
- m_xContext(xContext),
- m_pInitThread( NULL )
+ m_xContext(xContext)
{
m_xDesktop.set( xContext->getServiceManager()->createInstanceWithContext( UNISTRING("com.sun.star.frame.Desktop"), xContext ), uno::UNO_QUERY );
if ( m_xDesktop.is() )
@@ -234,7 +219,6 @@ UpdateCheckJob::execute(const uno::Sequence<beans::NamedValue>& namedValues)
uno::Sequence<beans::NamedValue> aConfig =
getValue< uno::Sequence<beans::NamedValue> > (namedValues, "JobConfig");
- m_pInitThread = new InitUpdateCheckJobThread( m_xContext, aConfig );
/* Determine the way we got invoked here -
* see Developers Guide Chapter "4.7.2 Jobs" to understand the magic
@@ -245,10 +229,10 @@ UpdateCheckJob::execute(const uno::Sequence<beans::NamedValue>& namedValues)
rtl::OUString aEventName = getValue< rtl::OUString > (aEnvironment, "EventName");
- if( ! aEventName.equalsAscii("onFirstVisibleTask") )
- {
- m_pInitThread->showDialog();
- }
+ m_pInitThread.reset(
+ new InitUpdateCheckJobThread(
+ m_xContext, aConfig,
+ !aEventName.equalsAscii("onFirstVisibleTask")));
return uno::Any();
}
@@ -346,7 +330,7 @@ void SAL_CALL UpdateCheckJob::queryTermination( lang::EventObject const & )
void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & rEvt )
throw ( uno::RuntimeException )
{
- if ( m_pInitThread )
+ if ( m_pInitThread.get() != 0 )
m_pInitThread->setTerminating();
disposing( rEvt );
diff --git a/extensions/source/update/exports.map b/extensions/source/update/exports.map
deleted file mode 100644
index ba501f9ae076..000000000000
--- a/extensions/source/update/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/extensions/source/update/feed/makefile.mk b/extensions/source/update/feed/makefile.mk
index c7d15a2beb74..7e12970ddef1 100644
--- a/extensions/source/update/feed/makefile.mk
+++ b/extensions/source/update/feed/makefile.mk
@@ -54,7 +54,7 @@ SHL1STDLIBS= \
$(CPPULIB) \
$(SALLIB)
-SHL1VERSIONMAP=..$/exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/extensions/source/update/ui/makefile.mk b/extensions/source/update/ui/makefile.mk
index 1cf95a52108d..c4826efba9ca 100644
--- a/extensions/source/update/ui/makefile.mk
+++ b/extensions/source/update/ui/makefile.mk
@@ -64,7 +64,7 @@ SHL1STDLIBS= \
$(VCLLIB) \
$(TOOLSLIB)
-SHL1VERSIONMAP=..$/exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)