summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-07-16 18:17:21 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-07-17 21:14:24 +0200
commit3c41b32562d5ccdd306000484c5b16245b2b4a4f (patch)
treebef39fbfb1b98655e5ad700a74ecdb8535bbe378 /framework
parent71f2aea3151b82ba4793eb21a2251d587e425511 (diff)
tdf#156308: Restore use of /org.openoffice.Office.Recovery/AutoSave
... instead of respective values from /org.openoffice.Office.Common/Save/Document The history of the problem: d0f9685d2cfc3927add412b276c804dcc20cb6a5 (2004-11-26) made SvtSaveOptions use org.openoffice.Office.Recovery/AutoSave, *in addition* to org.openoffice.Office.Common/Save/Document/*, as "forward AutoSave/AutoSaveTime to new config location" part of i#27726; at this point, org.openoffice.Office.Recovery/AutoSave/* took precedence (they were read last). 8e6031e126782ced6d7527b19cf817395e9b63e4 (2004-11-26) implemented autorecovery.cxx, already reading org.openoffice.Office.Recovery/AutoSave/* d5b9283985633fdb423269cab961bba2acc3539e (2021-07-25) made SvxSaveTabPage and SfxApplication::SetOptions_Impl use officecfg::Office::Common::Save::Document::* instead of SvtSaveOptions. 134f40136a9bea265d8f2fedfdb41a1e65d81b49 (2021-07-25) dropped SvtSaveOptions_Impl::ImplCommit, and its saving of officecfg::Office::Recovery::AutoSave::* (which likely detached officecfg::Office::Recovery::AutoSave from officecfg::Office::Common::Save::Document, making UI edits not stored to the former). aeb8a0076cd5ec2836b3dfc1adffcced432f995f (2022-05-23) made AutoRecovery::implts_readAutoSaveConfig read officecfg::Office::Common::Save::Document::* instead of proper officecfg::Office::Recovery::AutoSave::*. This change restores the intended use, and deprecates corresponding values in /org.openoffice.Office.Common/Save/Document. Change-Id: I33d48e3945326c80d356bfc930ed8a7f042c982b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154500 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/autorecovery.cxx18
1 files changed, 2 insertions, 16 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 07ea3184476f..a1a984e7617e 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -386,11 +386,6 @@ private:
bool m_bListenForDocEvents;
bool m_bListenForConfigChanges;
- /** @short specify the time interval between two save actions.
- @descr tools::Time is measured in [min].
- */
- sal_Int32 m_nAutoSaveTimeIntervall;
-
/** @short for an asynchronous operation we must know, if there is
at least one running job (may be asynchronous!).
*/
@@ -1003,7 +998,6 @@ private:
constexpr OUStringLiteral CFG_PACKAGE_RECOVERY = u"org.openoffice.Office.Recovery/";
const char CFG_ENTRY_AUTOSAVE_ENABLED[] = "AutoSave/Enabled";
-const char CFG_ENTRY_AUTOSAVE_TIMEINTERVALL[] = "AutoSave/TimeIntervall"; //sic!
constexpr OUStringLiteral CFG_ENTRY_REALDEFAULTFILTER = u"ooSetupFactoryActualFilter";
@@ -1218,7 +1212,6 @@ AutoRecovery::AutoRecovery(css::uno::Reference< css::uno::XComponentContext > x
, m_xContext (std::move(xContext ))
, m_bListenForDocEvents (false )
, m_bListenForConfigChanges (false )
- , m_nAutoSaveTimeIntervall (0 )
, m_eJob (Job::NoJob)
, m_aTimer( "framework::AutoRecovery m_aTimer" )
, m_xAsyncDispatcher (new vcl::EventPoster( LINK( this, AutoRecovery, implts_asyncDispatch ) ))
@@ -1646,9 +1639,6 @@ void SAL_CALL AutoRecovery::changesOccurred(const css::util::ChangesEvent& aEven
}
}
}
- else
- if ( sPath == CFG_ENTRY_AUTOSAVE_TIMEINTERVALL )
- pChanges[i].Element >>= m_nAutoSaveTimeIntervall;
}
} /* SAFE */
@@ -1754,7 +1744,7 @@ void AutoRecovery::implts_readAutoSaveConfig()
implts_openConfig();
// AutoSave [bool]
- bool bEnabled(officecfg::Office::Common::Save::Document::AutoSave::get());
+ bool bEnabled(officecfg::Office::Recovery::AutoSave::Enabled::get());
/* SAFE */ {
osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
@@ -2206,11 +2196,7 @@ void AutoRecovery::implts_updateTimer()
if (m_eTimerType == AutoRecovery::E_NORMAL_AUTOSAVE_INTERVALL)
{
- nMilliSeconds
- = m_nAutoSaveTimeIntervall
- ? m_nAutoSaveTimeIntervall
- : officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::get();
- nMilliSeconds *= 60000; // [min] => 60.000 ms
+ nMilliSeconds = officecfg::Office::Recovery::AutoSave::TimeIntervall::get() * 60000; // [min] => 60.000 ms
}
else if (m_eTimerType == AutoRecovery::E_POLL_FOR_USER_IDLE)
{