LibreOffice Module sfx2 (master) 1
|
#include <Context.hxx>
Public Member Functions | |
Context () | |
Context (OUString sApplication, OUString sContext) | |
sal_Int32 | EvaluateMatch (const Context &rOther) const |
Return the numeric value that describes how good the match between two contexts is. More... | |
bool | operator== (const Context &rOther) const |
bool | operator!= (const Context &rOther) const |
Public Attributes | |
OUString | msApplication |
OUString | msContext |
Static Public Attributes | |
static const sal_Int32 | NoMatch = 4 |
When two contexts are matched against each other, then application or context name may have the wildcard value 'any'. More... | |
static const sal_Int32 | OptimalMatch = 0 |
static const sal_Int32 | ApplicationWildcardMatch = 1 |
static const sal_Int32 | ContextWildcardMatch = 2 |
Definition at line 27 of file Context.hxx.
sfx2::sidebar::Context::Context | ( | ) |
Definition at line 33 of file Context.cxx.
sfx2::sidebar::Context::Context | ( | OUString | sApplication, |
OUString | sContext | ||
) |
Definition at line 39 of file Context.cxx.
sal_Int32 sfx2::sidebar::Context::EvaluateMatch | ( | const Context & | rOther | ) | const |
Return the numeric value that describes how good the match between two contexts is.
Smaller values represent better matches.
Definition at line 47 of file Context.cxx.
References AnyApplicationName, AnyContextName, ApplicationWildcardMatch, ContextWildcardMatch, msApplication, msContext, and NoMatch.
Referenced by sfx2::sidebar::ContextList::FindBestMatch(), and sfx2::sidebar::ContextList::ToggleVisibilityForContext().
bool sfx2::sidebar::Context::operator!= | ( | const Context & | rOther | ) | const |
Definition at line 71 of file Context.cxx.
References msApplication, and msContext.
bool sfx2::sidebar::Context::operator== | ( | const Context & | rOther | ) | const |
Definition at line 65 of file Context.cxx.
References msApplication, and msContext.
|
static |
Definition at line 43 of file Context.hxx.
Referenced by EvaluateMatch(), and sfx2::sidebar::ContextList::ToggleVisibilityForContext().
|
static |
Definition at line 44 of file Context.hxx.
Referenced by EvaluateMatch(), and sfx2::sidebar::ContextList::ToggleVisibilityForContext().
OUString sfx2::sidebar::Context::msApplication |
Definition at line 30 of file Context.hxx.
Referenced by sfx2::sidebar::SidebarController::CreateUIElement(), EvaluateMatch(), sfx2::sidebar::ResourceManager::GetLastActiveDeck(), sfx2::sidebar::isChartOrMathContext(), operator!=(), operator==(), sfx2::sidebar::ResourceManager::SaveLastActiveDeck(), sfx2::sidebar::ResourceManager::SetLastActiveDeck(), sfx2::sidebar::SidebarController::SwitchToDeck(), sfx2::sidebar::TabBar::ToggleHideFlag(), and sfx2::sidebar::SidebarController::UpdateConfigurations().
OUString sfx2::sidebar::Context::msContext |
Definition at line 31 of file Context.hxx.
Referenced by sfx2::sidebar::SidebarController::CreateUIElement(), EvaluateMatch(), operator!=(), operator==(), and sfx2::sidebar::SidebarController::SwitchToDeck().
|
static |
When two contexts are matched against each other, then application or context name may have the wildcard value 'any'.
In order to prefer matches without wildcards over matches with wildcards we introduce an integer evaluation for matches.
Definition at line 41 of file Context.hxx.
Referenced by EvaluateMatch(), and sfx2::sidebar::ContextList::FindBestMatch().
|
static |
Definition at line 42 of file Context.hxx.
Referenced by sfx2::sidebar::ContextList::FindBestMatch(), and sfx2::sidebar::ContextList::ToggleVisibilityForContext().