Remove redundant checks on nullptr.
CreateTextHelp() itself does the check on nullptr. No need for the
callers to do the same.
Change-Id: Ib57f3b818235a4e0fb302dda3562c9c8a29a4e54
Reviewed-on: https://gerrit.libreoffice.org/30919
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 664189b..878ee60 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -161,8 +161,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleEditObject::getAccessibleAtPo
SolarMutexGuard aGuard;
IsObjectValid();
if(!mpTextHelper)
CreateTextHelper();
CreateTextHelper();
xRet = mpTextHelper->GetAt(rPoint);
}
@@ -239,8 +238,7 @@ sal_Int32 SAL_CALL
{
SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
CreateTextHelper();
return mpTextHelper->GetChildCount();
}
@@ -251,8 +249,7 @@ uno::Reference< XAccessible > SAL_CALL
{
SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
CreateTextHelper();
return mpTextHelper->GetChild(nIndex);
}
@@ -306,8 +303,7 @@ void SAL_CALL
ScAccessibleEditObject::addAccessibleEventListener(const uno::Reference<XAccessibleEventListener>& xListener)
throw (uno::RuntimeException, std::exception)
{
if (!mpTextHelper)
CreateTextHelper();
CreateTextHelper();
mpTextHelper->AddEventListener(xListener);
@@ -318,8 +314,7 @@ void SAL_CALL
ScAccessibleEditObject::removeAccessibleEventListener(const uno::Reference<XAccessibleEventListener>& xListener)
throw (uno::RuntimeException, std::exception)
{
if (!mpTextHelper)
CreateTextHelper();
CreateTextHelper();
mpTextHelper->RemoveEventListener(xListener);