diff options
author | Peter Foley <pefoley2@verizon.net> | 2011-12-17 18:12:13 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-12-17 18:12:13 +0100 |
commit | 9d79b12871522cb9daebf4f6c850e07edcdce08a (patch) | |
tree | 2b43e02c1e05f353f622f66d45f6a7175f742a9e | |
parent | 4b4c583b90d61865de30de1a88074f600654b627 (diff) |
extensions: merge in Peter Foley's work in update
Main improvement is that the unit test is now linked against updchk
library.
-rw-r--r-- | Repository.mk | 2 | ||||
-rw-r--r-- | extensions/Configuration_updchk.mk | 9 | ||||
-rw-r--r-- | extensions/CppunitTest_extensions_test_update.mk | 16 | ||||
-rw-r--r-- | extensions/Library_updchk.mk | 7 | ||||
-rw-r--r-- | extensions/source/update/check/transform.pl | 61 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheck.hxx | 36 | ||||
-rw-r--r-- | extensions/source/update/check/updateprotocol.hxx | 2 | ||||
-rw-r--r-- | scp2/source/onlineupdate/file_onlineupdate.scp | 2 |
8 files changed, 43 insertions, 92 deletions
diff --git a/Repository.mk b/Repository.mk index 79aea6c12c24..ff8dccd62bfb 100644 --- a/Repository.mk +++ b/Repository.mk @@ -290,6 +290,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \ ucb \ ucpfile \ unopkgapp \ + updchk \ xmlsecurity \ xsec_fw \ xsec_xmlsec \ @@ -355,7 +356,6 @@ $(eval $(call gb_Helper_register_libraries,UNOLIBS_OOO, \ stocservices \ stringresource \ updatefeed \ - updchk \ vbaevents \ vbaobj \ vbaswobj \ diff --git a/extensions/Configuration_updchk.mk b/extensions/Configuration_updchk.mk index 2f392228fedf..d6bcc07f3202 100644 --- a/extensions/Configuration_updchk.mk +++ b/extensions/Configuration_updchk.mk @@ -13,7 +13,7 @@ # License. # # Major Contributor(s): -# [ Copyright (C) 2011 Red Hat, Inc., Michael Stahl <mstahl@redhat.com> (initial developer) ] +# [ Copyright (C) 2011 Peter Foley <pefoley2@verizon.net> (initial developer) ] # # All Rights Reserved. # @@ -27,11 +27,16 @@ # # TODO is this really supposed to be delivered to the officecfg registry? -$(eval $(call gb_Configuration_Configuration_nozip,updchk)) +$(eval $(call gb_Configuration_Configuration,updchk)) $(eval $(call gb_Configuration_add_spool_modules,updchk,extensions/source/update/check,\ org/openoffice/Office/Jobs-onlineupdate.xcu \ org/openoffice/Office/Addons-onlineupdate.xcu \ )) +$(eval $(call gb_Configuration_add_localized_datas,updchk,extensions/source/update/check,\ + org/openoffice/Office/Jobs.xcu \ + org/openoffice/Office/Addons.xcu \ +)) + # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/extensions/CppunitTest_extensions_test_update.mk b/extensions/CppunitTest_extensions_test_update.mk index 36721e720fc1..f0b9a0567bc0 100644 --- a/extensions/CppunitTest_extensions_test_update.mk +++ b/extensions/CppunitTest_extensions_test_update.mk @@ -28,16 +28,11 @@ $(eval $(call gb_CppunitTest_CppunitTest,extensions_test_update)) $(eval $(call gb_CppunitTest_add_exception_objects,extensions_test_update, \ - extensions/source/update/check/download \ - extensions/source/update/check/updatecheck \ - extensions/source/update/check/updatecheckconfig \ - extensions/source/update/check/updatehdl \ - extensions/source/update/check/updateprotocol \ - \ extensions/qa/update/test_update \ )) $(eval $(call gb_CppunitTest_add_linked_libs,extensions_test_update, \ + updchk \ cppu \ cppuhelper \ sal \ @@ -46,6 +41,13 @@ $(eval $(call gb_CppunitTest_add_linked_libs,extensions_test_update, \ $(gb_STDLIBS) \ )) +ifeq ($(OS),WNT) +$(eval $(call gb_CppunitTest_add_linked_libs,extensions_test_update,\ + shell32 \ + ole32 \ +)) +endif + $(eval $(call gb_CppunitTest_use_external,extensions_test_update,curl)) $(eval $(call gb_CppunitTest_set_include,extensions_test_update,\ @@ -67,13 +69,13 @@ $(eval $(call gb_CppunitTest_add_type_rdbs,extensions_test_update,\ $(eval $(call gb_CppunitTest_add_components,extensions_test_update,\ configmgr/source/configmgr \ + extensions/source/update/feed/updatefeed \ unoxml/source/service/unoxml \ )) $(eval $(call gb_CppunitTest_add_old_components,extensions_test_update,\ ucb1 \ ucpfile1 \ - component/extensions/source/update/feed/updatefeed \ )) $(eval $(call gb_CppunitTest_set_args,extensions_test_update,\ diff --git a/extensions/Library_updchk.mk b/extensions/Library_updchk.mk index ba6d7364e7b0..e78f1d0b26f6 100644 --- a/extensions/Library_updchk.mk +++ b/extensions/Library_updchk.mk @@ -14,6 +14,7 @@ # # Major Contributor(s): # [ Copyright (C) 2011 Red Hat, Inc., Michael Stahl <mstahl@redhat.com> (initial developer) ] +# [ Copyright (C) 2011 Peter Foley <pefoley2@verizon.net> ] # # All Rights Reserved. # @@ -30,13 +31,17 @@ $(eval $(call gb_Library_Library,updchk)) $(eval $(call gb_Library_set_componentfile,updchk,extensions/source/update/check/updchk.uno)) +$(eval $(call gb_Library_set_include,updchk,\ + $$(INCLUDE) \ + -I$(SRCDIR)/extensions/inc \ +)) + $(eval $(call gb_Library_add_api,updchk,\ udkapi \ offapi \ )) $(eval $(call gb_Library_add_linked_libs,updchk,\ - comphelper \ cppuhelper \ cppu \ sal \ diff --git a/extensions/source/update/check/transform.pl b/extensions/source/update/check/transform.pl deleted file mode 100644 index fb452ae0482c..000000000000 --- a/extensions/source/update/check/transform.pl +++ /dev/null @@ -1,61 +0,0 @@ -: -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; - -#************************************************************************* -# -# 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. -# -#************************************************************************* - -while (<>) { - - if( /<prop/ ) { - $prop = $_; - next if( /Text/ || /Bubble/ ); - } - - if( /<\/prop>/ ) { - next if( $prop =~ /Text/ || $prop =~ /Bubble/ ); - } - - if( /xml:lang/ ) { - $lang = $_; - $lang =~ s/.*xml:lang=\"//; - $lang =~ s/\".*//; - chomp $lang; - $line = $prop; - $line =~ s/\" oor:type/_$lang\" oor:type/; - print $line; - $line = $_; - $line =~ s/ xml:lang=\".*\"//; - print $line; - $line = $prop; - $line =~ s/<prop.*/<\/prop>/; - print $line; - next; - } - - print; -}
\ No newline at end of file diff --git a/extensions/source/update/check/updatecheck.hxx b/extensions/source/update/check/updatecheck.hxx index 0f0768919877..d6db5e8e8978 100644 --- a/extensions/source/update/check/updatecheck.hxx +++ b/extensions/source/update/check/updatecheck.hxx @@ -58,7 +58,7 @@ public: virtual void SAL_CALL cancel() = 0; }; -class UpdateCheck : +class SAL_DLLPUBLIC_EXPORT UpdateCheck : public UpdateCheckConfigListener, public IActionListener, public DownloadInteractionHandler, @@ -107,35 +107,35 @@ public: bool hasOfficeUpdate() const { return (m_aUpdateInfo.BuildId.getLength() > 0); } // DownloadInteractionHandler - virtual bool downloadTargetExists(const rtl::OUString& rFileName); - virtual void downloadStalled(const rtl::OUString& rErrorMessage); - virtual void downloadProgressAt(sal_Int8 nProcent); - virtual void downloadStarted(const rtl::OUString& rLocalFileName, sal_Int64 nFileSize); - virtual void downloadFinished(const rtl::OUString& rLocalFileName); + SAL_DLLPUBLIC_EXPORT virtual bool downloadTargetExists(const rtl::OUString& rFileName); + SAL_DLLPUBLIC_EXPORT virtual void downloadStalled(const rtl::OUString& rErrorMessage); + SAL_DLLPUBLIC_EXPORT virtual void downloadProgressAt(sal_Int8 nProcent); + SAL_DLLPUBLIC_EXPORT virtual void downloadStarted(const rtl::OUString& rLocalFileName, sal_Int64 nFileSize); + SAL_DLLPUBLIC_EXPORT virtual void downloadFinished(const rtl::OUString& rLocalFileName); // checks if the download target already exists and asks user what to do next - virtual bool checkDownloadDestination( const rtl::OUString& rFile ); + SAL_DLLPUBLIC_EXPORT virtual bool checkDownloadDestination( const rtl::OUString& rFile ); // Cancels the download action (and resumes checking if enabled) void cancelDownload(); // Returns the XInteractionHandler of the UpdateHandler instance if present (and visible) - com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > getInteractionHandler() const; + SAL_DLLPUBLIC_EXPORT com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > getInteractionHandler() const; // UpdateCheckConfigListener - virtual void autoCheckStatusChanged(bool enabled); - virtual void autoCheckIntervalChanged(); + SAL_DLLPUBLIC_EXPORT virtual void autoCheckStatusChanged(bool enabled); + SAL_DLLPUBLIC_EXPORT virtual void autoCheckIntervalChanged(); // IActionListener - void cancel(); - void download(); - void install(); - void pause(); - void resume(); - void closeAfterFailure(); + SAL_DLLPUBLIC_EXPORT void cancel(); + SAL_DLLPUBLIC_EXPORT void download(); + SAL_DLLPUBLIC_EXPORT void install(); + SAL_DLLPUBLIC_EXPORT void pause(); + SAL_DLLPUBLIC_EXPORT void resume(); + SAL_DLLPUBLIC_EXPORT void closeAfterFailure(); // rtl::IReference - virtual oslInterlockedCount SAL_CALL acquire() SAL_THROW(()); - virtual oslInterlockedCount SAL_CALL release() SAL_THROW(()); + SAL_DLLPUBLIC_EXPORT virtual oslInterlockedCount SAL_CALL acquire() SAL_THROW(()); + SAL_DLLPUBLIC_EXPORT virtual oslInterlockedCount SAL_CALL release() SAL_THROW(()); private: diff --git a/extensions/source/update/check/updateprotocol.hxx b/extensions/source/update/check/updateprotocol.hxx index 9488373a303e..aae612415a29 100644 --- a/extensions/source/update/check/updateprotocol.hxx +++ b/extensions/source/update/check/updateprotocol.hxx @@ -42,7 +42,7 @@ bool checkForUpdates( ); // The same as above, that does not read the info from bootstrap -bool +SAL_DLLPUBLIC_EXPORT bool checkForUpdates( UpdateInfo& o_rUpdateInfo, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext, diff --git a/scp2/source/onlineupdate/file_onlineupdate.scp b/scp2/source/onlineupdate/file_onlineupdate.scp index 07ab650acc2b..526e6eb8c539 100644 --- a/scp2/source/onlineupdate/file_onlineupdate.scp +++ b/scp2/source/onlineupdate/file_onlineupdate.scp @@ -27,7 +27,7 @@ #include "macros.inc" -SPECIAL_COMPONENT_LIB_FILE( gid_File_Lib_Updchk , updchk.uno ) +SPECIAL_LIB_FILE( gid_File_Lib_Updchk , updchk ) File gid_File_Share_Registry_Onlineupdate_Xcd TXT_FILE_BODY; |