LibreOffice Module starmath (master) 1
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SmMathConfig Class Referencefinal

#include <cfgitem.hxx>

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

Classes

struct  CommitLocker
 

Public Member Functions

 SmMathConfig ()
 
virtual ~SmMathConfig () override
 
virtual void Notify (const css::uno::Sequence< OUString > &rPropertyNames) override
 
SmSymbolManagerGetSymbolManager ()
 
void GetSymbols (std::vector< SmSym > &rSymbols) const
 
void SetSymbols (const std::vector< SmSym > &rNewSymbols)
 
const SmFormatGetStandardFormat () const
 
void SetStandardFormat (const SmFormat &rFormat, bool bSaveFontFormatList=false)
 
bool IsPrintTitle () const
 
void SetPrintTitle (bool bVal)
 
bool IsPrintFormulaText () const
 
void SetPrintFormulaText (bool bVal)
 
bool IsPrintFrame () const
 
void SetPrintFrame (bool bVal)
 
SmPrintSize GetPrintSize () const
 
void SetPrintSize (SmPrintSize eSize)
 
sal_uInt16 GetPrintZoomFactor () const
 
void SetPrintZoomFactor (sal_uInt16 nVal)
 
sal_uInt16 GetSmEditWindowZoomFactor () const
 
void SetSmEditWindowZoomFactor (sal_uInt16 nVal)
 
bool IsSaveOnlyUsedSymbols () const
 
void SetSaveOnlyUsedSymbols (bool bVal)
 
bool IsAutoCloseBrackets () const
 
void SetAutoCloseBrackets (bool bVal)
 
bool IsIgnoreSpacesRight () const
 
void SetIgnoreSpacesRight (bool bVal)
 
bool IsAutoRedraw () const
 
void SetAutoRedraw (bool bVal)
 
bool IsShowFormulaCursor () const
 
void SetShowFormulaCursor (bool bVal)
 
sal_uInt16 GetDefaultSmSyntaxVersion () const
 
void SetDefaultSmSyntaxVersion (sal_uInt16 nVal)
 
SmFontPickListGetFontPickList (sal_uInt16 nIdent)
 
void ItemSetToConfig (const SfxItemSet &rSet)
 
void ConfigToItemSet (SfxItemSet &rSet) const
 
- Public Member Functions inherited from utl::ConfigItem
virtual ~ConfigItem () override
 
 ConfigItem (ConfigItem const &)=default
 
 ConfigItem (ConfigItem &&)=default
 
ConfigItemoperator= (ConfigItem const &)=delete
 
ConfigItemoperator= (ConfigItem &&)=delete
 
virtual void Notify (const css::uno::Sequence< OUString > &aPropertyNames)=0
 
const OUString & GetSubTreeName () const
 
bool IsModified () const
 
void Commit ()
 
ConfigItemMode GetMode () const
 
- 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 SfxBroadcaster
 SfxBroadcaster ()
 
 SfxBroadcaster (const SfxBroadcaster &rBC)
 
virtual ~SfxBroadcaster () COVERITY_NOEXCEPT_FALSE
 
void Broadcast (const SfxHint &rHint)
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void ForAllListeners (std::function< bool(SfxListener *)> f) const
 

Private Member Functions

 SmMathConfig (const SmMathConfig &)=delete
 
SmMathConfigoperator= (const SmMathConfig &)=delete
 
void StripFontFormatList (const std::vector< SmSym > &rSymbols)
 
void Save ()
 
void ReadSymbol (SmSym &rSymbol, const OUString &rSymbolName, std::u16string_view rBaseNode) const
 
void ReadFontFormat (SmFontFormat &rFontFormat, std::u16string_view rSymbolName, std::u16string_view rBaseNode) const
 
bool SetOtherIfNotEqual (bool &rbItem, bool bNewVal)
 
void LoadOther ()
 
void SaveOther ()
 
void LoadFormat ()
 
void SaveFormat ()
 
void LoadFontFormatList ()
 
void SaveFontFormatList ()
 
void SetOtherModified (bool bVal)
 
bool IsOtherModified () const
 
