summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-24 09:24:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-24 11:41:21 +0200
commit3a8ef92bc0c80d4b8c0a7ef78261d262769f1946 (patch)
treeef6dbba07dea625405dcc9f45a77f59c67662851 /sc/source/ui/vba
parent3698b72185c1ee6ff7e2c65fa8f6e7c6bbf0479e (diff)
clang-tidy readability-simplify-boolean-expr in sc
Change-Id: I702e52e56487f201b9e0d7af21ff8167464aa58c Reviewed-on: https://gerrit.libreoffice.org/36876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/vba')
-rw-r--r--sc/source/ui/vba/vbarange.cxx16
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx6
2 files changed, 6 insertions, 16 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 8339a5ea538e..8f715d6b8d54 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -522,19 +522,13 @@ public:
bool isBooleanType()
{
- if ( getNumberFormat() & util::NumberFormat::LOGICAL )
- return true;
- return false;
+ return (getNumberFormat() & util::NumberFormat::LOGICAL) != 0;
}
bool isDateType()
{
sal_Int16 nType = getNumberFormat();
- if(( nType & util::NumberFormat::DATETIME ))
- {
- return true;
- }
- return false;
+ return ( nType & util::NumberFormat::DATETIME ) != 0;
}
OUString getNumberFormatString()
@@ -2275,10 +2269,8 @@ ScVbaRange::Select()
bool cellInRange( const table::CellRangeAddress& rAddr, sal_Int32 nCol, sal_Int32 nRow )
{
- if ( nCol >= rAddr.StartColumn && nCol <= rAddr.EndColumn &&
- nRow >= rAddr.StartRow && nRow <= rAddr.EndRow )
- return true;
- return false;
+ return nCol >= rAddr.StartColumn && nCol <= rAddr.EndColumn &&
+ nRow >= rAddr.StartRow && nRow <= rAddr.EndRow;
}
void setCursor( SCCOL nCol, SCROW nRow, const uno::Reference< frame::XModel >& xModel, bool bInSel = true )
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index c26088c42f1a..a0cefaeb7982 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -180,11 +180,9 @@ bool
ScVbaWorkbooks::isSpreadSheetFile( const OUString& sType )
{
// include calc_QPro etc. ? ( not for the moment anyway )
- if ( sType.startsWith( "calc_MS" )
+ return sType.startsWith( "calc_MS" )
|| sType.startsWith( "calc8" )
- || sType.startsWith( "calc_StarOffice" ) )
- return true;
- return false;
+ || sType.startsWith( "calc_StarOffice" );
}
OUString