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