void SetFormatModified (bool bVal)
 
bool IsFormatModified () const
 
SmFontFormatListGetFontFormatList ()
 
const SmFontFormatListGetFontFormatList () const
 
virtual void ImplCommit () override
 
void LockCommit ()
 
void UnlockCommit ()
 
void Clear ()
 

Private Attributes

std::unique_ptr< SmFormatpFormat
 
std::unique_ptr< SmCfgOtherpOther
 
std::unique_ptr< SmFontFormatListpFontFormatList
 
std::unique_ptr< SmSymbolManagerpSymbolMgr
 
bool bIsOtherModified
 
bool bIsFormatModified
 
SmFontPickList vFontPickList [7]
 
sal_Int32 m_nCommitLock = 0
 

Friends

struct CommitLocker
 

Additional Inherited Members

- Static Public Member Functions inherited from utl::ConfigItem
static css::uno::Sequence< OUString > GetNodeNames (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, ConfigNameFormat eFormat)
 
static css::uno::Sequence< css::uno::Any > GetProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales)
 
static bool PutProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues, bool bAllLocales)
 
static bool ClearNodeSet (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode)
 
static bool ReplaceSetProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues, bool bAllLocales)
 
static bool SetSetProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues)
 
- Protected Member Functions inherited from utl::ConfigItem
 ConfigItem (OUString aSubTree, ConfigItemMode nMode=ConfigItemMode::NONE)
 
void SetModified ()
 
void ClearModified ()
 
css::uno::Sequence< css::uno::Any > GetProperties (const css::uno::Sequence< OUString > &rNames)
 
css::uno::Sequence< sal_BoolGetReadOnlyStates (const css::uno::Sequence< OUString > &rNames)
 
bool PutProperties (const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues)
 
bool EnableNotification (const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false)
 
void DisableNotification ()
 
css::uno::Sequence< OUString > GetNodeNames (const OUString &rNode)
 
css::uno::Sequence< OUString > GetNodeNames (const OUString &rNode, ConfigNameFormat eFormat)
 
bool ClearNodeSet (const OUString &rNode)
 
bool ClearNodeElements (const OUString &rNode, css::uno::Sequence< OUString > const &rElements)
 
bool SetSetProperties (const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues)
 
bool ReplaceSetProperties (const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues)
 
bool AddNode (const OUString &rNode, const OUString &rNewNode)
 
- Protected Member Functions inherited from SfxBroadcaster
void Forward (SfxBroadcaster &rBC, const SfxHint &rHint)
 

Detailed Description

Definition at line 97 of file cfgitem.hxx.

Constructor & Destructor Documentation

◆ SmMathConfig() [1/2]

SmMathConfig::SmMathConfig ( const SmMathConfig )
privatedelete

◆ SmMathConfig() [2/2]

SmMathConfig::SmMathConfig ( )

Definition at line 357 of file cfgitem.cxx.

References utl::ConfigItem::EnableNotification().

◆ ~SmMathConfig()

SmMathConfig::~SmMathConfig ( )
overridevirtual

Definition at line 366 of file cfgitem.cxx.

References Save().

Member Function Documentation

◆ Clear()

void SmMathConfig::Clear ( )
private

Definition at line 497 of file cfgitem.cxx.

References pFontFormatList, pFormat, and pOther.

Referenced by Notify().

◆ ConfigToItemSet()

void SmMathConfig::ConfigToItemSet ( SfxItemSet rSet) const

◆ GetDefaultSmSyntaxVersion()

sal_uInt16 SmMathConfig::GetDefaultSmSyntaxVersion ( ) const

◆ GetFontFormatList() [1/2]

SmFontFormatList & SmMathConfig::GetFontFormatList ( )
private

◆ GetFontFormatList() [2/2]

const SmFontFormatList & SmMathConfig::GetFontFormatList ( ) const
inlineprivate

Definition at line 135 of file cfgitem.hxx.

References GetFontFormatList().

◆ GetFontPickList()

SmFontPickList & SmMathConfig::GetFontPickList ( sal_uInt16  nIdent)
inline

