LibreOffice Module unotools (master) 1
|
#include <configitem.hxx>
Public Member Functions | |
virtual | ~ConfigItem () override |
ConfigItem (ConfigItem const &)=default | |
ConfigItem (ConfigItem &&)=default | |
ConfigItem & | operator= (ConfigItem const &)=delete |
ConfigItem & | operator= (ConfigItem &&)=delete |
virtual void | Notify (const css::uno::Sequence< OUString > &aPropertyNames)=0 |
is called from the ConfigManager before application ends of from the PropertyChangeListener if the sub tree broadcasts changes. More... | |
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 () |
ConfigurationBroadcaster & | operator= (ConfigurationBroadcaster const &other) |
virtual void | BlockBroadcasts (bool bBlock) |
Static Public Member Functions | |
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 | |
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_Bool > | GetReadOnlyStates (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) |
enables notifications about changes on selected sub nodes/values More... | |
void | DisableNotification () |
disables notifications about changes on sub nodes/values, which previously had been enabled with EnableNotification More... | |
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) |
Private Member Functions | |
void | RemoveChangesListener () |
void | CallNotify (const css::uno::Sequence< OUString > &aPropertyNames) |
css::uno::Reference< css::container::XHierarchicalNameAccess > | GetTree () |
virtual void | ImplCommit ()=0 |
writes the changed values into the sub tree. More... | |
Static Private Member Functions | |
static void | impl_packLocalizedProperties (const css::uno::Sequence< OUString > &lInNames, const css::uno::Sequence< css::uno::Any > &lInValues, css::uno::Sequence< css::uno::Any > &lOutValues) |
static void | impl_unpackLocalizedProperties (const css::uno::Sequence< OUString > &lInNames, const css::uno::Sequence< css::uno::Any > &lInValues, css::uno::Sequence< OUString > &lOutNames, css::uno::Sequence< css::uno::Any > &lOutValues) |
Private Attributes | |
const OUString | sSubTree |
css::uno::Reference< css::container::XHierarchicalNameAccess > | m_xHierarchyAccess |
css::uno::Reference< css::util::XChangesListener > | xChangeLstnr |
ConfigItemMode | m_nMode |
bool | m_bIsModified |
bool | m_bEnableInternalNotification |
sal_Int16 | m_nInValueChange |
Friends | |
class | ConfigChangeListener_Impl |
class | ConfigManager |
Definition at line 67 of file configitem.hxx.
|
explicitprotected |
Definition at line 141 of file configitem.cxx.
References utl::ConfigManager::addConfigItem(), utl::ConfigManager::getConfigManager(), utl::ConfigManager::IsFuzzing(), m_xHierarchyAccess, and ReleaseTree.
|
overridevirtual |
Definition at line 157 of file configitem.cxx.
References utl::ConfigManager::getConfigManager(), RemoveChangesListener(), utl::ConfigManager::removeConfigItem(), and suppress_fun_call_w_exception.
|
default |
|
default |
|
protected |
Definition at line 1098 of file configitem.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, Exception, GetTree(), m_nInValueChange, and TOOLS_WARN_EXCEPTION.
|
private |
Definition at line 163 of file configitem.cxx.
References m_bEnableInternalNotification, m_nInValueChange, and Notify().
Referenced by utl::ConfigChangeListener_Impl::changesOccurred().
|
protected |
Definition at line 1168 of file configitem.cxx.
References m_bIsModified.
Referenced by Commit(), utl::ConfigManager::doStoreConfigItems(), SvtLinguConfigItem::SaveOptions(), and SvtLinguConfigItem::SvtLinguConfigItem().
|
protected |
Definition at line 780 of file configitem.cxx.
References Any, GetTree(), m_nInValueChange, and TOOLS_WARN_EXCEPTION.
|
protected |
Definition at line 730 of file configitem.cxx.
References ClearNodeSet(), GetTree(), and m_nInValueChange.
Referenced by ClearNodeSet(), and GlobalEventConfig_Impl::ImplCommit().
|
static |
Definition at line 740 of file configitem.cxx.
References Any, and TOOLS_WARN_EXCEPTION.
void ConfigItem::Commit | ( | ) |
Definition at line 1185 of file configitem.cxx.
References ClearModified(), and ImplCommit().
Referenced by utl::ConfigManager::doStoreConfigItems(), and SvtLinguConfig::~SvtLinguConfig().
|
protected |
disables notifications about changes on sub nodes/values, which previously had been enabled with EnableNotification
Definition at line 598 of file configitem.cxx.
References RemoveChangesListener(), and xChangeLstnr.
|
protected |
enables notifications about changes on selected sub nodes/values
Before calling this method a second time for a possibly changed node/value set, you must disable the current notifications by calling DisableNotification.
Definition at line 604 of file configitem.cxx.
References ConfigChangeListener_Impl, GetTree(), m_bEnableInternalNotification, m_nMode, ReleaseTree, and xChangeLstnr.
Referenced by GlobalEventConfig_Impl::GlobalEventConfig_Impl(), SvtFilterOptions::SvtFilterOptions(), SvtLinguConfigItem::SvtLinguConfigItem(), SvtModuleOptions_Impl::SvtModuleOptions_Impl(), and SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl().
|
inline |
Definition at line 181 of file configitem.hxx.
Referenced by utl::ConfigManager::acquireTree().
|
protected |
Definition at line 685 of file configitem.cxx.
References GetNodeNames(), and utl::LocalNode.
Referenced by GetNodeNames(), SvtLinguConfig::GetNodeNames(), SvtSecurityOptions::GetTrustedAuthors(), GlobalEventConfig_Impl::initBindingInfo(), SvtDynamicMenuOptions::lcl_GetPropertyNames(), SvtModuleOptions_Impl::MakeReadonlyStatesAvailable(), ReadNode(), SvtModuleOptions_Impl::SvtModuleOptions_Impl(), and SvtOptionsDialogOptions::SvtOptionsDialogOptions().
|
protected |
Definition at line 692 of file configitem.cxx.
References GetNodeNames(), and GetTree().
|
static |
Definition at line 700 of file configitem.cxx.
References Any, lcl_normalizeLocalNames(), and TOOLS_WARN_EXCEPTION.
|
protected |
Referenced by SvtDynamicMenuOptions::GetMenu(), SvtLinguConfig::GetProperties(), SvtSecurityOptions::GetTrustedAuthors(), SvtModuleOptions_Impl::impl_Read(), GlobalEventConfig_Impl::initBindingInfo(), SvtFilterOptions::Load(), SvtSearchOptions_Impl::Load(), SvtLinguConfigItem::LoadOptions(), SvtSysLocaleOptions_Impl::Notify(), ReadNode(), and SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl().
|
static |
|
protected |
Definition at line 316 of file configitem.cxx.
References Any, Exception, GetTree(), i, nCount, Property, sName, and utl::splitLastFromConfigurationPath().
Referenced by SvtLinguConfigItem::LoadOptions(), SvtModuleOptions_Impl::MakeReadonlyStatesAvailable(), SvtSysLocaleOptions_Impl::Notify(), and SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl().
|
inline |
Definition at line 175 of file configitem.hxx.
Referenced by utl::ConfigManager::acquireTree().
|
private |
Definition at line 1173 of file configitem.cxx.
References utl::ConfigManager::acquireTree(), utl::ConfigManager::IsFuzzing(), and m_xHierarchyAccess.
Referenced by AddNode(), ClearNodeElements(), ClearNodeSet(), EnableNotification(), GetNodeNames(), GetReadOnlyStates(), and RemoveChangesListener().
|
staticprivate |
Definition at line 172 of file configitem.cxx.
|
staticprivate |
Definition at line 239 of file configitem.cxx.
References Translate::get().
|
privatepure virtual |
writes the changed values into the sub tree.
Private and only called from non-virtual public Commit().
Implemented in SvtFilterOptions, GlobalEventConfig_Impl, SvtLinguConfigItem, SvtModuleOptions_Impl, SvtSearchOptions_Impl, and SvtSysLocaleOptions_Impl.
Referenced by Commit().
|
inline |
Definition at line 177 of file configitem.hxx.
Referenced by utl::ConfigManager::doStoreConfigItems(), SvtLinguConfigItem::SaveOptions(), GlobalEventConfig_Impl::~GlobalEventConfig_Impl(), SvtLinguConfig::~SvtLinguConfig(), SvtModuleOptions_Impl::~SvtModuleOptions_Impl(), and SvtSysLocaleOptions_Impl::~SvtSysLocaleOptions_Impl().
|
pure virtual |
is called from the ConfigManager before application ends of from the PropertyChangeListener if the sub tree broadcasts changes.
Implemented in SvtFilterOptions, GlobalEventConfig_Impl, SvtSearchOptions_Impl, SvtSysLocaleOptions_Impl, SvtModuleOptions_Impl, and SvtLinguConfigItem.
Referenced by CallNotify().
|
delete |
|
delete |
|
protected |
|
static |
|
private |
Definition at line 631 of file configitem.cxx.
References Exception, GetTree(), and xChangeLstnr.
Referenced by DisableNotification(), utl::ConfigChangeListener_Impl::disposing(), and ~ConfigItem().
|
protected |
Referenced by SvtLinguConfig::ReplaceSetProperties().
|
static |
|
protected |
Definition at line 1163 of file configitem.cxx.
References m_bIsModified.
Referenced by SvtFilterOptions::EnableMSOLockFileCreation(), GlobalEventConfig_Impl::replaceByName(), SvtSearchOptions_Impl::Save(), SvtFilterOptions::SetCalc2Excel(), SvtFilterOptions::SetCharBackground2Highlighting(), SvtFilterOptions::SetCharBackground2Shading(), SvtSysLocaleOptions_Impl::SetCurrencyString(), SvtSysLocaleOptions_Impl::SetDatePatternsString(), SvtSysLocaleOptions_Impl::SetDecimalSeparatorAsLocale(), SvtFilterOptions::SetExcel2Calc(), SvtModuleOptions_Impl::SetFactoryDefaultFilter(), SvtModuleOptions_Impl::SetFactoryStandardTemplate(), SvtSearchOptions_Impl::SetFlag(), SvtSysLocaleOptions_Impl::SetIgnoreLanguageChange(), SvtFilterOptions::SetImpress2PowerPoint(), SvtFilterOptions::SetLoadExcelBasicCode(), SvtFilterOptions::SetLoadExcelBasicExecutable(), SvtFilterOptions::SetLoadExcelBasicStorage(), SvtFilterOptions::SetLoadPPointBasicCode(), SvtFilterOptions::SetLoadPPointBasicStorage(), SvtFilterOptions::SetLoadWordBasicCode(), SvtFilterOptions::SetLoadWordBasicExecutable(), SvtFilterOptions::SetLoadWordBasicStorage(), SvtSysLocaleOptions_Impl::SetLocaleString(), SvtFilterOptions::SetMath2MathType(), SvtFilterOptions::SetMathType2Math(), SvtFilterOptions::SetPowerPoint2Impress(), SvtFilterOptions::SetSmartArt2Shape(), SvtSysLocaleOptions_Impl::SetUILocaleString(), SvtFilterOptions::SetVisio2Draw(), SvtFilterOptions::SetWinWord2Writer(), SvtFilterOptions::SetWriter2WinWord(), and SvtSearchOptions_Impl::SvtSearchOptions_Impl().
|
protected |
|
static |
|
friend |
Definition at line 69 of file configitem.hxx.
Referenced by EnableNotification().
|
friend |
Definition at line 70 of file configitem.hxx.
|
private |
Definition at line 79 of file configitem.hxx.
Referenced by CallNotify(), and EnableNotification().
|
private |
Definition at line 78 of file configitem.hxx.
Referenced by ClearModified(), and SetModified().
|
private |
Definition at line 80 of file configitem.hxx.
Referenced by AddNode(), CallNotify(), ClearNodeElements(), and ClearNodeSet().
|
private |
Definition at line 77 of file configitem.hxx.
Referenced by EnableNotification().
|
private |
Definition at line 74 of file configitem.hxx.
Referenced by ConfigItem(), and GetTree().
|
private |
Definition at line 72 of file configitem.hxx.
|
private |
Definition at line 76 of file configitem.hxx.
Referenced by DisableNotification(), EnableNotification(), and RemoveChangesListener().