[Libreoffice-commits] core.git: sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Thu Nov 17 03:04:26 UTC 2016
sc/source/ui/Accessibility/AccessibleEditObject.cxx | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
New commits:
commit 234325b9fc0d54e594de8e5d2e7c717684db1745
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Wed Nov 16 21:07:55 2016 -0500
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 at libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice at 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);
More information about the Libreoffice-commits
mailing list