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

Public Member Functions

 EnumContext ()
 
 EnumContext (const Application eApplication, const Context eContext)
 
 EnumContext (const OUString &rsApplicationName, const OUString &rsContextName)
 
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)
 
bool operator!= (const EnumContext &rOther)
 

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 const sal_Int32 OptimalMatch = 0
 

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

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.

Enumerator
ThreeDObject 
Annotation 
Auditing 
Axis 
Cell 
Chart 
ChartElements 
Draw 
DrawLine 
DrawPage 
DrawText 
EditCell 
ErrorBar 
Form 
Frame 
Graphic 
Grid 
HandoutPage 
MasterPage 
Media 
MultiObject 
NotesPage 
OLE 
OutlineText 
Pivot 
Printpreview 
Series 
SlidesorterPage 
Table 
Text 
TextObject 
Trendline 
Default 
Any 
Empty 
Unknown 
LAST 

Definition at line 64 of file EnumContext.hxx.

Constructor & Destructor Documentation

vcl::EnumContext::EnumContext ( )

Definition at line 45 of file EnumContext.cxx.

References NONE, and Unknown.

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

Definition at line 51 of file EnumContext.cxx.

vcl::EnumContext::EnumContext ( const OUString &  rsApplicationName,
const OUString &  rsContextName 
)

Definition at line 59 of file EnumContext.cxx.

Member Function Documentation

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

Definition at line 105 of file EnumContext.cxx.

References LAST.

Referenced by ProvideApplicationContainers(), and ProvideContextContainers().

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

Definition at line 152 of file EnumContext.cxx.

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

Definition at line 134 of file EnumContext.cxx.

References NONE, and ProvideApplicationContainers().

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

Definition at line 146 of file EnumContext.cxx.

References ProvideApplicationContainers().

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 67 of file EnumContext.cxx.

References CombinedEnumContext, GetApplication_DI(), and meContext.

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

Definition at line 213 of file EnumContext.cxx.

References ProvideContextContainers().

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

Definition at line 99 of file EnumContext.cxx.

References meApplication, and meContext.

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

Definition at line 93 of file EnumContext.cxx.

References meApplication, and meContext.

void vcl::EnumContext::ProvideApplicationContainers ( )
staticprivate
void vcl::EnumContext::ProvideContextContainers ( )
staticprivate

Member Data Documentation

Application vcl::EnumContext::meApplication
private

Definition at line 151 of file EnumContext.hxx.

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

Context vcl::EnumContext::meContext
private

Definition at line 152 of file EnumContext.hxx.

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

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.

const sal_Int32 vcl::EnumContext::OptimalMatch = 0
static

Definition at line 142 of file EnumContext.hxx.


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