diff options
author | Oliver Specht <os@openoffice.org> | 2001-06-25 13:41:45 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2001-06-25 13:41:45 +0000 |
commit | deef81dc8bd0f9c58389b68a3b0fa10e7fcfe4ca (patch) | |
tree | 6b1ebbb289dd468cda1c0c86bc12664e2587f4c0 /unotools/inc/unotools/configitem.hxx | |
parent | bcf95a9aff79e2cde52c954bcddc10127aa649b2 (diff) |
#88352# tree can be released, internal notificaion enabled
Diffstat (limited to 'unotools/inc/unotools/configitem.hxx')
-rw-r--r-- | unotools/inc/unotools/configitem.hxx | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/unotools/inc/unotools/configitem.hxx b/unotools/inc/unotools/configitem.hxx index 2b69b96205f1..c3e4e99ba0c5 100644 --- a/unotools/inc/unotools/configitem.hxx +++ b/unotools/inc/unotools/configitem.hxx @@ -2,9 +2,9 @@ * * $RCSfile: configitem.hxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: os $ $Date: 2001-06-05 09:28:10 $ + * last change: $Author: os $ $Date: 2001-06-25 14:41:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,6 +95,7 @@ namespace utl #define CONFIG_MODE_IMMEDIATE_UPDATE 0x00 #define CONFIG_MODE_DELAYED_UPDATE 0x01 #define CONFIG_MODE_ALL_LOCALES 0x02 +#define CONFIG_MODE_RELEASE_TREE 0x04 class ConfigChangeListener_Impl; class ConfigManager; @@ -103,10 +104,11 @@ namespace utl class ConfigItem { friend class ConfigChangeListener_Impl; + friend class ConfigManager; const rtl::OUString sSubTree; com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess> - xHierarchyAccess; + m_xHierarchyAccess; com::sun::star::uno::Reference< com::sun::star::util::XChangesListener > xChangeLstnr; ConfigItem_Impl* pImpl; @@ -135,12 +137,12 @@ namespace utl com::sun::star::uno::Sequence< rtl::OUString >& lOutNames , com::sun::star::uno::Sequence< com::sun::star::uno::Any >& lOutValues ); + com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess> + GetTree(); + protected: -#if SUPD>633 - ConfigItem(const rtl::OUString rSubTree, sal_Int16 nMode = CONFIG_MODE_DELAYED_UPDATE); -#else - ConfigItem(const rtl::OUString rSubTree, sal_Int16 nMode = CONFIG_MODE_IMMEDIATE_UPDATE); -#endif + ConfigItem(const rtl::OUString rSubTree, + sal_Int16 nMode = CONFIG_MODE_DELAYED_UPDATE); ConfigItem(utl::ConfigManager& rManager, const rtl::OUString rSubTree); void SetModified (); // mark item as modified @@ -153,8 +155,15 @@ namespace utl const com::sun::star::uno::Sequence< rtl::OUString >& rNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any>& rValues); +#if SUPD<637 sal_Bool EnableNotification(const com::sun::star::uno::Sequence< rtl::OUString >& rNames); - + sal_Bool EnableNotification(const com::sun::star::uno::Sequence< rtl::OUString >& rNames, + sal_Bool bEnableInternalNotification); +#else + sal_Bool EnableNotification(const com::sun::star::uno::Sequence< rtl::OUString >& rNames, + sal_Bool bEnableInternalNotification = sal_False); +#endif + sal_Bool IsInternalNotification()const {return IsInValueChange();} //returns all members of a node com::sun::star::uno::Sequence< rtl::OUString > GetNodeNames(const rtl::OUString& rNode); @@ -191,6 +200,11 @@ namespace utl /** is called from the ConfigManager if it is destroyed before the ConfigItem. */ void ReleaseConfigMgr(); + /** enable locking of the XHierarchicalNameAccess if CONFIG_MODE_RELEASE_TREE is set to + prevent multiple calls ConfigManager::AcquireTree() from a single Commit() operation*/ + void LockTree(); + void UnlockTree(); + const rtl::OUString& GetSubTreeName() const {return sSubTree;} sal_Bool IsModified() const; |