Definition at line 199 of file cfgitem.hxx.

References vFontPickList.

Referenced by SmFontTypeDialog::ReadFrom(), and SmFontTypeDialog::WriteTo().

◆ GetPrintSize()

SmPrintSize SmMathConfig::GetPrintSize ( ) const

Definition at line 1121 of file cfgitem.cxx.

References LoadOther(), and pOther.

Referenced by ConfigToItemSet(), and SmPrintUIOptions::SmPrintUIOptions().

◆ GetPrintZoomFactor()

sal_uInt16 SmMathConfig::GetPrintZoomFactor ( ) const

Definition at line 1142 of file cfgitem.cxx.

References LoadOther(), and pOther.

Referenced by ConfigToItemSet(), and SmPrintUIOptions::SmPrintUIOptions().

◆ GetSmEditWindowZoomFactor()

sal_uInt16 SmMathConfig::GetSmEditWindowZoomFactor ( ) const

Definition at line 1163 of file cfgitem.cxx.

References LoadOther(), and pOther.

Referenced by ConfigToItemSet().

◆ GetStandardFormat()

const SmFormat & SmMathConfig::GetStandardFormat ( ) const

◆ GetSymbolManager()

SmSymbolManager & SmMathConfig::GetSymbolManager ( )

Definition at line 465 of file cfgitem.cxx.

References pSymbolMgr.

Referenced by SmModule::GetSymbolManager().

◆ GetSymbols()

void SmMathConfig::GetSymbols ( std::vector< SmSym > &  rSymbols) const

Definition at line 506 of file cfgitem.cxx.

References utl::ConfigItem::GetNodeNames(), ReadSymbol(), and SYMBOL_LIST.

Referenced by SmSymbolManager::Load().

◆ ImplCommit()

void SmMathConfig::ImplCommit ( )
overrideprivatevirtual

Implements utl::ConfigItem.

Definition at line 476 of file cfgitem.cxx.

References Save().

◆ IsAutoCloseBrackets()

bool SmMathConfig::IsAutoCloseBrackets ( ) const

Definition at line 1237 of file cfgitem.cxx.

References LoadOther(), and pOther.

Referenced by ConfigToItemSet(), and SmEditTextWindow::KeyInput().

◆ IsAutoRedraw()

bool SmMathConfig::IsAutoRedraw ( ) const

◆ IsFormatModified()

bool SmMathConfig::IsFormatModified ( ) const
inlineprivate

Definition at line 132 of file cfgitem.hxx.

References bIsFormatModified.

Referenced by SaveFormat().

◆ IsIgnoreSpacesRight()

bool SmMathConfig::IsIgnoreSpacesRight ( ) const

Definition at line 1296 of file cfgitem.cxx.

References utl::ConfigManager::IsFuzzing(), LoadOther(), and pOther.

Referenced by ConfigToItemSet().

◆ IsOtherModified()

bool SmMathConfig::IsOtherModified ( ) const
inlineprivate

Definition at line 130 of file cfgitem.hxx.

References bIsOtherModified.

Referenced by SaveOther().

◆ IsPrintFormulaText()

bool SmMathConfig::IsPrintFormulaText ( ) const

Definition at line 1215 of file cfgitem.cxx.

References LoadOther(), and pOther.

Referenced by ConfigToItemSet(), and SmPrintUIOptions::SmPrintUIOptions().

◆ IsPrintFrame()

bool SmMathConfig::IsPrintFrame ( ) const

Definition at line 1253 of file cfgitem.cxx.

References LoadOther(), and pOther.

Referenced by ConfigToItemSet(), and SmPrintUIOptions::SmPrintUIOptions().

◆ IsPrintTitle()

bool SmMathConfig::IsPrintTitle ( ) const

Definition at line 1199 of file cfgitem.cxx.

References LoadOther(), and pOther.

Referenced by ConfigToItemSet(), and SmPrintUIOptions::SmPrintUIOptions().

◆ IsSaveOnlyUsedSymbols()

bool SmMathConfig::IsSaveOnlyUsedSymbols ( ) const

