sc/source/ui/Accessibility/AccessibleDocument.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit ca1f1962ae163345ecaedc288244448589ae2a0e
Author:     Oromidayo Owolabi <owolabioromiday...@gmail.com>
AuthorDate: Mon Oct 21 12:50:41 2024 +0100
Commit:     Hossein <hoss...@libreoffice.org>
CommitDate: Tue Oct 29 13:45:08 2024 +0100

    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   <hoss...@libreoffice.org>
    Tested-by: Hossein   <hoss...@libreoffice.org>

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);

Reply via email to