cui/source/dialogs/hldocntp.cxx | 1 - sw/source/uibase/app/apphdl.cxx | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
New commits: commit 5be0f62621a5ef66438cf2dc660be8e524588c15 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Apr 23 20:49:33 2023 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Apr 24 13:57:20 2023 +0200 tdf#147503 don't use SfxObjectShellLock for new xml forms document because in the hidden case the document is unexpectedly closed on leaving NewXForms Change-Id: I00ea0b8de6c10ff141584cefe3768b7071138393 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150891 Tested-by: Jenkins Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 5160d934cce9..4bdb56ea0658 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -287,7 +287,6 @@ IMPL_STATIC_LINK(SvxHyperlinkNewDocTp, DispatchDocument, void*, p, void) { SfxStringItem aNewName( SID_FILE_NAME, xExecuteInfo->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); SfxUnoFrameItem aDocFrame( SID_FILLFRAME, pViewFrame->GetFrame().GetFrameInterface() ); - fprintf(stderr, "is there a frame int %p\n", pViewFrame->GetFrame().GetFrameInterface().get() ); pViewFrame->GetDispatcher()->ExecuteList( SID_SAVEASDOC, SfxCallMode::SYNCHRON, { &aNewName }, { &aDocFrame }); diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 086002ce712e..dcdb31ae8bc3 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -1119,11 +1119,11 @@ void NewXForms( SfxRequest& rReq ) // copied & excerpted from SwModule::InsertLab(..) // create new document - SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD) ); + SwDocShellRef xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD) ); xDocSh->DoInitNew(); // initialize XForms - static_cast<SwDocShell*>( &xDocSh )->GetDoc()->initXForms( true ); + xDocSh->GetDoc()->initXForms(true); // load document into frame SfxViewFrame::DisplayNewDocument( *xDocSh, rReq );