diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-05 10:31:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-05 20:28:04 +0200 |
commit | 816da33afa4b0dcafed301880c1a12279193b95d (patch) | |
tree | e61688b93220502009c93a35cd68ac6a97a0f83b | |
parent | 1cd862de06a6044f3f9b565ec24c24cd68930a3f (diff) |
coverity#1438214 Unchecked dynamic_cast
Change-Id: I68e1569835a1e981f57aabf2565f3eb2c619d296
Reviewed-on: https://gerrit.libreoffice.org/58608
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 8da0b3adec3e..568009959399 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -2280,10 +2280,10 @@ uno::Reference<table::XCellRange> GetRangeByName( pUnoCursor->SetMark(); pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd(); pUnoCursor->Move( fnMoveForward, GoInNode ); - SwUnoTableCursor* pCursor = dynamic_cast<SwUnoTableCursor*>(pUnoCursor.get()); + SwUnoTableCursor& rCursor = dynamic_cast<SwUnoTableCursor&>(*pUnoCursor.get()); // HACK: remove pending actions for selecting old style tables - UnoActionRemoveContext aRemoveContext(*pCursor); - pCursor->MakeBoxSels(); + UnoActionRemoveContext aRemoveContext(rCursor); + rCursor.MakeBoxSels(); // pUnoCursor will be provided and will not be deleted return SwXCellRange::CreateXCellRange(pUnoCursor, *pFormat, rDesc).get(); } |