diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-11-19 15:38:58 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-11-24 12:09:11 +0100 |
commit | 93eb6a87e30c8716b5e65ce71e3d1d9deffb6425 (patch) | |
tree | f1a62bc6471276f51d120cc7c5ca9b71707e1d6a /sw/source | |
parent | 3347d71b23595919e167bd49932675e77cbbdbbb (diff) |
sw: exception messages for SwXTextRange
Change-Id: Iee53473ead4151348c2f02f4a83bd0bd17c46758
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106292
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index bfba1dd85a36..e364bb353f92 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -759,7 +759,7 @@ void SwXTextRange::DeleteAndInsert( if (RANGE_IS_TABLE == m_pImpl->m_eRangePosition) { // setString on table not allowed - throw uno::RuntimeException(); + throw uno::RuntimeException("not possible for table"); } const SwPosition aPos(GetDoc().GetNodes().GetEndOfContent()); @@ -872,7 +872,7 @@ SwXTextRange::getStart() } else { - throw uno::RuntimeException(); + throw uno::RuntimeException("disposed?"); } return xRet; } @@ -900,7 +900,7 @@ SwXTextRange::getEnd() } else { - throw uno::RuntimeException(); + throw uno::RuntimeException("disposed?"); } return xRet; } @@ -1184,18 +1184,18 @@ SwXTextRange::createContentEnumeration(const OUString& rServiceName) if ( rServiceName != "com.sun.star.text.TextContent" ) { - throw uno::RuntimeException(); + throw uno::RuntimeException("unsupported service"); } if (!m_pImpl->GetBookmark()) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no mark (table?)"); } const SwPosition aPos(GetDoc().GetNodes().GetEndOfContent()); const auto pNewCursor(m_pImpl->m_rDoc.CreateUnoCursor(aPos)); if (!GetPositions(*pNewCursor)) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no positions"); } return SwXParaFrameEnumeration::Create(*pNewCursor, PARAFRAME_PORTION_TEXTRANGE); @@ -1208,13 +1208,13 @@ SwXTextRange::createEnumeration() if (!m_pImpl->GetBookmark()) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no mark (table?)"); } const SwPosition aPos(GetDoc().GetNodes().GetEndOfContent()); auto pNewCursor(m_pImpl->m_rDoc.CreateUnoCursor(aPos)); if (!GetPositions(*pNewCursor)) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no positions"); } if (!m_pImpl->m_xParentText.is()) { @@ -1261,7 +1261,7 @@ SwXTextRange::setPropertyValue( if (!m_pImpl->GetBookmark()) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no mark (table?)"); } SwPaM aPaM(GetDoc().GetNodes()); GetPositions(aPaM); @@ -1276,7 +1276,7 @@ SwXTextRange::getPropertyValue(const OUString& rPropertyName) if (!m_pImpl->GetBookmark()) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no mark (table?)"); } SwPaM aPaM(GetDoc().GetNodes()); GetPositions(aPaM); @@ -1323,7 +1323,7 @@ SwXTextRange::getPropertyState(const OUString& rPropertyName) if (!m_pImpl->GetBookmark()) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no mark (table?)"); } SwPaM aPaM(GetDoc().GetNodes()); GetPositions(aPaM); @@ -1338,7 +1338,7 @@ SwXTextRange::getPropertyStates(const uno::Sequence< OUString >& rPropertyName) if (!m_pImpl->GetBookmark()) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no mark (table?)"); } SwPaM aPaM(GetDoc().GetNodes()); GetPositions(aPaM); @@ -1352,7 +1352,7 @@ void SAL_CALL SwXTextRange::setPropertyToDefault(const OUString& rPropertyName) if (!m_pImpl->GetBookmark()) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no mark (table?)"); } SwPaM aPaM(GetDoc().GetNodes()); GetPositions(aPaM); @@ -1367,7 +1367,7 @@ SwXTextRange::getPropertyDefault(const OUString& rPropertyName) if (!m_pImpl->GetBookmark()) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no mark (table?)"); } SwPaM aPaM(GetDoc().GetNodes()); GetPositions(aPaM); @@ -1384,7 +1384,7 @@ SwXTextRange::makeRedline( if (!m_pImpl->GetBookmark()) { - throw uno::RuntimeException(); + throw uno::RuntimeException("range has no mark (table?)"); } SwPaM aPaM(GetDoc().GetNodes()); SwXTextRange::GetPositions(aPaM); |