diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-03-11 16:14:47 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-03-11 16:50:00 +0100 |
commit | 765f6211b1371c1e40de386e715de6b3d1a8df86 (patch) | |
tree | 0d0a8d92097a628ac72316593db9561c23948685 /svtools/source | |
parent | 0bd20a26686d01efea4c64c1f4aac53ae1c142aa (diff) |
utl::ConfigItem::Commit() should call ClearModified()
Rename the virtual function, and add a new non-virtual Commit() to do
that.
Change-Id: I09421df781ba965d6ff638b46cd8214fb3a00022
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/config/apearcfg.cxx | 2 | ||||
-rw-r--r-- | svtools/source/config/colorcfg.cxx | 6 | ||||
-rw-r--r-- | svtools/source/config/extcolorcfg.cxx | 6 | ||||
-rw-r--r-- | svtools/source/config/fontsubstconfig.cxx | 2 | ||||
-rw-r--r-- | svtools/source/config/helpopt.cxx | 5 | ||||
-rw-r--r-- | svtools/source/config/htmlcfg.cxx | 2 | ||||
-rw-r--r-- | svtools/source/config/menuoptions.cxx | 15 | ||||
-rw-r--r-- | svtools/source/config/miscopt.cxx | 15 | ||||
-rw-r--r-- | svtools/source/config/optionsdrawinglayer.cxx | 10 | ||||
-rw-r--r-- | svtools/source/config/slidesorterbaropt.cxx | 13 | ||||
-rw-r--r-- | svtools/source/config/toolpanelopt.cxx | 14 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 4 |
12 files changed, 32 insertions, 62 deletions
diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index 35b0d688bf54..6c55776385e0 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -111,7 +111,7 @@ const Sequence<OUString>& SvtTabAppearanceCfg::GetPropertyNames() return aNames; } -void SvtTabAppearanceCfg::Commit() +void SvtTabAppearanceCfg::ImplCommit() { const Sequence<OUString>& rNames = GetPropertyNames(); Sequence<Any> aValues(rNames.getLength()); diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index d816876af614..691229a01b95 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -70,6 +70,9 @@ class ColorConfig_Impl : public utl::ConfigItem bool m_bAutoDetectSystemHC; uno::Sequence< OUString> GetPropertyNames(const OUString& rScheme); + + virtual void ImplCommit() SAL_OVERRIDE; + public: ColorConfig_Impl(bool bEditMode = false); virtual ~ColorConfig_Impl(); @@ -78,7 +81,6 @@ public: void CommitCurrentSchemeName(); //changes the name of the current scheme but doesn't load it! void SetCurrentSchemeName(const OUString& rSchemeName) {m_sLoadedScheme = rSchemeName;} - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; const ColorConfigValue& GetColorConfigValue(ColorConfigEntry eValue) @@ -261,7 +263,7 @@ void ColorConfig_Impl::Notify( const uno::Sequence<OUString>& ) NotifyListeners(0); } -void ColorConfig_Impl::Commit() +void ColorConfig_Impl::ImplCommit() { uno::Sequence < OUString > aColorNames = GetPropertyNames(m_sLoadedScheme); uno::Sequence < beans::PropertyValue > aPropValues(aColorNames.getLength()); diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index 069d8a26b8c0..507fde181aae 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -76,6 +76,9 @@ class ExtendedColorConfig_Impl : public utl::ConfigItem, public SfxBroadcaster uno::Sequence< OUString> GetPropertyNames(const OUString& rScheme); void FillComponentColors(uno::Sequence < OUString >& _rComponents,const TDisplayNames& _rDisplayNames); + + virtual void ImplCommit() SAL_OVERRIDE; + public: ExtendedColorConfig_Impl(bool bEditMode = false); virtual ~ExtendedColorConfig_Impl(); @@ -85,7 +88,6 @@ public: //changes the name of the current scheme but doesn't load it! void SetCurrentSchemeName(const OUString& rSchemeName) {m_sLoadedScheme = rSchemeName;} bool ExistsScheme(const OUString& _sSchemeName); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; sal_Int32 GetComponentCount() const; @@ -412,7 +414,7 @@ void ExtendedColorConfig_Impl::Notify( const uno::Sequence<OUString>& /*rProp Broadcast(SfxSimpleHint(SFX_HINT_COLORS_CHANGED)); } -void ExtendedColorConfig_Impl::Commit() +void ExtendedColorConfig_Impl::ImplCommit() { if ( m_sLoadedScheme.isEmpty() ) return; diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 57f3a2183f9e..a602845427d6 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -98,7 +98,7 @@ void SvtFontSubstConfig::Notify( const com::sun::star::uno::Sequence< OUString > { } -void SvtFontSubstConfig::Commit() +void SvtFontSubstConfig::ImplCommit() { Sequence<OUString> aNames(1); aNames.getArray()[0] = cReplacement; diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx index e0727add41fe..972f9a087d17 100644 --- a/svtools/source/config/helpopt.cxx +++ b/svtools/source/config/helpopt.cxx @@ -60,12 +60,13 @@ class SvtHelpOptions_Impl : public utl::ConfigItem Sequence< OUString > GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtHelpOptions_Impl(); virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void Load( const ::com::sun::star::uno::Sequence< OUString>& aPropertyNames); - virtual void Commit() SAL_OVERRIDE; void SetExtendedHelp( bool b ) { bExtendedHelp= b; SetModified(); } bool IsExtendedHelp() const { return bExtendedHelp; } @@ -215,7 +216,7 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames) -void SvtHelpOptions_Impl::Commit() +void SvtHelpOptions_Impl::ImplCommit() { Sequence< OUString > aNames = GetPropertyNames(); Sequence< Any > aValues( aNames.getLength() ); diff --git a/svtools/source/config/htmlcfg.cxx b/svtools/source/config/htmlcfg.cxx index b42eeaa6e982..94a51b654b4f 100644 --- a/svtools/source/config/htmlcfg.cxx +++ b/svtools/source/config/htmlcfg.cxx @@ -190,7 +190,7 @@ void SvxHtmlOptions::Load( const Sequence< OUString >& aNames ) } -void SvxHtmlOptions::Commit() +void SvxHtmlOptions::ImplCommit() { const Sequence<OUString>& aNames = GetPropertyNames(); diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx index a295fc46ea42..60d931a6f31e 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -107,17 +107,6 @@ class SvtMenuOptions_Impl : public ConfigItem virtual void Notify( const Sequence< OUString >& seqPropertyNames ) SAL_OVERRIDE; - /*-**************************************************************************************************** - @short write changes to configuration - @descr These method writes the changed values into the sub tree - and should always called in our destructor to guarantee consistency of config data. - - @seealso baseclass ConfigItem - *//*-*****************************************************************************************************/ - - virtual void Commit() SAL_OVERRIDE; - - // public interface @@ -148,6 +137,8 @@ class SvtMenuOptions_Impl : public ConfigItem private: + virtual void ImplCommit() SAL_OVERRIDE; + /*-**************************************************************************************************** @short return list of fix key names of our configuration management which represent our module tree @descr These methods return a static const list of key names. We need it to get needed values from our @@ -306,7 +297,7 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) // public method -void SvtMenuOptions_Impl::Commit() +void SvtMenuOptions_Impl::ImplCommit() { // Get names of supported properties, create a list for values and copy current values to it. Sequence< OUString > seqNames = impl_GetPropertyNames(); diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 8f25929c9897..9d4fcaf2870f 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -90,6 +90,8 @@ class SvtMiscOptions_Impl : public ConfigItem bool m_bMacroRecorderMode; bool m_bIconThemeWasSetAutomatically; + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtMiscOptions_Impl(); @@ -114,17 +116,6 @@ class SvtMiscOptions_Impl : public ConfigItem */ void Load( const Sequence< OUString >& rPropertyNames ); - /*-**************************************************************************************************** - @short write changes to configuration - @descr These method writes the changed values into the sub tree - and should always called in our destructor to guarantee consistency of config data. - - @seealso baseclass ConfigItem - *//*-*****************************************************************************************************/ - - virtual void Commit() SAL_OVERRIDE; - - // public interface @@ -576,7 +567,7 @@ void SvtMiscOptions_Impl::Notify( const Sequence< OUString >& rPropertyNames ) // public method -void SvtMiscOptions_Impl::Commit() +void SvtMiscOptions_Impl::ImplCommit() { // Get names of supported properties, create a list for values and copy current values to it. Sequence< OUString > seqNames = GetPropertyNames (); diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx index 325300503f4f..1e398d9e276d 100644 --- a/svtools/source/config/optionsdrawinglayer.cxx +++ b/svtools/source/config/optionsdrawinglayer.cxx @@ -168,8 +168,6 @@ public: // override methods of baseclass - - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; @@ -222,18 +220,16 @@ public: void SetTransparentSelection( bool bState ); void SetTransparentSelectionPercent( sal_uInt16 nPercent ); - // private methods - private: - static Sequence< OUString > impl_GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + static Sequence< OUString > impl_GetPropertyNames(); // private member - private: bool m_bOverlayBuffer; @@ -554,7 +550,7 @@ SvtOptionsDrawinglayer_Impl::~SvtOptionsDrawinglayer_Impl() // Commit -void SvtOptionsDrawinglayer_Impl::Commit() +void SvtOptionsDrawinglayer_Impl::ImplCommit() { Sequence< OUString > aSeqNames( impl_GetPropertyNames() ); Sequence< Any > aSeqValues( aSeqNames.getLength() ); diff --git a/svtools/source/config/slidesorterbaropt.cxx b/svtools/source/config/slidesorterbaropt.cxx index 74586f399a1e..cf0e0c6d3c6d 100644 --- a/svtools/source/config/slidesorterbaropt.cxx +++ b/svtools/source/config/slidesorterbaropt.cxx @@ -73,15 +73,6 @@ class SvtSlideSorterBarOptions_Impl : public ConfigItem */ void Load( const Sequence< OUString >& rPropertyNames ); - /** write changes to configuration - - These method writes the changed values into the sub tree - and should always called in our destructor to guarantee consistency of config data. - - \sa baseclass ConfigItem - */ - virtual void Commit() SAL_OVERRIDE; - // public interface bool m_bVisibleImpressView; bool m_bVisibleOutlineView; @@ -91,6 +82,8 @@ class SvtSlideSorterBarOptions_Impl : public ConfigItem bool m_bVisibleDrawView; private: + virtual void ImplCommit() SAL_OVERRIDE; + /** return list of key names of our configuration management which represent oue module tree These methods return a static const list of key names. We need it to get needed values from our @@ -257,7 +250,7 @@ void SvtSlideSorterBarOptions_Impl::Notify( const Sequence< OUString >& rPropert Load( rPropertyNames ); } -void SvtSlideSorterBarOptions_Impl::Commit() +void SvtSlideSorterBarOptions_Impl::ImplCommit() { // Get names of supported properties, create a list for values and copy current values to it. sal_Int32 nCount = m_seqPropertyNames.getLength(); diff --git a/svtools/source/config/toolpanelopt.cxx b/svtools/source/config/toolpanelopt.cxx index c5ec8c7ab27e..4934eeb6b545 100644 --- a/svtools/source/config/toolpanelopt.cxx +++ b/svtools/source/config/toolpanelopt.cxx @@ -78,15 +78,6 @@ class SvtToolPanelOptions_Impl : public ConfigItem */ void Load( const Sequence< OUString >& rPropertyNames ); - /** write changes to configuration - - These method writes the changed values into the sub tree - and should always called in our destructor to guarantee consistency of config data. - - \sa baseclass ConfigItem - */ - virtual void Commit() SAL_OVERRIDE; - // public interface bool m_bVisibleImpressView; bool m_bVisibleOutlineView; @@ -95,6 +86,9 @@ class SvtToolPanelOptions_Impl : public ConfigItem bool m_bVisibleSlideSorterView; private: + + virtual void ImplCommit() SAL_OVERRIDE; + /** return list of key names of our configuration management which represent oue module tree These methods return a static const list of key names. We need it to get needed values from our @@ -247,7 +241,7 @@ void SvtToolPanelOptions_Impl::Notify( const Sequence< OUString >& rPropertyName Load( rPropertyNames ); } -void SvtToolPanelOptions_Impl::Commit() +void SvtToolPanelOptions_Impl::ImplCommit() { // Get names of supported properties, create a list for values and copy current values to it. sal_Int32 nCount = m_seqPropertyNames.getLength(); diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 9afee2403ccc..57a389531db3 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -280,9 +280,9 @@ public: virtual void setCommand(const OUString& _rCommand) SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; private: + virtual void ImplCommit() SAL_OVERRIDE; void clearFieldAssignment(const OUString& _rLogicalName); }; @@ -291,7 +291,7 @@ void AssignmentPersistentData::Notify( const com::sun::star::uno::Sequence<OUStr { } -void AssignmentPersistentData::Commit() +void AssignmentPersistentData::ImplCommit() { } |