diff options
Diffstat (limited to 'sw/source/core/frmedt/fetab.cxx')
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 4334c08a76f2..bf312fe6a642 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -176,7 +176,8 @@ void SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); return; } @@ -215,7 +216,8 @@ void SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); return; } @@ -224,7 +226,8 @@ void SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) if( !CheckSplitCells( *this, nCnt + 1, SwTableSearchType::Col ) ) { - ErrorHandler::HandleError( ERR_TBLINSCOL_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLINSCOL_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); return; } @@ -268,7 +271,8 @@ bool SwFEShell::DeleteCol() if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); return false; } @@ -319,7 +323,8 @@ bool SwFEShell::DeleteRow(bool bCompleteTable) if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); return false; } @@ -438,7 +443,8 @@ TableMergeErr SwFEShell::MergeTab() const SwTableNode* pTableNd = pTableCursor->GetNode().FindTableNode(); if( dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) != nullptr ) { - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); } else @@ -469,7 +475,8 @@ void SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); return; } @@ -478,7 +485,8 @@ void SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) if( bVert && !CheckSplitCells( *this, nCnt + 1, SwTableSearchType::NONE ) ) { - ErrorHandler::HandleError( ERR_TBLSPLIT_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLSPLIT_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); return; } @@ -1271,7 +1279,8 @@ bool SwFEShell::DeleteTableSel() if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); return false; } @@ -2163,7 +2172,8 @@ void SwFEShell::SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 if( (TableChgWidthHeightType::InsertDeleteMode & eType) && dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { - ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetWin(), + vcl::Window* pWin = GetWin(); + ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, pWin ? pWin->GetFrameWeld() : nullptr, DialogMask::MessageInfo | DialogMask::ButtonDefaultsOk ); return; } |