Kaydet (Commit) d2c71361 authored tarafından Muhammet Kara's avatar Muhammet Kara Kaydeden (comit) Noel Grandin

Add some messages to SvxDrawPage::getByIndex exceptions

Change-Id: I2310907071d2a8d63d78dbeb99022309870d5c34
Reviewed-on: https://gerrit.libreoffice.org/67489
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 961ba62d
......@@ -345,14 +345,17 @@ uno::Any SAL_CALL SvxDrawPage::getByIndex( sal_Int32 Index )
SolarMutexGuard aGuard;
if( (mpModel == nullptr) || (mpPage == nullptr) )
throw lang::DisposedException();
throw lang::DisposedException("Model or Page was already disposed!");
if ( Index < 0 || static_cast<size_t>(Index) >= mpPage->GetObjCount() )
throw lang::IndexOutOfBoundsException();
throw lang::IndexOutOfBoundsException("Index (" + OUString::number(Index)
+ ") needs to be a positive integer smaller than the shape count ("
+ OUString::number(mpPage->GetObjCount()) + ")!");
SdrObject* pObj = mpPage->GetObj( Index );
if( pObj == nullptr )
throw uno::RuntimeException();
throw uno::RuntimeException("Runtime exception thrown while getting a ref to the SdrObject at index: "
+ OUString::number(Index));
return makeAny(Reference< drawing::XShape >( pObj->getUnoShape(), uno::UNO_QUERY ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment