Kaydet (Commit) 9d79b128 authored tarafından Peter Foley's avatar Peter Foley Kaydeden (comit) Michael Stahl

extensions: merge in Peter Foley's work in update

Main improvement is that the unit test is now linked against updchk
library.
üst 4b4c583b
......@@ -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 \
......
......@@ -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:
......@@ -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,\
......
......@@ -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 \
......
:
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
......@@ -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:
......
......@@ -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,
......
......@@ -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;
......
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