summaryrefslogtreecommitdiff
path: root/tools/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-05-11 20:59:39 +0200
committerKohei Yoshida <kyoshida@novell.com>2010-05-11 20:59:39 +0200
commit4b455165b645acf62a053b61737598214f5af785 (patch)
treedb7791f9b7011f25b11d69d0ac9f77c3b7337710 /tools/inc
parent1dffd5dc985c6bce998c6dbad58d39b83dbc0d45 (diff)
parentc5934ada09feec288519cbdfbe1c0c988a2fceec (diff)
rebased to DEV300_m77.
Diffstat (limited to 'tools/inc')
-rw-r--r--tools/inc/bootstrp/command.hxx4
-rw-r--r--tools/inc/tools/debug.hxx31
-rw-r--r--tools/inc/tools/diagnose_ex.h23
-rw-r--r--tools/inc/tools/postextstl.h36
-rw-r--r--tools/inc/tools/preextstl.h64
-rw-r--r--tools/inc/tools/wintypes.hxx5
6 files changed, 137 insertions, 26 deletions
diff --git a/tools/inc/bootstrp/command.hxx b/tools/inc/bootstrp/command.hxx
index e0d8f1e39aeb..638beb6cce1f 100644
--- a/tools/inc/bootstrp/command.hxx
+++ b/tools/inc/bootstrp/command.hxx
@@ -92,8 +92,6 @@ public:
void Print();
};
-static ByteString thePath( "PATH" );
-
/** Declares and spawns a child process.
The spawned programm could be a native executable or a schell script.
*/
@@ -127,7 +125,7 @@ public:
@param sItem specifies the system shell
@return the Location (when programm was found)
*/
- static ByteString Search( ByteString sEnv = thePath,
+ static ByteString Search( ByteString sEnv,
ByteString sItem = COMMAND_SHELL );
/** Spawns the Process
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 73b7bd9f96a5..fac739b32583 100644
--- a/tools/inc/tools/diagnose_ex.h
+++ b/tools/inc/tools/diagnose_ex.h
@@ -118,11 +118,28 @@
ifc ); }
/** This macro asserts the given condition (in debug mode), and
- returns false afterwards.
+ returns the given value afterwards.
*/
-#define ENSURE_OR_RETURN(c, m) if( !(c) ) { \
+#define ENSURE_OR_RETURN(c, m, r) if( !(c) ) { \
OSL_ENSURE(c, m); \
- return false; }
+ return r; }
+
+/** This macro asserts the given condition (in debug mode), and
+ returns false afterwards.
+ */
+#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; \
+ }
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..4d0418d01c57
--- /dev/null
+++ b/tools/inc/tools/preextstl.h
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#if defined(ADAPT_EXT_STL)
+# include <ostream>
+# include <istream>
+# include <fstream>
+# include <iostream>
+# include <vector>
+# include <list>
+# include <map>
+# include <algorithm>
+# if defined(std)
+# define std_was_redefined_as_stlport std
+# undef std
+# define _STLP_OUTERMOST_HEADER_ID 0xdeadbeaf
+# pragma GCC visibility push(default)
+# 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)
+# pragma GCC visibility pop
+# 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/wintypes.hxx b/tools/inc/tools/wintypes.hxx
index c909ca3e37b0..8f13af8fd842 100644
--- a/tools/inc/tools/wintypes.hxx
+++ b/tools/inc/tools/wintypes.hxx
@@ -178,10 +178,11 @@ typedef sal_Int64 WinBits;
#define WB_NOLABEL ((WinBits)0x02000000)
#define WB_SORT ((WinBits)0x04000000)
#define WB_DROPDOWN ((WinBits)0x08000000)
+#define WB_HIDE ((WinBits)SAL_CONST_INT64(0x80000000))
#define WB_AUTOHSCROLL ((WinBits)SAL_CONST_INT64(0x10000000))
#define WB_DOCKABLE ((WinBits)SAL_CONST_INT64(0x20000000))
#define WB_AUTOVSCROLL ((WinBits)SAL_CONST_INT64(0x40000000))
-#define WB_HYPHENATION (((WinBits)SAL_CONST_INT64(0x80000000)) | WB_WORDBREAK)
+#define WB_HYPHENATION (((WinBits)SAL_CONST_INT64(0x800000000)) | WB_WORDBREAK)
#define WB_CHILDDLGCTRL ((WinBits)SAL_CONST_INT64(0x100000000000))
// system floating window
@@ -193,7 +194,6 @@ typedef sal_Int64 WinBits;
#define WB_DEFAULTWIN ((WinBits)SAL_CONST_INT64(0x4000000000))
#define WB_NEEDSFOCUS ((WinBits)SAL_CONST_INT64(0x1000000000))
-#define WB_HIDE ((WinBits)SAL_CONST_INT64(0x80000000))
#define WB_HSCROLL WB_HORZ
#define WB_VSCROLL WB_VERT
#define WB_TOPIMAGE WB_TOP
@@ -205,6 +205,7 @@ typedef sal_Int64 WinBits;
#define WB_SMALLSTYLE ((WinBits)0x04000000)
#define WB_TOGGLE ((WinBits)SAL_CONST_INT64(0x1000000000))
#define WB_BEVELBUTTON ((WinBits)SAL_CONST_INT64(0x2000000000))
+#define WB_FLATBUTTON ((WinBits)SAL_CONST_INT64(0x4000000000))
// Window-Bits for FixedText
#define WB_PATHELLIPSIS ((WinBits)0x00100000)