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 | |
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
116 files changed, 344 insertions, 315 deletions
diff --git a/chart2/source/controller/main/ConfigurationAccess.cxx b/chart2/source/controller/main/ConfigurationAccess.cxx index 50f638a31358..4427b3fa105b 100644 --- a/chart2/source/controller/main/ConfigurationAccess.cxx +++ b/chart2/source/controller/main/ConfigurationAccess.cxx @@ -42,12 +42,14 @@ bool lcl_IsMetric() class CalcConfigItem : public ::utl::ConfigItem { +private: + virtual void ImplCommit() SAL_OVERRIDE; + public: CalcConfigItem(); virtual ~CalcConfigItem(); FieldUnit getFieldUnit(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; }; @@ -60,7 +62,7 @@ CalcConfigItem::~CalcConfigItem() { } -void CalcConfigItem::Commit() {} +void CalcConfigItem::ImplCommit() {} void CalcConfigItem::Notify( const uno::Sequence<OUString>& ) {} FieldUnit CalcConfigItem::getFieldUnit() diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx index 8b42c9c019db..3743205f04aa 100644 --- a/chart2/source/tools/ConfigColorScheme.cxx +++ b/chart2/source/tools/ConfigColorScheme.cxx @@ -61,7 +61,7 @@ public: protected: // ____ ::utl::ConfigItem ____ - virtual void Commit() SAL_OVERRIDE; + virtual void ImplCommit() SAL_OVERRIDE; virtual void Notify( const Sequence< OUString > & aPropertyNames ) SAL_OVERRIDE; private: @@ -86,7 +86,7 @@ void ChartConfigItem::Notify( const Sequence< OUString > & aPropertyNames ) } } -void ChartConfigItem::Commit() +void ChartConfigItem::ImplCommit() {} void ChartConfigItem::addPropertyNotification( const OUString & rPropertyName ) diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx index 8c10a9e0e4be..8e18319a5c36 100644 --- a/cui/source/options/cfgchart.cxx +++ b/cui/source/options/cfgchart.cxx @@ -245,7 +245,7 @@ bool SvxChartOptions::RetrieveOptions() return false; } -void SvxChartOptions::Commit() +void SvxChartOptions::ImplCommit() { uno::Sequence< OUString > aNames = GetPropertyNames(); uno::Sequence< uno::Any > aValues( aNames.getLength()); diff --git a/cui/source/options/cfgchart.hxx b/cui/source/options/cfgchart.hxx index fdfc06f675ba..f7e34fb8fde4 100644 --- a/cui/source/options/cfgchart.hxx +++ b/cui/source/options/cfgchart.hxx @@ -72,6 +72,8 @@ private: { return maPropertyNames; } bool RetrieveOptions(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SvxChartOptions(); virtual ~SvxChartOptions(); @@ -79,7 +81,6 @@ public: const SvxChartColorTable& GetDefaultColors(); void SetDefaultColors( const SvxChartColorTable& aCol ); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames) SAL_OVERRIDE; }; diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 50e853008ad7..c384de188dec 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -940,11 +940,13 @@ class MailerProgramCfg_Impl : public utl::ConfigItem bool bROProgram; const Sequence<OUString> GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: MailerProgramCfg_Impl(); virtual ~MailerProgramCfg_Impl(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames) SAL_OVERRIDE; }; @@ -994,7 +996,7 @@ const Sequence<OUString> MailerProgramCfg_Impl::GetPropertyNames() /* -------------------------------------------------------------------------*/ -void MailerProgramCfg_Impl::Commit() +void MailerProgramCfg_Impl::ImplCommit() { const Sequence< OUString > aOrgNames = GetPropertyNames(); sal_Int32 nOrgCount = aOrgNames.getLength(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index fdcbb0a16191..88c2cdb9a006 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -249,15 +249,17 @@ static sal_uInt16 getGroupNodeId( const OUString& rModule ) class MailMergeCfg_Impl : public utl::ConfigItem { +private: friend class SvxEMailTabPage; // variables bool bIsEmailSupported; + virtual void ImplCommit() SAL_OVERRIDE; + public: MailMergeCfg_Impl(); virtual ~MailMergeCfg_Impl(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames) SAL_OVERRIDE; bool IsEmailSupported() const {return bIsEmailSupported;} @@ -280,7 +282,7 @@ MailMergeCfg_Impl::~MailMergeCfg_Impl() { } /* -------------------------------------------------------------------------*/ -void MailMergeCfg_Impl::Commit() +void MailMergeCfg_Impl::ImplCommit() { } diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index 9ca989c6cace..cac7cb924ba1 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -236,7 +236,7 @@ SvxBaseAutoCorrCfg::~SvxBaseAutoCorrCfg() { } -void SvxBaseAutoCorrCfg::Commit() +void SvxBaseAutoCorrCfg::ImplCommit() { Sequence<OUString> aNames( GetPropertyNames() ); @@ -321,7 +321,6 @@ void SvxBaseAutoCorrCfg::Commit() } } PutProperties(aNames, aValues); - ClearModified(); } void SvxBaseAutoCorrCfg::Notify( const Sequence<OUString>& /* aPropertyNames */) @@ -546,7 +545,7 @@ SvxSwAutoCorrCfg::~SvxSwAutoCorrCfg() { } -void SvxSwAutoCorrCfg::Commit() +void SvxSwAutoCorrCfg::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); @@ -641,7 +640,6 @@ void SvxSwAutoCorrCfg::Commit() } } PutProperties(aNames, aValues); - ClearModified(); } void SvxSwAutoCorrCfg::Notify( const Sequence<OUString>& /* aPropertyNames */ ) diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index c9d0af0c9d65..4c7b65c9a559 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -218,7 +218,7 @@ void BibConfig::Notify( const com::sun::star::uno::Sequence<OUString>& ) { } -void BibConfig::Commit() +void BibConfig::ImplCommit() { const Sequence<OUString> aPropertyNames = GetPropertyNames(); Sequence<Any> aValues(aPropertyNames.getLength()); diff --git a/extensions/source/bibliography/bibconfig.hxx b/extensions/source/bibliography/bibconfig.hxx index 4bca1a9208f5..23880ed711ac 100644 --- a/extensions/source/bibliography/bibconfig.hxx +++ b/extensions/source/bibliography/bibconfig.hxx @@ -102,11 +102,13 @@ class BibConfig : public utl::ConfigItem OUString aColumnDefaults[COLUMN_COUNT]; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: BibConfig(); virtual ~BibConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; BibDBDescriptor GetBibliographyURL(); diff --git a/framework/inc/classes/protocolhandlercache.hxx b/framework/inc/classes/protocolhandlercache.hxx index 52d3997c3ad9..7c7cce222685 100644 --- a/framework/inc/classes/protocolhandlercache.hxx +++ b/framework/inc/classes/protocolhandlercache.hxx @@ -138,6 +138,8 @@ class FWI_DLLPUBLIC HandlerCFGAccess : public ::utl::ConfigItem private: HandlerCache* m_pCache; + virtual void ImplCommit() SAL_OVERRIDE; + /* interface */ public: HandlerCFGAccess( const OUString& sPackage ); @@ -146,7 +148,6 @@ class FWI_DLLPUBLIC HandlerCFGAccess : public ::utl::ConfigItem void setCache(HandlerCache* pCache) {m_pCache = pCache;}; virtual void Notify(const css::uno::Sequence< OUString >& lPropertyNames) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; }; } // namespace framework diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 4f0fcff181b2..58699066b38a 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -182,16 +182,6 @@ class AddonsOptions_Impl : public ConfigItem virtual void Notify( const Sequence< OUString >& lPropertyNames ) 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 /*-**************************************************************************************************** @@ -286,6 +276,8 @@ class AddonsOptions_Impl : public ConfigItem Sequence< OUString > GetPropertyNamesImages( const OUString& aPropertyRootNode ) const; bool CreateImageFromSequence( Image& rImage, Sequence< sal_Int8 >& rBitmapDataSeq ) const; + virtual void ImplCommit() SAL_OVERRIDE; + // private member private: @@ -428,9 +420,9 @@ void AddonsOptions_Impl::Notify( const Sequence< OUString >& /*lPropertyNames*/ // public method -void AddonsOptions_Impl::Commit() +void AddonsOptions_Impl::ImplCommit() { - OSL_FAIL( "AddonsOptions_Impl::Commit()\nNot implemented yet!\n" ); + SAL_WARN("framework", "AddonsOptions_Impl::ImplCommit(): Not implemented yet!"); } // public method diff --git a/framework/source/fwi/classes/protocolhandlercache.cxx b/framework/source/fwi/classes/protocolhandlercache.cxx index 18abfdbbe508..9d71c8c38428 100644 --- a/framework/source/fwi/classes/protocolhandlercache.cxx +++ b/framework/source/fwi/classes/protocolhandlercache.cxx @@ -269,7 +269,7 @@ void HandlerCFGAccess::Notify(const css::uno::Sequence< OUString >& /*lPropertyN } } -void HandlerCFGAccess::Commit() +void HandlerCFGAccess::ImplCommit() { } diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 98e9b0f6d339..4601a662cd35 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -125,9 +125,11 @@ class SubstitutePathVariables_Impl : public utl::ConfigItem /** is called from the ConfigManager before application ends or from the PropertyChangeListener if the sub tree broadcasts changes. */ virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; - private: + private: + + virtual void ImplCommit() SAL_OVERRIDE; + // Wrapper methods for low-level functions OperatingSystem GetOperatingSystem(); const OUString& GetYPDomainName(); @@ -458,7 +460,7 @@ void SubstitutePathVariables_Impl::Notify( const com::sun::star::uno::Sequence< // NOT implemented yet! } -void SubstitutePathVariables_Impl::Commit() +void SubstitutePathVariables_Impl::ImplCommit() { } diff --git a/include/editeng/acorrcfg.hxx b/include/editeng/acorrcfg.hxx index 14e2b69d808d..b0ecbc1b1be0 100644 --- a/include/editeng/acorrcfg.hxx +++ b/include/editeng/acorrcfg.hxx @@ -26,30 +26,34 @@ class SvxAutoCorrect; class SvxAutoCorrCfg; class EDITENG_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem { +private: SvxAutoCorrCfg& rParent; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rParent); virtual ~SvxBaseAutoCorrCfg(); void Load(bool bInit); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; void SetModified() {ConfigItem::SetModified();} }; class EDITENG_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem { +private: SvxAutoCorrCfg& rParent; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SvxSwAutoCorrCfg(SvxAutoCorrCfg& rParent); virtual ~SvxSwAutoCorrCfg(); void Load(bool bInit); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; void SetModified() {ConfigItem::SetModified();} }; diff --git a/include/svl/languageoptions.hxx b/include/svl/languageoptions.hxx index 428e5ca79a22..8c0ea1af24e8 100644 --- a/include/svl/languageoptions.hxx +++ b/include/svl/languageoptions.hxx @@ -98,11 +98,12 @@ private: bool isKeyboardLayoutTypeInstalled(sal_Int16 scriptType) const; + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtSystemLanguageOptions(); virtual ~SvtSystemLanguageOptions(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& rPropertyNames ) SAL_OVERRIDE; LanguageType GetWin16SystemLanguage() const; diff --git a/include/svl/srchitem.hxx b/include/svl/srchitem.hxx index 531d95e679d3..2b1eeb627b06 100644 --- a/include/svl/srchitem.hxx +++ b/include/svl/srchitem.hxx @@ -81,6 +81,8 @@ class SVL_DLLPUBLIC SvxSearchItem : bool bContent; // search in content bool bAsianOptions; // use asian options? + virtual void ImplCommit() SAL_OVERRIDE; + public: TYPEINFO_OVERRIDE(); @@ -99,7 +101,6 @@ public: // ConfigItem virtual void Notify( const com::sun::star::uno::Sequence< OUString > &rPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; SvxSearchCmd GetCommand() const { return nCommand; } void SetCommand(SvxSearchCmd nNewCommand) { nCommand = nNewCommand; } diff --git a/include/svtools/apearcfg.hxx b/include/svtools/apearcfg.hxx index 973577d31a3c..cb308b821ae6 100644 --- a/include/svtools/apearcfg.hxx +++ b/include/svtools/apearcfg.hxx @@ -55,12 +55,12 @@ class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem static bool bInitialized ; SVT_DLLPRIVATE const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; public: SvtTabAppearanceCfg( ); virtual ~SvtTabAppearanceCfg( ); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames) SAL_OVERRIDE; sal_uInt16 GetDragMode () const { return nDragMode; } diff --git a/include/svtools/fontsubstconfig.hxx b/include/svtools/fontsubstconfig.hxx index 4bac9db32dd7..278eb66bb936 100644 --- a/include/svtools/fontsubstconfig.hxx +++ b/include/svtools/fontsubstconfig.hxx @@ -35,13 +35,16 @@ struct SubstitutionStruct class SVT_DLLPUBLIC SvtFontSubstConfig : public utl::ConfigItem { +private: bool bIsEnabled; SvtFontSubstConfig_Impl* pImpl; + + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtFontSubstConfig(); virtual ~SvtFontSubstConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames) SAL_OVERRIDE; bool IsEnabled() const {return bIsEnabled;} diff --git a/include/svtools/htmlcfg.hxx b/include/svtools/htmlcfg.hxx index 69d4782b0d0e..b26391755b78 100644 --- a/include/svtools/htmlcfg.hxx +++ b/include/svtools/htmlcfg.hxx @@ -42,11 +42,12 @@ class SVT_DLLPUBLIC SvxHtmlOptions : public utl::ConfigItem void Load( const com::sun::star::uno::Sequence< OUString >& rPropertyNames ); void CallListeners(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SvxHtmlOptions(); virtual ~SvxHtmlOptions(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames) SAL_OVERRIDE; sal_uInt16 GetFontSize(sal_uInt16 nPos) const; diff --git a/include/unotools/configitem.hxx b/include/unotools/configitem.hxx index b30af8083d4e..929ffd74e3bb 100644 --- a/include/unotools/configitem.hxx +++ b/include/unotools/configitem.hxx @@ -101,6 +101,9 @@ namespace utl com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess> GetTree(); + /** writes the changed values into the sub tree. + Private and only called from non-virtual public Commit(). */ + virtual void ImplCommit() = 0; protected: explicit ConfigItem(const OUString &rSubTree, @@ -166,8 +169,7 @@ namespace utl bool IsModified() const { return m_bIsModified;} - /** writes the changed values into the sub tree. Always called in the Dtor of the derived class. */ - virtual void Commit()=0; + void Commit(); bool IsInValueChange() const { return m_nInValueChange > 0;} diff --git a/include/unotools/eventcfg.hxx b/include/unotools/eventcfg.hxx index 7185aef49695..d1cc6fe95e30 100644 --- a/include/unotools/eventcfg.hxx +++ b/include/unotools/eventcfg.hxx @@ -64,18 +64,20 @@ typedef std::vector< OUString > SupportedEventsVector; class GlobalEventConfig_Impl : public utl::ConfigItem { +private: EventBindingHash m_eventBindingHash; FrameVector m_lFrames; SupportedEventsVector m_supportedEvents; void initBindingInfo(); + virtual void ImplCommit() SAL_OVERRIDE; + public: GlobalEventConfig_Impl( ); virtual ~GlobalEventConfig_Impl( ); void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; - void Commit() SAL_OVERRIDE; void SAL_CALL replaceByName( const OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); diff --git a/include/unotools/fltrcfg.hxx b/include/unotools/fltrcfg.hxx index 520959763eea..c64ce01be72b 100644 --- a/include/unotools/fltrcfg.hxx +++ b/include/unotools/fltrcfg.hxx @@ -25,15 +25,18 @@ struct SvtFilterOptions_Impl; class UNOTOOLS_DLLPUBLIC SvtFilterOptions : public utl::ConfigItem { +private: SvtFilterOptions_Impl* pImp; const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtFilterOptions(); virtual ~SvtFilterOptions(); virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; void Load(); void SetLoadWordBasicCode( bool bFlag ); diff --git a/include/vcl/configsettings.hxx b/include/vcl/configsettings.hxx index b721f25ea380..f797898d88ff 100644 --- a/include/vcl/configsettings.hxx +++ b/include/vcl/configsettings.hxx @@ -36,12 +36,16 @@ namespace vcl class VCL_DLLPUBLIC SettingsConfigItem : public ::utl::ConfigItem { + private: std::unordered_map< OUString, SmallOUStrMap, OUStringHash > m_aSettings; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& rPropertyNames ) SAL_OVERRIDE; void getValues(); SettingsConfigItem(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: virtual ~SettingsConfigItem(); @@ -50,7 +54,6 @@ namespace vcl const OUString& getValue( const OUString& rGroup, const OUString& rKey ) const; void setValue( const OUString& rGroup, const OUString& rKey, const OUString& rValue ); - virtual void Commit() SAL_OVERRIDE; }; diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index aa733628c166..58bfa7750754 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -969,11 +969,11 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames ) } -void LngSvcMgr::Commit() +void LngSvcMgr::ImplCommit() { // everything necessary should have already been done by 'SaveCfgSvcs' // called from within 'setConfiguredServices'. - // Also this class usually exits only when the Office i sbeing shutdown. + // Also this class usually exits only when the Office is being shutdown. } diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx index 6b4392ec2789..73822faf8473 100644 --- a/linguistic/source/lngsvcmgr.hxx +++ b/linguistic/source/lngsvcmgr.hxx @@ -134,7 +134,7 @@ class LngSvcMgr : // utl::ConfigItem (to allow for listening of changes of relevant properties) virtual void Notify( const com::sun::star::uno::Sequence< OUString > &rPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; + virtual void ImplCommit() SAL_OVERRIDE; void UpdateAll(); void stopListening(); diff --git a/sc/inc/addincfg.hxx b/sc/inc/addincfg.hxx index ab8b6978d210..74e86c93047b 100644 --- a/sc/inc/addincfg.hxx +++ b/sc/inc/addincfg.hxx @@ -24,13 +24,15 @@ class ScAddInCfg : public utl::ConfigItem { +private: com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: ScAddInCfg(); virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; com::sun::star::uno::Sequence< com::sun::star::uno::Any> GetProperties(const com::sun::star::uno::Sequence< OUString >& rNames) diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx index 8e69e76775f6..700e14408787 100644 --- a/sc/inc/defaultsoptions.hxx +++ b/sc/inc/defaultsoptions.hxx @@ -64,13 +64,15 @@ private: class ScDefaultsCfg : public ScDefaultsOptions, public utl::ConfigItem { +private: com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: ScDefaultsCfg(); void SetOptions( const ScDefaultsOptions& rNew ); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; }; diff --git a/sc/inc/filtopt.hxx b/sc/inc/filtopt.hxx index ed6ee85095ce..d080a6683ae2 100644 --- a/sc/inc/filtopt.hxx +++ b/sc/inc/filtopt.hxx @@ -27,17 +27,19 @@ class SC_DLLPUBLIC ScFilterOptions : public utl::ConfigItem { +private: bool bWK3Flag; double fExcelColScale; double fExcelRowScale; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: ScFilterOptions(); virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; bool GetWK3Flag() const { return bWK3Flag; } double GetExcelColScale() const { return fExcelColScale; } diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx index e19de2d89e97..59ce099aab05 100644 --- a/sc/inc/formulaopt.hxx +++ b/sc/inc/formulaopt.hxx @@ -104,12 +104,14 @@ class ScFormulaCfg : public ScFormulaOptions, public utl::ConfigItem com::sun::star::uno::Sequence<OUString> GetPropertyNames(); ScFormulaCfg::PropsToIds GetPropNamesToId(); void UpdateFromProperties( const com::sun::star::uno::Sequence<OUString>& rNames ); + + virtual void ImplCommit() SAL_OVERRIDE; + public: ScFormulaCfg(); void SetOptions( const ScFormulaOptions& rNew ); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; }; diff --git a/sc/inc/inputopt.hxx b/sc/inc/inputopt.hxx index b6d2a0940913..cd82ef0d5336 100644 --- a/sc/inc/inputopt.hxx +++ b/sc/inc/inputopt.hxx @@ -81,6 +81,8 @@ class ScInputCfg : public ScInputOptions, { com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: ScInputCfg(); @@ -88,7 +90,6 @@ public: void OptionsChanged(); // after direct access to SetOptions base class virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; }; #endif diff --git a/sc/inc/optutil.hxx b/sc/inc/optutil.hxx index 88bbc3f5b739..aa9f11c1ed7b 100644 --- a/sc/inc/optutil.hxx +++ b/sc/inc/optutil.hxx @@ -45,7 +45,7 @@ public: void SetCommitLink( const Link& rLink ); virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; + virtual void ImplCommit() SAL_OVERRIDE; void SetModified() { ConfigItem::SetModified(); } com::sun::star::uno::Sequence< com::sun::star::uno::Any> diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx index ff4f6edba3c9..ab3fe003a812 100644 --- a/sc/inc/printopt.hxx +++ b/sc/inc/printopt.hxx @@ -74,14 +74,16 @@ private: class ScPrintCfg : public ScPrintOptions, public utl::ConfigItem { +private: com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: ScPrintCfg(); void SetOptions( const ScPrintOptions& rNew ); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; }; diff --git a/sc/source/core/tool/addincfg.cxx b/sc/source/core/tool/addincfg.cxx index db6cc3474687..4b03a47413d4 100644 --- a/sc/source/core/tool/addincfg.cxx +++ b/sc/source/core/tool/addincfg.cxx @@ -37,9 +37,9 @@ ScAddInCfg::ScAddInCfg() : EnableNotification( aNames ); } -void ScAddInCfg::Commit() +void ScAddInCfg::ImplCommit() { - OSL_FAIL("ScAddInCfg shouldn't be modified"); + SAL_WARN("sc", "ScAddInCfg shouldn't be modified"); } void ScAddInCfg::Notify( const uno::Sequence<OUString>& ) diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx index c21eef3edf60..cf5965134b2c 100644 --- a/sc/source/core/tool/defaultsoptions.cxx +++ b/sc/source/core/tool/defaultsoptions.cxx @@ -143,7 +143,7 @@ ScDefaultsCfg::ScDefaultsCfg() : } } -void ScDefaultsCfg::Commit() +void ScDefaultsCfg::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/sc/source/core/tool/filtopt.cxx b/sc/source/core/tool/filtopt.cxx index a4db66e4112d..86626d8c162c 100644 --- a/sc/source/core/tool/filtopt.cxx +++ b/sc/source/core/tool/filtopt.cxx @@ -84,7 +84,7 @@ ScFilterOptions::ScFilterOptions() : } } -void ScFilterOptions::Commit() +void ScFilterOptions::ImplCommit() { // options are never modified from office diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index 1480ada92182..1e0a5f5d6c59 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -502,7 +502,7 @@ void ScFormulaCfg::UpdateFromProperties( const Sequence<OUString>& aNames ) } } -void ScFormulaCfg::Commit() +void ScFormulaCfg::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx index 27c9fb8abf77..437c047d2ee7 100644 --- a/sc/source/core/tool/inputopt.cxx +++ b/sc/source/core/tool/inputopt.cxx @@ -185,7 +185,7 @@ ScInputCfg::ScInputCfg() : } } -void ScInputCfg::Commit() +void ScInputCfg::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx index 671e6d933756..0574517749b0 100644 --- a/sc/source/core/tool/optutil.cxx +++ b/sc/source/core/tool/optutil.cxx @@ -52,7 +52,7 @@ void ScLinkConfigItem::Notify( const com::sun::star::uno::Sequence<OUString>& /* //TODO: not implemented yet... } -void ScLinkConfigItem::Commit() +void ScLinkConfigItem::ImplCommit() { aCommitLink.Call( this ); } diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx index 6d02ed918d2b..209b8968614e 100644 --- a/sc/source/core/tool/printopt.cxx +++ b/sc/source/core/tool/printopt.cxx @@ -156,7 +156,7 @@ ScPrintCfg::ScPrintCfg() : } } -void ScPrintCfg::Commit() +void ScPrintCfg::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index c3f85efe3f44..bb89daf2ac8c 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -54,7 +54,7 @@ SdOptionsItem::~SdOptionsItem() { } -void SdOptionsItem::Commit() +void SdOptionsItem::ImplCommit() { if( IsModified() ) mrParent.Commit( *this ); diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index a3ce85b949f0..86e4637e63b7 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -55,12 +55,13 @@ private: const SdOptionsGeneric& mrParent; + virtual void ImplCommit() SAL_OVERRIDE; + public: SdOptionsItem( const SdOptionsGeneric& rParent, const OUString& rSubTree ); virtual ~SdOptionsItem(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetProperties( diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index f2e9b8175441..3b12c54ed722 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -468,7 +468,7 @@ SmSymbolManager & SmMathConfig::GetSymbolManager() } -void SmMathConfig::Commit() +void SmMathConfig::ImplCommit() { Save(); } diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx index bcbfe4e80fd3..2fe2cdd8c03d 100644 --- a/starmath/source/cfgitem.hxx +++ b/starmath/source/cfgitem.hxx @@ -137,13 +137,14 @@ protected: return const_cast<SmMathConfig*>(this)->GetFontFormatList(); } + virtual void ImplCommit() SAL_OVERRIDE; + public: SmMathConfig(); virtual ~SmMathConfig(); // utl::ConfigItem virtual void Notify( const com::sun::star::uno::Sequence< OUString > &rPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; SmSymbolManager & GetSymbolManager(); void GetSymbols( std::vector< SmSym > &rSymbols ) const; diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx index 90def9ac2ff1..843311d43b72 100644 --- a/svl/source/config/cjkoptions.cxx +++ b/svl/source/config/cjkoptions.cxx @@ -57,12 +57,13 @@ class SvtCJKOptions_Impl : public utl::ConfigItem bool bROEmphasisMarks; bool bROVerticalCallOut; + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtCJKOptions_Impl(); virtual ~SvtCJKOptions_Impl(); virtual void Notify( const com::sun::star::uno::Sequence< OUString >& rPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; void Load(); bool IsLoaded() { return bIsLoaded; } @@ -232,7 +233,7 @@ void SvtCJKOptions_Impl::Notify( const Sequence< OUString >& ) NotifyListeners(0); } -void SvtCJKOptions_Impl::Commit() +void SvtCJKOptions_Impl::ImplCommit() { Sequence<OUString> &rPropertyNames = PropertyNames::get(); OUString* pOrgNames = rPropertyNames.getArray(); diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx index d4a38cced2d9..3cca42821a50 100644 --- a/svl/source/config/ctloptions.cxx +++ b/svl/source/config/ctloptions.cxx @@ -54,12 +54,13 @@ private: bool m_bROCTLCursorMovement; bool m_bROCTLTextNumerals; + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtCTLOptions_Impl(); virtual ~SvtCTLOptions_Impl(); virtual void Notify( const Sequence< OUString >& _aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; void Load(); bool IsLoaded() { return m_bIsLoaded; } @@ -137,7 +138,7 @@ void SvtCTLOptions_Impl::Notify( const Sequence< OUString >& ) NotifyListeners(SFX_HINT_CTL_SETTINGS_CHANGED); } -void SvtCTLOptions_Impl::Commit() +void SvtCTLOptions_Impl::ImplCommit() { Sequence< OUString > &rPropertyNames = PropertyNames::get(); OUString* pOrgNames = rPropertyNames.getArray(); diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx index 06d438271e05..390875ffd798 100644 --- a/svl/source/config/languageoptions.cxx +++ b/svl/source/config/languageoptions.cxx @@ -175,7 +175,7 @@ SvtSystemLanguageOptions::~SvtSystemLanguageOptions() { } -void SvtSystemLanguageOptions::Commit() +void SvtSystemLanguageOptions::ImplCommit() { //does nothing } diff --git a/svl/source/inc/passwordcontainer.hxx b/svl/source/inc/passwordcontainer.hxx index 3ddb900eed77..86b26d76c5f4 100644 --- a/svl/source/inc/passwordcontainer.hxx +++ b/svl/source/inc/passwordcontainer.hxx @@ -190,10 +190,16 @@ typedef ::std::map< OUString, ::std::list< NamePassRecord > > PassMap; class PasswordContainer; -class StorageItem : public ::utl::ConfigItem { +class StorageItem + : public ::utl::ConfigItem +{ +private: PasswordContainer* mainCont; bool hasEncoded; OUString mEncoded; + + virtual void ImplCommit() SAL_OVERRIDE; + public: StorageItem( PasswordContainer* point, const OUString& path ) : ConfigItem( path, CONFIG_MODE_IMMEDIATE_UPDATE ), @@ -217,7 +223,6 @@ public: bool useStorage(); virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; }; diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index 87a55d7575fb..5c0808f1b0bf 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -282,7 +282,7 @@ void SvxSearchItem::Notify( const Sequence< OUString > & ) SetTransliterationFlags( SvtSearchOptions().GetTransliterationFlags() ); } -void SvxSearchItem::Commit() +void SvxSearchItem::ImplCommit() { } diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 889ed3074ff3..8d2243fcb71f 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -383,7 +383,7 @@ void StorageItem::Notify( const Sequence< OUString >& ) } -void StorageItem::Commit() +void StorageItem::ImplCommit() { // Do nothing, we stored everything we want already } diff --git a/svl/source/passwordcontainer/syscreds.cxx b/svl/source/passwordcontainer/syscreds.cxx index bcfacb07c6a6..e0cb7d5fd87f 100644 --- a/svl/source/passwordcontainer/syscreds.cxx +++ b/svl/source/passwordcontainer/syscreds.cxx @@ -48,7 +48,7 @@ void SysCredentialsConfigItem::Notify( m_pOwner->persistentConfigChanged(); } -void SysCredentialsConfigItem::Commit() +void SysCredentialsConfigItem::ImplCommit() { // does nothing } diff --git a/svl/source/passwordcontainer/syscreds.hxx b/svl/source/passwordcontainer/syscreds.hxx index faaf1d09cb0a..45574dae96af 100644 --- a/svl/source/passwordcontainer/syscreds.hxx +++ b/svl/source/passwordcontainer/syscreds.hxx @@ -38,7 +38,6 @@ class SysCredentialsConfigItem : public utl::ConfigItem virtual void Notify( const com::sun::star::uno::Sequence< OUString > & seqPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; com::sun::star::uno::Sequence< OUString > getSystemCredentialsURLs(); @@ -49,7 +48,9 @@ class SysCredentialsConfigItem : public utl::ConfigItem //bool isSystemCredentialsURL( const OUString & rURL ) const; -private: + private: + virtual void ImplCommit() SAL_OVERRIDE; + ::osl::Mutex m_aMutex; bool m_bInited; com::sun::star::uno::Sequence< OUString > m_seqURLs; 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() { } diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 10ff7106930f..f41cfacaed5f 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -3580,7 +3580,7 @@ void FmXFormShell::Notify( const com::sun::star::uno::Sequence< OUString >& _rPr } } -void FmXFormShell::Commit() +void FmXFormShell::ImplCommit() { } diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index bf057cc2d835..b274ae4cce8f 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -490,7 +490,6 @@ private: // ConfigItem related stuff SAL_DLLPRIVATE virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames) SAL_OVERRIDE; - SAL_DLLPRIVATE virtual void Commit() SAL_OVERRIDE; SAL_DLLPRIVATE void implAdjustConfigCache(); SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > @@ -517,6 +516,7 @@ private: */ SAL_DLLPRIVATE void impl_RemoveElement_nothrow(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element); + SAL_DLLPRIVATE virtual void ImplCommit() SAL_OVERRIDE; // asynchronous cursor actions/navigation slot handling diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index f8bb42d68672..f72357a3f99a 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -99,6 +99,9 @@ class SwNoteProps: public utl::ConfigItem { private: bool bIsShowAnchor; + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwNoteProps() : ConfigItem(OUString("Office.Writer/Notes")) @@ -128,7 +131,6 @@ class SwNoteProps: public utl::ConfigItem return aNames; } - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; }; diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index a506db9304bf..7b1288aac1d3 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -58,11 +58,13 @@ class SwRevisionConfig : public utl::ConfigItem Color aMarkColor; //Revision/LinesChanged/Color const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwRevisionConfig(); virtual ~SwRevisionConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void Load(); void SetModified(){ConfigItem::SetModified();} @@ -80,11 +82,13 @@ class SwCompareConfig : public utl::ConfigItem sal_uInt16 nPieceLen; //Compare/Settings/Ignore pieces of length const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwCompareConfig(); virtual ~SwCompareConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& ) SAL_OVERRIDE { }; void Load(); void SetModified() {ConfigItem::SetModified(); } @@ -106,11 +110,13 @@ class SwInsertConfig : public utl::ConfigItem bool bIsWeb; const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwInsertConfig(bool bWeb); virtual ~SwInsertConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void Load(); void SetModified(){ConfigItem::SetModified();} @@ -131,11 +137,13 @@ class SwTableConfig : public utl::ConfigItem bool bInsTblAlignNum; // Table/Input/Alignment // Align numbers. const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwTableConfig(bool bWeb); virtual ~SwTableConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void Load(); void SetModified(){ConfigItem::SetModified();} @@ -159,11 +167,13 @@ class SwMiscConfig : public utl::ConfigItem OUString sMailName; // FormLetter/FileOutput/FileName/FromManualSetting (string!) const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwMiscConfig(); virtual ~SwMiscConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void Load(); void SetModified(){ConfigItem::SetModified();} diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx index a304772344e7..c610a13ab7f9 100644 --- a/sw/inc/prtopt.hxx +++ b/sw/inc/prtopt.hxx @@ -24,14 +24,17 @@ class SwPrintOptions : public SwPrintData, public utl::ConfigItem { +private: bool bIsWeb; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwPrintOptions(bool bWeb); virtual ~SwPrintOptions(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; virtual void doSetModified( ) SAL_OVERRIDE { bModified = true; SetModified();} diff --git a/sw/inc/swfltopt.hxx b/sw/inc/swfltopt.hxx index afc0050e0f61..b7ebce565036 100644 --- a/sw/inc/swfltopt.hxx +++ b/sw/inc/swfltopt.hxx @@ -23,13 +23,15 @@ class SW_DLLPUBLIC SwFilterOptions : public utl::ConfigItem { +private: + virtual void ImplCommit() SAL_OVERRIDE; + public: SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames, sal_uInt32* pValues ); void GetValues( sal_uInt16 nCnt, const sal_Char** ppNames, sal_uInt32* pValues ); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; }; diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 03e62ca88cb8..9108f0953c52 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1118,7 +1118,7 @@ namespace numfunc /** catches notification about changed default bullet configuration data */ virtual void Notify( const uno::Sequence<OUString>& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; + virtual void ImplCommit() SAL_OVERRIDE; // default bullet list configuration data OUString msFontname; @@ -1279,7 +1279,7 @@ namespace numfunc InitFont(); } - void SwDefBulletConfig::Commit() + void SwDefBulletConfig::ImplCommit() { } @@ -1333,7 +1333,7 @@ namespace numfunc /** catches notification about changed configuration data */ virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; + virtual void ImplCommit() SAL_OVERRIDE; // configuration data bool mbChangeIndentOnTabAtFirstPosOfFirstListItem; @@ -1374,7 +1374,7 @@ namespace numfunc return aPropNames; } - void SwNumberingUIBehaviorConfig::Commit() {} + void SwNumberingUIBehaviorConfig::ImplCommit() {} void SwNumberingUIBehaviorConfig::LoadConfig() { diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 786d9f2b2ed5..1f841da3c7d3 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -72,12 +72,13 @@ private: sal_Int32 m_nLRU_InitSize; uno::Sequence< OUString > GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SwOLELRUCache(); virtual void Notify( const uno::Sequence< OUString>& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; void Load(); void InsertObj( SwOLEObj& rObj ); @@ -921,7 +922,7 @@ void SwOLELRUCache::Notify( const uno::Sequence< OUString>& ) Load(); } -void SwOLELRUCache::Commit() +void SwOLELRUCache::ImplCommit() { } diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 3d909bf5d285..029c1b470d09 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -277,7 +277,7 @@ void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames, } } -void SwFilterOptions::Commit() {} +void SwFilterOptions::ImplCommit() {} void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} void StgReader::SetFltName( const OUString& rFltNm ) diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index a270d2943d94..bbb557993e4c 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1505,7 +1505,7 @@ static OUString lcl_CreateUniqueName(const Sequence<OUString>& aNames) void SwInsertDBColAutoPilot::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} -void SwInsertDBColAutoPilot::Commit() +void SwInsertDBColAutoPilot::ImplCommit() { Sequence <OUString> aNames = GetNodeNames(OUString()); const OUString* pNames = aNames.getArray(); diff --git a/sw/source/uibase/config/barcfg.cxx b/sw/source/uibase/config/barcfg.cxx index f9c4db5a81fd..d0b8ce3431a3 100644 --- a/sw/source/uibase/config/barcfg.cxx +++ b/sw/source/uibase/config/barcfg.cxx @@ -110,7 +110,7 @@ Sequence<OUString> SwToolbarConfigItem::GetPropertyNames() return aNames; } -void SwToolbarConfigItem::Commit() +void SwToolbarConfigItem::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); diff --git a/sw/source/uibase/config/dbconfig.cxx b/sw/source/uibase/config/dbconfig.cxx index cad668f4a618..d3114c8ca9d1 100644 --- a/sw/source/uibase/config/dbconfig.cxx +++ b/sw/source/uibase/config/dbconfig.cxx @@ -110,7 +110,7 @@ const SwDBData& SwDBConfig::GetBibliographySource() return *pBibImpl; } -void SwDBConfig::Commit() {} +void SwDBConfig::ImplCommit() {} void SwDBConfig::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx index 7fbd5270f209..53971f9aede6 100644 --- a/sw/source/uibase/config/fontcfg.cxx +++ b/sw/source/uibase/config/fontcfg.cxx @@ -131,7 +131,7 @@ SwStdFontConfig::SwStdFontConfig() : } } -void SwStdFontConfig::Commit() +void SwStdFontConfig::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx index 8176a79f608c..52a97e248d01 100644 --- a/sw/source/uibase/config/modcfg.cxx +++ b/sw/source/uibase/config/modcfg.cxx @@ -291,7 +291,7 @@ static sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr) void SwRevisionConfig::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} -void SwRevisionConfig::Commit() +void SwRevisionConfig::ImplCommit() { const Sequence<OUString>& aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); @@ -633,7 +633,7 @@ static void lcl_WriteOpt(const InsCaptionOpt& rOpt, Any* pValues, sal_Int32 nPro void SwInsertConfig::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} -void SwInsertConfig::Commit() +void SwInsertConfig::ImplCommit() { const Sequence<OUString>& aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); @@ -1134,7 +1134,7 @@ SwTableConfig::~SwTableConfig() void SwTableConfig::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} -void SwTableConfig::Commit() +void SwTableConfig::ImplCommit() { const Sequence<OUString>& aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); @@ -1236,7 +1236,7 @@ const Sequence<OUString>& SwMiscConfig::GetPropertyNames() void SwMiscConfig::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} -void SwMiscConfig::Commit() +void SwMiscConfig::ImplCommit() { const Sequence<OUString>& aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); @@ -1340,7 +1340,7 @@ SwCompareConfig::~SwCompareConfig() { } -void SwCompareConfig::Commit() +void SwCompareConfig::ImplCommit() { const Sequence<OUString>& aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/sw/source/uibase/config/prtopt.cxx b/sw/source/uibase/config/prtopt.cxx index a8c007448583..e3c8cb2a0cb3 100644 --- a/sw/source/uibase/config/prtopt.cxx +++ b/sw/source/uibase/config/prtopt.cxx @@ -127,7 +127,7 @@ SwPrintOptions::~SwPrintOptions() void SwPrintOptions::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} -void SwPrintOptions::Commit() +void SwPrintOptions::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index 49e353b8a4e1..017d885ced7e 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -127,7 +127,7 @@ void SwContentViewConfig::Notify( const Sequence< OUString > & /*rPropertyNames* Load(); } -void SwContentViewConfig::Commit() +void SwContentViewConfig::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); @@ -259,7 +259,7 @@ SwLayoutViewConfig::~SwLayoutViewConfig() { } -void SwLayoutViewConfig::Commit() +void SwLayoutViewConfig::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); @@ -394,7 +394,7 @@ SwGridConfig::~SwGridConfig() { } -void SwGridConfig::Commit() +void SwGridConfig::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); @@ -479,7 +479,7 @@ SwCursorConfig::~SwCursorConfig() { } -void SwCursorConfig::Commit() +void SwCursorConfig::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); @@ -544,7 +544,7 @@ SwWebColorConfig::~SwWebColorConfig() { } -void SwWebColorConfig::Commit() +void SwWebColorConfig::ImplCommit() { Sequence<Any> aValues(aPropNames.getLength()); Any* pValues = aValues.getArray(); diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 12e1465eb466..461c68cf6d28 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -151,11 +151,12 @@ class SwMailMergeConfigItem_Impl : public utl::ConfigItem const Sequence< OUString>& GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SwMailMergeConfigItem_Impl(); virtual ~SwMailMergeConfigItem_Impl(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; const Sequence< OUString> GetAddressBlocks(bool bConvertToConfig = false) const; @@ -490,7 +491,7 @@ const Sequence<OUString>& SwMailMergeConfigItem_Impl::GetPropertyNames() void SwMailMergeConfigItem_Impl::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} -void SwMailMergeConfigItem_Impl::Commit() +void SwMailMergeConfigItem_Impl::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index cbd5f2f826a7..54647e0d22f0 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -2144,7 +2144,7 @@ void SwPostItMgr::GetAllSidebarWinForFrm( const SwFrm& rFrm, } } -void SwNoteProps::Commit() {} +void SwNoteProps::ImplCommit() {} void SwNoteProps::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx index 9975522d123f..d215a2d32cb6 100644 --- a/sw/source/uibase/envelp/envimg.cxx +++ b/sw/source/uibase/envelp/envimg.cxx @@ -236,7 +236,7 @@ SwEnvCfgItem::~SwEnvCfgItem() { } -void SwEnvCfgItem::Commit() +void SwEnvCfgItem::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx index 947540b06cf4..e9197ab2474c 100644 --- a/sw/source/uibase/envelp/labelcfg.cxx +++ b/sw/source/uibase/envelp/labelcfg.cxx @@ -169,7 +169,7 @@ SwLabelConfig::~SwLabelConfig() } // the config item is not writable ?: -void SwLabelConfig::Commit() {} +void SwLabelConfig::ImplCommit() {} void SwLabelConfig::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} diff --git a/sw/source/uibase/envelp/labimg.cxx b/sw/source/uibase/envelp/labimg.cxx index 2a2922b0e8f6..067107570e1c 100644 --- a/sw/source/uibase/envelp/labimg.cxx +++ b/sw/source/uibase/envelp/labimg.cxx @@ -396,7 +396,7 @@ SwLabCfgItem::SwLabCfgItem(bool bLabel) : void SwLabCfgItem::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} -void SwLabCfgItem::Commit() +void SwLabCfgItem::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/sw/source/uibase/inc/barcfg.hxx b/sw/source/uibase/inc/barcfg.hxx index 1d7507ce7a19..cdb0897959c6 100644 --- a/sw/source/uibase/inc/barcfg.hxx +++ b/sw/source/uibase/inc/barcfg.hxx @@ -26,11 +26,12 @@ class SwToolbarConfigItem : public utl::ConfigItem com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SwToolbarConfigItem( bool bWeb ); virtual ~SwToolbarConfigItem(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void SetTopToolbar( sal_Int32 nSelType, sal_Int32 nBarId ); diff --git a/sw/source/uibase/inc/dbconfig.hxx b/sw/source/uibase/inc/dbconfig.hxx index 16f0481b674f..55251ee4de3a 100644 --- a/sw/source/uibase/inc/dbconfig.hxx +++ b/sw/source/uibase/inc/dbconfig.hxx @@ -26,7 +26,9 @@ struct SwDBData; class SW_DLLPUBLIC SwDBConfig : public utl::ConfigItem { +private: SAL_DLLPRIVATE const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; SwDBData* pAdrImpl; SwDBData* pBibImpl; @@ -38,7 +40,6 @@ public: void Load(); const SwDBData& GetAddressSource(); const SwDBData& GetBibliographySource(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; }; diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index f156ebe327a3..e48f422fed9a 100644 --- a/sw/source/uibase/inc/dbinsdlg.hxx +++ b/sw/source/uibase/inc/dbinsdlg.hxx @@ -145,7 +145,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem bool SplitTextToColArr( const OUString& rTxt, _DB_Columns& rColArr, bool bInsField ); using SfxModalDialog::Notify; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; + virtual void ImplCommit() SAL_OVERRIDE; void Load(); // set the tables - properties diff --git a/sw/source/uibase/inc/envimg.hxx b/sw/source/uibase/inc/envimg.hxx index 40fe1e419c83..fd9a04f76d53 100644 --- a/sw/source/uibase/inc/envimg.hxx +++ b/sw/source/uibase/inc/envimg.hxx @@ -69,16 +69,19 @@ public: class SwEnvCfgItem : public utl::ConfigItem { +private: SwEnvItem aEnvItem; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwEnvCfgItem(); virtual ~SwEnvCfgItem(); SwEnvItem& GetItem() {return aEnvItem;} - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; }; diff --git a/sw/source/uibase/inc/fontcfg.hxx b/sw/source/uibase/inc/fontcfg.hxx index 8bd78440f449..77aa2a669d97 100644 --- a/sw/source/uibase/inc/fontcfg.hxx +++ b/sw/source/uibase/inc/fontcfg.hxx @@ -71,11 +71,12 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem void ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight ); + virtual void ImplCommit() SAL_OVERRIDE; + public: SwStdFontConfig(); virtual ~SwStdFontConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; const OUString& GetFontStandard(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_STANDARD + FONT_PER_GROUP * nFontGroup];} diff --git a/sw/source/uibase/inc/labelcfg.hxx b/sw/source/uibase/inc/labelcfg.hxx index 0a8a162e077a..5f47a4b638e6 100644 --- a/sw/source/uibase/inc/labelcfg.hxx +++ b/sw/source/uibase/inc/labelcfg.hxx @@ -34,14 +34,16 @@ struct SwLabelMeasure class SW_DLLPUBLIC SwLabelConfig : public utl::ConfigItem { +private: std::vector<OUString> m_aManufacturers; std::map< OUString, std::map<OUString, SwLabelMeasure> > m_aLabels; + virtual void ImplCommit() SAL_OVERRIDE; + public: SwLabelConfig(); virtual ~SwLabelConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void FillLabels(const OUString& rManufacturer, SwLabRecs& rLabArr); diff --git a/sw/source/uibase/inc/labimg.hxx b/sw/source/uibase/inc/labimg.hxx index dad4ae7f4d9e..c278c55eec30 100644 --- a/sw/source/uibase/inc/labimg.hxx +++ b/sw/source/uibase/inc/labimg.hxx @@ -105,16 +105,19 @@ public: class SwLabCfgItem : public utl::ConfigItem { +private: SwLabItem aItem; bool bIsLabel; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwLabCfgItem(bool bLabel); SwLabItem& GetItem() {return aItem;} - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; }; diff --git a/sw/source/uibase/inc/navicfg.hxx b/sw/source/uibase/inc/navicfg.hxx index 1a3a6faaf062..06a3c4e45c54 100644 --- a/sw/source/uibase/inc/navicfg.hxx +++ b/sw/source/uibase/inc/navicfg.hxx @@ -33,11 +33,12 @@ class SwNavigationConfig : public utl::ConfigItem com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SwNavigationConfig(); virtual ~SwNavigationConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; sal_Int32 GetRootType()const {return nRootType;} diff --git a/sw/source/uibase/inc/usrpref.hxx b/sw/source/uibase/inc/usrpref.hxx index 362003c2c3cb..1ab07b4fc3fe 100644 --- a/sw/source/uibase/inc/usrpref.hxx +++ b/sw/source/uibase/inc/usrpref.hxx @@ -28,17 +28,20 @@ class SwMasterUsrPref; class SwContentViewConfig : public utl::ConfigItem { +private: SwMasterUsrPref& rParent; bool bWeb; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwContentViewConfig(bool bWeb, SwMasterUsrPref& rParent); virtual ~SwContentViewConfig(); // utl::ConfigItem virtual void Notify( const com::sun::star::uno::Sequence< OUString > &rPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; void Load(); void SetModified(){ConfigItem::SetModified();} @@ -46,30 +49,36 @@ class SwContentViewConfig : public utl::ConfigItem class SwLayoutViewConfig : public utl::ConfigItem { +private: SwMasterUsrPref& rParent; bool bWeb; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwLayoutViewConfig(bool bWeb, SwMasterUsrPref& rParent); virtual ~SwLayoutViewConfig(); virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; void Load(); void SetModified(){ConfigItem::SetModified();} }; class SwGridConfig : public utl::ConfigItem { +private: SwMasterUsrPref& rParent; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwGridConfig(bool bWeb, SwMasterUsrPref& rParent); virtual ~SwGridConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void Load(); void SetModified(){ConfigItem::SetModified();} @@ -77,14 +86,17 @@ class SwGridConfig : public utl::ConfigItem class SwCursorConfig : public utl::ConfigItem { +private: SwMasterUsrPref& rParent; com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + + virtual void ImplCommit() SAL_OVERRIDE; + public: SwCursorConfig(SwMasterUsrPref& rParent); virtual ~SwCursorConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void Load(); void SetModified(){ConfigItem::SetModified();} @@ -92,14 +104,16 @@ class SwCursorConfig : public utl::ConfigItem class SwWebColorConfig : public utl::ConfigItem { +private: SwMasterUsrPref& rParent; com::sun::star::uno::Sequence<OUString> aPropNames; + virtual void ImplCommit() SAL_OVERRIDE; + public: SwWebColorConfig(SwMasterUsrPref& rParent); virtual ~SwWebColorConfig(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; void Load(); void SetModified(){ConfigItem::SetModified();} diff --git a/sw/source/uibase/utlui/navicfg.cxx b/sw/source/uibase/utlui/navicfg.cxx index a7caf882857e..6ae84e5050b4 100644 --- a/sw/source/uibase/utlui/navicfg.cxx +++ b/sw/source/uibase/utlui/navicfg.cxx @@ -90,7 +90,7 @@ SwNavigationConfig::~SwNavigationConfig() { } -void SwNavigationConfig::Commit() +void SwNavigationConfig::ImplCommit() { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index 59b7f1966f4b..b6d96899fce6 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -105,16 +105,6 @@ class SvtCommandOptions_Impl : public ConfigItem virtual void Notify( const Sequence< OUString >& lPropertyNames ) 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; - - /*-**************************************************************************************************** @short base implementation of public interface for "SvtDynamicMenuOptions"! @descr These class is used as static member of "SvtDynamicMenuOptions" ... => The code exist only for one time and isn't duplicated for every instance! @@ -126,6 +116,8 @@ class SvtCommandOptions_Impl : public ConfigItem private: + virtual void ImplCommit() SAL_OVERRIDE; + /*-**************************************************************************************************** @short return list of key names of our configuration management which represent oue module tree @descr These methods return the current list of key names! We need it to get needed values from our @@ -233,9 +225,9 @@ void SvtCommandOptions_Impl::Notify( const Sequence< OUString >& ) // public method -void SvtCommandOptions_Impl::Commit() +void SvtCommandOptions_Impl::ImplCommit() { - OSL_FAIL( "SvtCommandOptions_Impl::Commit()\nNot implemented yet!\n" ); + SAL_WARN("unotools.config","SvtCommandOptions_Impl::ImplCommit(): Not implemented yet!"); } // public method diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index 005b1ee1a686..f91981d1a262 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -234,16 +234,6 @@ class SvtCompatibilityOptions_Impl : public ConfigItem virtual void Notify( const Sequence< OUString >& lPropertyNames ) 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 /*-**************************************************************************************************** @@ -284,6 +274,8 @@ class SvtCompatibilityOptions_Impl : public ConfigItem private: + virtual void ImplCommit() SAL_OVERRIDE; + /*-**************************************************************************************************** @short return list of key names of our configuration management which represent one module tree @descr These methods return the current list of key names! We need it to get needed values from our @@ -415,7 +407,7 @@ void SvtCompatibilityOptions_Impl::Notify( const Sequence< OUString >& ) // public method -void SvtCompatibilityOptions_Impl::Commit() +void SvtCompatibilityOptions_Impl::ImplCommit() { // Write all properties! // Delete complete set first. diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index 57ead3bf9cb5..46489d7214d9 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -1118,4 +1118,10 @@ Reference< XHierarchicalNameAccess> ConfigItem::GetTree() return xRet; } +void ConfigItem::Commit() +{ + ImplCommit(); + ClearModified(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx index de38a3b2a00a..fffd62918b72 100644 --- a/unotools/source/config/defaultoptions.cxx +++ b/unotools/source/config/defaultoptions.cxx @@ -90,8 +90,10 @@ public: SvtDefaultOptions_Impl(); OUString GetDefaultPath( sal_uInt16 nId ) const; - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; + +private: + virtual void ImplCommit() SAL_OVERRIDE; }; // global ---------------------------------------------------------------- @@ -175,7 +177,7 @@ void SvtDefaultOptions_Impl::Notify( const Sequence< OUString >& ) // no notification, will never be changed } -void SvtDefaultOptions_Impl::Commit() +void SvtDefaultOptions_Impl::ImplCommit() { // will never be changed } diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index 161875b98bfe..f406c8d225f2 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -170,16 +170,6 @@ class SvtDynamicMenuOptions_Impl : public ConfigItem virtual void Notify( const Sequence< OUString >& lPropertyNames ) 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; - - /*-**************************************************************************************************** @short base implementation of public interface for "SvtDynamicMenuOptions"! @descr These class is used as static member of "SvtDynamicMenuOptions" ... => The code exist only for one time and isn't duplicated for every instance! @@ -189,6 +179,8 @@ class SvtDynamicMenuOptions_Impl : public ConfigItem private: + virtual void ImplCommit() SAL_OVERRIDE; + /*-**************************************************************************************************** @short return list of key names of our configuration management which represent oue module tree @descr These methods return the current list of key names! We need it to get needed values from our @@ -377,9 +369,9 @@ void SvtDynamicMenuOptions_Impl::Notify( const Sequence< OUString >& ) // public method -void SvtDynamicMenuOptions_Impl::Commit() +void SvtDynamicMenuOptions_Impl::ImplCommit() { - OSL_FAIL( "SvtDynamicMenuOptions_Impl::Commit()\nNot implemented yet!\n" ); + SAL_WARN("unotools.config", "SvtDynamicMenuOptions_Impl::ImplCommit(): Not implemented yet!"); /* // Write all properties! // Delete complete sets first. diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index eaae708a8619..bd3f79ca46e7 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -159,10 +159,10 @@ void GlobalEventConfig_Impl::Notify( const Sequence< OUString >& ) // public method -void GlobalEventConfig_Impl::Commit() +void GlobalEventConfig_Impl::ImplCommit() { //DF need to check it this is correct?? - OSL_TRACE("In GlobalEventConfig_Impl::Commit"); + OSL_TRACE("In GlobalEventConfig_Impl::ImplCommit"); EventBindingHash::const_iterator it = m_eventBindingHash.begin(); EventBindingHash::const_iterator it_end = m_eventBindingHash.end(); // clear the existing nodes diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx index e079c937a7df..d7db4b8db683 100644 --- a/unotools/source/config/extendedsecurityoptions.cxx +++ b/unotools/source/config/extendedsecurityoptions.cxx @@ -69,18 +69,10 @@ class SvtExtendedSecurityOptions_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; - SvtExtendedSecurityOptions::OpenHyperlinkMode GetOpenHyperlinkMode() { return m_eOpenHyperlinkMode;} + private: + virtual void ImplCommit() SAL_OVERRIDE; /*-**************************************************************************************************** @short return list of key names of our configuration management which represent oue module tree @@ -176,7 +168,7 @@ void SvtExtendedSecurityOptions_Impl::Notify( const Sequence< OUString >& ) // public method -void SvtExtendedSecurityOptions_Impl::Commit() +void SvtExtendedSecurityOptions_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/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx index 96b75f45c5a5..d929b312cc7e 100644 --- a/unotools/source/config/fltrcfg.cxx +++ b/unotools/source/config/fltrcfg.cxx @@ -54,15 +54,19 @@ using namespace com::sun::star::uno; class SvtAppFilterOptions_Impl : public utl::ConfigItem { +private: bool bLoadVBA; bool bSaveVBA; + +protected: + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtAppFilterOptions_Impl(const OUString& rRoot) : utl::ConfigItem(rRoot), bLoadVBA(false), bSaveVBA(false) {} virtual ~SvtAppFilterOptions_Impl(); - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; void Load(); @@ -88,7 +92,7 @@ SvtAppFilterOptions_Impl::~SvtAppFilterOptions_Impl() Commit(); } -void SvtAppFilterOptions_Impl::Commit() +void SvtAppFilterOptions_Impl::ImplCommit() { Sequence<OUString> aNames(2); OUString* pNames = aNames.getArray(); @@ -127,13 +131,16 @@ void SvtAppFilterOptions_Impl::Load() class SvtWriterFilterOptions_Impl : public SvtAppFilterOptions_Impl { +private: bool bLoadExecutable; + + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtWriterFilterOptions_Impl(const OUString& rRoot) : SvtAppFilterOptions_Impl(rRoot), bLoadExecutable(false) {} - virtual void Commit() SAL_OVERRIDE; void Load(); bool IsLoadExecutable() const {return bLoadExecutable;} @@ -145,9 +152,9 @@ public: } }; -void SvtWriterFilterOptions_Impl::Commit() +void SvtWriterFilterOptions_Impl::ImplCommit() { - SvtAppFilterOptions_Impl::Commit(); + SvtAppFilterOptions_Impl::ImplCommit(); Sequence<OUString> aNames(1); aNames[0] = "Executable"; @@ -172,13 +179,16 @@ void SvtWriterFilterOptions_Impl::Load() class SvtCalcFilterOptions_Impl : public SvtAppFilterOptions_Impl { +private: bool bLoadExecutable; + + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtCalcFilterOptions_Impl(const OUString& rRoot) : SvtAppFilterOptions_Impl(rRoot), bLoadExecutable(false) {} - virtual void Commit() SAL_OVERRIDE; void Load(); bool IsLoadExecutable() const {return bLoadExecutable;} @@ -190,9 +200,9 @@ public: } }; -void SvtCalcFilterOptions_Impl::Commit() +void SvtCalcFilterOptions_Impl::ImplCommit() { - SvtAppFilterOptions_Impl::Commit(); + SvtAppFilterOptions_Impl::ImplCommit(); Sequence<OUString> aNames(1); aNames[0] = "Executable"; @@ -367,7 +377,7 @@ void SvtFilterOptions::Notify( const Sequence<OUString>& ) Load(); } -void SvtFilterOptions::Commit() +void SvtFilterOptions::ImplCommit() { const Sequence<OUString>& aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); diff --git a/unotools/source/config/fontoptions.cxx b/unotools/source/config/fontoptions.cxx index b7c26f7d04e8..5766b9a9603c 100644 --- a/unotools/source/config/fontoptions.cxx +++ b/unotools/source/config/fontoptions.cxx @@ -64,16 +64,6 @@ class SvtFontOptions_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; - - /*-**************************************************************************************************** @short access method to get internal values @descr These method give us a chance to regulate access to our internal values. It's not used in the moment - but it's possible for the feature! @@ -87,6 +77,8 @@ class SvtFontOptions_Impl : public ConfigItem private: + virtual void ImplCommit() SAL_OVERRIDE; + /*-**************************************************************************************************** @short return list of key names of our configuration management which represent oue module tree @descr These methods return a static const list of key names. We need it to get needed values from our @@ -203,7 +195,7 @@ void SvtFontOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) // public method -void SvtFontOptions_Impl::Commit() +void SvtFontOptions_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/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 881c81889ed0..e86c8dd002ac 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -152,6 +152,7 @@ class SvtLinguConfigItem : public utl::ConfigItem SvtLinguConfigItem(const SvtLinguConfigItem&) SAL_DELETED_FUNCTION; SvtLinguConfigItem& operator=(const SvtLinguConfigItem&) SAL_DELETED_FUNCTION; + virtual void ImplCommit() SAL_OVERRIDE; public: SvtLinguConfigItem(); @@ -159,7 +160,6 @@ public: // utl::ConfigItem virtual void Notify( const com::sun::star::uno::Sequence< OUString > &rPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; // make some protected functions of utl::ConfigItem public using utl::ConfigItem::GetNodeNames; @@ -207,7 +207,7 @@ void SvtLinguConfigItem::Notify( const uno::Sequence< OUString > &rPropertyNames NotifyListeners(0); } -void SvtLinguConfigItem::Commit() +void SvtLinguConfigItem::ImplCommit() { SaveOptions( GetPropertyNames() ); } diff --git a/unotools/source/config/localisationoptions.cxx b/unotools/source/config/localisationoptions.cxx index 7fd2440196be..f2f2ab1a315c 100644 --- a/unotools/source/config/localisationoptions.cxx +++ b/unotools/source/config/localisationoptions.cxx @@ -63,16 +63,6 @@ class SvtLocalisationOptions_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; - - /*-**************************************************************************************************** @short access method to get internal values @descr These method give us a chance to regulate access to our internal values. It's not used in the moment - but it's possible for the feature! @@ -83,6 +73,8 @@ class SvtLocalisationOptions_Impl : public ConfigItem private: + virtual void ImplCommit() SAL_OVERRIDE; + /*-**************************************************************************************************** @short return list of key names of our configuration management which represent oue module tree @descr These methods return a static const list of key names. We need it to get needed values from our @@ -188,7 +180,7 @@ void SvtLocalisationOptions_Impl::Notify( const Sequence< OUString >& seqPropert // public method -void SvtLocalisationOptions_Impl::Commit() +void SvtLocalisationOptions_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/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx index 74666473b99b..2624f41b6b5c 100644 --- a/unotools/source/config/misccfg.cxx +++ b/unotools/source/config/misccfg.cxx @@ -38,6 +38,7 @@ static sal_Int32 nRefCount = 0; class SfxMiscCfg : public utl::ConfigItem { +private: bool bPaperSize; // printer warnings bool bPaperOrientation; bool bNotFound; @@ -46,12 +47,13 @@ class SfxMiscCfg : public utl::ConfigItem const com::sun::star::uno::Sequence<OUString> GetPropertyNames(); void Load(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SfxMiscCfg( ); virtual ~SfxMiscCfg( ); virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; bool IsNotFoundWarning() const {return bNotFound;} void SetNotFoundWarning( bool bSet); @@ -153,7 +155,7 @@ void SfxMiscCfg::Notify( const com::sun::star::uno::Sequence<OUString>& ) Load(); } -void SfxMiscCfg::Commit() +void SfxMiscCfg::ImplCommit() { const Sequence<OUString>& rNames = GetPropertyNames(); Sequence<Any> aValues(rNames.getLength()); diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 7f351df8843b..7f1b55fe4863 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -290,7 +290,6 @@ class SvtModuleOptions_Impl : public ::utl::ConfigItem // override methods of baseclass virtual void Notify( const css::uno::Sequence< OUString >& lPropertyNames ) SAL_OVERRIDE; - virtual void Commit( ) SAL_OVERRIDE; // public interface @@ -316,6 +315,8 @@ class SvtModuleOptions_Impl : public ::utl::ConfigItem static css::uno::Sequence< OUString > impl_ExpandSetNames ( const css::uno::Sequence< OUString >& lSetNames ); void impl_Read ( const css::uno::Sequence< OUString >& lSetNames ); + virtual void ImplCommit() SAL_OVERRIDE; + // private types private: @@ -405,7 +406,7 @@ void SvtModuleOptions_Impl::Notify( const css::uno::Sequence< OUString >& ) @seealso baseclass ConfigItem @threadsafe no *//*-*****************************************************************************************************/ -void SvtModuleOptions_Impl::Commit() +void SvtModuleOptions_Impl::ImplCommit() { // Reserve memory for ALL possible factory properties! // Step over all factories and get her really changed values only. diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx index 92a1ba278371..2683a8870acb 100644 --- a/unotools/source/config/optionsdlg.cxx +++ b/unotools/source/config/optionsdlg.cxx @@ -52,11 +52,12 @@ private: void ReadNode( const OUString& _rNode, NodeType _eType ); bool IsHidden( const OUString& _rPath ) const; + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtOptionsDlgOptions_Impl(); virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; static ::osl::Mutex & getInitMutex(); @@ -96,7 +97,7 @@ SvtOptionsDlgOptions_Impl::SvtOptionsDlgOptions_Impl() } } -void SvtOptionsDlgOptions_Impl::Commit() +void SvtOptionsDlgOptions_Impl::ImplCommit() { // nothing to commit } diff --git a/unotools/source/config/printwarningoptions.cxx b/unotools/source/config/printwarningoptions.cxx index b1e519dc922d..33d61f2c4252 100644 --- a/unotools/source/config/printwarningoptions.cxx +++ b/unotools/source/config/printwarningoptions.cxx @@ -59,7 +59,6 @@ public: // override methods of baseclass - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; // public interface @@ -78,6 +77,8 @@ public: private: + virtual void ImplCommit() SAL_OVERRIDE; + static Sequence< OUString > impl_GetPropertyNames(); // private member @@ -164,7 +165,7 @@ SvtPrintWarningOptions_Impl::~SvtPrintWarningOptions_Impl() // Commit -void SvtPrintWarningOptions_Impl::Commit() +void SvtPrintWarningOptions_Impl::ImplCommit() { Sequence< OUString > aSeqNames( impl_GetPropertyNames() ); Sequence< Any > aSeqValues( aSeqNames.getLength() ); diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx index 9031dee52c7e..57b0aec7f8ae 100644 --- a/unotools/source/config/saveopt.cxx +++ b/unotools/source/config/saveopt.cxx @@ -90,12 +90,13 @@ class SvtSaveOptions_Impl : public utl::ConfigItem bROUseSHA1InODF12, bROUseBlowfishInODF12; + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtSaveOptions_Impl(); virtual ~SvtSaveOptions_Impl(); virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; sal_Int32 GetAutoSaveTime() const { return nAutoSaveTime; } bool IsUseUserData() const { return bUseUserData; } @@ -571,7 +572,7 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl() SvtSaveOptions_Impl::~SvtSaveOptions_Impl() {} -void SvtSaveOptions_Impl::Commit() +void SvtSaveOptions_Impl::ImplCommit() { Sequence< OUString > aOrgNames = GetPropertyNames(); OUString* pOrgNames = aOrgNames.getArray(); @@ -750,15 +751,16 @@ void SvtSaveOptions_Impl::Notify( const Sequence<OUString>& ) class SvtLoadOptions_Impl : public utl::ConfigItem { - +private: bool bLoadUserDefinedSettings; + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtLoadOptions_Impl(); virtual ~SvtLoadOptions_Impl(); virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; void SetLoadUserSettings(bool b){bLoadUserDefinedSettings = b; SetModified();} bool IsLoadUserSettings() const {return bLoadUserDefinedSettings;} @@ -784,7 +786,7 @@ SvtLoadOptions_Impl::~SvtLoadOptions_Impl() { } -void SvtLoadOptions_Impl::Commit() +void SvtLoadOptions_Impl::ImplCommit() { Sequence< OUString > aNames(1); aNames[0] = cUserDefinedSettings; diff --git a/unotools/source/config/searchopt.cxx b/unotools/source/config/searchopt.cxx index bca047c4e270..59eae30135bf 100644 --- a/unotools/source/config/searchopt.cxx +++ b/unotools/source/config/searchopt.cxx @@ -43,6 +43,9 @@ class SvtSearchOptions_Impl : public ConfigItem SvtSearchOptions_Impl(const SvtSearchOptions_Impl&) SAL_DELETED_FUNCTION; SvtSearchOptions_Impl& operator=(const SvtSearchOptions_Impl&) SAL_DELETED_FUNCTION; + // ConfigItem + virtual void ImplCommit() SAL_OVERRIDE; + protected: bool IsModified() const { return bModified; } using ConfigItem::SetModified; @@ -56,8 +59,6 @@ public: SvtSearchOptions_Impl(); virtual ~SvtSearchOptions_Impl(); - // ConfigItem - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; bool GetFlag( sal_uInt16 nOffset ) const; @@ -77,7 +78,7 @@ SvtSearchOptions_Impl::~SvtSearchOptions_Impl() Commit(); } -void SvtSearchOptions_Impl::Commit() +void SvtSearchOptions_Impl::ImplCommit() { if (IsModified()) Save(); diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 32631e07a142..c235a73bc168 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -100,6 +100,9 @@ using namespace ::com::sun::star::uno; class SvtSecurityOptions_Impl : public ConfigItem { + private: + virtual void ImplCommit() SAL_OVERRIDE; + // public methods public: @@ -124,16 +127,6 @@ class SvtSecurityOptions_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 bool IsReadOnly ( SvtSecurityOptions::EOption eOption ) const; @@ -572,7 +565,7 @@ void SvtSecurityOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNam LoadAuthors(); } -void SvtSecurityOptions_Impl::Commit() +void SvtSecurityOptions_Impl::ImplCommit() { // Get names of supported properties, create a list for values and copy current values to it. Sequence< OUString > lOrgNames = GetPropertyNames(); diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index ff5da146f076..5a8d10788056 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -67,12 +67,13 @@ class SvtSysLocaleOptions_Impl : public utl::ConfigItem void MakeRealLocale(); void MakeRealUILocale(); + virtual void ImplCommit() SAL_OVERRIDE; + public: SvtSysLocaleOptions_Impl(); virtual ~SvtSysLocaleOptions_Impl(); virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; const OUString& GetLocaleString() const { return m_aLocaleString; } @@ -307,7 +308,7 @@ bool SvtSysLocaleOptions_Impl::IsReadOnly( SvtSysLocaleOptions::EOption eOption return bReadOnly; } -void SvtSysLocaleOptions_Impl::Commit() +void SvtSysLocaleOptions_Impl::ImplCommit() { const Sequence< OUString > aOrgNames = GetPropertyNames(); sal_Int32 nOrgCount = aOrgNames.getLength(); @@ -384,7 +385,6 @@ void SvtSysLocaleOptions_Impl::Commit() aNames.realloc(nRealCount); aValues.realloc(nRealCount); PutProperties( aNames, aValues ); - ClearModified(); } void SvtSysLocaleOptions_Impl::SetLocaleString( const OUString& rStr ) diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx index 8e1c5d9b5aaa..dd5c32757a7f 100644 --- a/vcl/source/gdi/configsettings.cxx +++ b/vcl/source/gdi/configsettings.cxx @@ -57,7 +57,7 @@ SettingsConfigItem::~SettingsConfigItem() Commit(); } -void SettingsConfigItem::Commit() +void SettingsConfigItem::ImplCommit() { std::unordered_map< OUString, SmallOUStrMap, OUStringHash >::const_iterator group; diff --git a/vcl/unx/generic/dtrans/config.cxx b/vcl/unx/generic/dtrans/config.cxx index 7d52b9882412..b99176473757 100644 --- a/vcl/unx/generic/dtrans/config.cxx +++ b/vcl/unx/generic/dtrans/config.cxx @@ -33,7 +33,8 @@ class DtransX11ConfigItem : public ::utl::ConfigItem sal_Int32 m_nSelectionTimeout; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& rPropertyNames ) SAL_OVERRIDE; - virtual void Commit() SAL_OVERRIDE; + virtual void ImplCommit() SAL_OVERRIDE; + public: DtransX11ConfigItem(); virtual ~DtransX11ConfigItem(); @@ -108,11 +109,7 @@ DtransX11ConfigItem::~DtransX11ConfigItem() { } -/* - * DtransX11ConfigItem::Commit - */ - -void DtransX11ConfigItem::Commit() +void DtransX11ConfigItem::ImplCommit() { // for the clipboard service this is readonly, so // there is nothing to commit diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 835dc00b9cd4..5d412c700d7d 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -65,9 +65,12 @@ namespace { class SaveODFItem: public utl::ConfigItem { + private: sal_Int16 m_nODF; + + virtual void ImplCommit() SAL_OVERRIDE; + public: - virtual void Commit() SAL_OVERRIDE; virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE; SaveODFItem(); //See group ODF in Common.xcs @@ -77,7 +80,7 @@ namespace } }; -void SaveODFItem::Commit() {} +void SaveODFItem::ImplCommit() {} void SaveODFItem::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {} SaveODFItem::SaveODFItem(): utl::ConfigItem(OUString( |