34: m_xMgr(
std::move(_xMgr))
67 uno::Reference< report::meta::XFunctionCategory> xCategory =
m_xMgr->getCategory(
_nPos);
68 auto pCategory = std::make_shared<FunctionCategory>(
this,
_nPos + 1,xCategory);
78std::shared_ptr< FunctionDescription >
FunctionManager::get(
const uno::Reference< report::meta::XFunctionDescription>& _xFunctionDescription)
const
80 std::shared_ptr< FunctionDescription > pDesc;
81 if ( _xFunctionDescription.is() )
83 const OUString sFunctionName = _xFunctionDescription->getName();
84 TFunctionsMap::const_iterator aFunctionFind =
m_aFunctions.find(sFunctionName);
87 const uno::Reference< report::meta::XFunctionCategory> xCategory = _xFunctionDescription->getCategory();
88 const OUString sCategoryName = xCategory->getName();
89 TCategoriesMap::iterator aCategoryFind =
m_aCategories.find(sCategoryName);
92 aCategoryFind =
m_aCategories.emplace(sCategoryName,std::make_shared< FunctionCategory > (
this,xCategory->getNumber() + 1,xCategory)).first;
95 aFunctionFind =
m_aFunctions.emplace(sFunctionName,std::make_shared<FunctionDescription>(aCategoryFind->second.get(),_xFunctionDescription)).first;
97 pDesc = aFunctionFind->second;
104,m_nFunctionCount(_xCategory->getCount())
106,m_pFunctionManager(_pFMgr)
119 uno::Reference< report::meta::XFunctionDescription> xFunctionDescription =
m_xCategory->getFunction(
_nPos);
137: m_xFunctionDescription(
std::move(_xFunctionDescription))
138, m_pFunctionCategory(_pFunctionCategory)
169 catch(
const uno::Exception&)
181 _rArguments.push_back(
i);
217 const sal_uInt32 nVarArgs30 = 30;
218 const sal_uInt32 nPairedVarArgs60 = 60;
219 const sal_uInt32 nVarArgs255 = 255;
220 const sal_uInt32 nPairedVarArgs510 = 510;
227 "VAR_ARGS or PAIRED_VAR_ARGS has unexpected value");
228 if (nLen >= nPairedVarArgs510)
229 nLen -= nPairedVarArgs510;
230 else if (nLen >= nVarArgs255)
232 else if (nLen >= nPairedVarArgs60)
233 nLen -= nPairedVarArgs60;
234 else if (nLen >= nVarArgs30)
236 return nLen ? nLen - 1 : 0;
std::unique_ptr< weld::ComboBox > m_xCategory
virtual const formula::IFunctionDescription * getFunction(sal_uInt32 _nPos) const override
mutable ::std::vector< std::shared_ptr< FunctionDescription > > m_aFunctions
const FunctionManager * m_pFunctionManager
virtual sal_uInt32 getNumber() const override
virtual sal_uInt32 getCount() const override
virtual OUString getName() const override
css::uno::Reference< css::report::meta::XFunctionCategory > m_xCategory
FunctionCategory(const FunctionManager *_pFMgr, sal_uInt32 _nPos, const css::uno::Reference< css::report::meta::XFunctionCategory > &_xCategory)
sal_uInt32 m_nFunctionCount
virtual OUString getParameterName(sal_uInt32 _nPos) const override
FunctionDescription(const formula::IFunctionCategory *_pFunctionCategory, css::uno::Reference< css::report::meta::XFunctionDescription > _xFunctionDescription)
virtual void fillVisibleArgumentMapping(::std::vector< sal_uInt16 > &_rArguments) const override
virtual bool isHidden() const override
virtual sal_uInt32 getVarArgsStart() const override
virtual OUString getFunctionName() const override
css::uno::Reference< css::report::meta::XFunctionDescription > m_xFunctionDescription
virtual sal_Int32 getSuppressedArgumentCount() const override
virtual OUString getHelpId() const override
virtual OUString getDescription() const override
virtual OUString getParameterDescription(sal_uInt32 _nPos) const override
virtual sal_uInt32 getParameterCount() const override
css::uno::Sequence< css::sheet::FunctionArgument > m_aParameter
virtual OUString getSignature() const override
virtual OUString getFormula(const ::std::vector< OUString > &_aArguments) const override
virtual const formula::IFunctionCategory * getCategory() const override
virtual void initArgumentInfo() const override
const formula::IFunctionCategory * m_pFunctionCategory
virtual bool isParameterOptional(sal_uInt32 _nPos) const override
virtual sal_uInt32 getVarArgsLimit() const override
mutable ::std::vector< TCategoriesMap::iterator > m_aCategoryIndex
TFunctionsMap m_aFunctions
virtual sal_uInt32 getCount() const override
virtual const formula::IFunctionCategory * getCategory(sal_uInt32 nPos) const override
virtual void fillLastRecentlyUsedFunctions(::std::vector< const formula::IFunctionDescription * > &_rLastRUFunctions) const override
virtual sal_Unicode getSingleToken(const EToken _eToken) const override
FunctionManager(css::uno::Reference< css::report::meta::XFunctionManager > _xMgr)
virtual ~FunctionManager()
css::uno::Reference< css::report::meta::XFunctionManager > m_xMgr
std::shared_ptr< FunctionDescription > get(const css::uno::Reference< css::report::meta::XFunctionDescription > &_xFunctionDescription) const
TCategoriesMap m_aCategories
#define TOOLS_WARN_EXCEPTION(area, stream)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)