merge the formfield patch from ooo-build
[ooovba.git] / sc / addin / inc / addin.h
blob81bfe0d66ebb9bc87e7e8db36d0228e2dd93e3d7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: addin.h,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _ADDIN_H
32 #define _ADDIN_H
34 #ifndef _SOLAR_H
36 #ifndef TRUE
37 #define TRUE 1
38 #endif
39 #ifndef FALSE
40 #define FALSE 0
41 #endif
43 #undef NULL
44 #define NULL 0
46 typedef unsigned char BOOL;
47 typedef unsigned char BYTE;
48 typedef unsigned short USHORT;
49 typedef unsigned long ULONG;
51 #endif
53 #ifndef SUPD
54 /* enable all new interface features */
55 #define SUPD 9999
56 #endif
58 /* all character string returns are limited to 255+1 chars */
59 #define SO_CHARSTRING_MAX 256
60 #define SO_StringCopy( dst, src ) \
61 (strncpy( dst, src, SO_CHARSTRING_MAX ), dst[SO_CHARSTRING_MAX-1] = '\0')
63 typedef enum
65 PTR_DOUBLE,
66 PTR_STRING,
67 PTR_DOUBLE_ARR,
68 PTR_STRING_ARR,
69 PTR_CELL_ARR,
70 NONE
71 } ParamType;
73 #ifndef WIN
74 #ifdef WNT
75 #define CALLTYPE __cdecl
76 #else
77 #define CALLTYPE
78 #endif
79 #else
80 #define PASCAL _pascal
81 #define FAR _far
82 #define CALLTYPE FAR PASCAL
83 #endif
86 #ifdef __cplusplus
88 extern "C" {
90 typedef void (CALLTYPE* AdvData)( double& nHandle, void* pData );
92 extern void CALLTYPE GetFunctionCount( USHORT& nCount );
94 extern void CALLTYPE GetFunctionData( USHORT& nNo,
95 char* pFuncName,
96 USHORT& nParamCount,
97 ParamType* peType,
98 char* pInternalName );
100 extern void CALLTYPE IsAsync( USHORT& nNo, ParamType* peType );
102 extern void CALLTYPE Advice( USHORT& nNo, AdvData& pfCallback );
104 extern void CALLTYPE Unadvice( double& nHandle );
107 /* new in StarOffice 5.0 */
109 extern void CALLTYPE GetParameterDescription( USHORT& nNo, USHORT& nParam,
110 char* pName, char* pDesc );
112 /* new in StarOffice 5.1 */
114 extern void CALLTYPE SetLanguage( USHORT& nLanguage );
119 #else
121 typedef void (CALLTYPE* AdvData)( double* nHandle, void* pData );
123 extern void CALLTYPE GetFunctionCount( USHORT * nCount );
125 extern void CALLTYPE GetFunctionData( USHORT * nNo,
126 char * pFuncName,
127 USHORT * nParamCount,
128 ParamType * peType,
129 char * pInternalName );
131 extern void CALLTYPE IsAsync( USHORT * nNo, ParamType * peType );
133 extern void CALLTYPE Advice( USHORT * nNo, AdvData * pfCallback );
135 extern void CALLTYPE Unadvice( double * nHandle );
137 /* new in StarOffice 5.0 */
139 extern void CALLTYPE GetParameterDescription( USHORT* nNo, USHORT* nParam,
140 char* pName, char* pDesc );
143 /* new in StarOffice 5.1 */
145 extern void CALLTYPE SetLanguage( USHORT* nLanguage );
148 #endif
150 #endif