1*feb022d5SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*feb022d5SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*feb022d5SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*feb022d5SAndrew Rist * distributed with this work for additional information 6*feb022d5SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*feb022d5SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*feb022d5SAndrew Rist * "License"); you may not use this file except in compliance 9*feb022d5SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*feb022d5SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*feb022d5SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*feb022d5SAndrew Rist * software distributed under the License is distributed on an 15*feb022d5SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*feb022d5SAndrew Rist * KIND, either express or implied. See the License for the 17*feb022d5SAndrew Rist * specific language governing permissions and limitations 18*feb022d5SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*feb022d5SAndrew Rist *************************************************************/ 21*feb022d5SAndrew Rist 22*feb022d5SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _ADDIN_H 25cdf0e10cSrcweir #define _ADDIN_H 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifndef _SOLAR_H 28cdf0e10cSrcweir 29cdf0e10cSrcweir #ifndef TRUE 30cdf0e10cSrcweir #define TRUE 1 31cdf0e10cSrcweir #endif 32cdf0e10cSrcweir #ifndef FALSE 33cdf0e10cSrcweir #define FALSE 0 34cdf0e10cSrcweir #endif 35cdf0e10cSrcweir 36cdf0e10cSrcweir #undef NULL 37cdf0e10cSrcweir #define NULL 0 38cdf0e10cSrcweir 39cdf0e10cSrcweir typedef unsigned char BOOL; 40cdf0e10cSrcweir typedef unsigned char BYTE; 41cdf0e10cSrcweir typedef unsigned short USHORT; 42cdf0e10cSrcweir typedef unsigned long ULONG; 43cdf0e10cSrcweir 44cdf0e10cSrcweir #endif 45cdf0e10cSrcweir 46cdf0e10cSrcweir #ifndef SUPD 47cdf0e10cSrcweir /* enable all new interface features */ 48cdf0e10cSrcweir #define SUPD 9999 49cdf0e10cSrcweir #endif 50cdf0e10cSrcweir 51cdf0e10cSrcweir /* all character string returns are limited to 255+1 chars */ 52cdf0e10cSrcweir #define SO_CHARSTRING_MAX 256 53cdf0e10cSrcweir #define SO_StringCopy( dst, src ) \ 54cdf0e10cSrcweir (strncpy( dst, src, SO_CHARSTRING_MAX ), dst[SO_CHARSTRING_MAX-1] = '\0') 55cdf0e10cSrcweir 56cdf0e10cSrcweir typedef enum 57cdf0e10cSrcweir { 58cdf0e10cSrcweir PTR_DOUBLE, 59cdf0e10cSrcweir PTR_STRING, 60cdf0e10cSrcweir PTR_DOUBLE_ARR, 61cdf0e10cSrcweir PTR_STRING_ARR, 62cdf0e10cSrcweir PTR_CELL_ARR, 63cdf0e10cSrcweir NONE 64cdf0e10cSrcweir } ParamType; 65cdf0e10cSrcweir 66cdf0e10cSrcweir #ifdef WNT 67cdf0e10cSrcweir #define CALLTYPE __cdecl 68cdf0e10cSrcweir #else 69cdf0e10cSrcweir #define CALLTYPE 70cdf0e10cSrcweir #endif 71cdf0e10cSrcweir 72cdf0e10cSrcweir #ifdef __cplusplus 73cdf0e10cSrcweir 74cdf0e10cSrcweir extern "C" { 75cdf0e10cSrcweir 76cdf0e10cSrcweir typedef void (CALLTYPE* AdvData)( double& nHandle, void* pData ); 77cdf0e10cSrcweir 78cdf0e10cSrcweir extern void CALLTYPE GetFunctionCount( USHORT& nCount ); 79cdf0e10cSrcweir 80cdf0e10cSrcweir extern void CALLTYPE GetFunctionData( USHORT& nNo, 81cdf0e10cSrcweir char* pFuncName, 82cdf0e10cSrcweir USHORT& nParamCount, 83cdf0e10cSrcweir ParamType* peType, 84cdf0e10cSrcweir char* pInternalName ); 85cdf0e10cSrcweir 86cdf0e10cSrcweir extern void CALLTYPE IsAsync( USHORT& nNo, ParamType* peType ); 87cdf0e10cSrcweir 88cdf0e10cSrcweir extern void CALLTYPE Advice( USHORT& nNo, AdvData& pfCallback ); 89cdf0e10cSrcweir 90cdf0e10cSrcweir extern void CALLTYPE Unadvice( double& nHandle ); 91cdf0e10cSrcweir 92cdf0e10cSrcweir 93cdf0e10cSrcweir /* new in StarOffice 5.0 */ 94cdf0e10cSrcweir 95cdf0e10cSrcweir extern void CALLTYPE GetParameterDescription( USHORT& nNo, USHORT& nParam, 96cdf0e10cSrcweir char* pName, char* pDesc ); 97cdf0e10cSrcweir 98cdf0e10cSrcweir /* new in StarOffice 5.1 */ 99cdf0e10cSrcweir 100cdf0e10cSrcweir extern void CALLTYPE SetLanguage( USHORT& nLanguage ); 101cdf0e10cSrcweir 102cdf0e10cSrcweir 103cdf0e10cSrcweir }; 104cdf0e10cSrcweir 105cdf0e10cSrcweir #else 106cdf0e10cSrcweir 107cdf0e10cSrcweir typedef void (CALLTYPE* AdvData)( double* nHandle, void* pData ); 108cdf0e10cSrcweir 109cdf0e10cSrcweir extern void CALLTYPE GetFunctionCount( USHORT * nCount ); 110cdf0e10cSrcweir 111cdf0e10cSrcweir extern void CALLTYPE GetFunctionData( USHORT * nNo, 112cdf0e10cSrcweir char * pFuncName, 113cdf0e10cSrcweir USHORT * nParamCount, 114cdf0e10cSrcweir ParamType * peType, 115cdf0e10cSrcweir char * pInternalName ); 116cdf0e10cSrcweir 117cdf0e10cSrcweir extern void CALLTYPE IsAsync( USHORT * nNo, ParamType * peType ); 118cdf0e10cSrcweir 119cdf0e10cSrcweir extern void CALLTYPE Advice( USHORT * nNo, AdvData * pfCallback ); 120cdf0e10cSrcweir 121cdf0e10cSrcweir extern void CALLTYPE Unadvice( double * nHandle ); 122cdf0e10cSrcweir 123cdf0e10cSrcweir /* new in StarOffice 5.0 */ 124cdf0e10cSrcweir 125cdf0e10cSrcweir extern void CALLTYPE GetParameterDescription( USHORT* nNo, USHORT* nParam, 126cdf0e10cSrcweir char* pName, char* pDesc ); 127cdf0e10cSrcweir 128cdf0e10cSrcweir 129cdf0e10cSrcweir /* new in StarOffice 5.1 */ 130cdf0e10cSrcweir 131cdf0e10cSrcweir extern void CALLTYPE SetLanguage( USHORT* nLanguage ); 132cdf0e10cSrcweir 133cdf0e10cSrcweir 134cdf0e10cSrcweir #endif 135cdf0e10cSrcweir 136cdf0e10cSrcweir #endif 137