summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-05 21:09:13 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2022-01-07 11:21:24 +0100
commit3399f4d95ec1e685bd48936f1131dd8c860aebf4 (patch)
tree079aa0e5548d67c98bd7df77d395e9d70a32527e /sc
parent7c0a4e7ca36b93df4968182f92b3d52fd4d1bb01 (diff)
Resolves: tdf#146592 "Reset" to the current document properties
not those seen at the initial load of the TabPage Change-Id: Ieba4c278a0a9b7fef3030d8462cb845c27dba9b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127959 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 4a491a1c5419..df8d827ef670 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -83,12 +83,16 @@ std::unique_ptr<SfxTabPage> ScTpCalcOptions::Create( weld::Container* pPage, wel
return std::make_unique<ScTpCalcOptions>( pPage, pController, *rAttrSet );
}
-void ScTpCalcOptions::Reset( const SfxItemSet* /* rCoreAttrs */ )
+void ScTpCalcOptions::Reset(const SfxItemSet* rCoreAttrs)
{
sal_uInt16 d,m;
sal_Int16 y;
- *pLocalOptions = *pOldOptions;
+ pOldOptions.reset(new ScDocOptions(
+ static_cast<const ScTpCalcItem&>(rCoreAttrs->Get(
+ GetWhich(SID_SCDOCOPTIONS))).GetDocOptions()));
+
+ *pLocalOptions = *pOldOptions;
m_xBtnCase->set_active( !pLocalOptions->IsIgnoreCase() );
m_xBtnCase->set_sensitive( !officecfg::Office::Calc::Calculate::Other::CaseSensitive::isReadOnly() );