diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-04-17 09:23:24 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-04-17 09:23:24 +0000 |
commit | 02f6d9f3b765df1972557288efef7aa51142ebae (patch) | |
tree | 4ed311c7860ad1a4c8b32ada693abf69face1e42 | |
parent | 05288290dc6fd8a20eddf85a60abf2c9e5bc3b13 (diff) |
INTEGRATION: CWS sw009 (1.1.4.3.28); FILE MERGED
2003/03/18 12:25:31 oj 1.1.4.3.28.1: #106149# add two new methods
-rw-r--r-- | svtools/source/config/colorcfg.cxx | 50 |
1 files changed, 42 insertions, 8 deletions
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index a16fb92ac86f..8b11d8cd9db1 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: colorcfg.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: hr $ $Date: 2003-03-27 14:37:32 $ + * last change: $Author: vg $ $Date: 2003-04-17 10:23:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -136,6 +136,7 @@ class ColorConfig_Impl : public utl::ConfigItem, public SfxBroadcaster sal_Bool m_bEditMode; rtl::OUString m_sIsVisible; rtl::OUString m_sLoadedScheme; + sal_Bool m_bIsBroadcastEnabled; static sal_Bool m_bLockBroadcast; static sal_Bool m_bBroadcastWhenUnlocked; @@ -166,6 +167,10 @@ public: void ClearModified(){ConfigItem::ClearModified();} void SettingsChanged(); + static void DisableBroadcast(); + static void EnableBroadcast(); + static sal_Bool IsEnableBroadcast(); + static void LockBroadcast(); static void UnlockBroadcast(); @@ -265,7 +270,8 @@ sal_Bool ColorConfig_Impl::m_bBroadcastWhenUnlocked = sal_False; ColorConfig_Impl::ColorConfig_Impl(sal_Bool bEditMode) : ConfigItem(C2U("Office.UI/ColorScheme")), m_sIsVisible(C2U("/IsVisible")), - m_bEditMode(bEditMode) + m_bEditMode(bEditMode), + m_bIsBroadcastEnabled(sal_True) { if(!m_bEditMode) { @@ -289,6 +295,21 @@ ColorConfig_Impl::~ColorConfig_Impl() // #100822# ::Application::RemoveEventListener( LINK(this, ColorConfig_Impl, DataChangedEventListener) ); } +// ----------------------------------------------------------------------------- +void ColorConfig_Impl::DisableBroadcast() +{ + ColorConfig::m_pImpl->m_bIsBroadcastEnabled = sal_False; +} +// ----------------------------------------------------------------------------- +void ColorConfig_Impl::EnableBroadcast() +{ + ColorConfig::m_pImpl->m_bIsBroadcastEnabled = sal_True; +} +// ----------------------------------------------------------------------------- +sal_Bool ColorConfig_Impl::IsEnableBroadcast() +{ + return ColorConfig::m_pImpl->m_bIsBroadcastEnabled; +} /* -----------------------------22.03.2002 14:38------------------------------ ---------------------------------------------------------------------------*/ @@ -449,14 +470,16 @@ void ColorConfig_Impl::LockBroadcast() * --------------------------------------------------*/ void ColorConfig_Impl::UnlockBroadcast() { - if(m_bBroadcastWhenUnlocked) + if ( m_bBroadcastWhenUnlocked ) { - - m_bBroadcastWhenUnlocked = sal_False; - if(ColorConfig::m_pImpl) + if ( m_bBroadcastWhenUnlocked = ColorConfig::m_pImpl != NULL ) { ColorConfig::m_pImpl->ImplUpdateApplicationSettings(); - ColorConfig::m_pImpl->Broadcast(SfxSimpleHint(SFX_HINT_COLORS_CHANGED)); + if ( ColorConfig::m_pImpl->IsEnableBroadcast() ) + { + m_bBroadcastWhenUnlocked = sal_False; + ColorConfig::m_pImpl->Broadcast(SfxSimpleHint(SFX_HINT_COLORS_CHANGED)); + } } } m_bLockBroadcast = sal_False; @@ -761,5 +784,16 @@ void EditableColorConfig::Commit() m_pImpl->Commit(); m_bModified = sal_False; } +// ----------------------------------------------------------------------------- +void EditableColorConfig::DisableBroadcast() +{ + m_pImpl->DisableBroadcast(); +} +// ----------------------------------------------------------------------------- +void EditableColorConfig::EnableBroadcast() +{ + m_pImpl->EnableBroadcast(); +} +// ----------------------------------------------------------------------------- }//namespace svtools |