summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-08-05 19:46:07 +0200
committerEike Rathke <erack@redhat.com>2022-08-06 19:37:55 +0200
commitd778c6fd5c2ba8e27df46ec9e183a61ad29e30d5 (patch)
treeb99484fdf4b0330b97c551e5648da75a67ebc4aa /sc/inc
parent0a78f11fdd13d914d5f063007b2df9796e6dce9d (diff)
Resolves: tdf#135993 Create ScFunctionList and ScFuncDesc with English names
Used in Function Wizard and formula tooltips. Without, no matching name is found for AddIn English name and no tooltip/description/arguments are displayed. Change-Id: Ib0cf419c476dae495467c444f1ee1f84a55633a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137883 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/addincol.hxx10
-rw-r--r--sc/inc/funcdesc.hxx2
2 files changed, 9 insertions, 3 deletions
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx
index 14af12006637..bb89f8d3c87a 100644
--- a/sc/inc/addincol.hxx
+++ b/sc/inc/addincol.hxx
@@ -87,6 +87,7 @@ private:
OUString aLocalName; ///< for display
OUString aUpperName; ///< for entering formulas
OUString aUpperLocal; ///< for entering formulas
+ OUString aUpperEnglish; ///< for Function Wizard and tooltips
OUString aDescription;
css::uno::Reference< css::reflection::XIdlMethod> xFunction;
css::uno::Any aObject;
@@ -113,6 +114,7 @@ public:
const OUString& GetLocalName() const { return aLocalName; }
const OUString& GetUpperName() const { return aUpperName; }
const OUString& GetUpperLocal() const { return aUpperLocal; }
+ const OUString& GetUpperEnglish() const { return aUpperEnglish; }
const css::uno::Reference< css::reflection::XIdlMethod>& GetFunction() const
{ return xFunction; }
const css::uno::Any& GetObject() const { return aObject; }
@@ -132,6 +134,9 @@ public:
void SetArguments( tools::Long nNewCount, const ScAddInArgDesc* pNewDescs );
void SetCallerPos( tools::Long nNewPos );
void SetCompNames( ::std::vector< LocalizedName >&& rNew );
+
+ /// Takes care of handling an empty name *after* upper local name was set.
+ void SetEnglishName( const OUString& rEnglishName );
};
class SC_DLLPUBLIC ScUnoAddInCollection
@@ -175,9 +180,10 @@ public:
void LocalizeString( OUString& rName ); ///< modify rName - input: exact name
tools::Long GetFuncCount();
- bool FillFunctionDesc( tools::Long nFunc, ScFuncDesc& rDesc );
+ bool FillFunctionDesc( tools::Long nFunc, ScFuncDesc& rDesc, bool bEnglishFunctionNames );
- static bool FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc );
+ static bool FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc,
+ bool bEnglishFunctionNames );
/// leave rRetExcelName unchanged, if no matching name is found
bool GetExcelName( const OUString& rCalcName, LanguageType eDestLang, OUString& rRetExcelName );
/// leave rRetCalcName unchanged, if no matching name is found
diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx
index 58c6957316b3..0f37e924d941 100644
--- a/sc/inc/funcdesc.hxx
+++ b/sc/inc/funcdesc.hxx
@@ -241,7 +241,7 @@ public:
class ScFunctionList
{
public:
- ScFunctionList();
+ explicit ScFunctionList( bool bEnglishFunctionNames );
~ScFunctionList();
sal_uInt32 GetCount() const