sw/source/uibase/shells/textfld.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit d4cf5814146e375805df98eafba2baf321b9b005 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Wed Apr 26 08:15:19 2023 -0400 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Apr 28 08:07:01 2023 +0200 tdf#86630 sw page number wizard: cleanup numbering type patch Much nicer to use things have have references for guaranteed items. I didn't notice the previous use of this as I was copy/pasting my patch together from various sources. Change-Id: I47f44a12fba4fc30db0597bcdcb339c062bc8b78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151149 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index bee499cd57f8..766d5e03c0a2 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -1034,11 +1034,11 @@ FIELD_INSERT: auto pShell = GetShellPtr(); const SvxPageItem* pPageItem; - GetView().GetViewFrame().GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE, pPageItem); + rSh.GetView().GetDispatcher().QueryState(SID_ATTR_PAGE, pPageItem); if (pPageItem) pDlg->SetPageNumberType(pPageItem->GetNumType()); - pDlg->StartExecuteAsync([this, pShell, &rSh, pDlg](int nResult) { + pDlg->StartExecuteAsync([pShell, &rSh, pDlg](int nResult) { if ( nResult == RET_OK ) { auto rDoc = rSh.GetDoc(); @@ -1055,8 +1055,9 @@ FIELD_INSERT: SvxPageItem aPageItem(SID_ATTR_PAGE); aPageItem.SetNumType(pDlg->GetPageNumberType()); - GetView().GetViewFrame().GetBindings().GetDispatcher()->ExecuteList( - SID_ATTR_PAGE, SfxCallMode::RECORD, { &aPageItem }); + rSh.GetView().GetDispatcher().ExecuteList(SID_ATTR_PAGE, + SfxCallMode::API | SfxCallMode::SYNCHRON, + { &aPageItem }); // Insert header/footer const bool bHeader = !pDlg->GetPageNumberPosition();