summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2016-11-16 21:07:55 -0500
committerKohei Yoshida <libreoffice@kohei.us>2016-11-17 03:04:00 +0000
commit234325b9fc0d54e594de8e5d2e7c717684db1745 (patch)
tree47dd603f35ec4e53a7a557cee141106039b82f9c /sc
parent9008db0a8259551c292f94007afcac710b637b57 (diff)
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>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 664189b1071b..878ee603d219 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);