diff options
author | Izabela Bakollari <izabela.bakollari@gmail.com> | 2018-10-27 19:39:05 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@libreoffice.org> | 2018-10-27 23:13:44 +0200 |
commit | 0f190f50368816964b2a1b7bb58000ac1792d640 (patch) | |
tree | efb26295269d522096b1ef2abdd1d4734397ad84 /sw | |
parent | be9f3db2306150a37ef18e4ccc8d8f4a1934c5c1 (diff) |
tdf#42982: added description on RuntimeException
Change-Id: I4d76117d4cbef19a8c68fecb882fcaef4c97efba
Reviewed-on: https://gerrit.libreoffice.org/62434
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unochart.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
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" ); |