diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-24 09:25:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-24 10:27:12 +0200 |
commit | 2c56d461633ff1a1b364685df79b521f8802c4ec (patch) | |
tree | b419b70f891398d39decdc17b7e4f5ae82d478fa /sw/source/ui/vba/vbaselection.cxx | |
parent | a975225678c00272fc6e2ee2c85e6fe00a2204f1 (diff) |
clang-tidy readability-simplify-boolean-expr in sw
Change-Id: Ib3ec37b8280c527fa712192db043b348c3427c50
Reviewed-on: https://gerrit.libreoffice.org/36877
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/vba/vbaselection.cxx')
-rw-r--r-- | sw/source/ui/vba/vbaselection.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index b3334a13766c..22c38459060d 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -956,9 +956,7 @@ uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable() bool SwVbaSelection::IsInTable() { uno::Reference< text::XTextTable > xTextTable = GetXTextTable(); - if( xTextTable.is() ) - return true; - return false; + return xTextTable.is(); } bool SwVbaSelection::HasSelection() @@ -966,9 +964,7 @@ bool SwVbaSelection::HasSelection() uno::Reference< text::XTextRange > xStart = mxTextViewCursor->getStart(); uno::Reference< text::XTextRange > xEnd = mxTextViewCursor->getEnd(); uno::Reference< text::XTextRangeCompare > xTRC( mxTextViewCursor->getText(), uno::UNO_QUERY_THROW ); - if( xTRC->compareRegionStarts( xStart, xEnd ) == 0 && xTRC->compareRegionEnds( xStart, xEnd ) == 0 ) - return false; - return true; + return xTRC->compareRegionStarts( xStart, xEnd ) != 0 || xTRC->compareRegionEnds( xStart, xEnd ) != 0; } void SwVbaSelection::GetSelectedCellRange( OUString& sTLName, OUString& sBRName ) |