From dc0f901190da6ab3d95c6008e947684ab36a4f2a Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Wed, 10 Feb 2016 12:10:23 +0300 Subject: GetActiveAccessibleCell: remove recently obsoleted IF clause MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to commit 1fda8bf08123b521d9ad77eb542d7d1a3c63f54a The recently added ELSE component is more inclusive than the IF component, so there is no longer any need to check if a cell IsTextEditActive(). As long as the cell is active in any way, it will be returned. Change-Id: I92cf2a231db1e1457f81a2ef77811ed40078e647 Reviewed-on: https://gerrit.libreoffice.org/22262 Reviewed-by: Justin Luth Tested-by: Jenkins Reviewed-by: Jacobo Aragunde PĂ©rez --- svx/source/table/accessibletableshape.cxx | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index 71cbe1022151..97e53b67a186 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -957,26 +957,15 @@ AccessibleCell* AccessibleTableShape::GetActiveAccessibleCell() sdr::table::CellRef xCellRef (pTableObj->getActiveCell()); if ( xCellRef.is() ) { - const bool bCellEditing = xCellRef->IsTextEditActive(); - if (bCellEditing) + try { - //Reference< XCell > xCell(xCellRef.get(), UNO_QUERY); - xAccCell = mxImpl->getAccessibleCell(Reference< XCell >( xCellRef.get() )); - if (xAccCell.is()) + CellPos rPos; + pTableObj->getActiveCellPos( rPos ); + xAccCell = mxImpl->getAccessibleCell( rPos.mnRow, rPos.mnCol ); + if ( xAccCell.is() ) pAccCell = xAccCell.get(); } - else - { - try - { - CellPos rPos; - pTableObj->getActiveCellPos( rPos ); - xAccCell = mxImpl->getAccessibleCell( rPos.mnRow, rPos.mnCol ); - if ( xAccCell.is() ) - pAccCell = xAccCell.get(); - } - catch ( IndexOutOfBoundsException& ) {} - } + catch ( IndexOutOfBoundsException& ) {} } } } -- cgit