sw/source/core/unocore/unochart.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
New commits: commit 0f190f50368816964b2a1b7bb58000ac1792d640 Author: Izabela Bakollari <izabela.bakoll...@gmail.com> AuthorDate: Sat Oct 27 19:39:05 2018 +0200 Commit: Björn Michaelsen <bjoern.michael...@libreoffice.org> CommitDate: Sat Oct 27 23:13:44 2018 +0200 tdf#42982: added description on RuntimeException Change-Id: I4d76117d4cbef19a8c68fecb882fcaef4c97efba Reviewed-on: https://gerrit.libreoffice.org/62434 Reviewed-by: Michael Stahl <michael.st...@cib.de> Tested-by: Jenkins diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 8a49a513aa42..b12ddb64987e 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -533,7 +533,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData uno::Reference< chart2::data::XDataSource > xRes; if (!pDoc) - throw uno::RuntimeException(); + throw uno::RuntimeException("Not connected to a document."); // get arguments OUString aRangeRepresentation; @@ -1690,7 +1690,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange throw lang::IllegalArgumentException(); SwTable* pTable = SwTable::FindTable( pTableFormat ); if (pTable->IsTableComplex()) - throw uno::RuntimeException(); + throw uno::RuntimeException("Table too complex."); // check that there is only one table used in all ranges if (!pFirstFoundTable) @@ -1707,7 +1707,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange sal_Int32 nCol, nRow; SwXTextTable::GetCellPosition( aStartCell, nCol, nRow ); if (nCol < 0 || nRow < 0) - throw uno::RuntimeException(); + throw uno::RuntimeException("Cell not found."); //!! following objects/functions are implemented in XMLRangeHelper.?xx //!! which is a copy of the respective file from chart2 !! @@ -1720,7 +1720,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange { SwXTextTable::GetCellPosition( aEndCell, nCol, nRow ); if (nCol < 0 || nRow < 0) - throw uno::RuntimeException(); + throw uno::RuntimeException("Cell not found."); aCellRange.aLowerRight.nColumn = nCol; aCellRange.aLowerRight.nRow = nRow; @@ -1965,9 +1965,13 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel( SwRangeDescriptor aDesc; bool bOk = false; SwFrameFormat* pTableFormat = GetFrameFormat(); - SwTable* pTable = pTableFormat ? SwTable::FindTable( pTableFormat ) : nullptr; - if (!pTableFormat || !pTable || pTable->IsTableComplex()) - throw uno::RuntimeException(); + if (!pTableFormat) + throw uno::RuntimeException("No table format found."); + SwTable* pTable = SwTable::FindTable( pTableFormat ); + if (!pTable) + throw uno::RuntimeException("No table found."); + if (pTable->IsTableComplex()) + throw uno::RuntimeException("Table too complex."); const OUString aCellRange( GetCellRangeName( *pTableFormat, *m_pTableCursor ) ); OSL_ENSURE( !aCellRange.isEmpty(), "failed to get cell range" ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits