23#include <com/sun/star/uno/Any.h>
24#include <com/sun/star/uno/Reference.h>
25#include <com/sun/star/uno/Sequence.h>
29#include <rtl/ustring.hxx>
37#include <unordered_map>
49typedef std::unordered_map< OUString, const ScUnoAddInFuncData* >
ScAddInHashMap;
94 css::uno::Reference< css::reflection::XIdlMethod>
xFunction;
97 std::unique_ptr<ScAddInArgDesc[]>
108 sal_uInt16 nCat, OUString ,
109 css::uno::Reference< css::reflection::XIdlMethod> aFunc,
120 const css::uno::Reference< css::reflection::XIdlMethod>&
GetFunction()
const
130 const ::std::vector< LocalizedName >&
GetCompNames()
const;
132 bool bFallbackToAny =
true )
const;
134 void SetFunction(
const css::uno::Reference< css::reflection::XIdlMethod>& rNewFunc,
135 const css::uno::Any& rNewObj );
138 void SetCompNames( ::std::vector< LocalizedName >&& rNew );
148 std::unique_ptr<std::unique_ptr<ScUnoAddInFuncData>[]>
ppFuncData;
156 void ReadConfiguration();
157 void ReadFromAddIn(
const css::uno::Reference< css::uno::XInterface>& xInterface );
158 void UpdateFromAddIn(
const css::uno::Reference< css::uno::XInterface>& xInterface,
159 std::u16string_view rServiceName );
167 OUString FindFunction(
const OUString& rUpperName,
bool bLocalFirst );
172 const ScUnoAddInFuncData* GetFuncData(
const OUString& rName,
bool bComplete =
false );
182 void LocalizeString( OUString& rName );
188 bool bEnglishFunctionNames );
190 bool GetExcelName(
const OUString& rCalcName,
LanguageType eDestLang, OUString& rRetExcelName );
192 bool GetCalcName(
const OUString& rExcelName, OUString& rRetCalcName );
199 css::uno::Sequence<css::uno::Any>
aArgs;
201 css::uno::Reference<css::uno::XInterface>
xCaller;
210 css::uno::Reference<css::sheet::XVolatileResult>
xVarRes;
221 void SetCaller(
const css::uno::Reference<css::uno::XInterface>& rInterface );
230 void SetResult(
const css::uno::Any& rNewRes );
239 const css::uno::Reference<css::sheet::XVolatileResult>&
std::unordered_map< OUString, const ScUnoAddInFuncData * > ScAddInHashMap
@ SC_ADDINARG_VALUE_OR_ARRAY
any
@ SC_ADDINARG_INTEGER
long
@ SC_ADDINARG_STRING
string
@ SC_ADDINARG_VARARGS
sequence<any>
@ SC_ADDINARG_STRING_ARRAY
sequence<sequence<string>>
@ SC_ADDINARG_INTEGER_ARRAY
sequence<sequence<long>>
@ SC_ADDINARG_DOUBLE
double
@ SC_ADDINARG_CALLER
XPropertySet.
@ SC_ADDINARG_DOUBLE_ARRAY
sequence<sequence<double>>
@ SC_ADDINARG_CELLRANGE
XCellRange.
@ SC_ADDINARG_MIXED_ARRAY
sequence<sequence<any>>
Stores and generates human readable descriptions for spreadsheet-functions, e.g. functions used in fo...
ScUnoAddInCall(ScDocument &rDoc, ScUnoAddInCollection &rColl, const OUString &rName, tools::Long nParamCount)
const ScMatrixRef & GetMatrix() const
FormulaError GetErrCode() const
void SetResult(const css::uno::Any &rNewRes)
ScAddInArgumentType GetArgType(tools::Long nPos)
css::uno::Reference< css::sheet::XVolatileResult > xVarRes
const css::uno::Reference< css::sheet::XVolatileResult > & GetVarRes() const
css::uno::Sequence< css::uno::Any > aVarArg
void SetCaller(const css::uno::Reference< css::uno::XInterface > &rInterface)
const OUString & GetString() const
void ExecuteCallWithArgs(css::uno::Sequence< css::uno::Any > &rCallArgs)
const ScUnoAddInFuncData * pFuncData
css::uno::Sequence< css::uno::Any > aArgs
void SetParam(tools::Long nPos, const css::uno::Any &rValue)
css::uno::Reference< css::uno::XInterface > xCaller
void SetCallerFromObjectShell(const SfxObjectShell *pSh)
std::unique_ptr< ScAddInHashMap > pLocalHashMap
localized name upper
std::unique_ptr< ScAddInHashMap > pEnglishHashMap
English name upper.
std::unique_ptr< std::unique_ptr< ScUnoAddInFuncData >[]> ppFuncData
std::unique_ptr< ScAddInHashMap > pExactHashMap
exact internal name
std::unique_ptr< ScAddInHashMap > pNameHashMap
internal name upper
void SetFunction(const css::uno::Reference< css::reflection::XIdlMethod > &rNewFunc, const css::uno::Any &rNewObj)
OUString aUpperName
for entering formulas
const ScAddInArgDesc * GetArguments() const
const OUString & GetHelpId() const
tools::Long GetCallerPos() const
OUString aOriginalName
kept in formula
OUString aUpperEnglish
for Function Wizard and tooltips
css::uno::Reference< css::reflection::XIdlMethod > xFunction
ScUnoAddInFuncData(const OUString &rNam, const OUString &rLoc, OUString aDesc, sal_uInt16 nCat, OUString, css::uno::Reference< css::reflection::XIdlMethod > aFunc, css::uno::Any aO, tools::Long nAC, const ScAddInArgDesc *pAD, tools::Long nCP)
const OUString & GetUpperLocal() const
const ::std::vector< LocalizedName > & GetCompNames() const
sal_uInt16 GetCategory() const
const OUString & GetDescription() const
const OUString & GetUpperEnglish() const
bool GetExcelName(const LanguageTag &rDestLang, OUString &rRetExcelName, bool bFallbackToAny=true) const
const OUString & GetUpperName() const
void SetCallerPos(tools::Long nNewPos)
OUString aLocalName
for display
void SetCompNames(::std::vector< LocalizedName > &&rNew)
mutable ::std::vector< LocalizedName > maCompNames
const css::uno::Any & GetObject() const
std::unique_ptr< ScAddInArgDesc[]> pArgDescs
OUString aUpperLocal
for entering formulas
tools::Long GetArgumentCount() const
const css::uno::Reference< css::reflection::XIdlMethod > & GetFunction() const
const OUString & GetLocalName() const
void SetEnglishName(const OUString &rEnglishName)
Takes care of handling an empty name after upper local name was set.
void SetArguments(tools::Long nNewCount, const ScAddInArgDesc *pNewDescs)
const OUString & GetOriginalName() const
void Clear(EHistoryType eHistory)
ScAddInArgumentType eType
OUString aInternalName
used to match configuration and reflection information
LocalizedName(OUString aLocale, OUString aName)
::boost::intrusive_ptr< ScMatrix > ScMatrixRef