LibreOffice Module unotools (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
SvtModuleOptions Class Referencefinal

#include <moduleoptions.hxx>

Inheritance diagram for SvtModuleOptions:
[legend]
Collaboration diagram for SvtModuleOptions:
[legend]

Public Types

enum class  EModule {
  WRITER = 0 ,
  CALC = 1 ,
  DRAW = 2 ,
  IMPRESS = 3 ,
  MATH = 4 ,
  CHART = 5 ,
  STARTMODULE = 6 ,
  BASIC = 7 ,
  DATABASE = 8 ,
  WEB = 9 ,
  GLOBAL = 10
}
 
enum class  EFactory {
  UNKNOWN_FACTORY = -1 ,
  WRITER = 0 ,
  WRITERWEB = 1 ,
  WRITERGLOBAL = 2 ,
  CALC = 3 ,
  DRAW = 4 ,
  IMPRESS = 5 ,
  MATH = 6 ,
  CHART = 7 ,
  STARTMODULE = 8 ,
  DATABASE = 9 ,
  BASIC = 10 ,
  LAST = BASIC
}
 

Public Member Functions

 SvtModuleOptions ()
 
virtual ~SvtModuleOptions () override
 
bool IsModuleInstalled (EModule eModule) const
 
OUString GetModuleName (EModule eModule) const
 
const OUString & GetFactoryName (EFactory eFactory) const
 
OUString GetFactoryStandardTemplate (EFactory eFactory) const
 
OUString GetFactoryEmptyDocumentURL (EFactory eFactory) const
 
OUString GetFactoryDefaultFilter (EFactory eFactory) const
 
bool IsDefaultFilterReadonly (EFactory eFactory) const
 
sal_Int32 GetFactoryIcon (EFactory eFactory) const
 
void SetFactoryStandardTemplate (EFactory eFactory, const OUString &sTemplate)
 
void SetFactoryDefaultFilter (EFactory eFactory, const OUString &sFilter)
 
OUString GetDefaultModuleName () const
 
bool IsMath () const
 
bool IsChart () const
 
bool IsCalc () const
 
bool IsDraw () const
 
bool IsWriter () const
 
bool IsImpress () const
 
bool IsDataBase () const
 
css::uno::Sequence< OUString > GetAllServiceNames ()
 
- Public Member Functions inherited from utl::detail::Options
 Options ()
 
virtual ~Options () override=0
 
- Public Member Functions inherited from utl::ConfigurationBroadcaster
void AddListener (utl::ConfigurationListener *pListener)
 
void RemoveListener (utl::ConfigurationListener const *pListener)
 
void NotifyListeners (ConfigurationHints nHint)
 
 ConfigurationBroadcaster ()
 
 ConfigurationBroadcaster (ConfigurationBroadcaster const &)
 
virtual ~ConfigurationBroadcaster ()
 
ConfigurationBroadcasteroperator= (ConfigurationBroadcaster const &other)
 
virtual void BlockBroadcasts (bool bBlock)
 
- Public Member Functions inherited from utl::ConfigurationListener
virtual ~ConfigurationListener ()
 
virtual void ConfigurationChanged (ConfigurationBroadcaster *p, ConfigurationHints nHint)=0
 

Static Public Member Functions

static bool ClassifyFactoryByName (std::u16string_view sName, EFactory &eFactory)
 
static EFactory ClassifyFactoryByServiceName (std::u16string_view sName)
 return the corresponding application ID for the given document service name. More...
 
static EFactory ClassifyFactoryByShortName (std::u16string_view sName)
 return the corresponding application ID for the given short name. More...
 
static EFactory ClassifyFactoryByURL (const OUString &sURL, const css::uno::Sequence< css::beans::PropertyValue > &lMediaDescriptor)
 return the corresponding application ID for the given properties. More...
 
static EFactory ClassifyFactoryByModel (const css::uno::Reference< css::frame::XModel > &xModel)
 return the corresponding application ID for the given properties. More...
 
static OUString GetFactoryShortName (EFactory eFactory)
 
static bool IsBasicIDE ()
 

Private Attributes

std::shared_ptr< SvtModuleOptions_Implm_pImpl
 

Additional Inherited Members

- Protected Member Functions inherited from utl::detail::Options
virtual void ConfigurationChanged (::utl::ConfigurationBroadcaster *p, ConfigurationHints nHint) override
 

Detailed Description

Definition at line 49 of file moduleoptions.hxx.

Member Enumeration Documentation

◆ EFactory

enum class SvtModuleOptions::EFactory
strong
Enumerator
UNKNOWN_FACTORY 
WRITER 
WRITERWEB 
WRITERGLOBAL 
CALC 
DRAW 
IMPRESS 
MATH 
CHART 
STARTMODULE 
DATABASE 
BASIC 
LAST 

Definition at line 72 of file moduleoptions.hxx.

◆ EModule

enum class SvtModuleOptions::EModule
strong
Enumerator
WRITER 
CALC 
DRAW 
IMPRESS 
MATH 
CHART 
STARTMODULE 
BASIC 
DATABASE 
WEB 
GLOBAL 

Definition at line 53 of file moduleoptions.hxx.

Constructor & Destructor Documentation

◆ SvtModuleOptions()

SvtModuleOptions::SvtModuleOptions ( )

Definition at line 781 of file moduleoptions.cxx.

References ItemHolder1::holdConfigItem(), m_pImpl, and ModuleOptions.

◆ ~SvtModuleOptions()

SvtModuleOptions::~SvtModuleOptions ( )
overridevirtual

Definition at line 801 of file moduleoptions.cxx.

References m_pImpl.

Member Function Documentation

◆ ClassifyFactoryByModel()

SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByModel ( const css::uno::Reference< css::frame::XModel > &  xModel)
static

return the corresponding application ID for the given properties.

@descr Here we try to use the list of supported service names of the given model to find out the right application module.

Attention: \n The module BASIC can't be detected here. Because it does not
support any model/ctrl/view paradigm.
Parameters
xModelthe document model
Returns
A suitable enum value. See EFactory above.

Definition at line 1071 of file moduleoptions.cxx.

References ClassifyFactoryByServiceName(), UNKNOWN_FACTORY, and xModel.

◆ ClassifyFactoryByName()

bool SvtModuleOptions::ClassifyFactoryByName ( std::u16string_view  sName,
EFactory eFactory 
)
static

Definition at line 857 of file moduleoptions.cxx.

References SvtModuleOptions_Impl::ClassifyFactoryByName(), and sName.

◆ ClassifyFactoryByServiceName()

SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByServiceName ( std::u16string_view  sName)
static

◆ ClassifyFactoryByShortName()

SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByShortName ( std::u16string_view  sName)
static

return the corresponding application ID for the given short name.

Definition at line 942 of file moduleoptions.cxx.

References BASIC, CALC, CHART, DATABASE, DRAW, o3tl::equalsIgnoreAsciiCase(), IMPRESS, MATH, sName, u, UNKNOWN_FACTORY, WRITER, WRITERGLOBAL, and WRITERWEB.

◆ ClassifyFactoryByURL()

SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByURL ( const OUString &  sURL,
const css::uno::Sequence< css::beans::PropertyValue > &  lMediaDescriptor 
)
static

return the corresponding application ID for the given properties.

@descr Because this search base on filters currently (till we have a better solution) a result is not guaranteed every time. May a filter does not exists for the specified content (but a FrameLoader which is not bound to any application!) ... or the given properties describe a stream (and we make no deep detection inside here!).

Attention: \n The module BASIC can't be detected here. Because it does not
has an own URL schema.
Parameters
sURLthe complete URL!
lMediaDescriptoradditional information
Returns
A suitable enum value. See EFactory above.

Definition at line 996 of file moduleoptions.cxx.

References ClassifyFactoryByServiceName(), comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), sDocumentService, and UNKNOWN_FACTORY.

