diff options
Diffstat (limited to 'scaddins/source/pricing/pricing.hxx')
-rw-r--r-- | scaddins/source/pricing/pricing.hxx | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/scaddins/source/pricing/pricing.hxx b/scaddins/source/pricing/pricing.hxx index 18acc54c811f..82fbbb6cacc5 100644 --- a/scaddins/source/pricing/pricing.hxx +++ b/scaddins/source/pricing/pricing.hxx @@ -37,8 +37,6 @@ #include <com/sun/star/sheet/XCompatibilityNames.hpp> #include <com/sun/star/sheet/addin/XPricingFunctions.hpp> #include <cppuhelper/implbase.hxx> -#include <tools/resid.hxx> -#include <tools/resary.hxx> #define RETURN_FINITE(d) if( ::rtl::math::isFinite( d ) ) return d; else throw css::lang::IllegalArgumentException() @@ -46,12 +44,6 @@ namespace sca { namespace pricing { -class ScaResId : public ResId -{ -public: - ScaResId( sal_uInt16 nResId, ResMgr& rResMgr ); -}; - enum class ScaCategory { DateTime, @@ -65,8 +57,8 @@ enum class ScaCategory struct ScaFuncDataBase { const sal_Char* pIntName; // internal name (get***) - sal_uInt16 nUINameID; // resource ID to UI name - sal_uInt16 nDescrID; // resource ID to description, parameter names and ~ description + const char* pUINameID; // resource ID to UI name + const char** pDescrID; // resource ID to description, parameter names and ~ description // pCompName was originally meant to be able to load Excel documents that for // some time were stored with localized function names. // This is not relevant to this add-in, so we only supply the same @@ -82,12 +74,12 @@ struct ScaFuncDataBase class ScaFuncData final { private: - OUString aIntName; // internal name (get***) - sal_uInt16 nUINameID; // resource ID to UI name - sal_uInt16 nDescrID; // leads also to parameter descriptions! - sal_uInt16 nParamCount; // num of parameters - std::vector<OUString> aCompList; // list of all valid names - ScaCategory eCat; // function category + OUString aIntName; // internal name (get***) + const char* pUINameID; // resource ID to UI name + const char** pDescrID; // leads also to parameter descriptions! + sal_uInt16 nParamCount; // num of parameters + std::vector<OUString> aCompList; // list of all valid names + ScaCategory eCat; // function category bool bDouble; // name already exist in Calc bool bWithOpt; // first parameter is internal @@ -95,8 +87,8 @@ public: ScaFuncData(const ScaFuncDataBase& rBaseData); ~ScaFuncData(); - sal_uInt16 GetUINameID() const { return nUINameID; } - sal_uInt16 GetDescrID() const { return nDescrID; } + const char* GetUINameID() const { return pUINameID; } + const char** GetDescrID() const { return pDescrID; } ScaCategory GetCategory() const { return eCat; } bool IsDouble() const { return bDouble; } @@ -140,23 +132,23 @@ class ScaPricingAddIn : public ::cppu::WeakImplHelper< private: css::lang::Locale aFuncLoc; css::lang::Locale* pDefLocales; - ResMgr* pResMgr; + std::locale aResLocale; sca::pricing::ScaFuncDataList* pFuncDataList; void InitDefLocales(); const css::lang::Locale& GetLocale( sal_uInt32 nIndex ); - /// @throws css::uno::RuntimeException - ResMgr& GetResMgr(); void InitData(); /// @throws css::uno::RuntimeException - OUString GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ); + OUString GetFuncDescrStr(const char** pResId, sal_uInt16 nStrIndex); public: ScaPricingAddIn(); virtual ~ScaPricingAddIn() override; + OUString ScaResId(const char* pResId); + static OUString getImplementationName_Static(); static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); |