cui/source/tabpages/paragrph.cxx | 14 +++++--------- sfx2/source/dialog/tabdlg.cxx | 3 +-- 2 files changed, 6 insertions(+), 11 deletions(-)
New commits: commit d4efce34e0bd1e99d115ece4442ead39b90b89bb Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Oct 17 06:09:19 2023 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue Oct 17 07:36:59 2023 +0200 tdf#148725: Reset must clear respective items from m_pOutSet After Reset, the tabbed dialog's output set should restore to the same state (concerning the current tab page) as immediately after creation. This state means that pressing OK immediately afer Reset would not try to set or remove any items in the target. SfxTabDialogController::Ok has this code: if (m_pOutSet && m_pOutSet->Count() > 0) bModified = true; meaning that m_pOutSet is expected to be empty in case of completely unmodified dialog; and Reset must make sure this for a given page. Instead, commit 28fc0962b10519ab84654d189d2ad0cca8f84f95 (weld SwLabDlg, 2018-04-27) made Reset handler to populate the output item set with all the items from the input set, that belong to the page's which ranges. This made all the settings set in parents (which therefore appeared in the input set) to be set directly in the target upon application. Change-Id: Iacfffb5670cc3ade950ac412b818acb482845255 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158067 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 8f0f41426972..57e266a3f198 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -457,13 +457,12 @@ IMPL_LINK_NOARG(SfxTabDialogController, ResetHdl, weld::Button&, void) if (SfxItemState::SET == m_pSet->GetItemState(nWh, false, &pItem)) { m_xExampleSet->Put(*pItem); - m_pOutSet->Put(*pItem); } else { m_xExampleSet->ClearItem(nWh); - m_pOutSet->ClearItem(nWh); } + m_pOutSet->ClearItem(nWh); nTmp++; } } commit e134bcf0272929ebba8edc35ae0bdd8f934e624a Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Oct 17 06:00:34 2023 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue Oct 17 07:36:52 2023 +0200 Related: tdf#148725 Fix SvxExtParagraphTabPage::ChangesApplied It was setting values, instead of saving them, ever since commit a212ef2b6ebadb22a9abf6d042aa2b5fd9ac1cf0 (tdf#93901: apply handling in style/edit dialog improved, 2015-09-11). The same thing in SvxStdParagraphTabPage::ChangesApplied was fixed in commit 8b0dae14a5af0ad2892bac0e606467af6148c8d1 (weld SvxStdParagraphTabPage, 2018-06-14); but a similar commit eb1d6b16e787a87c3d918135ca98c5694d352557 (weld SvxExtParagraphTabPage, 2018-06-14) kept this in SvxExtParagraphTabPage. Change-Id: I5fb61a9416dab4ccf9fa690eca87a16f7b9378bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158066 Tested-by: Mike Kaganski <mike.kagan...@collabora.com> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 9f5e94833b3b..7c8f2dc225a7 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -2138,15 +2138,11 @@ void SvxExtParagraphTabPage::ChangesApplied() m_xHyphenBox->save_state(); m_xHyphenNoCapsBox->save_state(); m_xHyphenNoLastWordBox->save_state(); - m_xExtHyphenBeforeBox->set_value(m_xExtHyphenBeforeBox->get_value()); - m_xExtHyphenAfterBox->set_value(m_xExtHyphenAfterBox->get_value()); - m_xMaxHyphenEdit->set_value(m_xMaxHyphenEdit->get_value()); - m_xMinWordLength->set_value(m_xMinWordLength->get_value()); - SfxItemPool* pPool = GetItemSet().GetPool(); - DBG_ASSERT( pPool, "Where is the pool?" ); - FieldUnit eUnit = - MapToFieldUnit( pPool->GetMetric( GetWhich( SID_ATTR_PARA_HYPHENZONE ) ) ); - m_aHyphenZone.set_value(m_aHyphenZone.get_value(eUnit), eUnit); + m_xExtHyphenBeforeBox->save_value(); + m_xExtHyphenAfterBox->save_value(); + m_xMaxHyphenEdit->save_value(); + m_xMinWordLength->save_value(); + m_aHyphenZone.save_value(); m_xPageBreakBox->save_state(); m_xBreakPositionLB->save_value(); m_xBreakTypeLB->save_value();