summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-03-11 16:39:24 +0100
committerMichael Stahl <mstahl@redhat.com>2015-03-11 16:50:03 +0100
commit465359c35fcd8c30a2bedd3d0beb07c0c1c36cba (patch)
tree3959801825b12a5def0a4e6402917a455aa9c6a2 /svtools
parenta7b9167235d38130aab1af4bed66b6c48d375fc9 (diff)
do not call virtual Commit() from dtors of utl::ConfigItem subclasses
~SvtAppFilterOptions_Impl() demonstrates that this is a bad idea, by not invoking its subclasses' ImplCommit() but its own. Change-Id: Ic675e9cd3be1494c740a4f289be3bdbf0d1a122b
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/menuoptions.cxx7
-rw-r--r--svtools/source/config/miscopt.cxx6
-rw-r--r--svtools/source/config/optionsdrawinglayer.cxx3
-rw-r--r--svtools/source/config/slidesorterbaropt.cxx2
-rw-r--r--svtools/source/config/toolpanelopt.cxx2
5 files changed, 5 insertions, 15 deletions
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index 60d931a6f31e..1a7421595ef4 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -227,12 +227,7 @@ SvtMenuOptions_Impl::SvtMenuOptions_Impl()
SvtMenuOptions_Impl::~SvtMenuOptions_Impl()
{
- // Flush data to configuration!
- // User has no chance to do that.
- if( IsModified() )
- {
- Commit();
- }
+ assert(!IsModified()); // should have been committed
}
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index 9d4fcaf2870f..0dd13809f899 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -386,11 +386,7 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
SvtMiscOptions_Impl::~SvtMiscOptions_Impl()
{
- // We must save our current values .. if user forgets it!
- if( IsModified() )
- {
- Commit();
- }
+ assert(!IsModified()); // should have been committed
}
static int lcl_MapPropertyName( const OUString& rCompare,
diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx
index 1e398d9e276d..d706f5e5b8cd 100644
--- a/svtools/source/config/optionsdrawinglayer.cxx
+++ b/svtools/source/config/optionsdrawinglayer.cxx
@@ -543,8 +543,7 @@ SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl() :
SvtOptionsDrawinglayer_Impl::~SvtOptionsDrawinglayer_Impl()
{
- if( IsModified() )
- Commit();
+ assert(!IsModified()); // should have been committed
}
diff --git a/svtools/source/config/slidesorterbaropt.cxx b/svtools/source/config/slidesorterbaropt.cxx
index cf0e0c6d3c6d..dd62de329771 100644
--- a/svtools/source/config/slidesorterbaropt.cxx
+++ b/svtools/source/config/slidesorterbaropt.cxx
@@ -172,7 +172,7 @@ SvtSlideSorterBarOptions_Impl::SvtSlideSorterBarOptions_Impl()
SvtSlideSorterBarOptions_Impl::~SvtSlideSorterBarOptions_Impl()
{
- Commit();
+ assert(!IsModified()); // should have been committed
}
static int lcl_MapPropertyName( const OUString& rCompare,
diff --git a/svtools/source/config/toolpanelopt.cxx b/svtools/source/config/toolpanelopt.cxx
index 4934eeb6b545..4ae9153eca11 100644
--- a/svtools/source/config/toolpanelopt.cxx
+++ b/svtools/source/config/toolpanelopt.cxx
@@ -170,7 +170,7 @@ SvtToolPanelOptions_Impl::SvtToolPanelOptions_Impl()
SvtToolPanelOptions_Impl::~SvtToolPanelOptions_Impl()
{
- Commit();
+ assert(!IsModified()); // should have been committed
}
static int lcl_MapPropertyName( const OUString& rCompare,