summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2001-02-12 09:19:12 +0000
committerOliver Specht <os@openoffice.org>2001-02-12 09:19:12 +0000
commit93332f1e7f7e125aecc070783d07f3f9d8dc70d7 (patch)
tree179fe160b3642a24ce26941e25a06c063fe9f2a5 /unotools
parent2b6c3d8714abac81955802fcb8704ee9a8bcf82e (diff)
enable delayed update mode
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/configitem.hxx12
-rw-r--r--unotools/source/config/configitem.cxx12
2 files changed, 16 insertions, 8 deletions
diff --git a/unotools/inc/unotools/configitem.hxx b/unotools/inc/unotools/configitem.hxx
index a6c334bacf9f..475f65a7e017 100644
--- a/unotools/inc/unotools/configitem.hxx
+++ b/unotools/inc/unotools/configitem.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configitem.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: os $ $Date: 2001-01-23 16:29:51 $
+ * last change: $Author: os $ $Date: 2001-02-12 10:19:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -92,6 +92,9 @@ namespace com{ namespace sun{ namespace star{
//-----------------------------------------------------------------------------
namespace utl
{
+#define CONFIG_MODE_IMMEDIATE_UPDATE 0x00
+#define CONFIG_MODE_DELAYED_UPDATE 0x01
+
class ConfigChangeListener_Impl;
class ConfigManager;
class ConfigItem
@@ -108,13 +111,14 @@ namespace utl
sal_Bool bHasChangedProperties : 1; //call XChangesBatch::Commit() if any changes were notified
sal_Int16 nInValueChange;
+ sal_Int16 nMode;
ConfigItem();//
void RemoveListener();
void CallNotify(
const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
protected:
- ConfigItem(const rtl::OUString rSubTree);
+ ConfigItem(const rtl::OUString rSubTree, sal_Int16 nMode = CONFIG_MODE_IMMEDIATE_UPDATE);
ConfigItem(utl::ConfigManager& rManager, const rtl::OUString rSubTree);
void SetModified() {bIsModified = sal_True;}
@@ -161,6 +165,8 @@ namespace utl
virtual void Commit();
sal_Bool IsInValueChange() const {return nInValueChange > 0;}
+
+ sal_Int16 GetMode() const {return nMode;}
};
}//namespace utl
#endif //_UTL_CONFIGITEM_HXX_
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 62b7990fa4c7..f598254f416f 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configitem.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: os $ $Date: 2001-01-23 16:30:25 $
+ * last change: $Author: os $ $Date: 2001-02-12 10:19:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -226,12 +226,13 @@ void ConfigChangeListener_Impl::disposing( const EventObject& Source ) throw(Run
/* -----------------------------29.08.00 12:50--------------------------------
---------------------------------------------------------------------------*/
-ConfigItem::ConfigItem(const OUString rSubTree ) :
+ConfigItem::ConfigItem(const OUString rSubTree, sal_Int16 nSetMode ) :
pManager(ConfigManager::GetConfigManager()),
sSubTree(rSubTree),
bIsModified(sal_False),
bHasChangedProperties(sal_False),
- nInValueChange(0)
+ nInValueChange(0),
+ nMode(nSetMode)
{
xHierarchyAccess = pManager->AddConfigItem(*this);
}
@@ -243,7 +244,8 @@ ConfigItem::ConfigItem(utl::ConfigManager& rManager, const rtl::OUString rSubTr
sSubTree(rSubTree),
bIsModified(sal_False),
nInValueChange(0),
- bHasChangedProperties(sal_False)
+ bHasChangedProperties(sal_False),
+ nMode(0)
{
xHierarchyAccess = pManager->AddConfigItem(*this);
}