LibreOffice Module vcl (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | List of all members
vcl::EnumContext Class Reference

#include <EnumContext.hxx>

Collaboration diagram for vcl::EnumContext:
[legend]

Public Types

enum class  Application {
  Writer ,
  WriterGlobal ,
  WriterWeb ,
  WriterXML ,
  WriterForm ,
  WriterReport ,
  Calc ,
  Chart ,
  Draw ,
  Impress ,
  Formula ,
  Base ,
  DrawImpress ,
  WriterVariants ,
  Any ,
  NONE ,
  LAST = Application::NONE
}
 
enum class  Context {
  ThreeDObject ,
  Annotation ,
  Auditing ,
  Axis ,
  Cell ,
  Chart ,
  ChartElements ,
  Draw ,
  DrawFontwork ,
  DrawLine ,
  DrawPage ,
  DrawText ,
  EditCell ,
  ErrorBar ,
  Form ,
  Frame ,
  Graphic ,
  Grid ,
  HandoutPage ,
  MasterPage ,
  Math ,
  Media ,
  MultiObject ,
  NotesPage ,
  OLE ,
  OutlineText ,
  Pivot ,
  Printpreview ,
  Series ,
  SlidesorterPage ,
  Table ,
  Text ,
  TextObject ,
  Trendline ,
  Sparkline ,
  Default ,
  Any ,
  Empty ,
  Unknown ,
  LAST = Unknown
}
 

Public Member Functions

 EnumContext ()
 
 EnumContext (const Application eApplication, const Context eContext)
 
sal_Int32 GetCombinedContext_DI () const
 This variant of the GetCombinedContext() method treats some application names as identical to each other. More...
 
Application GetApplication_DI () const
 
bool operator== (const EnumContext &rOther) const
 
bool operator!= (const EnumContext &rOther) const
 

Static Public Member Functions

static Application GetApplicationEnum (const OUString &rsApplicationName)
 
static const OUString & GetApplicationName (const Application eApplication)
 
static Context GetContextEnum (const OUString &rsContextName)
 
static const OUString & GetContextName (const Context eContext)
 

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 Private Member Functions

static void ProvideApplicationContainers ()
 
static void ProvideContextContainers ()
 
static void AddEntry (const OUString &rsName, const Application eApplication)
 
static void AddEntry (const OUString &rsName, const Context eContext)
 

Private Attributes

Application meApplication
 
Context meContext
 

Detailed Description

Definition at line 29 of file EnumContext.hxx.

Member Enumeration Documentation

◆ Application

enum class vcl::EnumContext::Application
strong
Enumerator
Writer 
WriterGlobal 
WriterWeb 
WriterXML 
WriterForm 
WriterReport 
Calc 
Chart 
Draw 
Impress 
Formula 
Base 
DrawImpress 
WriterVariants 
Any 
NONE 
LAST 

Definition at line 32 of file EnumContext.hxx.

◆ Context

enum class vcl::EnumContext::Context
strong
Enumerator
ThreeDObject 
Annotation 
Auditing 
Axis 
Cell 
Chart 
ChartElements 
Draw 
DrawFontwork 
DrawLine 
DrawPage 
DrawText 
EditCell 
ErrorBar 
Form 
Frame 
Graphic 
Grid 
HandoutPage 
MasterPage 
Math 
Media 
MultiObject 
NotesPage 
OLE 
OutlineText 
Pivot 
Printpreview 
Series 
SlidesorterPage 
Table 
Text 
TextObject 
Trendline 
Sparkline 
Default 
Any 
Empty 
Unknown 
LAST 

Definition at line 64 of file EnumContext.hxx.

Constructor & Destructor Documentation

◆ EnumContext() [1/2]

vcl::EnumContext::EnumContext ( )

Definition at line 44 of file EnumContext.cxx.

References NONE, and Unknown.

◆ EnumContext() [2/2]

vcl::EnumContext::EnumContext ( const Application  eApplication,
const Context  eContext 
)

Definition at line 50 of file EnumContext.cxx.

Member Function Documentation

◆ AddEntry() [1/2]

void vcl::EnumContext::AddEntry ( const OUString &  rsName,
const Application  eApplication 
)
staticprivate

Definition at line 96 of file EnumContext.cxx.

References LAST.

Referenced by ProvideApplicationContainers(), and ProvideContextContainers().

◆ AddEntry() [2/2]

void vcl::EnumContext::AddEntry ( const OUString &  rsName,
const Context  eContext 
)
staticprivate

Definition at line 143 of file EnumContext.cxx.

◆ GetApplication_DI()

EnumContext::Application vcl::EnumContext::GetApplication_DI ( ) const

◆ GetApplicationEnum()

EnumContext::Application vcl::EnumContext::GetApplicationEnum ( const OUString &  rsApplicationName)
static

Definition at line 125 of file EnumContext.cxx.

References NONE, and ProvideApplicationContainers().

◆ GetApplicationName()

const OUString & vcl::EnumContext::GetApplicationName ( const Application  eApplication)
static

Definition at line 137 of file EnumContext.cxx.

References ProvideApplicationContainers().

◆ GetCombinedContext_DI()

sal_Int32 vcl::EnumContext::GetCombinedContext_DI ( ) const

This variant of the GetCombinedContext() method treats some application names as identical to each other.

Replacements made are: Draw or Impress -> DrawImpress Writer or WriterWeb -> WriterAndWeb Use the Application::DrawImpress or Application::WriterAndWeb values in the CombinedEnumContext macro.

Definition at line 58 of file EnumContext.cxx.

References CombinedEnumContext, GetApplication_DI(), and meContext.

◆ GetContextEnum()

EnumContext::Context vcl::EnumContext::GetContextEnum ( const OUString &  rsContextName)
static

◆ GetContextName()

const OUString & vcl::EnumContext::GetContextName ( const Context  eContext)
static

Definition at line 207 of file EnumContext.cxx.

References ProvideContextContainers().

◆ operator!=()

bool vcl::EnumContext::operator!= ( const EnumContext rOther) const

Definition at line 90 of file EnumContext.cxx.

References meApplication, and meContext.

◆ operator==()

bool vcl::EnumContext::operator== ( const EnumContext rOther) const

Definition at line 84 of file EnumContext.cxx.

References meApplication, and meContext.

◆ ProvideApplicationContainers()

void vcl::EnumContext::ProvideApplicationContainers ( )
staticprivate

◆ ProvideContextContainers()

void vcl::EnumContext::ProvideContextContainers ( )
staticprivate

Member Data Documentation

◆ meApplication

Application vcl::EnumContext::meApplication
private

Definition at line 150 of file EnumContext.hxx.

Referenced by GetApplication_DI(), operator!=(), and operator==().

◆ meContext

Context vcl::EnumContext::meContext
private

Definition at line 151 of file EnumContext.hxx.

Referenced by GetCombinedContext_DI(), operator!=(), and operator==().

◆ NoMatch

const sal_Int32 vcl::EnumContext::NoMatch = 4
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 141 of file EnumContext.hxx.


The documentation for this class was generated from the following files: