From 97da76a17dd6addfd3213f196f4454e1d5cee417 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 Oct 2015 09:03:36 +0200 Subject: cid#1326131 'Constant' variable guards dead code Change-Id: I832b2fc243404a6ae9796ad994e901880d3b9260 --- wizards/com/sun/star/wizards/common/Desktop.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'wizards') diff --git a/wizards/com/sun/star/wizards/common/Desktop.java b/wizards/com/sun/star/wizards/common/Desktop.java index 14c3a7a77561..62b3ea6754d2 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.java +++ b/wizards/com/sun/star/wizards/common/Desktop.java @@ -234,24 +234,19 @@ public class Desktop } /** - * Checks if the passed Element Name already exists in the list If yes it appends a - * suffix to make it unique + * Checks if the passed Element Name already exists in the list. If yes it appends a + * suffix to make it unique. * @return a unique Name not being in the passed list. */ public static String getUniqueName(String[] _slist, String _sElementName, String _sSuffixSeparator) { - int a = 2; - String scompname = _sElementName; - boolean bElementexists = true; - if (_slist == null) + if (_slist == null || _slist.length == 0) { return _sElementName; } - if (_slist.length == 0) - { - return _sElementName; - } - while (bElementexists) + String scompname = _sElementName; + int a = 2; + while (true) { for (int i = 0; i < _slist.length; i++) { @@ -262,7 +257,6 @@ public class Desktop } scompname = _sElementName + _sSuffixSeparator + a++; } - return PropertyNames.EMPTY_STRING; } -- cgit /libreoffice-6-2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/cli_ure
AgeCommit message (Expand)Author
2015-03-25TyposJulien Nabet
2015-03-19We require MSVC2013 (_MSC_VER == 1800) nowTor Lillqvist
2015-03-12cli_ure: PVS-Studio V618 non-const format stringMichael Stahl
2015-02-24Typo: increse->increaseJulien Nabet
2015-02-03climaker: Fix handling incomplete typesDavid Ostrovsky
2014-12-12osl_getCommandArg always returns osl_Process_E_NoneStephan Bergmann
2014-12-09fdo#39440 reduce scope of local variablesMichael Weghorn
2014-12-03Fold URE: WindowsStephan Bergmann
2014-11-18java: make fields final where possibleNoel Grandin
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini
2014-10-29remove unnecessary 'using namespace rtl' declarationsNoel Grandin
2014-10-02cli_ure (Windows): std::auto_ptr -> std::unique_ptrStephan Bergmann
2014-08-27cli_ure: adapt destructors in cli_uno library to "C++/CLI"Michael Stahl
2014-08-13warning C4189: local variable is initialized but not referencedThomas Arnhold
2014-08-13java: reduce scope, make fields privateNoel Grandin
2014-08-12java: add @Override annotation to overriding methodsNoel Grandin
2014-08-08Remove redundant inclusions of header "cppuhelper/shlib.h"Matthew Pottage
2014-08-08java: use an empty block rather than an empty statementNoel Grandin
2014-08-08java: remove unused variablesNoel Grandin
2014-08-01typo: more then -> more thanTakeshi Abe
2014-06-29Typo: habe->haveJulien Nabet
2014-06-29Typo: apend->appendJulien Nabet
2014-06-09gbuild, cli_ure: Win32 make issues with back and forward slashesMichael Stahl
2014-06-09cli_ure: Win32 make quoting problem, use sed to work aroundMichael Stahl
2014-06-05various: remove SAL_THROW macroNoel Grandin
2014-05-23remove boilerplate in UNO Exception constructor callsNoel Grandin
2014-05-23Combine unoidl::loadProvider and unoidl::Manager::addProviderStephan Bergmann
2014-05-15Resolves fdo#70681: fixincludeguards.pl: all that's leftThomas Arnhold
2014-05-12use css prefix consistentlyThomas Arnhold
2014-05-12cli_ure: fix dbglevel=2 build on windowsThomas Arnhold
2014-05-05simplify ternary conditions "xxx ? yyy : false"Noel Grandin
2014-04-29Fix memory leaksJulien Nabet
2014-04-24add missing modelines to idl filesThomas Arnhold
2014-04-14typo: noone -> no oneThomas Arnhold
2014-03-10cli_ure: simplify deprecated XTypeProvider.getImplementationIdStephan Bergmann
2014-02-27Remove visual noise from cli_ureAlexander Wilms
2014-02-23Remove unneccessary commentsAlexander Wilms
2014-02-14Drop unused #includeTakeshi Abe