Definition at line 1230 of file cfgitem.cxx.

References LoadOther(), and pOther.

Referenced by ConfigToItemSet(), and SmXMLExport::GetConfigurationSettings().

◆ IsShowFormulaCursor()

bool SmMathConfig::IsShowFormulaCursor ( ) const

◆ ItemSetToConfig()

void SmMathConfig::ItemSetToConfig ( const SfxItemSet rSet)

◆ LoadFontFormatList()

void SmMathConfig::LoadFontFormatList ( )
private

◆ LoadFormat()

void SmMathConfig::LoadFormat ( )
private

◆ LoadOther()

void SmMathConfig::LoadOther ( )
private

◆ LockCommit()

void SmMathConfig::LockCommit ( )
inlineprivate

Definition at line 141 of file cfgitem.hxx.

References m_nCommitLock.

Referenced by SmMathConfig::CommitLocker::CommitLocker().

◆ Notify()

void SmMathConfig::Notify ( const css::uno::Sequence< OUString > &  rPropertyNames)
overridevirtual

Implements utl::ConfigItem.

Definition at line 1350 of file cfgitem.cxx.

References SfxBroadcaster::Broadcast(), and Clear().

◆ operator=()

SmMathConfig & SmMathConfig::operator= ( const SmMathConfig )
privatedelete

◆ ReadFontFormat()

void SmMathConfig::ReadFontFormat ( SmFontFormat rFontFormat,
std::u16string_view  rSymbolName,
std::u16string_view  rBaseNode 
) const
private

◆ ReadSymbol()

void SmMathConfig::ReadSymbol ( SmSym rSymbol,
const OUString &  rSymbolName,
std::u16string_view  rBaseNode 
) const
private

◆ Save()

void SmMathConfig::Save ( )
private

Definition at line 482 of file cfgitem.cxx.

References SaveFontFormatList(), SaveFormat(), and SaveOther().

Referenced by ImplCommit(), and ~SmMathConfig().

◆ SaveFontFormatList()

void SmMathConfig::SaveFontFormatList ( )
private

◆ SaveFormat()

void SmMathConfig::SaveFormat ( )
private

◆ SaveOther()

void SmMathConfig::SaveOther ( )
private

◆ SetAutoCloseBrackets()

void SmMathConfig::SetAutoCloseBrackets ( bool  bVal)

Definition at line 1277 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherIfNotEqual().

Referenced by ItemSetToConfig().

◆ SetAutoRedraw()

void SmMathConfig::SetAutoRedraw ( bool  bVal)

Definition at line 1327 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherIfNotEqual().

Referenced by SmDocShell::Execute(), and ItemSetToConfig().

◆ SetDefaultSmSyntaxVersion()

void SmMathConfig::SetDefaultSmSyntaxVersion ( sal_uInt16  nVal)

Definition at line 1284 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherModified().

Referenced by ItemSetToConfig().

◆ SetFormatModified()

void SmMathConfig::SetFormatModified ( bool  bVal)
private

Definition at line 378 of file cfgitem.cxx.

References bIsFormatModified.

Referenced by LoadFormat(), SaveFormat(), and SetStandardFormat().

◆ SetIgnoreSpacesRight()

void SmMathConfig::SetIgnoreSpacesRight ( bool  bVal)

Definition at line 1306 of file cfgitem.cxx.

References SfxBroadcaster::Broadcast(), LoadOther(), pOther, and SetOtherIfNotEqual().

Referenced by ItemSetToConfig().

◆ SetOtherIfNotEqual()

bool SmMathConfig::SetOtherIfNotEqual ( bool &  rbItem,
bool  bNewVal 
)
private

◆ SetOtherModified()

void SmMathConfig::SetOtherModified ( bool  bVal)
private

◆ SetPrintFormulaText()

void SmMathConfig::SetPrintFormulaText ( bool  bVal)

Definition at line 1223 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherIfNotEqual().

Referenced by ItemSetToConfig().

◆ SetPrintFrame()

void SmMathConfig::SetPrintFrame ( bool  bVal)

Definition at line 1261 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherIfNotEqual().

