diff options
author | Bjoern Michaelsen <b_michaelsen@openoffice.org> | 2010-07-13 14:36:24 +0200 |
---|---|---|
committer | Bjoern Michaelsen <b_michaelsen@openoffice.org> | 2010-07-13 14:36:24 +0200 |
commit | d6fff0796828dab5afb054e7ad3dd8c8c6ed8d52 (patch) | |
tree | 09721660070414d00cc2f83b19bf29892763c99e /tools | |
parent | 13650e71469d579a91f3de3eefa977e825567b57 (diff) | |
parent | be588658ea127a6a05390435126f1d739a477b58 (diff) |
CWS gnumake2: resync to DEV300_m84
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Library_tl.mk | 1 | ||||
-rw-r--r-- | tools/bootstrp/makefile.mk | 9 | ||||
-rw-r--r-- | tools/bootstrp/rscdep.cxx | 67 | ||||
-rw-r--r-- | tools/inc/tools/color.hxx | 2 | ||||
-rw-r--r-- | tools/inc/tools/debug.hxx | 31 | ||||
-rw-r--r-- | tools/inc/tools/diagnose_ex.h | 29 | ||||
-rw-r--r-- | tools/inc/tools/gen.hxx | 15 | ||||
-rw-r--r-- | tools/inc/tools/postextstl.h | 36 | ||||
-rw-r--r-- | tools/inc/tools/preextstl.h | 71 | ||||
-rw-r--r-- | tools/inc/tools/solar.h | 26 | ||||
-rw-r--r-- | tools/inc/tools/svborder.hxx | 8 | ||||
-rw-r--r-- | tools/inc/tools/svlibrary.hxx | 42 | ||||
-rw-r--r-- | tools/inc/tools/urlobj.hxx | 31 | ||||
-rw-r--r-- | tools/inc/tools/wintypes.hxx | 1 | ||||
-rw-r--r-- | tools/qa/makefile.mk | 1 | ||||
-rw-r--r-- | tools/source/debug/debug.cxx | 32 | ||||
-rw-r--r-- | tools/source/fsys/tdir.cxx | 2 | ||||
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 64 | ||||
-rw-r--r-- | tools/source/generic/makefile.mk | 3 | ||||
-rw-r--r-- | tools/source/generic/svlibrary.cxx | 129 | ||||
-rw-r--r-- | tools/source/stream/strmunx.cxx | 10 | ||||
-rw-r--r-- | tools/test/export.map | 2 | ||||
-rw-r--r-- | tools/test/makefile.mk | 2 | ||||
-rw-r--r-- | tools/workben/urltest.cxx | 14 |
24 files changed, 467 insertions, 161 deletions
diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk index 2fc00ec68a8b..48abccd4bf85 100644 --- a/tools/Library_tl.mk +++ b/tools/Library_tl.mk @@ -90,6 +90,7 @@ $(eval $(call gb_Library_add_exception_objects,tl,\ tools/source/generic/poly2 \ tools/source/generic/svborder \ tools/source/generic/toolsin \ + tools/source/generic/svlibrary \ tools/source/inet/inetmime \ tools/source/inet/inetmsg \ tools/source/inet/inetstrm \ diff --git a/tools/bootstrp/makefile.mk b/tools/bootstrp/makefile.mk index 1d16ed2aeec2..3db493cbe162 100644 --- a/tools/bootstrp/makefile.mk +++ b/tools/bootstrp/makefile.mk @@ -38,6 +38,10 @@ LIBTARGET=NO CDEFS+=-D_TOOLS_STRINGLIST +.IF "$(HAVE_GETOPT)" == "YES" +CDEFS += -DHAVE_GETOPT +.ENDIF + # --- Files -------------------------------------------------------- OBJFILES= \ @@ -71,6 +75,11 @@ APP2TARGET= rscdep APP2OBJS= $(OBJ)$/rscdep.obj APP2LIBS= $(LB)$/$(TARGET).lib $(LB)$/$(TARGET1).lib APP2STDLIBS= $(SALLIB) $(VOSLIB) $(TOOLSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB) +.IF "$(HAVE_GETOPT)" != "YES" +.IF "$(OS)"=="WNT" +APP2STDLIBS+=gnu_getopt.lib +.ENDIF +.ENDIF APP2RPATH= NONE APP2RPATH= NONE APP2RPATH= NONE diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx index 35968654b5cd..37edfc6a8c18 100644 --- a/tools/bootstrp/rscdep.cxx +++ b/tools/bootstrp/rscdep.cxx @@ -36,6 +36,7 @@ #include <string.h> #include "bootstrp/prj.hxx" +#include "sal/main.h" #include <tools/string.hxx> #include <tools/list.hxx> @@ -44,6 +45,16 @@ #include "cppdep.hxx" +#if defined WNT +#if !defined HAVE_GETOPT +#define __STDC__ 1 +#define __GNU_LIBRARY__ +#include <external/glibc/getopt.h> +#else +#include <getopt.h> +#endif +#endif + class RscHrcDep : public CppDep { public: @@ -69,21 +80,7 @@ void RscHrcDep::Execute() //static String aDelim; -/* poor man's getopt() */ -int simple_getopt(char *argv[], const char *optstring); -#if defined(WNT) || defined(OS2) -static char *optarg = NULL; -static int optind = 1; -static int optopt = 0; -static int opterr = 0; -#endif - - -int -#ifdef WNT -_cdecl -#endif -main( int argc, char **argv ) +SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) { int c; char aBuf[255]; @@ -183,7 +180,7 @@ main( int argc, char **argv ) while( 1 ) { - c = simple_getopt( argv, + c = getopt( argc, argv, "_abcdefghi:jklmnopqrstuvwxyzABCDEFGHI:JKLMNOPQRSTUVWXYZ1234567890/-+=.\\()\""); if ( c == -1 ) break; @@ -300,41 +297,3 @@ main( int argc, char **argv ) return 0; } -/* my very simple minded implementation of getopt() - * it's too sad that getopt() is not available everywhere - * note: this is not a full POSIX conforming getopt() - */ -int simple_getopt(char *argv[], const char *optstring) -{ - char *arg = argv[optind]; - - /* skip all response file arguments */ - if ( arg ) { - while ( *arg == '@' ) - arg = argv[++optind]; - - if ( arg[0] == '-' && arg[1] != '\0' ) { - const char *popt; - int c = arg[1]; - if ( (popt = strchr(optstring, c)) == NULL ) { - optopt = c; - if ( opterr ) - fprintf(stderr, "Unknown option character `\\x%x'.\n", optopt); - return '?'; - } - if ( *(++popt) == ':') { - if ( arg[2] != '\0' ) { - optarg = ++arg; - } else { - optarg = argv[++optind]; - } - } else { - optarg = NULL; - } - ++optind; - return c; - } - } - return -1; -} - diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx index 56d596453740..a99ad1dd11c4 100644 --- a/tools/inc/tools/color.hxx +++ b/tools/inc/tools/color.hxx @@ -78,7 +78,7 @@ typedef UINT32 ColorData; #define COL_YELLOW RGB_COLORDATA( 0xFF, 0xFF, 0x00 ) #define COL_WHITE RGB_COLORDATA( 0xFF, 0xFF, 0xFF ) #define COL_TRANSPARENT TRGB_COLORDATA( 0xFF, 0xFF, 0xFF, 0xFF ) -#define COL_AUTO (UINT32)0xFFFFFFFF +#define COL_AUTO (ColorData)0xFFFFFFFF #define COL_AUTHOR1_DARK RGB_COLORDATA(198, 146, 0) #define COL_AUTHOR1_NORMAL RGB_COLORDATA(255, 255, 158) #define COL_AUTHOR1_LIGHT RGB_COLORDATA(255, 255, 195) diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx index e764ed2fc79a..b8aa1c8b59fe 100644 --- a/tools/inc/tools/debug.hxx +++ b/tools/inc/tools/debug.hxx @@ -125,19 +125,18 @@ struct DbgDataType #define DBG_FUNC_SAVEDATA 5 #define DBG_FUNC_SETPRINTMSGBOX 6 #define DBG_FUNC_SETPRINTWINDOW 7 -#define DBG_FUNC_SETPRINTSHELL 8 -#define DBG_FUNC_SETPRINTTESTTOOL 9 -#define DBG_FUNC_MEMTEST 10 -#define DBG_FUNC_XTORINFO 11 -#define DBG_FUNC_MEMINFO 12 -#define DBG_FUNC_COREDUMP 13 -#define DBG_FUNC_ALLERROROUT 14 -#define DBG_FUNC_SETTESTSOLARMUTEX 15 -#define DBG_FUNC_TESTSOLARMUTEX 16 -#define DBG_FUNC_PRINTFILE 17 -#define DBG_FUNC_GETPRINTMSGBOX 18 -#define DBG_FUNC_FILTERMESSAGE 19 // new for #i38967 -#define DBG_FUNC_UPDATEOSLHOOK 20 +#define DBG_FUNC_SETPRINTTESTTOOL 8 +#define DBG_FUNC_MEMTEST 9 +#define DBG_FUNC_XTORINFO 10 +#define DBG_FUNC_MEMINFO 11 +#define DBG_FUNC_COREDUMP 12 +#define DBG_FUNC_ALLERROROUT 13 +#define DBG_FUNC_SETTESTSOLARMUTEX 14 +#define DBG_FUNC_TESTSOLARMUTEX 15 +#define DBG_FUNC_PRINTFILE 16 +#define DBG_FUNC_GETPRINTMSGBOX 17 +#define DBG_FUNC_FILTERMESSAGE 18 // new for #i38967 +#define DBG_FUNC_UPDATEOSLHOOK 19 TOOLS_DLLPUBLIC void* DbgFunc( USHORT nAction, void* pData = NULL ); @@ -176,11 +175,6 @@ inline void DbgSetPrintWindow( DbgPrintLine pProc ) DbgFunc( DBG_FUNC_SETPRINTWINDOW, (void*)(long)pProc ); } -inline void DbgSetPrintShell( DbgPrintLine pProc ) -{ - DbgFunc( DBG_FUNC_SETPRINTSHELL, (void*)(long)pProc ); -} - inline void DbgSetPrintTestTool( DbgPrintLine pProc ) { DbgFunc( DBG_FUNC_SETPRINTTESTTOOL, (void*)(long)pProc ); @@ -344,6 +338,7 @@ void DbgPrintStackTree( void* p ); TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, USHORT nOutType = DBG_OUT_TRACE, const sal_Char* pFile = NULL, USHORT nLine = 0 ); +TOOLS_DLLPUBLIC void DbgPrintShell(char const * message); TOOLS_DLLPUBLIC void DbgOutTypef( USHORT nOutType, const sal_Char* pFStr, ... ); TOOLS_DLLPUBLIC void DbgOutf( const sal_Char* pFStr, ... ); TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... ); diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h index fac739b32583..b244d11dc305 100644 --- a/tools/inc/tools/diagnose_ex.h +++ b/tools/inc/tools/diagnose_ex.h @@ -130,6 +130,17 @@ #define ENSURE_OR_RETURN_FALSE(c, m) \ ENSURE_OR_RETURN(c, m, false) +/** This macro asserts the given condition (in debug mode), and + returns afterwards, without return value "void". + */ +#define ENSURE_OR_RETURN_VOID( c, m ) \ + if( !(c) ) \ + { \ + OSL_ENSURE( c, m ); \ + return; \ + } + + /** This macro asserts the given condition (in debug mode), and returns afterwards, without return value "void". @@ -141,6 +152,24 @@ return; \ } +/** asserts a given condition (in debug mode), and continues the most-inner + loop if the condition is not met +*/ +#define ENSURE_OR_CONTINUE( c, m ) \ + if ( !(c) ) \ + { \ + OSL_ENSURE( false, m ); \ + continue; \ + } +/** asserts a given condition (in debug mode), and continues the most-inner + loop if the condition is not met +*/ +#define ENSURE_OR_BREAK( c, m ) \ + if ( !(c) ) \ + { \ + OSL_ENSURE( false, m ); \ + break; \ + } #endif // TOOLS_DIAGNOSE_EX_H diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx index 85da22126b77..308cc02165ce 100644 --- a/tools/inc/tools/gen.hxx +++ b/tools/inc/tools/gen.hxx @@ -420,6 +420,7 @@ public: Point Center() const; void Move( long nHorzMove, long nVertMove ); + inline void Transpose(); inline void SetPos( const Point& rPoint ); void SetSize( const Size& rSize ); inline Size GetSize() const; @@ -578,6 +579,20 @@ inline void Rectangle::Move( long nHorzMove, long nVertMove ) nBottom += nVertMove; } +void Rectangle::Transpose() +{ + if ( !IsEmpty() ) + { + long swap( nLeft ); + nLeft = nTop; + nTop = swap; + + swap = nRight; + nRight = nBottom; + nBottom = swap; + } +} + inline void Rectangle::SetPos( const Point& rPoint ) { if ( nRight != RECT_EMPTY ) diff --git a/tools/inc/tools/postextstl.h b/tools/inc/tools/postextstl.h new file mode 100644 index 000000000000..81a21e25c15b --- /dev/null +++ b/tools/inc/tools/postextstl.h @@ -0,0 +1,36 @@ +/************************************************************************* + * + * 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 std_was_redefined_as_stlport +// put things back the way they were +# define std std_was_redefined_as_stlport +# undef _STLP_OUTERMOST_HEADER_ID +// force config to be re-read +# undef _STLP_NOTHROW_INHERENTLY +# undef _STLP_CONFIG_H +# include <stddef.h> +#endif diff --git a/tools/inc/tools/preextstl.h b/tools/inc/tools/preextstl.h new file mode 100644 index 000000000000..27aed38686f0 --- /dev/null +++ b/tools/inc/tools/preextstl.h @@ -0,0 +1,71 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +//1. Force inclusion of a std:: using header to ensure the stlport define +//of std as "stlport" +#include <algorithm> +#if defined(ADAPT_EXT_STL) +//2. Force inclusion of stlport headers to get their stlport:: definitions +# include <ostream> +# include <istream> +# include <fstream> +# include <iostream> +# include <vector> +# include <list> +# include <map> +//3. Now force inclusion of native headers to get their std:: definitions +# if defined(std) +# define std_was_redefined_as_stlport std +# undef std +# define _STLP_OUTERMOST_HEADER_ID 0xdeadbeaf +# if defined(_GNUC__) +# pragma GCC visibility push(default) +# endif +# include _STLP_NATIVE_HEADER(exception_defines.h) +# include _STLP_NATIVE_HEADER(limits) +# include _STLP_NATIVE_HEADER(memory) +# include _STLP_NATIVE_HEADER(exception) +# include _STLP_NATIVE_HEADER(iosfwd) +# include _STLP_NATIVE_HEADER(algorithm) +# include _STLP_NATIVE_HEADER(string) +# include _STLP_NATIVE_HEADER(streambuf) +# include _STLP_NATIVE_HEADER(ios) +# include _STLP_NATIVE_HEADER(locale) +# include _STLP_NATIVE_HEADER(stdexcept) +# include _STLP_NATIVE_HEADER(ostream) +# include _STLP_NATIVE_HEADER(istream) +# include _STLP_NATIVE_HEADER(iostream) +# include _STLP_NATIVE_HEADER(vector) +# include _STLP_NATIVE_HEADER(list) +# include _STLP_NATIVE_HEADER(map) +# if defined(_GNUC__) +# pragma GCC visibility pop +# endif +# endif +#endif +//ext_std resolves to the std that external c++ libs, e.g. Graphite were built +//against regardless of whether that is stlport or system stl +namespace ext_std = std; diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 1d248853f895..096d34d05b9e 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -122,23 +122,13 @@ typedef BYTE SVBT64[8]; #ifdef __cplusplus inline BYTE SVBT8ToByte ( const SVBT8 p ) { return p[0]; } -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT2 == 1 -inline USHORT SVBT16ToShort( const SVBT16 p ) { return *(USHORT*)p; } -#else inline USHORT SVBT16ToShort( const SVBT16 p ) { return (USHORT)p[0] + ((USHORT)p[1] << 8); } -#endif -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT4 == 1 -inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return *(sal_uInt32*)p; } -#else inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return (sal_uInt32)p[0] + ((sal_uInt32)p[1] << 8) + ((sal_uInt32)p[2] << 16) + ((sal_uInt32)p[3] << 24); } -#endif -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT8 == 1 -inline double SVBT64ToDouble( const SVBT64 p ) { return *(double*)p; } -#elif defined OSL_LITENDIAN +#if defined OSL_LITENDIAN inline double SVBT64ToDouble( const SVBT64 p ) { double n; ((BYTE*)&n)[0] = p[0]; ((BYTE*)&n)[1] = p[1]; @@ -163,23 +153,13 @@ inline double SVBT64ToDouble( const SVBT64 p ) { double n; #endif inline void ByteToSVBT8 ( BYTE n, SVBT8 p ) { p[0] = n; } -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT2 == 1 -inline void ShortToSVBT16( USHORT n, SVBT16 p ) { *(USHORT*)p = n; } -#else inline void ShortToSVBT16( USHORT n, SVBT16 p ) { p[0] = (BYTE) n; p[1] = (BYTE)(n >> 8); } -#endif -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT4 == 1 -inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { *(sal_uInt32*)p = n; } -#else inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (BYTE) n; p[1] = (BYTE)(n >> 8); p[2] = (BYTE)(n >> 16); p[3] = (BYTE)(n >> 24); } -#endif -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT8 == 1 -inline void DoubleToSVBT64( double n, SVBT64 p ) { *(double*)p = n; } -#elif defined OSL_LITENDIAN +#if defined OSL_LITENDIAN inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[0]; p[1] = ((BYTE*)&n)[1]; p[2] = ((BYTE*)&n)[2]; @@ -384,6 +364,8 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } #define __DLLEXTENSION "lm.so" #elif defined LINUX && defined HPPA #define __DLLEXTENSION "lh.so" +#elif defined LINUX && defined AXP + #define __DLLEXTENSION "ll.so" #elif defined LINUX #error unknown plattform #elif defined FREEBSD && defined X86 diff --git a/tools/inc/tools/svborder.hxx b/tools/inc/tools/svborder.hxx index 9523a71a060f..a0509bcc89be 100644 --- a/tools/inc/tools/svborder.hxx +++ b/tools/inc/tools/svborder.hxx @@ -49,6 +49,14 @@ public: } BOOL operator != ( const SvBorder & rObj ) const { return !(*this == rObj); } + SvBorder & operator = ( const SvBorder & rBorder ) + { + Left() = rBorder.Left(); + Top() = rBorder.Top(); + Right() = rBorder.Right(); + Bottom() = rBorder.Bottom(); + return *this; + } SvBorder & operator += ( const SvBorder & rBorder ) { Left() += rBorder.Left(); diff --git a/tools/inc/tools/svlibrary.hxx b/tools/inc/tools/svlibrary.hxx new file mode 100644 index 000000000000..fa8ff7c8068b --- /dev/null +++ b/tools/inc/tools/svlibrary.hxx @@ -0,0 +1,42 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +#ifndef _SVLIBRARY_HXX +#define _SVLIBRARY_HXX + +#include "tools/toolsdllapi.h" + +#include <osl/module.hxx> +#include <rtl/ustring.hxx> + +class TOOLS_DLLPUBLIC SvLibrary +{ +public: + static bool LoadModule( osl::Module&, const rtl::OUString& rLibName, ::oslGenericFunction baseModule, ::sal_Int32 mode = SAL_LOADMODULE_DEFAULT ); +}; + +#endif + diff --git a/tools/inc/tools/urlobj.hxx b/tools/inc/tools/urlobj.hxx index 86a8114ab0b8..17d52432e206 100644 --- a/tools/inc/tools/urlobj.hxx +++ b/tools/inc/tools/urlobj.hxx @@ -125,22 +125,21 @@ enum INetProtocol INET_PROT_DATA = 15, INET_PROT_CID = 16, INET_PROT_OUT = 17, - INET_PROT_VND_SUN_STAR_WFS = 18, - INET_PROT_VND_SUN_STAR_HIER = 19, - INET_PROT_VIM = 20, - INET_PROT_UNO = 21, - INET_PROT_COMPONENT = 22, - INET_PROT_VND_SUN_STAR_PKG = 23, - INET_PROT_LDAP = 24, - INET_PROT_DB = 25, - INET_PROT_VND_SUN_STAR_CMD = 26, - INET_PROT_VND_SUN_STAR_ODMA = 27, - INET_PROT_TELNET = 28, - INET_PROT_VND_SUN_STAR_EXPAND = 29, - INET_PROT_VND_SUN_STAR_TDOC = 30, - INET_PROT_GENERIC = 31, - INET_PROT_SMB = 32, - INET_PROT_END = 33 + INET_PROT_VND_SUN_STAR_HIER = 18, + INET_PROT_VIM = 19, + INET_PROT_UNO = 20, + INET_PROT_COMPONENT = 21, + INET_PROT_VND_SUN_STAR_PKG = 22, + INET_PROT_LDAP = 23, + INET_PROT_DB = 24, + INET_PROT_VND_SUN_STAR_CMD = 25, + INET_PROT_VND_SUN_STAR_ODMA = 26, + INET_PROT_TELNET = 27, + INET_PROT_VND_SUN_STAR_EXPAND = 28, + INET_PROT_VND_SUN_STAR_TDOC = 29, + INET_PROT_GENERIC = 30, + INET_PROT_SMB = 31, + INET_PROT_END = 32 }; //============================================================================ diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 8f13af8fd842..7d6296b76e8c 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -215,6 +215,7 @@ typedef sal_Int64 WinBits; // Window-Bits for CheckBox #define WB_CBLINESTYLE ((WinBits)SAL_CONST_INT64(0x2000000000)) +#define WB_EARLYTOGGLE ((WinBits)SAL_CONST_INT64(0x4000000000)) // Window-Bits for Edit #define WB_PASSWORD ((WinBits)0x01000000) diff --git a/tools/qa/makefile.mk b/tools/qa/makefile.mk index 66ed19e20737..abaea848c1db 100644 --- a/tools/qa/makefile.mk +++ b/tools/qa/makefile.mk @@ -32,6 +32,7 @@ ENABLE_EXCEPTIONS = TRUE .INCLUDE: settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) DLLPRE = # no leading "lib" on .so files SHL1TARGET = test_pathutils diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx index 62f36e662ea9..e17457c60525 100644 --- a/tools/source/debug/debug.cxx +++ b/tools/source/debug/debug.cxx @@ -151,7 +151,6 @@ struct DebugData USHORT bInit; DbgPrintLine pDbgPrintMsgBox; DbgPrintLine pDbgPrintWindow; - DbgPrintLine pDbgPrintShell; DbgPrintLine pDbgPrintTestTool; ::std::vector< DbgPrintLine > aDbgPrintUserChannels; @@ -166,7 +165,6 @@ struct DebugData :bInit( FALSE ) ,pDbgPrintMsgBox( FALSE ) ,pDbgPrintWindow( NULL ) - ,pDbgPrintShell( NULL ) ,pDbgPrintTestTool( NULL ) ,pProfList( NULL ) ,pXtorList( NULL ) @@ -1037,9 +1035,7 @@ static void DebugDeInit() pData->aDbgData.nTestFlags &= (DBG_TEST_MEM | DBG_TEST_PROFILING); pData->aDbgPrintUserChannels.clear(); pData->pDbgPrintTestTool = NULL; - pData->pDbgPrintShell = NULL; pData->pDbgPrintWindow = NULL; - pData->pDbgPrintShell = NULL; pData->pOldDebugMessageFunc = NULL; ImplDbgDeInitLock(); } @@ -1199,10 +1195,6 @@ void* DbgFunc( USHORT nAction, void* pParam ) pDebugData->pDbgPrintWindow = (DbgPrintLine)(long)pParam; break; - case DBG_FUNC_SETPRINTSHELL: - pDebugData->pDbgPrintShell = (DbgPrintLine)(long)pParam; - break; - case DBG_FUNC_SETPRINTTESTTOOL: pDebugData->pDbgPrintTestTool = (DbgPrintLine)(long)pParam; break; @@ -1739,14 +1731,6 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT if ( pData->pDbgPrintMsgBox ) pData->pDbgPrintMsgBox( aBufOut ); else - nOut = DBG_OUT_SHELL; - } - - if ( nOut == DBG_OUT_SHELL ) - { - if ( pData->pDbgPrintShell ) - pData->pDbgPrintShell( aBufOut ); - else nOut = DBG_OUT_WINDOW; } @@ -1758,14 +1742,28 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT nOut = DBG_OUT_FILE; } - if ( nOut == DBG_OUT_FILE ) + switch ( nOut ) + { + case DBG_OUT_SHELL: + DbgPrintShell( aBufOut ); + break; + case DBG_OUT_FILE: ImplDbgPrintFile( aBufOut ); + break; + } ImplDbgUnlock(); bIn = FALSE; } +void DbgPrintShell(char const * message) { + fprintf(stderr, "%s\n", message); +#if defined WNT + OutputDebugStringA(message); +#endif +} + // ----------------------------------------------------------------------- void DbgOutTypef( USHORT nDbgOut, const sal_Char* pFStr, ... ) diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx index 429835d35ab3..b6bf48a8cdf9 100644 --- a/tools/source/fsys/tdir.cxx +++ b/tools/source/fsys/tdir.cxx @@ -266,7 +266,7 @@ void Dir::Construct( DirEntryKind nKindFlags ) strcpy( pBuffer, aTStr.GetBuffer() ); CharLowerBuff( pBuffer, aTStr.Len() ); aNameMask = WildCard( String(pBuffer, osl_getThreadTextEncoding()), ';' ); - delete pBuffer; + delete [] pBuffer; } #else aNameMask = WildCard( CutName(), ';' ); diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 07c532e60dd7..a6d7bc6fd04e 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -191,11 +191,6 @@ using namespace com::sun; name = *(escaped / alphanum / "!" / "$" / "'" / "(" / ")" / "*" / "+" / "," / "-" / "." / ":" / ";" / "=" / "?" / "@" / "_" / "~" - ; prvate (see RFC 1738, RFC 2396) - vnd-sun-star-wfs-url = "VND.SUN.STAR.WFS://" [host / "LOCALHOST"] ["/" segment *("/" segment)] - segment = *pchar - - ; private vnd-sun-star-hier-url = "VND.SUN.STAR.HIER:" ["//"reg_name] *("/" *pchar) reg_name = 1*(escaped / alphanum / "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / "-" / "." / ":" / ";" / "=" / "@" / "_" / "~") @@ -403,8 +398,6 @@ static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END] false, false }, { "out", "out://", 0, true, false, false, false, false, false, false, false }, - { "vnd.sun.star.wfs", "vnd.sun.star.wfs://", 0, true, false, false, - false, true, true, true, false }, { "vnd.sun.star.hier", "vnd.sun.star.hier:", 0, true, false, false, false, false, false, true, false }, { "vim", "vim://", 0, true, true, false, true, false, false, true, @@ -429,7 +422,7 @@ static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END] false, false, false, false, false }, { "vnd.sun.star.tdoc", "vnd.sun.star.tdoc:", 0, false, false, false, false, false, false, true, false }, - { "", "", 0, false, false, false, false, false, false, false, false }, + { "", "", 0, false, false, false, false, true, true, true, false }, { "smb", "smb://", 139, true, true, false, true, true, true, true, true } }; @@ -1338,7 +1331,7 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, if (pHostPortBegin) { sal_Unicode const * pPort = pHostPortEnd; - if (getSchemeInfo().m_bPort && pHostPortBegin < pHostPortEnd) + if ( getSchemeInfo().m_bPort && pHostPortBegin < pHostPortEnd ) { sal_Unicode const * p1 = pHostPortEnd - 1; while (p1 > pHostPortBegin && INetMIME::isDigit(*p1)) @@ -1350,7 +1343,6 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, switch (m_eScheme) { case INET_PROT_FILE: - case INET_PROT_VND_SUN_STAR_WFS: // If the host equals "LOCALHOST" (unencoded and ignoring // case), turn it into an empty host: if (INetMIME::equalIgnoreCase(pHostPortBegin, pPort, @@ -1367,7 +1359,6 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef, return false; } break; - default: if (pHostPortBegin == pPort) { @@ -1609,7 +1600,23 @@ bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef, STATE_DONE }; rtl::OUStringBuffer aSynAbsURIRef; - aSynAbsURIRef.appendAscii(getSchemeInfo().m_pScheme); + // make sure that the scheme is copied for generic schemes: getSchemeInfo().m_pScheme + // is empty ("") in that case, so take the scheme from m_aAbsURIRef + if (m_eScheme != INET_PROT_GENERIC) + { + aSynAbsURIRef.appendAscii(getSchemeInfo().m_pScheme); + } + else + { + sal_Unicode const * pSchemeBegin + = m_aAbsURIRef.getStr(); + sal_Unicode const * pSchemeEnd = pSchemeBegin; + while (pSchemeEnd[0] != ':') + { + ++pSchemeEnd; + } + aSynAbsURIRef.append(pSchemeBegin, pSchemeEnd - pSchemeBegin); + } aSynAbsURIRef.append(sal_Unicode(':')); sal_Char cEscapePrefix = getEscapePrefix(); @@ -2162,11 +2169,7 @@ INetURLObject::getPrefix(sal_Unicode const *& rBegin, { "vnd.sun.star.tdoc:", 0, INET_PROT_VND_SUN_STAR_TDOC, PrefixInfo::OFFICIAL }, { "vnd.sun.star.webdav:", 0, INET_PROT_VND_SUN_STAR_WEBDAV, - PrefixInfo::OFFICIAL }, - { "vnd.sun.star.wfs:", 0, INET_PROT_VND_SUN_STAR_WFS, - PrefixInfo::OFFICIAL }, - { "wfs:", "vnd.sun.star.wfs:", INET_PROT_VND_SUN_STAR_WFS, - PrefixInfo::ALIAS } }; + PrefixInfo::OFFICIAL } }; PrefixInfo const * pFirst = aMap + 1; PrefixInfo const * pLast = aMap + sizeof aMap / sizeof (PrefixInfo) - 1; PrefixInfo const * pMatch = 0; @@ -2889,7 +2892,6 @@ bool INetURLObject::setHost(rtl::OUString const & rTheHost, bool bOctets, switch (m_eScheme) { case INET_PROT_FILE: - case INET_PROT_VND_SUN_STAR_WFS: { rtl::OUString sTemp(aSynHost); if (sTemp.equalsIgnoreAsciiCaseAsciiL( @@ -2985,7 +2987,6 @@ bool INetURLObject::parsePath(INetProtocol eScheme, break; case INET_PROT_FILE: - case INET_PROT_VND_SUN_STAR_WFS: { if (bSkippedInitialSlash) aTheSynPath.append(sal_Unicode('/')); @@ -3398,7 +3399,6 @@ bool INetURLObject::parsePath(INetProtocol eScheme, if (aTheSynPath.getLength() == 0) return false; break; - default: OSL_ASSERT(false); break; @@ -3825,7 +3825,27 @@ INetURLObject::getAbbreviated( OSL_ENSURE(rStringWidth.is(), "specification violation"); sal_Char cEscapePrefix = getEscapePrefix(); rtl::OUStringBuffer aBuffer; - aBuffer.appendAscii(getSchemeInfo().m_pScheme); + // make sure that the scheme is copied for generic schemes: getSchemeInfo().m_pScheme + // is empty ("") in that case, so take the scheme from m_aAbsURIRef + if (m_eScheme != INET_PROT_GENERIC) + { + aBuffer.appendAscii(getSchemeInfo().m_pScheme); + } + else + { + if (m_aAbsURIRef) + { + sal_Unicode const * pSchemeBegin + = m_aAbsURIRef.getStr(); + sal_Unicode const * pSchemeEnd = pSchemeBegin; + + while (pSchemeEnd[0] != ':') + { + ++pSchemeEnd; + } + aBuffer.append(pSchemeBegin, pSchemeEnd - pSchemeBegin); + } + } aBuffer.append(static_cast< sal_Unicode >(':')); bool bAuthority = getSchemeInfo().m_bAuthority; sal_Unicode const * pCoreBegin @@ -4007,7 +4027,6 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const switch (m_eScheme) { case INET_PROT_FILE: - case INET_PROT_VND_SUN_STAR_WFS: { // If the URL paths of two file URLs only differ in that one has a // final '/' and the other has not, take the two paths as @@ -4162,7 +4181,6 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme, switch (m_eScheme) { case INET_PROT_FILE: - case INET_PROT_VND_SUN_STAR_WFS: { rtl::OUString sTemp(aSynHost); if (sTemp.equalsIgnoreAsciiCaseAsciiL( diff --git a/tools/source/generic/makefile.mk b/tools/source/generic/makefile.mk index 5cdaa02065ae..07bab82f32b0 100644 --- a/tools/source/generic/makefile.mk +++ b/tools/source/generic/makefile.mk @@ -37,9 +37,10 @@ TARGET=gen # --- Files -------------------------------------------------------- -EXCEPTIONSFILES = $(SLO)$/poly.obj $(OBJ)$/poly.obj +EXCEPTIONSFILES = $(SLO)$/poly.obj $(OBJ)$/poly.obj $(SLO)$/svlibrary.obj SLOFILES= $(SLO)$/toolsin.obj \ + $(SLO)$/svlibrary.obj \ $(SLO)$/b3dtrans.obj \ $(SLO)$/link.obj \ $(SLO)$/bigint.obj \ diff --git a/tools/source/generic/svlibrary.cxx b/tools/source/generic/svlibrary.cxx new file mode 100644 index 000000000000..6ebfd0086b5c --- /dev/null +++ b/tools/source/generic/svlibrary.cxx @@ -0,0 +1,129 @@ +/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_tools.hxx"
+
+#include <tools/svlibrary.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/util/XMacroExpander.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <comphelper/processfactory.hxx>
+#include <tools/string.hxx>
+#include <rtl/uri.hxx>
+
+using namespace com::sun::star;
+
+static uno::Sequence< rtl::OUString > GetMultiPaths_Impl()
+{
+ uno::Sequence< rtl::OUString > aRes;
+ uno::Sequence< rtl::OUString > aInternalPaths;
+ uno::Sequence< rtl::OUString > aUserPaths;
+
+ bool bSuccess = true;
+ uno::Reference< lang::XMultiServiceFactory > xMgr( comphelper::getProcessServiceFactory() );
+ if (xMgr.is())
+ {
+ try
+ {
+ String aInternal;
+ aInternal.AppendAscii("Libraries");
+ String aUser;
+ aUser.AppendAscii("Libraries");
+ aInternal .AppendAscii( "_internal" );
+ aUser .AppendAscii( "_user" );
+
+ uno::Reference< beans::XPropertySet > xPathSettings( xMgr->createInstance(
+ rtl::OUString::createFromAscii( "com.sun.star.util.PathSettings" ) ), uno::UNO_QUERY_THROW );
+ xPathSettings->getPropertyValue( aInternal ) >>= aInternalPaths;
+ xPathSettings->getPropertyValue( aUser ) >>= aUserPaths;
+ }
+ catch (uno::Exception &)
+ {
+ bSuccess = false;
+ }
+ }
+ if (bSuccess)
+ {
+ sal_Int32 nMaxEntries = aInternalPaths.getLength() + aUserPaths.getLength();
+ aRes.realloc( nMaxEntries );
+ rtl::OUString *pRes = aRes.getArray();
+ sal_Int32 nCount = 0; // number of actually added entries
+ for (int i = 0; i < 2; ++i)
+ {
+ const uno::Sequence< rtl::OUString > &rPathSeq = i == 0 ? aUserPaths : aInternalPaths;
+ const rtl::OUString *pPathSeq = rPathSeq.getConstArray();
+ for (sal_Int32 k = 0; k < rPathSeq.getLength(); ++k)
+ {
+ const bool bAddUser = (&rPathSeq == &aUserPaths);
+ const bool bAddInternal = (&rPathSeq == &aInternalPaths);
+ if ((bAddUser || bAddInternal) && pPathSeq[k].getLength() > 0)
+ pRes[ nCount++ ] = pPathSeq[k];
+ }
+ }
+ aRes.realloc( nCount );
+ }
+
+ return aRes;
+}
+
+bool SvLibrary::LoadModule( osl::Module& rModule, const rtl::OUString& rLibName, ::oslGenericFunction baseModule, ::sal_Int32 mode )
+{
+ static uno::Sequence < rtl::OUString > aPaths = GetMultiPaths_Impl();
+ bool bLoaded = false;
+
+ for (sal_Int32 n=0; n<aPaths.getLength(); n++)
+ {
+ rtl::OUString aMod = aPaths[n];
+ if ( aPaths[n].indexOfAsciiL("vnd.sun.star.expand",19) == 0)
+ {
+ uno::Reference< uno::XComponentContext > xComponentContext = comphelper::getProcessComponentContext();
+ uno::Reference< util::XMacroExpander > xMacroExpander;
+ xComponentContext->getValueByName(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.util.theMacroExpander") ) )
+ >>= xMacroExpander;
+
+ aMod = aMod.copy( sizeof("vnd.sun.star.expand:") -1 );
+ aMod = ::rtl::Uri::decode( aMod, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+ aMod = xMacroExpander->expandMacros( aMod );
+ }
+
+ aMod += ::rtl::OUString( sal_Unicode('/') );
+ aMod += rLibName;
+ bLoaded = rModule.load( aMod, mode );
+ if ( bLoaded )
+ break;
+ }
+
+ if (!bLoaded )
+ bLoaded = rModule.loadRelative( baseModule, rLibName, mode );
+
+ return bLoaded;
+}
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 8a3504a417c0..88ccb2113e0d 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -91,7 +91,7 @@ InternalStreamLock::InternalStreamLock( #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "locked %s", aFileName.GetBuffer() ); if( m_nStartPos || m_nEndPos ) - fprintf(stderr, " [ %d ... %d ]", m_nStartPos, m_nEndPos ); + fprintf(stderr, " [ %ld ... %ld ]", m_nStartPos, m_nEndPos ); fprintf( stderr, "\n" ); #endif } @@ -103,7 +103,7 @@ InternalStreamLock::~InternalStreamLock() ByteString aFileName(m_pStream->GetFileName(), osl_getThreadTextEncoding()); fprintf( stderr, "unlocked %s", aFileName.GetBuffer() ); if( m_nStartPos || m_nEndPos ) - fprintf(stderr, " [ %d ... %d ]", m_nStartPos, m_nEndPos ); + fprintf(stderr, " [ %ld ... %ld ]", m_nStartPos, m_nEndPos ); fprintf( stderr, "\n" ); #endif } @@ -209,7 +209,7 @@ static sal_uInt32 GetSvError( int nErrno ) { 0, SVSTREAM_OK }, { EACCES, SVSTREAM_ACCESS_DENIED }, { EBADF, SVSTREAM_INVALID_HANDLE }, -#if defined( RS6000 ) || defined( ALPHA ) || defined( HP9000 ) || defined( NETBSD ) || defined(FREEBSD) || defined(MACOSX) +#if defined( RS6000 ) || defined( ALPHA ) || defined( HP9000 ) || defined( NETBSD ) || defined(FREEBSD) || defined(MACOSX) || defined(__FreeBSD_kernel__) { EDEADLK, SVSTREAM_LOCKING_VIOLATION }, #else { EDEADLOCK, SVSTREAM_LOCKING_VIOLATION }, @@ -223,7 +223,7 @@ static sal_uInt32 GetSvError( int nErrno ) { EAGAIN, SVSTREAM_LOCKING_VIOLATION }, { EISDIR, SVSTREAM_PATH_NOT_FOUND }, { ELOOP, SVSTREAM_PATH_NOT_FOUND }, -#if ! defined( RS6000 ) && ! defined( ALPHA ) && ! defined( NETBSD ) && ! defined (FREEBSD) && ! defined (MACOSX) +#if ! defined( RS6000 ) && ! defined( ALPHA ) && ! defined( NETBSD ) && ! defined (FREEBSD) && ! defined (MACOSX) && ! defined(__FreeBSD_kernel__) { EMULTIHOP, SVSTREAM_PATH_NOT_FOUND }, { ENOLINK, SVSTREAM_PATH_NOT_FOUND }, #endif @@ -514,7 +514,7 @@ sal_Bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes ) if( ! InternalStreamLock::LockFile( nByteOffset, nByteOffset+nBytes, this ) ) { #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "InternalLock on %s [ %d ... %d ] failed\n", + fprintf( stderr, "InternalLock on %s [ %ld ... %ld ] failed\n", ByteString(aFilename, osl_getThreadTextEncoding()).GetBuffer(), nByteOffset, nByteOffset+nBytes ); #endif return sal_False; diff --git a/tools/test/export.map b/tools/test/export.map index 709047ae63e5..7321bbca16ad 100644 --- a/tools/test/export.map +++ b/tools/test/export.map @@ -25,7 +25,7 @@ # #************************************************************************* -UDK_3.1 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/tools/test/makefile.mk b/tools/test/makefile.mk index 5dea8ce6f960..ab2cfd8e6676 100644 --- a/tools/test/makefile.mk +++ b/tools/test/makefile.mk @@ -36,6 +36,8 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) + # --- Common ---------------------------------------------------------- SHL1OBJS= \ diff --git a/tools/workben/urltest.cxx b/tools/workben/urltest.cxx index 694698297680..0930dfcc5239 100644 --- a/tools/workben/urltest.cxx +++ b/tools/workben/urltest.cxx @@ -523,6 +523,8 @@ main() /*TODO "vnd.sun.star.wfs:///c|/xyz/",*/ /*TODO "vnd.sun.star.wfs://xxx/yyy?zzz",*/ "vnd.sun.star.wfs:///x/y/z", + "vnd.sun.star.generic:///x/y/z", + "vnd.sun.star.generic://host:34/x/y/z" /*TODO "wfs://",*/ /*TODO "wfs://LocalHost",*/ /*TODO "wfs:///c|/xyz/",*/ @@ -533,13 +535,21 @@ main() INetURLObject aUrl(aTest[i]); if (aUrl.HasError()) printf("BAD %s\n", aTest[i]); - else if (aUrl.GetMainURL(INetURLObject::DECODE_TO_IURI). - equalsAscii(aTest[i]) != sal_True) + else { + if (aUrl.GetProtocol() != INET_PROT_GENERIC) { + printf("BAD PROTOCOL %i -> %i\n", + aUrl.GetProtocol(), + INET_PROT_GENERIC); + } + if (aUrl.GetMainURL(INetURLObject::DECODE_TO_IURI). + equalsAscii(aTest[i]) != sal_True) + { String sTest(aUrl.GetMainURL(INetURLObject::DECODE_TO_IURI)); printf("BAD %s -> %s\n", aTest[i], ByteString(sTest, RTL_TEXTENCODING_ASCII_US).GetBuffer()); + } } } } |