◆ GetAllServiceNames()

css::uno::Sequence< OUString > SvtModuleOptions::GetAllServiceNames ( )

Definition at line 1089 of file moduleoptions.cxx.

References m_pImpl.

◆ GetDefaultModuleName()

OUString SvtModuleOptions::GetDefaultModuleName ( ) const

◆ GetFactoryDefaultFilter()

OUString SvtModuleOptions::GetFactoryDefaultFilter ( EFactory  eFactory) const

Definition at line 838 of file moduleoptions.cxx.

References m_pImpl.

◆ GetFactoryEmptyDocumentURL()

OUString SvtModuleOptions::GetFactoryEmptyDocumentURL ( EFactory  eFactory) const

◆ GetFactoryIcon()

sal_Int32 SvtModuleOptions::GetFactoryIcon ( EFactory  eFactory) const

Definition at line 851 of file moduleoptions.cxx.

References m_pImpl.

◆ GetFactoryName()

const OUString & SvtModuleOptions::GetFactoryName ( EFactory  eFactory) const

Definition at line 820 of file moduleoptions.cxx.

References m_pImpl.

◆ GetFactoryShortName()

OUString SvtModuleOptions::GetFactoryShortName ( SvtModuleOptions::EFactory  eFactory)
static

Definition at line 442 of file moduleoptions.cxx.

