summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/Library_updchk.mk5
-rw-r--r--extensions/source/update/check/onlinecheck.cxx (renamed from sal/systools/win32/onlineupdate/onlinecheck.cxx)6
-rw-r--r--extensions/source/update/check/updatecheck.cxx33
-rwxr-xr-xsal/systools/win32/onlineupdate/makefile.mk78
-rw-r--r--sal/systools/win32/onlineupdate/onlinecheck.dxp28
5 files changed, 13 insertions, 137 deletions
diff --git a/extensions/Library_updchk.mk b/extensions/Library_updchk.mk
index a16f2a2e6160..c5286de8e08d 100644
--- a/extensions/Library_updchk.mk
+++ b/extensions/Library_updchk.mk
@@ -51,6 +51,11 @@ ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_linked_libs,updchk,\
ole32 \
shell32 \
+ wininet \
+))
+
+$(eval $(call gb_Library_add_exception_objects,updchk,\
+ extensions/source/update/check/onlinecheck \
))
endif # OS WNT
diff --git a/sal/systools/win32/onlineupdate/onlinecheck.cxx b/extensions/source/update/check/onlinecheck.cxx
index d3bbdc3f7b19..0a765399cce3 100644
--- a/sal/systools/win32/onlineupdate/onlinecheck.cxx
+++ b/extensions/source/update/check/onlinecheck.cxx
@@ -43,7 +43,7 @@
#include <tchar.h>
// #i71984
-extern "C" sal_Bool SAL_CALL hasInternetConnection()
+extern "C" bool SAL_CALL WNT_hasInternetConnection()
{
DWORD dwFlags;
TCHAR szConnectionName[1024];
@@ -57,11 +57,11 @@ extern "C" sal_Bool SAL_CALL hasInternetConnection()
SAL_N_ELEMENTS(szConnectionName),
0 );
- return fIsConnected ? sal_True : sal_False;
+ return fIsConnected ? true : false;
#ifndef __MINGW32__
} __except( EXCEPTION_EXECUTE_HANDLER ) {
- return sal_False;
+ return false;
}
#endif
}
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 66acb883033a..d0b204a3be3a 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -85,6 +85,7 @@ namespace uno = com::sun::star::uno ;
#define PROPERTY_DEFAULT_TEXT UNISTRING("DefaultText")
#define PROPERTY_SHOW_MENUICON UNISTRING("MenuIconVisible")
+extern "C" bool SAL_CALL WNT_hasInternetConnection();
//------------------------------------------------------------------------------
// Returns the URL of the release note for the given position
@@ -267,9 +268,11 @@ private:
/* Used to avoid dialup login windows (on platforms we know how to double this) */
inline bool hasInternetConnection() const
{
- if(m_pHasInternetConnection != NULL )
- return (sal_True == m_pHasInternetConnection());
+#ifdef WNT
+ return WNT_hasInternetConnection();
+#else
return true;
+#endif
}
/* Creates a new instance of UpdateInformationProvider and returns this instance */
@@ -295,10 +298,6 @@ protected:
osl::Condition& m_aCondition;
private:
-
-// const
- OnlineCheckFunc m_pHasInternetConnection;
-
const uno::Reference<uno::XComponentContext> m_xContext;
uno::Reference<deployment::XUpdateInformationProvider> m_xProvider;
};
@@ -373,30 +372,8 @@ private:
UpdateCheckThread::UpdateCheckThread( osl::Condition& rCondition,
const uno::Reference<uno::XComponentContext>& xContext ) :
m_aCondition(rCondition),
- m_pHasInternetConnection(NULL),
m_xContext(xContext)
{
-
-#ifdef WNT
- rtl::OUString aPath;
- if( osl_getExecutableFile(&aPath.pData) == osl_Process_E_None )
- {
- sal_uInt32 lastIndex = aPath.lastIndexOf('/');
- if ( lastIndex > 0 )
- {
- aPath = aPath.copy( 0, lastIndex+1 );
- aPath += UNISTRING( "onlinecheck" );
- }
-
- if ( m_aModule.load(aPath) )
- {
- m_pHasInternetConnection =
- reinterpret_cast < OnlineCheckFunc > (
- m_aModule.getFunctionSymbol( UNISTRING("hasInternetConnection")));
- }
- }
-#endif
-
createSuspended();
// actually run the thread
diff --git a/sal/systools/win32/onlineupdate/makefile.mk b/sal/systools/win32/onlineupdate/makefile.mk
deleted file mode 100755
index 027ddef11192..000000000000
--- a/sal/systools/win32/onlineupdate/makefile.mk
+++ /dev/null
@@ -1,78 +0,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.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-PRJNAME=sal
-TARGET=onlinecheck
-
-USE_DEFFILE=TRUE
-LIBTARGET=NO
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGS+= $(LFS_CFLAGS)
-CXXFLAGS+= $(LFS_CFLAGS)
-
-# --- Targets ----------------------------------
-
-.IF "$(GUI)"=="WNT"
-
-.IF "$(COMEX)"=="9"
-.IF "$(PSDK_HOME)"!=""
-# Since the 02/2003 PSDK the "new" linker is needed here.
-LINK=$(WRAPCMD) "$(PSDK_HOME)$/Bin$/Win64$/LINK.EXE"
-.ENDIF
-.ENDIF
-
-SLOFILES=\
- $(SLO)$/onlinecheck.obj
-
-
-SHL1TARGET=$(TARGET)
-SHL1IMPLIB=$(SHL1TARGET)
-SHL1DEF=$(MISC)/$(SHL1TARGET).def
-DEF1NAME=$(SHL1TARGET)
-DEF1EXPORTFILE=$(SHL1TARGET).dxp
-
-DEF1DEPN=\
- $(DEF1EXPORTFILE)\
- makefile.mk
-
-SHL1OBJS=$(SLOFILES)
-
-SHL1STDLIBS=\
- $(KERNEL32LIB)\
- $(LIBCMT)\
- $(WININETLIB)
-
-
-.ENDIF
-
-.INCLUDE : target.mk
-
diff --git a/sal/systools/win32/onlineupdate/onlinecheck.dxp b/sal/systools/win32/onlineupdate/onlinecheck.dxp
deleted file mode 100644
index 7d3a3cac01fd..000000000000
--- a/sal/systools/win32/onlineupdate/onlinecheck.dxp
+++ /dev/null
@@ -1,28 +0,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.
-;
-;*************************************************************************
-
-hasInternetConnection