cui/source/customize/eventdlg.cxx | 4 ++-- cui/source/customize/macropg.cxx | 9 ++++----- cui/source/inc/macropg.hxx | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-)
New commits: commit 9f8c462b1f296c748c9749236405e87fe859935b Author: Caolán McNamara <[email protected]> AuthorDate: Sat Dec 21 20:09:46 2024 +0000 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Sun Dec 22 21:54:31 2024 +0100 Resolves: tdf#161832 select row before update that depends on selection Change-Id: Ic1d291a68009749ce1464de60a78baf3047ddcc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179094 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 1dc004c33b57..bfdd847f8d31 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -125,7 +125,7 @@ IMPL_LINK_NOARG( SvxEventConfigPage, SelectHdl_Impl, weld::ComboBox&, void ) if (bApp) { SetReadOnly( false ); - SvxMacroTabPage_::DisplayAppEvents( true ); + SvxMacroTabPage_::DisplayAppEvents(true, 0); } else { @@ -151,7 +151,7 @@ IMPL_LINK_NOARG( SvxEventConfigPage, SelectHdl_Impl, weld::ComboBox&, void ) } SetReadOnly( isReadonly ); - SvxMacroTabPage_::DisplayAppEvents( false ); + SvxMacroTabPage_::DisplayAppEvents(false, 0); } } diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index b042ffb71668..2473ca2f3aed 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -263,7 +263,7 @@ void SvxMacroTabPage_::Reset( const SfxItemSet* ) catch (const Exception&) { } - DisplayAppEvents(bAppEvents); + DisplayAppEvents(bAppEvents, 0); } void SvxMacroTabPage_::SetReadOnly( bool bSet ) @@ -307,7 +307,7 @@ namespace } // displays the app events if appEvents=true, otherwise displays the doc events -void SvxMacroTabPage_::DisplayAppEvents( bool appEvents) +void SvxMacroTabPage_::DisplayAppEvents(bool appEvents, int nSelectIndex) { bAppEvents = appEvents; @@ -363,7 +363,7 @@ void SvxMacroTabPage_::DisplayAppEvents( bool appEvents) if (mpImpl->xEventLB->n_children()) { - mpImpl->xEventLB->select(0); + mpImpl->xEventLB->select(nSelectIndex); mpImpl->xEventLB->scroll_to_row(0); } @@ -661,8 +661,7 @@ SvxMacroTabPage::SvxMacroTabPage(weld::Container* pPage, weld::DialogController* } InitAndSetHandler( xNameReplace, Reference< container::XNameReplace>(nullptr), Reference< util::XModifiable >(nullptr)); - DisplayAppEvents(true); - mpImpl->xEventLB->select(nSelectedIndex); + DisplayAppEvents(true, nSelectedIndex); } SvxMacroAssignDlg::SvxMacroAssignDlg(weld::Window* pParent, const Reference< frame::XFrame >& _rxDocumentFrame, const SfxItemSet& rSet, diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx index 1d9f2230f048..a2f006809c9e 100644 --- a/cui/source/inc/macropg.hxx +++ b/cui/source/inc/macropg.hxx @@ -73,7 +73,7 @@ public: virtual void Reset( const SfxItemSet* ) override; - void DisplayAppEvents( bool appEvents); + void DisplayAppEvents(bool appEvents, int nSelectIndex); void SetReadOnly( bool bSet ); bool IsReadOnly() const override; };
