1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <rtl/ustring.hxx>
27 #define MAXFUNCPARAM 16
28 #define MAXARRSIZE 0xfffe
33 #define CALLTYPE __cdecl
37 typedef void (CALLTYPE
* AdvData
)( double& nHandle
, void* pData
);
54 friend class LegacyFuncCollection
;
56 const ModuleData
* pModuleData
;
57 OUString aInternalName
;
60 sal_uInt16 nParamCount
;
62 ParamType eParamType
[MAXFUNCPARAM
];
64 LegacyFuncData(const ModuleData
*pModule
,
65 const OUString
& rIName
,
66 const OUString
& rFName
,
69 const ParamType
* peType
,
71 LegacyFuncData(const LegacyFuncData
& rData
);
73 const OUString
& GetModuleName() const;
74 const OUString
& GetInternalName() const { return aInternalName
; }
75 sal_uInt16
GetParamCount() const { return nParamCount
; }
76 ParamType
GetParamType(sal_uInt16 nIndex
) const { return eParamType
[nIndex
]; }
77 ParamType
GetAsyncType() const { return eAsyncType
; }
78 void Call(void** ppParam
) const;
79 void Unadvice(double nHandle
);
81 /** name and description of parameter nParam.
82 nParam==0 => Desc := function description,
84 void getParamDesc( OUString
& aName
, OUString
& aDesc
, sal_uInt16 nParam
) const;
87 class LegacyFuncCollection
89 typedef std::map
<OUString
, std::unique_ptr
<LegacyFuncData
>> MapType
;
93 typedef MapType::const_iterator const_iterator
;
95 LegacyFuncCollection();
96 LegacyFuncCollection(const LegacyFuncCollection
& r
);
98 const LegacyFuncData
* findByName(const OUString
& rName
) const;
99 LegacyFuncData
* findByName(const OUString
& rName
);
100 void insert(LegacyFuncData
* pNew
);
102 const_iterator
begin() const;
103 const_iterator
end() const;
106 bool InitExternalFunc(const OUString
& rModuleName
);
107 void ExitExternalFunc();
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */