summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-16 10:26:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-16 11:57:44 +0200
commit482ef1bfe95a32a6796ce5a3150f272845db7931 (patch)
tree9ac13cb3e96823a743c20822cc91d5929f40f570 /accessibility
parent1772daba6afa394e1081028825e4f96e6387d9a3 (diff)
loplugin:comparisonwithconstant in accessibility
Change-Id: I934c78ec8daec656ca656d5c784f80895abfd2e4 Reviewed-on: https://gerrit.libreoffice.org/37666 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxBase.cxx4
-rw-r--r--accessibility/source/extended/AccessibleGridControlBase.cxx4
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrl.cxx2
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx2
-rw-r--r--accessibility/source/extended/accessibletablistboxtable.cxx2
-rw-r--r--accessibility/source/helper/acc_factory.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx4
7 files changed, 10 insertions, 10 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
index f4b18d9e1208..5c21f9371849 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
@@ -389,7 +389,7 @@ tools::Rectangle AccessibleBrowseBoxBase::getBoundingBox()
ensureIsAlive();
tools::Rectangle aRect = implGetBoundingBox();
- if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
+ if ( aRect.Left() == 0 && aRect.Top() == 0 && aRect.Right() == 0 && aRect.Bottom() == 0 )
{
SAL_WARN( "accessibility", "rectangle doesn't exist" );
}
@@ -402,7 +402,7 @@ tools::Rectangle AccessibleBrowseBoxBase::getBoundingBoxOnScreen()
ensureIsAlive();
tools::Rectangle aRect = implGetBoundingBoxOnScreen();
- if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
+ if ( aRect.Left() == 0 && aRect.Top() == 0 && aRect.Right() == 0 && aRect.Bottom() == 0 )
{
SAL_WARN( "accessibility", "rectangle doesn't exist" );
}
diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx
index dd22d4c76af7..49b5a46f32a2 100644
--- a/accessibility/source/extended/AccessibleGridControlBase.cxx
+++ b/accessibility/source/extended/AccessibleGridControlBase.cxx
@@ -313,7 +313,7 @@ tools::Rectangle AccessibleGridControlBase::getBoundingBox()
SolarMutexGuard aSolarGuard;
ensureIsAlive();
tools::Rectangle aRect = implGetBoundingBox();
- if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
+ if ( aRect.Left() == 0 && aRect.Top() == 0 && aRect.Right() == 0 && aRect.Bottom() == 0 )
{
SAL_WARN( "accessibility", "rectangle doesn't exist" );
}
@@ -325,7 +325,7 @@ tools::Rectangle AccessibleGridControlBase::getBoundingBoxOnScreen()
SolarMutexGuard aSolarGuard;
ensureIsAlive();
tools::Rectangle aRect = implGetBoundingBoxOnScreen();
- if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
+ if ( aRect.Left() == 0 && aRect.Top() == 0 && aRect.Right() == 0 && aRect.Bottom() == 0 )
{
SAL_WARN( "accessibility", "rectangle doesn't exist" );
}
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index 18a4a344495d..3ec6e6e29c04 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -337,7 +337,7 @@ namespace accessibility
}
// if only one entry is selected and its index is chosen to deselect -> no selection anymore
- if ( 1 == nSelCount && bFound )
+ if ( nSelCount == 1 && bFound )
pCtrl->SetNoSelection();
}
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index dc1c80299e51..4f635be0cbac 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -316,7 +316,7 @@ namespace accessibility
if ( !xParent.is() )
{
OSL_ENSURE( m_aEntryPath.size(), "AccessibleListBoxEntry::getAccessibleParent: invalid path!" );
- if ( 1 == m_aEntryPath.size() )
+ if ( m_aEntryPath.size() == 1 )
{ // we're a top level entry
// -> our parent is the tree listbox itself
if ( getListBox() )
diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx
index 857de8c81c8f..2490cf12c5cd 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -79,7 +79,7 @@ namespace accessibility
case VclEventId::ControlLoseFocus :
{
uno::Any aOldValue, aNewValue;
- if ( VclEventId::ControlGetFocus == nEventId )
+ if ( nEventId == VclEventId::ControlGetFocus )
aNewValue <<= AccessibleStateType::FOCUSED;
else
aOldValue <<= AccessibleStateType::FOCUSED;
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx
index d74d2edc663c..bfc629239bd9 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -73,7 +73,7 @@ namespace {
inline bool hasFloatingChild(vcl::Window *pWindow)
{
vcl::Window * pChild = pWindow->GetAccessibleChildWindow(0);
- return pChild && WindowType::FLOATINGWINDOW == pChild->GetType();
+ return pChild && pChild->GetType() == WindowType::FLOATINGWINDOW;
}
// IAccessibleFactory
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index b8dd8e2436f4..d00778116f19 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -160,8 +160,8 @@ namespace
sal_Int64 SAL_CALL OToolBoxWindowItem::getSomething( const Sequence< sal_Int8 >& _rId )
{
- if ( ( 16 == _rId.getLength() )
- && ( 0 == memcmp( getUnoTunnelImplementationId().getConstArray(), _rId.getConstArray(), 16 ) )
+ if ( ( _rId.getLength() == 16 )
+ && ( memcmp( getUnoTunnelImplementationId().getConstArray(), _rId.getConstArray(), 16 ) == 0 )
)
return reinterpret_cast< sal_Int64>( this );