From b63609ba5478ed9b020c113f5704f7ea8447dec8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 21 Sep 2017 15:42:49 +0200 Subject: loplugin:flatten in framework..package Change-Id: Ide8a97eae6e2fdc7d2dcccba1480ac55a9b555bc Reviewed-on: https://gerrit.libreoffice.org/42593 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/source/ppt/comments.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'oox/source/ppt') diff --git a/oox/source/ppt/comments.cxx b/oox/source/ppt/comments.cxx index 965a7ef658b0..9f9a8fe7977c 100644 --- a/oox/source/ppt/comments.cxx +++ b/oox/source/ppt/comments.cxx @@ -76,10 +76,11 @@ OUString Comment::getAuthor ( const CommentAuthorList& list ) const Comment& CommentList::getCommentAtIndex (int index) { - if(index < (int)cmLst.size() && index >= 0) - return cmLst.at(index); - else + if(index >= (int)cmLst.size() || index < 0) throw css::lang::IllegalArgumentException(); + + return cmLst.at(index) +; } } } -- cgit