summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOromidayo Owolabi <owolabioromidayo16@gmail.com>2024-10-21 12:50:41 +0100
committerHossein <hossein@libreoffice.org>2024-10-29 13:45:08 +0100
commitca1f1962ae163345ecaedc288244448589ae2a0e (patch)
tree32d6fc6530d6efe6cfddb884ac2d4650016a0c7d
parent152896274aca291a5d2181db6dd639c3e36c2a02 (diff)
tdf#42982 Improve UNO API error reporting
Add more information to UNO API error reporting in AccessibleDocument.cxx. Change-Id: I411df5c5e3eb69fcc045c92453aa3c37111145f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175331 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Hossein <hossein@libreoffice.org>
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 4603df711de2..28b6ed5517a3 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -307,7 +307,7 @@ ScChildrenShapes::ScChildrenShapes(ScAccessibleDocument* pAccessibleDocument, Sc
{
//set flag on every selected shape
if (!xSelectionSupplier.is())
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Could not get selected shapes. Null reference to xSelectionSupplier in ScChildrenShapes::ScChildrenShapes.");
uno::Reference<drawing::XShapes> xShapes(mpViewShell->getSelectedXShapes());
if (xShapes.is())
@@ -603,7 +603,7 @@ bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
GetCount(); // fill list with filtered shapes (no internal shapes)
if (!xSelectionSupplier.is())
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Could not get selected shapes. Null reference to xSelectionSupplier in ScChildrenShapes::IsSelected.");
if (mbShapesNeedSorting)
{
@@ -653,7 +653,7 @@ bool ScChildrenShapes::SelectionChanged()
{
bool bResult(false);
if (!xSelectionSupplier.is())
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Could not get selected shapes. Null reference to xSelectionSupplier in ScChildrenShapes::SelectionChanged.");
uno::Reference<drawing::XShapes> xShapes(mpViewShell->getSelectedXShapes());
@@ -668,7 +668,7 @@ void ScChildrenShapes::Select(sal_Int32 nIndex)
GetCount(); // fill list with filtered shapes (no internal shapes)
if (!xSelectionSupplier.is())
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Could not get selected shapes. Null reference to xSelectionSupplier in ScChildrenShapes::Select.");
if (mbShapesNeedSorting)
{
@@ -706,7 +706,7 @@ void ScChildrenShapes::Select(sal_Int32 nIndex)
void ScChildrenShapes::DeselectAll()
{
if (!xSelectionSupplier.is())
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Could not get selected shapes. Null reference to xSelectionSupplier in ScChildrenShapes::DeselectAll.");
bool bSomethingSelected(true);
try
@@ -733,7 +733,7 @@ void ScChildrenShapes::DeselectAll()
void ScChildrenShapes::SelectAll()
{
if (!xSelectionSupplier.is())
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Could not get selected shapes. Null reference to xSelectionSupplier in ScChildrenShapes::SelectAll.");
if (maZOrderedShapes.size() <= 1)
GetCount(); // fill list with filtered shapes (no internal shapes)
@@ -784,7 +784,7 @@ void ScChildrenShapes::FillShapes(std::vector < uno::Reference < drawing::XShape
sal_Int32 ScChildrenShapes::GetSelectedCount() const
{
if (!xSelectionSupplier.is())
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Could not get selected shapes. Null reference to xSelectionSupplier in ScChildrenShapes::GetSelectedCount.");
std::vector < uno::Reference < drawing::XShape > > aShapes;
FillShapes(aShapes);
@@ -1194,7 +1194,7 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, b
}
if (!xSelectionSupplier.is())
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Could not get selected shapes. Null reference to xSelectionSupplier in ScChildrenShapes::AddShape.");
uno::Reference<drawing::XShapes> xShapes(mpViewShell->getSelectedXShapes());
uno::Reference<container::XEnumerationAccess> xEnumAcc(xShapes, uno::UNO_QUERY);