sw/source/core/frmedt/fetab.cxx | 28 ++++++++++------------------ sw/source/uibase/app/appenv.cxx | 4 ++-- sw/source/uibase/wrtsh/wrtsh1.cxx | 4 ++-- 3 files changed, 14 insertions(+), 22 deletions(-)
New commits: commit 31acd9f73686394cb9e7af9c6ef3169276df0f91 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Oct 30 12:13:21 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Oct 31 20:11:24 2019 +0100 avoid intermediate vcl::Windows Change-Id: Ie0618107a3aee4a0d35867f3c1cf83715e7bc842 Reviewed-on: https://gerrit.libreoffice.org/81763 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index bf345ad64457..a6cd65a55d15 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -51,6 +51,7 @@ #include <swddetbl.hxx> #include <ndtxt.hxx> #include <calc.hxx> +#include <dialoghelp.hxx> #include <tabcol.hxx> #include <tblafmt.hxx> #include <cellatr.hxx> @@ -177,8 +178,7 @@ void SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - vcl::Window* pWin = GetWin(); - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), DialogMask::MessageInfo | DialogMask::ButtonsOk ); return; } @@ -217,8 +217,7 @@ void SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - vcl::Window* pWin = GetWin(); - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), DialogMask::MessageInfo | DialogMask::ButtonsOk ); return; } @@ -227,8 +226,7 @@ void SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) if( !CheckSplitCells( *this, nCnt + 1, SwTableSearchType::Col ) ) { - vcl::Window* pWin = GetWin(); - ErrorHandler::HandleError( ERR_TBLINSCOL_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, + ErrorHandler::HandleError( ERR_TBLINSCOL_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), DialogMask::MessageInfo | DialogMask::ButtonsOk ); return; } @@ -272,8 +270,7 @@ bool SwFEShell::DeleteCol() if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - vcl::Window* pWin = GetWin(); - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), DialogMask::MessageInfo | DialogMask::ButtonsOk ); return false; } @@ -324,8 +321,7 @@ bool SwFEShell::DeleteRow(bool bCompleteTable) if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - vcl::Window* pWin = GetWin(); - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), DialogMask::MessageInfo | DialogMask::ButtonsOk ); return false; } @@ -446,8 +442,7 @@ TableMergeErr SwFEShell::MergeTab() const SwTableNode* pTableNd = pTableCursor->GetNode().FindTableNode(); if( dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) != nullptr ) { - vcl::Window* pWin = GetWin(); - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), DialogMask::MessageInfo | DialogMask::ButtonsOk ); } else @@ -478,8 +473,7 @@ void SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - vcl::Window* pWin = GetWin(); - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), DialogMask::MessageInfo | DialogMask::ButtonsOk ); return; } @@ -488,8 +482,7 @@ void SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) if( bVert && !CheckSplitCells( *this, nCnt + 1, SwTableSearchType::NONE ) ) { - vcl::Window* pWin = GetWin(); - ErrorHandler::HandleError( ERR_TBLSPLIT_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, + ErrorHandler::HandleError( ERR_TBLSPLIT_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), DialogMask::MessageInfo | DialogMask::ButtonsOk ); return; } @@ -1289,8 +1282,7 @@ bool SwFEShell::DeleteTableSel() if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - vcl::Window* pWin = GetWin(); - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), DialogMask::MessageInfo | DialogMask::ButtonsOk ); return false; } diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index c3c7e33eedca..5de37c41b4a0 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -49,6 +49,7 @@ #include <swundo.hxx> #include <IDocumentDeviceAccess.hxx> #include <dbmgr.hxx> +#include <dialoghelp.hxx> #include <fmtcol.hxx> #include <frmmgr.hxx> #include <fldmgr.hxx> @@ -202,7 +203,6 @@ void SwModule::InsertEnv( SfxRequest& rReq ) } - vcl::Window *pParent = pOldSh ? pOldSh->GetWin() : nullptr; ScopedVclPtr<SfxAbstractTabDialog> pDlg; short nMode = ENV_INSERT; @@ -210,7 +210,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) if ( !pItem ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - pDlg.disposeAndReset(pFact->CreateSwEnvDlg(pParent ? pParent->GetFrameWeld() : nullptr, aSet, pOldSh, pTempPrinter, !bEnvChange)); + pDlg.disposeAndReset(pFact->CreateSwEnvDlg(GetFrameWeld(pMyDocSh), aSet, pOldSh, pTempPrinter, !bEnvChange)); nMode = pDlg->Execute(); } else diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index d89174bbb979..8dbde3081590 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -54,6 +54,7 @@ #include <svx/svxdlg.hxx> #include <svx/extrusionbar.hxx> #include <svx/fontworkbar.hxx> +#include <dialoghelp.hxx> #include <frmfmt.hxx> #include <fmtftn.hxx> #include <fmthdft.hxx> @@ -414,8 +415,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId); OString aCmd = OStringLiteral(".uno:") + pSlot->GetUnoName(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - vcl::Window* pWin = GetWin(); - ScopedVclPtr<SfxAbstractInsertObjectDialog> pDlg(pFact->CreateInsertObjectDialog(pWin ? pWin->GetFrameWeld() : nullptr, + ScopedVclPtr<SfxAbstractInsertObjectDialog> pDlg(pFact->CreateInsertObjectDialog(GetFrameWeld(mxDoc->GetDocShell()), OUString::fromUtf8( aCmd ), xStor, &aServerList)); if (pDlg) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits