Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 19 December 2011 14:59, Jan Holesovsky <kendy@suse.cz> wrote:
Yes, calling directly indeed looks right.  I suppose the original intent
was not to link against Windows code for the
InternetGetConnectedStateEx() function in extensions/ ; but I think it
is fine, the code in extensions/ is #ifdef WNT there anyway, so...

Will you do that, please?  I can test the patch for you.

I was afraid I will be the one to do it :)

Well, something like attached patch could be ok?
I did not test even on Linux.
I guess soon extensions will be gbuild'ified so the makefile will be
removed anyway.

Matus
From fc9c19b950647f1a1ba2683adfe8299a29c97199 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= <matus.kukan@gmail.com>
Date: Mon, 19 Dec 2011 16:37:06 +0100
Subject: [PATCH] move onlinecheck.cxx from sal to extensions

---
 extensions/source/update/check/makefile.mk      |   22 +++++--
 extensions/source/update/check/onlinecheck.cxx  |   69 ++++++++++++++++++++
 sal/systools/win32/onlineupdate/makefile.mk     |   78 -----------------------
 sal/systools/win32/onlineupdate/onlinecheck.cxx |   69 --------------------
 sal/systools/win32/onlineupdate/onlinecheck.dxp |   28 --------
 5 files changed, 85 insertions(+), 181 deletions(-)
 create mode 100644 extensions/source/update/check/onlinecheck.cxx
 delete mode 100755 sal/systools/win32/onlineupdate/makefile.mk
 delete mode 100644 sal/systools/win32/onlineupdate/onlinecheck.cxx
 delete mode 100644 sal/systools/win32/onlineupdate/onlinecheck.dxp

diff --git a/extensions/source/update/check/makefile.mk b/extensions/source/update/check/makefile.mk
index 47da869..e460d39 100644
--- a/extensions/source/update/check/makefile.mk
+++ b/extensions/source/update/check/makefile.mk
@@ -67,13 +67,7 @@ SLOFILES=\
     $(SLO)$/updatecheckconfig.obj \
     $(SLO)$/updateprotocol.obj \
     $(SLO)$/updatehdl.obj
-        
-SHL1NOCHECK=TRUE
-SHL1TARGET=$(TARGET).uno   
-SHL1OBJS=$(SLOFILES)
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
 
-SHL1IMPLIB=i$(SHL1TARGET)
 SHL1STDLIBS=    \
         $(CPPUHELPERLIB) \
         $(CPPULIB) \
@@ -81,6 +75,22 @@ SHL1STDLIBS=    \
         $(SALLIB) \
         $(SHELL32LIB) \
         $(OLE32LIB)
+
+.IF "$(GUI)"=="WNT"
+SLOFILES+=\
+    $(SLO)$/onlinecheck.obj
+SHL1STDLIBS+=    \
+       $(KERNEL32LIB) \
+       $(LIBCMT) \
+       $(WININETLIB)
+.ENDIF
+        
+SHL1NOCHECK=TRUE
+SHL1TARGET=$(TARGET).uno   
+SHL1OBJS=$(SLOFILES)
+SHL1DEF=$(MISC)$/$(SHL1TARGET).def
+
+SHL1IMPLIB=i$(SHL1TARGET)
         
 SHL1VERSIONMAP=$(SOLARENV)/src/component.map
 SHL1DEF=$(MISC)$/$(SHL1TARGET).def
diff --git a/extensions/source/update/check/onlinecheck.cxx 
b/extensions/source/update/check/onlinecheck.cxx
new file mode 100644
index 0000000..d3bbdc3
--- /dev/null
+++ b/extensions/source/update/check/onlinecheck.cxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma warning( disable: 4668 )
+#endif
+
+#include <sal/types.h>
+#include <sal/macros.h>
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <wininet.h>
+
+#ifdef UNICODE
+#define _UNICODE
+#endif
+#include <tchar.h>
+
+// #i71984
+extern "C" sal_Bool SAL_CALL hasInternetConnection()
+{
+    DWORD   dwFlags;
+    TCHAR   szConnectionName[1024];
+
+#ifndef __MINGW32__
+    __try {
+#endif
+    BOOL fIsConnected = InternetGetConnectedStateEx(
+        &dwFlags,
+        szConnectionName,
+        SAL_N_ELEMENTS(szConnectionName),
+        0 );
+
+    return fIsConnected ? sal_True : sal_False;
+
+#ifndef __MINGW32__
+    } __except( EXCEPTION_EXECUTE_HANDLER ) {
+        return sal_False;
+    }
+#endif
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/onlineupdate/makefile.mk 
b/sal/systools/win32/onlineupdate/makefile.mk
deleted file mode 100755
index 027ddef..0000000
--- 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.cxx 
b/sal/systools/win32/onlineupdate/onlinecheck.cxx
deleted file mode 100644
index d3bbdc3..0000000
--- a/sal/systools/win32/onlineupdate/onlinecheck.cxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifdef _MSC_VER
-#pragma warning( disable: 4668 )
-#endif
-
-#include <sal/types.h>
-#include <sal/macros.h>
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <wininet.h>
-
-#ifdef UNICODE
-#define _UNICODE
-#endif
-#include <tchar.h>
-
-// #i71984
-extern "C" sal_Bool SAL_CALL hasInternetConnection()
-{
-    DWORD   dwFlags;
-    TCHAR   szConnectionName[1024];
-
-#ifndef __MINGW32__
-    __try {
-#endif
-    BOOL fIsConnected = InternetGetConnectedStateEx(
-        &dwFlags,
-        szConnectionName,
-        SAL_N_ELEMENTS(szConnectionName),
-        0 );
-
-    return fIsConnected ? sal_True : sal_False;
-
-#ifndef __MINGW32__
-    } __except( EXCEPTION_EXECUTE_HANDLER ) {
-        return sal_False;
-    }
-#endif
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/systools/win32/onlineupdate/onlinecheck.dxp 
b/sal/systools/win32/onlineupdate/onlinecheck.dxp
deleted file mode 100644
index 7d3a3ca..0000000
--- 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
-- 
1.7.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.