summaryrefslogtreecommitdiff
path: root/extensions/source/update/check
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/update/check')
-rw-r--r--extensions/source/update/check/makefile.mk8
-rw-r--r--extensions/source/update/check/updatecheck.cxx2
-rw-r--r--extensions/source/update/check/updatecheckconfig.cxx100
-rwxr-xr-x[-rw-r--r--]extensions/source/update/check/updatecheckconfig.hxx10
-rwxr-xr-x[-rw-r--r--]extensions/source/update/check/updatecheckjob.cxx19
-rw-r--r--extensions/source/update/check/updatehdl.cxx35
-rwxr-xr-x[-rw-r--r--]extensions/source/update/check/updateprotocol.cxx10
-rw-r--r--extensions/source/update/check/updchk.uno.component37
8 files changed, 156 insertions, 65 deletions
diff --git a/extensions/source/update/check/makefile.mk b/extensions/source/update/check/makefile.mk
index 9f5f54410..47da869ea 100644
--- a/extensions/source/update/check/makefile.mk
+++ b/extensions/source/update/check/makefile.mk
@@ -132,3 +132,11 @@ $(SPOOLDIR)$/$(PACKAGEDIR)$/Jobs$/Jobs-onlineupdate.xcu : $(XCU_SOURCEDIR)$/Jobs
@$(COPY) $< $@
# @$(PERL) transform.pl < $< > $@
+
+ALLTAR : $(MISC)/updchk.uno.component
+
+$(MISC)/updchk.uno.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ updchk.uno.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt updchk.uno.component
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 747d64263..b15e524bf 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -458,7 +458,7 @@ UpdateCheckThread::runCheck( bool & rbExtensionsChecked )
UpdateInfo aInfo;
rtl::Reference< UpdateCheck > aController(UpdateCheck::get());
-
+
if( checkForUpdates(aInfo, m_xContext, aController->getInteractionHandler(), createProvider()) )
{
aController->setUpdateInfo(aInfo);
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index dd91d4c22..99dab40e0 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -33,7 +33,8 @@
#include "updatecheckconfig.hxx"
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
-
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <osl/security.hxx>
#include <osl/time.h>
#include <osl/file.hxx>
@@ -76,6 +77,8 @@ namespace uno = com::sun::star::uno ;
#define RELEASE_NOTE "ReleaseNote"
#define EXTENSION_PREFIX "Extension_"
+#define PROPERTY_VERSION UNISTRING("Version")
+
static const sal_Char * const aUpdateEntryProperties[] = {
UPDATE_VERSION,
UPDATE_BUILDID,
@@ -244,19 +247,19 @@ rtl::OUString UpdateCheckConfig::getAllUsersDirectory()
}
//------------------------------------------------------------------------------
-
-UpdateCheckConfig::UpdateCheckConfig(
- const uno::Reference<container::XNameContainer>& xContainer,
- const ::rtl::Reference< UpdateCheckConfigListener >& rListener
-) : m_xContainer(xContainer), m_rListener(rListener)
-{
-}
+UpdateCheckConfig::UpdateCheckConfig( const uno::Reference<container::XNameContainer>& xContainer,
+ const uno::Reference<container::XNameContainer>& xAvailableUpdates,
+ const uno::Reference<container::XNameContainer>& xIgnoredUpdates,
+ const ::rtl::Reference< UpdateCheckConfigListener >& rListener ) :
+ m_xContainer( xContainer ),
+ m_xAvailableUpdates( xAvailableUpdates ),
+ m_xIgnoredUpdates( xIgnoredUpdates ),
+ m_rListener( rListener )
+{}
//------------------------------------------------------------------------------
-
UpdateCheckConfig::~UpdateCheckConfig()
-{
-}
+{}
//------------------------------------------------------------------------------
@@ -293,7 +296,15 @@ UpdateCheckConfig::get(
UNISTRING("com.sun.star.configuration.ConfigurationUpdateAccess"), aArgumentList ),
uno::UNO_QUERY_THROW );
- return new UpdateCheckConfig( xContainer, rListener );
+ aProperty.Value = uno::makeAny( UNISTRING("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/IgnoredUpdates") );
+ aArgumentList[0] = uno::makeAny( aProperty );
+ uno::Reference< container::XNameContainer > xIgnoredExt( xConfigProvider->createInstanceWithArguments( UNISTRING("com.sun.star.configuration.ConfigurationUpdateAccess"), aArgumentList ), uno::UNO_QUERY_THROW );
+
+ aProperty.Value = uno::makeAny( UNISTRING("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/AvailableUpdates") );
+ aArgumentList[0] = uno::makeAny( aProperty );
+ uno::Reference< container::XNameContainer > xUpdateAvail( xConfigProvider->createInstanceWithArguments( UNISTRING("com.sun.star.configuration.ConfigurationUpdateAccess"), aArgumentList ), uno::UNO_QUERY_THROW );
+
+ return new UpdateCheckConfig( xContainer, xUpdateAvail, xIgnoredExt, rListener );
}
//------------------------------------------------------------------------------
@@ -625,6 +636,19 @@ UpdateCheckConfig::commitChanges()
}
}
}
+
+ xChangesBatch = uno::Reference< util::XChangesBatch > ( m_xAvailableUpdates, uno::UNO_QUERY );
+ if( xChangesBatch.is() && xChangesBatch->hasPendingChanges() )
+ {
+ util::ChangesSet aChangesSet = xChangesBatch->getPendingChanges();
+ xChangesBatch->commitChanges();
+ }
+ xChangesBatch = uno::Reference< util::XChangesBatch > ( m_xIgnoredUpdates, uno::UNO_QUERY );
+ if( xChangesBatch.is() && xChangesBatch->hasPendingChanges() )
+ {
+ util::ChangesSet aChangesSet = xChangesBatch->getPendingChanges();
+ xChangesBatch->commitChanges();
+ }
}
//------------------------------------------------------------------------------
@@ -652,40 +676,66 @@ UpdateCheckConfig::getPendingChanges( ) throw (uno::RuntimeException)
}
//------------------------------------------------------------------------------
-void UpdateCheckConfig::storeExtensionVersion( const rtl::OUString& rExtensionName,
+bool UpdateCheckConfig::storeExtensionVersion( const rtl::OUString& rExtensionName,
const rtl::OUString& rVersion )
{
- const rtl::OUString aExtName = UNISTRING( EXTENSION_PREFIX ) + rExtensionName;
- const uno::Any aValue = uno::makeAny( rVersion );
-
- if( m_xContainer->hasByName( aExtName ) )
- m_xContainer->replaceByName( aExtName, aValue );
+ bool bNotify = true;
+
+ if ( m_xAvailableUpdates->hasByName( rExtensionName ) )
+ uno::Reference< beans::XPropertySet >( m_xAvailableUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->setPropertyValue( PROPERTY_VERSION, uno::Any( rVersion ) );
else
- m_xContainer->insertByName( aExtName, aValue );
+ {
+ uno::Reference< beans::XPropertySet > elem( uno::Reference< lang::XSingleServiceFactory >( m_xAvailableUpdates, uno::UNO_QUERY_THROW )->createInstance(), uno::UNO_QUERY_THROW );
+ elem->setPropertyValue( PROPERTY_VERSION, uno::Any( rVersion ) );
+ m_xAvailableUpdates->insertByName( rExtensionName, uno::Any( elem ) );
+ }
+
+ if ( m_xIgnoredUpdates->hasByName( rExtensionName ) )
+ {
+ ::rtl::OUString aIgnoredVersion;
+ uno::Any aValue( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) );
+ aValue >>= aIgnoredVersion;
+ if ( aIgnoredVersion.getLength() == 0 ) // no version means ignore all updates
+ bNotify = false;
+ else if ( aIgnoredVersion == rVersion ) // the user wanted to ignore this update
+ bNotify = false;
+ }
commitChanges();
+
+ return bNotify;
}
//------------------------------------------------------------------------------
bool UpdateCheckConfig::checkExtensionVersion( const rtl::OUString& rExtensionName,
const rtl::OUString& rVersion )
{
- const rtl::OUString aExtName = UNISTRING( EXTENSION_PREFIX ) + rExtensionName;
-
- if( m_xContainer->hasByName( aExtName ) )
+ if ( m_xAvailableUpdates->hasByName( rExtensionName ) )
{
- uno::Any aValue = m_xContainer->getByName( aExtName );
- rtl::OUString aStoredVersion;
+ ::rtl::OUString aStoredVersion;
+ uno::Any aValue( uno::Reference< beans::XPropertySet >( m_xAvailableUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) );
aValue >>= aStoredVersion;
+ if ( m_xIgnoredUpdates->hasByName( rExtensionName ) )
+ {
+ ::rtl::OUString aIgnoredVersion;
+ uno::Any aValue2( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) );
+ aValue2 >>= aIgnoredVersion;
+ if ( aIgnoredVersion.getLength() == 0 ) // no version means ignore all updates
+ return false;
+ else if ( aIgnoredVersion == aStoredVersion ) // the user wanted to ignore this update
+ return false;
+ // TODO: else delete ignored entry?
+ }
if ( isVersionGreater( rVersion, aStoredVersion ) )
return true;
else
{
- m_xContainer->removeByName( aExtName );
+ m_xAvailableUpdates->removeByName( rExtensionName );
commitChanges();
}
}
+
return false;
}
diff --git a/extensions/source/update/check/updatecheckconfig.hxx b/extensions/source/update/check/updatecheckconfig.hxx
index 4149e9993..4266159a8 100644..100755
--- a/extensions/source/update/check/updatecheckconfig.hxx
+++ b/extensions/source/update/check/updatecheckconfig.hxx
@@ -94,8 +94,10 @@ class UpdateCheckConfig : public ::cppu::WeakImplHelper3<
::com::sun::star::util::XChangesBatch,
::com::sun::star::lang::XServiceInfo >
{
- UpdateCheckConfig(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xContainer,
- const ::rtl::Reference< UpdateCheckConfigListener >& rListener );
+ UpdateCheckConfig( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xContainer,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xAvailableUpdates,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xIgnoredUpdates,
+ const ::rtl::Reference< UpdateCheckConfigListener >& rListener );
virtual ~UpdateCheckConfig();
@@ -155,7 +157,7 @@ public:
static rtl::OUString getAllUsersDirectory();
// store and retrieve information about extensions
- void storeExtensionVersion( const rtl::OUString& rExtensionName,
+ bool storeExtensionVersion( const rtl::OUString& rExtensionName,
const rtl::OUString& rVersion );
bool checkExtensionVersion( const rtl::OUString& rExtensionName,
const rtl::OUString& rVersion );
@@ -206,6 +208,8 @@ private:
static bool isVersionGreater( const rtl::OUString& rVersion1, const rtl::OUString& rVersion2 );
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xContainer;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xAvailableUpdates;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xIgnoredUpdates;
const ::rtl::Reference< UpdateCheckConfigListener > m_rListener;
};
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index cd07d8c4c..fc1fd8fde 100644..100755
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -328,13 +328,14 @@ void SAL_CALL UpdateCheckJob::queryTermination( lang::EventObject const & )
}
//------------------------------------------------------------------------------
-void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & rEvt )
+void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & )
throw ( uno::RuntimeException )
{
if ( m_pInitThread.get() != 0 )
+ {
m_pInitThread->setTerminating();
-
- disposing( rEvt );
+ m_pInitThread->join();
+ }
}
} // anonymous namespace
@@ -388,18 +389,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir
//------------------------------------------------------------------------------
-extern "C" sal_Bool SAL_CALL
-component_writeInfo(void *pServiceManager, void *pRegistryKey)
-{
- return cppu::component_writeInfoHelper(
- pServiceManager,
- pRegistryKey,
- kImplementations_entries
- );
-}
-
-//------------------------------------------------------------------------------
-
extern "C" void *
component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
{
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 6210a8af7..d0cef51bd 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -50,7 +50,7 @@
#include "com/sun/star/awt/XControl.hpp"
#include "com/sun/star/awt/XControlContainer.hpp"
#include "com/sun/star/awt/XMessageBox.hpp"
-#include "com/sun/star/awt/XThrobber.hpp"
+#include "com/sun/star/awt/XAnimation.hpp"
#include "com/sun/star/awt/XTopWindow.hpp"
#include "com/sun/star/awt/XVclWindowPeer.hpp"
#include "com/sun/star/awt/XVclContainer.hpp"
@@ -70,6 +70,7 @@
#include <com/sun/star/resource/XResourceBundleLoader.hpp>
#include "updatehdl.hrc"
+#include <tools/urlobj.hxx>
#define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
@@ -159,7 +160,7 @@ void UpdateHandler::setDownloadBtnLabel( bool bAppendDots )
aLabel += UNISTRING( "..." );
setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("Label"), uno::Any( aLabel ) );
- setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DOWNLOAD2 ) ) );
+ setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD2 ) ) );
mbDownloadBtnHasDots = bAppendDots;
}
@@ -759,14 +760,14 @@ void UpdateHandler::loadStrings()
void UpdateHandler::startThrobber( bool bStart )
{
uno::Reference< awt::XControlContainer > xContainer( mxUpdDlg, uno::UNO_QUERY );
- uno::Reference< awt::XThrobber > xThrobber( xContainer->getControl( CTRL_THROBBER ), uno::UNO_QUERY );
+ uno::Reference< awt::XAnimation > xThrobber( xContainer->getControl( CTRL_THROBBER ), uno::UNO_QUERY );
if ( xThrobber.is() )
{
if ( bStart )
- xThrobber->start();
+ xThrobber->startAnimation();
else
- xThrobber->stop();
+ xThrobber->stopAnimation();
}
uno::Reference< awt::XWindow > xWindow( xContainer->getControl( CTRL_THROBBER ), uno::UNO_QUERY );
@@ -1084,8 +1085,8 @@ bool UpdateHandler::showOverwriteWarning() const
#define EDIT_WIDTH ( DIALOG_WIDTH - 2 * DIALOG_BORDER )
#define BOX1_BTN_X ( DIALOG_BORDER + EDIT_WIDTH - BUTTON_WIDTH - INNER_BORDER )
#define BOX1_BTN_Y ( DIALOG_BORDER + LABEL_HEIGHT + INNER_BORDER)
-#define THROBBER_WIDTH 14
-#define THROBBER_HEIGHT 14
+#define THROBBER_WIDTH 16
+#define THROBBER_HEIGHT 16
#define THROBBER_X_POS ( DIALOG_BORDER + 8 )
#define THROBBER_Y_POS ( DIALOG_BORDER + 23 )
#define BUTTON_BAR_HEIGHT 24
@@ -1175,7 +1176,7 @@ void UpdateHandler::createDialog()
xPropSet->setPropertyValue( UNISTRING("PositionY"), uno::Any(sal_Int32( 100 )) );
xPropSet->setPropertyValue( UNISTRING("Width"), uno::Any(sal_Int32( DIALOG_WIDTH )) );
xPropSet->setPropertyValue( UNISTRING("Height"), uno::Any(sal_Int32( DIALOG_HEIGHT )) );
- xPropSet->setPropertyValue( UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DLG ) ) );
+ xPropSet->setPropertyValue( UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DLG ) ) );
}
{ // Label (fixed text) <status>
uno::Sequence< beans::NamedValue > aProps(1);
@@ -1202,7 +1203,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 3, UNISTRING("MultiLine"), uno::Any( true ) );
setProperty( aProps, 4, UNISTRING("ReadOnly"), uno::Any( true ) );
setProperty( aProps, 5, UNISTRING("AutoVScroll"), uno::Any( true ) );
- setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_STATUS ) ) );
+ setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_STATUS ) ) );
insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_STATUS,
awt::Rectangle( DIALOG_BORDER + TEXT_OFFSET,
@@ -1233,7 +1234,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msPauseBtn ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_PAUSE ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_PAUSE ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[PAUSE_BUTTON],
awt::Rectangle( BOX1_BTN_X, BOX1_BTN_Y, BUTTON_WIDTH, BUTTON_HEIGHT ),
@@ -1246,7 +1247,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msResumeBtn ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_RESUME ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_RESUME ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[RESUME_BUTTON],
awt::Rectangle( BOX1_BTN_X,
@@ -1262,7 +1263,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msCancelBtn ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_CANCEL ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CANCEL ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[CANCEL_BUTTON],
awt::Rectangle( BOX1_BTN_X,
@@ -1296,7 +1297,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 3, UNISTRING("MultiLine"), uno::Any( true ) );
setProperty( aProps, 4, UNISTRING("ReadOnly"), uno::Any( true ) );
setProperty( aProps, 5, UNISTRING("AutoVScroll"), uno::Any( true ) );
- setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DESCRIPTION ) ) );
+ setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DESCRIPTION ) ) );
insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_DESCRIPTION,
awt::Rectangle( DIALOG_BORDER + TEXT_OFFSET,
@@ -1326,7 +1327,7 @@ void UpdateHandler::createDialog()
// setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_CANCEL) ) );
// [property] string Label // only if PushButtonType_STANDARD
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msClose ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_CLOSE ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CLOSE ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[ CLOSE_BUTTON ],
awt::Rectangle( CLOSE_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ),
@@ -1339,7 +1340,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msInstall ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_INSTALL ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_INSTALL ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[INSTALL_BUTTON],
awt::Rectangle( INSTALL_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ),
@@ -1352,7 +1353,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msDownload ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DOWNLOAD ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[DOWNLOAD_BUTTON],
awt::Rectangle( DOWNLOAD_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ),
@@ -1372,7 +1373,7 @@ void UpdateHandler::createDialog()
{ // @see awt/UnoControlThrobberModel.idl
uno::Sequence< beans::NamedValue > aProps;
- insertControlModel( xControlModel, UNISTRING("com.sun.star.awt.UnoThrobberControlModel"), CTRL_THROBBER,
+ insertControlModel( xControlModel, UNISTRING("com.sun.star.awt.SpinningProgressControlModel"), CTRL_THROBBER,
awt::Rectangle( THROBBER_X_POS, THROBBER_Y_POS, THROBBER_WIDTH, THROBBER_HEIGHT),
aProps );
}
diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx
index cafda1b8c..fb3db88e5 100644..100755
--- a/extensions/source/update/check/updateprotocol.cxx
+++ b/extensions/source/update/check/updateprotocol.cxx
@@ -254,16 +254,18 @@ checkForUpdates(
bool storeExtensionUpdateInfos( const uno::Reference< uno::XComponentContext > & rxContext,
const uno::Sequence< uno::Sequence< rtl::OUString > > &rUpdateInfos )
{
+ bool bNotify = false;
+
if ( rUpdateInfos.hasElements() )
{
rtl::Reference< UpdateCheckConfig > aConfig = UpdateCheckConfig::get( rxContext );
for ( sal_Int32 i = rUpdateInfos.getLength() - 1; i >= 0; i-- )
{
- aConfig->storeExtensionVersion( rUpdateInfos[i][0], rUpdateInfos[i][1] );
+ bNotify |= aConfig->storeExtensionVersion( rUpdateInfos[i][0], rUpdateInfos[i][1] );
}
}
- return rUpdateInfos.hasElements();
+ return bNotify;
}
//------------------------------------------------------------------------------
@@ -288,9 +290,9 @@ bool checkForExtensionUpdates( const uno::Reference< uno::XComponentContext > &
if ( !xInfoProvider.is() ) return false;
aUpdateList = xInfoProvider->isUpdateAvailable( ::rtl::OUString() );
- storeExtensionUpdateInfos( rxContext, aUpdateList );
+ bool bNotify = storeExtensionUpdateInfos( rxContext, aUpdateList );
- return aUpdateList.hasElements();
+ return bNotify;
}
//------------------------------------------------------------------------------
diff --git a/extensions/source/update/check/updchk.uno.component b/extensions/source/update/check/updchk.uno.component
new file mode 100644
index 000000000..b1eb32917
--- /dev/null
+++ b/extensions/source/update/check/updchk.uno.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="vnd.sun.UpdateCheck">
+ <service name="com.sun.star.setup.UpdateCheck"/>
+ </implementation>
+ <implementation name="vnd.sun.UpdateCheckConfig">
+ <service name="com.sun.star.setup.UpdateCheckConfig"/>
+ </implementation>
+</component>