1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _ADDIN_H 29 #define _ADDIN_H 30 31 #ifndef _SOLAR_H 32 33 #ifndef TRUE 34 #define TRUE 1 35 #endif 36 #ifndef FALSE 37 #define FALSE 0 38 #endif 39 40 #undef NULL 41 #define NULL 0 42 43 typedef unsigned char BOOL; 44 typedef unsigned char BYTE; 45 typedef unsigned short USHORT; 46 typedef unsigned long ULONG; 47 48 #endif 49 50 #ifndef SUPD 51 /* enable all new interface features */ 52 #define SUPD 9999 53 #endif 54 55 /* all character string returns are limited to 255+1 chars */ 56 #define SO_CHARSTRING_MAX 256 57 #define SO_StringCopy( dst, src ) \ 58 (strncpy( dst, src, SO_CHARSTRING_MAX ), dst[SO_CHARSTRING_MAX-1] = '\0') 59 60 typedef enum 61 { 62 PTR_DOUBLE, 63 PTR_STRING, 64 PTR_DOUBLE_ARR, 65 PTR_STRING_ARR, 66 PTR_CELL_ARR, 67 NONE 68 } ParamType; 69 70 #ifdef WNT 71 #define CALLTYPE __cdecl 72 #else 73 #define CALLTYPE 74 #endif 75 76 #ifdef __cplusplus 77 78 extern "C" { 79 80 typedef void (CALLTYPE* AdvData)( double& nHandle, void* pData ); 81 82 extern void CALLTYPE GetFunctionCount( USHORT& nCount ); 83 84 extern void CALLTYPE GetFunctionData( USHORT& nNo, 85 char* pFuncName, 86 USHORT& nParamCount, 87 ParamType* peType, 88 char* pInternalName ); 89 90 extern void CALLTYPE IsAsync( USHORT& nNo, ParamType* peType ); 91 92 extern void CALLTYPE Advice( USHORT& nNo, AdvData& pfCallback ); 93 94 extern void CALLTYPE Unadvice( double& nHandle ); 95 96 97 /* new in StarOffice 5.0 */ 98 99 extern void CALLTYPE GetParameterDescription( USHORT& nNo, USHORT& nParam, 100 char* pName, char* pDesc ); 101 102 /* new in StarOffice 5.1 */ 103 104 extern void CALLTYPE SetLanguage( USHORT& nLanguage ); 105 106 107 }; 108 109 #else 110 111 typedef void (CALLTYPE* AdvData)( double* nHandle, void* pData ); 112 113 extern void CALLTYPE GetFunctionCount( USHORT * nCount ); 114 115 extern void CALLTYPE GetFunctionData( USHORT * nNo, 116 char * pFuncName, 117 USHORT * nParamCount, 118 ParamType * peType, 119 char * pInternalName ); 120 121 extern void CALLTYPE IsAsync( USHORT * nNo, ParamType * peType ); 122 123 extern void CALLTYPE Advice( USHORT * nNo, AdvData * pfCallback ); 124 125 extern void CALLTYPE Unadvice( double * nHandle ); 126 127 /* new in StarOffice 5.0 */ 128 129 extern void CALLTYPE GetParameterDescription( USHORT* nNo, USHORT* nParam, 130 char* pName, char* pDesc ); 131 132 133 /* new in StarOffice 5.1 */ 134 135 extern void CALLTYPE SetLanguage( USHORT* nLanguage ); 136 137 138 #endif 139 140 #endif 141