LibreOffice Module sc (master) 1
|
Stores spreadsheet functions in categories, including a cumulative ('All') category and makes them accessible. More...
#include <funcdesc.hxx>
Public Member Functions | |
ScFunctionMgr () | |
Retrieves all calc functions, generates cumulative ('All') category, and the categories. More... | |
virtual | ~ScFunctionMgr () |
const ScFuncDesc * | Get (sal_uInt16 nFIndex) const |
Returns function by index. More... | |
const ScFuncDesc * | First (sal_uInt16 nCategory=0) const |
Returns the first function in category nCategory. More... | |
const ScFuncDesc * | Next () const |
Returns the next function of the current category. More... | |
virtual sal_uInt32 | getCount () const override |
virtual const formula::IFunctionCategory * | getCategory (sal_uInt32 nPos) const override |
Returns a category. More... | |
virtual void | fillLastRecentlyUsedFunctions (::std::vector< const formula::IFunctionDescription * > &_rLastRUFunctions) const override |
Appends the last recently used functions. More... | |
virtual sal_Unicode | getSingleToken (const formula::IFunctionManager::EToken _eToken) const override |
Maps Etoken to character. More... | |
virtual sal_uInt32 | getCount () const=0 |
virtual const IFunctionCategory * | getCategory (sal_uInt32 nPos) const=0 |
virtual void | fillLastRecentlyUsedFunctions (::std::vector< const IFunctionDescription * > &_rLastRUFunctions) const=0 |
virtual sal_Unicode | getSingleToken (const EToken _eToken) const=0 |
Static Public Member Functions | |
static OUString | GetCategoryName (sal_uInt32 _nCategoryNumber) |
Returns name of category. More... | |
Private Attributes | |
std::vector< const ScFuncDesc * > | aCatLists [MAX_FUNCCAT] |
array of all categories, 0 is the cumulative ('All') category More... | |
std::map< sal_uInt32, std::shared_ptr< ScFunctionCategory > > | m_aCategories |
map of category pos to IFunctionCategory More... | |
std::vector< constScFuncDesc * >::const_iterator | pCurCatListIter |
position in current category More... | |
std::vector< constScFuncDesc * >::const_iterator | pCurCatListEnd |
end of current category More... | |
Additional Inherited Members | |
Public Types inherited from formula::IFunctionManager | |
enum | EToken |
Public Attributes inherited from formula::IFunctionManager | |
eOk | |
eClose | |
eSep | |
eArrayOpen | |
eArrayClose | |
Protected Member Functions inherited from formula::IFunctionManager | |
~IFunctionManager () | |
Stores spreadsheet functions in categories, including a cumulative ('All') category and makes them accessible.
Definition at line 308 of file funcdesc.hxx.
ScFunctionMgr::ScFunctionMgr | ( | ) |
Retrieves all calc functions, generates cumulative ('All') category, and the categories.
The function lists of the categories are sorted by (case insensitive) function name
< list of all calc functions
Definition at line 1029 of file funcdesc.cxx.
References aCatLists, begin, ScFuncDesc::compareByName(), end, ScFunctionList::First(), ScFunctionList::GetCount(), ScGlobal::GetStarCalcFunctionList(), i, MAX_FUNCCAT, ScFunctionList::Next(), pCurCatListEnd, and pCurCatListIter.
|
virtual |
Definition at line 1070 of file funcdesc.cxx.
|
overridevirtual |
Appends the last recently used functions.
Takes the last recently used functions, but maximal LRU_MAX, and appends them to the given vector _rLastRUFunctions.
_rLastRUFunctions | a vector of pointer to IFunctionDescription, by reference. |
Implements formula::IFunctionManager.
Definition at line 1131 of file funcdesc.cxx.
References Get(), ScAppOptions::GetLRUFuncList(), ScAppOptions::GetLRUFuncListCount(), i, LRU_MAX, and SC_MOD.
Referenced by ScFunctionWin::InitLRUList().
const ScFuncDesc * ScFunctionMgr::First | ( | sal_uInt16 | nCategory = 0 | ) | const |
Returns the first function in category nCategory.
Selects nCategory as current category and returns first element of this.
nCategory | index of requested category |
Definition at line 1084 of file funcdesc.cxx.
References aCatLists, MAX_FUNCCAT, pCurCatListEnd, and pCurCatListIter.
Referenced by Get(), and ScFunctionWin::UpdateFunctionList().
const ScFuncDesc * ScFunctionMgr::Get | ( | sal_uInt16 | nFIndex | ) | const |
Returns function by index.
Searches for a function with the function index nFIndex.
nFIndex | index of the function |
Definition at line 1075 of file funcdesc.cxx.
References First(), Next(), and ScFuncDesc::nFIndex.
Referenced by fillLastRecentlyUsedFunctions().
|
overridevirtual |
Returns a category.
Returns an IFunctionCategory object for a category specified by nPos.
nPos | the index of the category, note that 0 maps to the first category not the cumulative ('All') category. |
Implements formula::IFunctionManager.
Definition at line 1120 of file funcdesc.cxx.
References aCatLists, m_aCategories, and MAX_FUNCCAT.
Referenced by ScFuncDesc::getCategory().
|
static |
Returns name of category.
_nCategoryNumber | index of category |
Definition at line 1147 of file funcdesc.cxx.
References SC_FUNCGROUP_COUNT, and ScResId().
Referenced by ScFunctionCategory::getName().
|
overridevirtual |
Implements formula::IFunctionManager.
Definition at line 1115 of file funcdesc.cxx.
References MAX_FUNCCAT.
|
overridevirtual |
Maps Etoken to character.
Used for retrieving characters for parentheses and separators.
_eToken | token for which, the corresponding character is retrieved |
Implements formula::IFunctionManager.
Definition at line 1158 of file funcdesc.cxx.
References formula::IFunctionManager::eArrayClose, formula::IFunctionManager::eArrayOpen, formula::IFunctionManager::eClose, formula::IFunctionManager::eOk, formula::IFunctionManager::eSep, formula::FormulaCompiler::GetNativeSymbolChar(), ocArrayClose, ocArrayOpen, ocClose, ocOpen, and ocSep.
const ScFuncDesc * ScFunctionMgr::Next | ( | void | ) | const |
Returns the next function of the current category.
Definition at line 1102 of file funcdesc.cxx.
References pCurCatListEnd, and pCurCatListIter.
Referenced by Get(), and ScFunctionWin::UpdateFunctionList().
|
private |
array of all categories, 0 is the cumulative ('All') category
Definition at line 400 of file funcdesc.hxx.
Referenced by First(), getCategory(), and ScFunctionMgr().
|
mutableprivate |
map of category pos to IFunctionCategory
Definition at line 401 of file funcdesc.hxx.
Referenced by getCategory().
|
mutableprivate |
end of current category
Definition at line 403 of file funcdesc.hxx.
Referenced by First(), Next(), and ScFunctionMgr().
|
mutableprivate |
position in current category
Definition at line 402 of file funcdesc.hxx.
Referenced by First(), Next(), and ScFunctionMgr().