diff options
author | Justin Luth <justin.luth@collabora.com> | 2023-04-26 08:15:19 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-04-28 08:07:01 +0200 |
commit | d4cf5814146e375805df98eafba2baf321b9b005 (patch) | |
tree | a57a7ef7f771e51691e4990fb1142fa9ddfd4419 /sw | |
parent | a3a758350e92a3084d2cbef05ca6caef899746a4 (diff) |
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 <jluth@mail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/textfld.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
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(); |