References BASIC, CALC, CHART, DATABASE, DRAW, IMPRESS, MATH, STARTMODULE, WRITER, WRITERGLOBAL, and WRITERWEB.

Referenced by GetDefaultModuleName().

◆ GetFactoryStandardTemplate()

OUString SvtModuleOptions::GetFactoryStandardTemplate ( EFactory  eFactory) const

Definition at line 826 of file moduleoptions.cxx.

References m_pImpl.

◆ GetModuleName()

OUString SvtModuleOptions::GetModuleName ( EModule  eModule) const

Definition at line 920 of file moduleoptions.cxx.

References BASIC, CALC, CHART, DATABASE, DRAW, GLOBAL, IMPRESS, MATH, WEB, and WRITER.

◆ IsBasicIDE()

static bool SvtModuleOptions::IsBasicIDE ( )
inlinestatic

Definition at line 164 of file moduleoptions.hxx.

◆ IsCalc()

bool SvtModuleOptions::IsCalc ( ) const

Definition at line 890 of file moduleoptions.cxx.

References CALC, and m_pImpl.

◆ IsChart()

bool SvtModuleOptions::IsChart ( ) const

Definition at line 884 of file moduleoptions.cxx.

References CHART, and m_pImpl.

◆ IsDataBase()

bool SvtModuleOptions::IsDataBase ( ) const

Definition at line 914 of file moduleoptions.cxx.

References DATABASE, and m_pImpl.

◆ IsDefaultFilterReadonly()

bool SvtModuleOptions::IsDefaultFilterReadonly ( EFactory  eFactory) const

Definition at line 844 of file moduleoptions.cxx.

References m_pImpl.

◆ IsDraw()

bool SvtModuleOptions::IsDraw ( ) const

Definition at line 896 of file moduleoptions.cxx.

References DRAW, and m_pImpl.

◆ IsImpress()

bool SvtModuleOptions::IsImpress ( ) const

Definition at line 908 of file moduleoptions.cxx.

References IMPRESS, and m_pImpl.

◆ IsMath()

bool SvtModuleOptions::IsMath ( ) const

Definition at line 878 of file moduleoptions.cxx.

References m_pImpl, and MATH.

◆ IsModuleInstalled()

bool SvtModuleOptions::IsModuleInstalled ( EModule  eModule) const

Definition at line 814 of file moduleoptions.cxx.

References m_pImpl.

◆ IsWriter()

bool SvtModuleOptions::IsWriter ( ) const

Definition at line 902 of file moduleoptions.cxx.

References m_pImpl, and WRITER.

◆ SetFactoryDefaultFilter()

void SvtModuleOptions::SetFactoryDefaultFilter ( EFactory  eFactory,
const OUString &  sFilter 
)

Definition at line 871 of file moduleoptions.cxx.

References m_pImpl.

◆ SetFactoryStandardTemplate()

void SvtModuleOptions::SetFactoryStandardTemplate ( EFactory  eFactory,
const OUString &  sTemplate 
)

Definition at line 864 of file moduleoptions.cxx.

References m_pImpl.

Member Data Documentation

◆ m_pImpl

std::shared_ptr<SvtModuleOptions_Impl> SvtModuleOptions::m_pImpl
private

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