diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-02-01 13:47:03 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-02-02 07:32:01 +0100 |
commit | 59317e7b1b822cf06effcd5b3ce004019d95e0ef (patch) | |
tree | 7bd0f28ecf1a3b388f11a02076c7778088d6be70 /sw/source/uibase | |
parent | a53f0dc811a115cd68a5c297a68eeb5a9d3bb5ef (diff) |
sw: Increase indentation for StartExecuteAsync params
This way it's easier to spot that the (now further indented)
code is the lambda expression passed as
param to `StartExecuteAsync`.
Change-Id: Iaa56b0838be4d1607bfde9e740f1397021604b7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162922
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index fa2f03ab63a3..45f5525884d3 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -465,41 +465,43 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) pDlg->PreGetFormat(*aDataHelper); - pDlg->StartExecuteAsync([aDataHelper, pDlg, &rSh, this](sal_Int32 nResult){ - if (nResult == RET_OK) - { - // Temporary variables, because the shell could already be - // destroyed after the paste. - SwView* pView = &m_rView; - bool bRet = false; - SotClipboardFormatId nFormatId = pDlg->GetFormatOnly(); - - if( nFormatId != SotClipboardFormatId::NONE ) - bRet = SwTransferable::PasteFormat( rSh, *aDataHelper, nFormatId ); - - if (bRet) + pDlg->StartExecuteAsync( + [aDataHelper, pDlg, &rSh, this](sal_Int32 nResult) { - SfxViewFrame& rViewFrame = pView->GetViewFrame(); - uno::Reference< frame::XDispatchRecorder > xRecorder = - rViewFrame.GetBindings().GetRecorder(); - if(xRecorder.is()) { - SfxRequest aReq(rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS); - aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(nFormatId) ) ); - aReq.Done(); - } - } + if (nResult == RET_OK) + { + // Temporary variables, because the shell could already be + // destroyed after the paste. + SwView* pView = &m_rView; + bool bRet = false; + SotClipboardFormatId nFormatId = pDlg->GetFormatOnly(); - if (rSh.IsFrameSelected() || rSh.IsObjSelected()) - rSh.EnterSelFrameMode(); - pView->AttrChangedNotify(nullptr); + if( nFormatId != SotClipboardFormatId::NONE ) + bRet = SwTransferable::PasteFormat( rSh, *aDataHelper, nFormatId ); - // Fold pasted outlines that have outline content visible attribute false - MakeAllOutlineContentTemporarilyVisible a(rSh.GetDoc()); - } + if (bRet) + { + SfxViewFrame& rViewFrame = pView->GetViewFrame(); + uno::Reference< frame::XDispatchRecorder > xRecorder = + rViewFrame.GetBindings().GetRecorder(); + if(xRecorder.is()) { + SfxRequest aReq(rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS); + aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(nFormatId) ) ); + aReq.Done(); + } + } - pDlg->disposeOnce(); + if (rSh.IsFrameSelected() || rSh.IsObjSelected()) + rSh.EnterSelFrameMode(); + pView->AttrChangedNotify(nullptr); - }); + // Fold pasted outlines that have outline content visible attribute false + MakeAllOutlineContentTemporarilyVisible a(rSh.GetDoc()); + } + + pDlg->disposeOnce(); + } + ); } else return; |