Referenced by ItemSetToConfig().

◆ SetPrintSize()

void SmMathConfig::SetPrintSize ( SmPrintSize  eSize)

Definition at line 1129 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherModified().

Referenced by ItemSetToConfig().

◆ SetPrintTitle()

void SmMathConfig::SetPrintTitle ( bool  bVal)

Definition at line 1207 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherIfNotEqual().

Referenced by ItemSetToConfig().

◆ SetPrintZoomFactor()

void SmMathConfig::SetPrintZoomFactor ( sal_uInt16  nVal)

Definition at line 1150 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherModified().

Referenced by ItemSetToConfig().

◆ SetSaveOnlyUsedSymbols()

void SmMathConfig::SetSaveOnlyUsedSymbols ( bool  bVal)

Definition at line 1269 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherIfNotEqual().

Referenced by ItemSetToConfig().

◆ SetShowFormulaCursor()

void SmMathConfig::SetShowFormulaCursor ( bool  bVal)

Definition at line 1343 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherIfNotEqual().

Referenced by SmViewShell::Execute().

◆ SetSmEditWindowZoomFactor()

void SmMathConfig::SetSmEditWindowZoomFactor ( sal_uInt16  nVal)

Definition at line 1173 of file cfgitem.cxx.

References LoadOther(), pOther, and SetOtherModified().

Referenced by ItemSetToConfig().

◆ SetStandardFormat()

void SmMathConfig::SetStandardFormat ( const SmFormat rFormat,
bool  bSaveFontFormatList = false 
)

Definition at line 1101 of file cfgitem.cxx.

References LoadFormat(), pFontFormatList, pFormat, and SetFormatModified().

Referenced by SmDocShell::Execute(), and IMPL_LINK_NOARG().

◆ SetSymbols()

void SmMathConfig::SetSymbols ( const std::vector< SmSym > &  rNewSymbols)

◆ StripFontFormatList()

void SmMathConfig::StripFontFormatList ( const std::vector< SmSym > &  rSymbols)
private

◆ UnlockCommit()

void SmMathConfig::UnlockCommit ( )
private

Definition at line 490 of file cfgitem.cxx.

References utl::ConfigItem::Commit(), and m_nCommitLock.

Referenced by SmMathConfig::CommitLocker::~CommitLocker().

Friends And Related Function Documentation

◆ CommitLocker

friend struct CommitLocker
friend

Definition at line 144 of file cfgitem.hxx.

Member Data Documentation

◆ bIsFormatModified

bool SmMathConfig::bIsFormatModified
private

Definition at line 104 of file cfgitem.hxx.

Referenced by IsFormatModified(), and SetFormatModified().

◆ bIsOtherModified

bool SmMathConfig::bIsOtherModified
private

Definition at line 103 of file cfgitem.hxx.

Referenced by IsOtherModified(), and SetOtherModified().

◆ m_nCommitLock

sal_Int32 SmMathConfig::m_nCommitLock = 0
private

Definition at line 106 of file cfgitem.hxx.

Referenced by LockCommit(), and UnlockCommit().

◆ pFontFormatList

std::unique_ptr<SmFontFormatList> SmMathConfig::pFontFormatList
private

Definition at line 101 of file cfgitem.hxx.

Referenced by Clear(), GetFontFormatList(), LoadFontFormatList(), and SetStandardFormat().

◆ pFormat

std::unique_ptr<SmFormat> SmMathConfig::pFormat
private

Definition at line 99 of file cfgitem.hxx.

Referenced by Clear(), GetStandardFormat(), LoadFormat(), SaveFormat(), and SetStandardFormat().

◆ pOther

std::unique_ptr<SmCfgOther> SmMathConfig::pOther
private

◆ pSymbolMgr

std::unique_ptr<SmSymbolManager> SmMathConfig::pSymbolMgr
private

Definition at line 102 of file cfgitem.hxx.

Referenced by GetSymbolManager().

◆ vFontPickList

SmFontPickList SmMathConfig::vFontPickList[7]
private

Definition at line 105 of file cfgitem.hxx.

Referenced by GetFontPickList().


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