summaryrefslogtreecommitdiff
path: root/scripting/source/provider
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-12 11:21:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-28 11:23:34 +0200
commit9348b322a5c230dfcc2231661b73e480b130fcd9 (patch)
tree2c81a97d6f54229c87c5e2a37c73935ffc2527ac /scripting/source/provider
parent5bcd18461b8cb63b477dbb74025374b4c963161a (diff)
clang-tidy readability-simplify-boolean-expr
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a Reviewed-on: https://gerrit.libreoffice.org/36450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/source/provider')
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx47
1 files changed, 10 insertions, 37 deletions
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 56faea32c6d2..0b4baeddd981 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -55,16 +55,11 @@ using namespace ::sf_misc;
namespace func_provider
{
-bool endsWith( const OUString& target,
- const OUString& item )
+bool endsWith( const OUString& target, const OUString& item )
{
- sal_Int32 index = 0;
- if ( ( index = target.indexOf( item ) ) != -1 &&
- ( index == ( target.getLength() - item.getLength() ) ) )
- {
- return true;
- }
- return false;
+ sal_Int32 index = target.indexOf( item );
+ return index != -1 &&
+ index == ( target.getLength() - item.getLength() );
}
/* should be available in some central location. */
@@ -607,30 +602,17 @@ MasterScriptProvider::removeByName( const OUString& Name )
void SAL_CALL
-MasterScriptProvider::replaceByName( const OUString& aName, const Any& aElement )
+MasterScriptProvider::replaceByName( const OUString& /*aName*/, const Any& /*aElement*/ )
{
- (void)aName;
- (void)aElement;
-
// TODO needs implementing
- if ( true )
- {
- throw RuntimeException( "replaceByName not implemented!!!!" );
- }
+ throw RuntimeException( "replaceByName not implemented!!!!" );
}
Any SAL_CALL
-MasterScriptProvider::getByName( const OUString& aName )
+MasterScriptProvider::getByName( const OUString& /*aName*/ )
{
- (void)aName;
-
// TODO needs to be implemented
- Any result;
- if ( true )
- {
- throw RuntimeException( "getByName not implemented!!!!" );
- }
- return result;
+ throw RuntimeException( "getByName not implemented!!!!" );
}
sal_Bool SAL_CALL
@@ -701,12 +683,7 @@ Sequence< OUString > SAL_CALL
MasterScriptProvider::getElementNames( )
{
// TODO needs implementing
- Sequence< OUString > names;
- if ( true )
- {
- throw RuntimeException( "getElementNames not implemented!!!!" );
- }
- return names;
+ throw RuntimeException( "getElementNames not implemented!!!!" );
}
Type SAL_CALL
@@ -720,11 +697,7 @@ MasterScriptProvider::getElementType( )
sal_Bool SAL_CALL MasterScriptProvider::hasElements( )
{
// TODO needs implementing
- if ( true )
- {
- throw RuntimeException( "hasElements not implemented!!!!" );
- }
- return false;
+ throw RuntimeException( "hasElements not implemented!!!!" );
}