diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-15 14:43:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-16 08:15:48 +0200 |
commit | 973eb2f6db60c0939299a968a3121e3310e6d1f5 (patch) | |
tree | 9eece355c20bc4d930e7e58943fc2d33bedfcfd0 /wizards | |
parent | fa652cdd2314f485359119a8ff081a7afd1c01b0 (diff) |
java: reduce the depth of some deeply nested if blocks
Change-Id: I3c0c7f08d4d8ea594e72fc0d9b93d085d4ab4bf5
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/db/CommandName.java | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/wizards/com/sun/star/wizards/db/CommandName.java b/wizards/com/sun/star/wizards/db/CommandName.java index 2621b96e167b..1db997976ea9 100644 --- a/wizards/com/sun/star/wizards/db/CommandName.java +++ b/wizards/com/sun/star/wizards/db/CommandName.java @@ -82,48 +82,48 @@ public class CommandName { try { - if (this.setMetaDataAttributes()) - { - this.DisplayName = _DisplayName; - int iIndex; - if (oCommandMetaData.xDBMetaData.supportsCatalogsInDataManipulation()) - { // ...dann Catalog mit in TableName - iIndex = _DisplayName.indexOf(sCatalogSep); - if (iIndex >= 0) - { - if (bCatalogAtStart) - { - CatalogName = _DisplayName.substring(0, iIndex); - _DisplayName = _DisplayName.substring(iIndex + 1, _DisplayName.length()); - } - else - { - CatalogName = _DisplayName.substring(iIndex + 1, _DisplayName.length()); - _DisplayName = _DisplayName.substring(0, iIndex); - } - } - } - if (oCommandMetaData.xDBMetaData.supportsSchemasInDataManipulation()) + if (!setMetaDataAttributes()) + return; + + this.DisplayName = _DisplayName; + int iIndex; + if (oCommandMetaData.xDBMetaData.supportsCatalogsInDataManipulation()) + { // ...dann Catalog mit in TableName + iIndex = _DisplayName.indexOf(sCatalogSep); + if (iIndex >= 0) { - String[] NameList; - NameList = new String[0]; - NameList = JavaTools.ArrayoutofString(_DisplayName, "."); - if (NameList.length > 1) + if (bCatalogAtStart) { - SchemaName = NameList[0]; - TableName = NameList[1]; + CatalogName = _DisplayName.substring(0, iIndex); + _DisplayName = _DisplayName.substring(iIndex + 1, _DisplayName.length()); } else { - TableName = _DisplayName; + CatalogName = _DisplayName.substring(iIndex + 1, _DisplayName.length()); + _DisplayName = _DisplayName.substring(0, iIndex); } } + } + if (oCommandMetaData.xDBMetaData.supportsSchemasInDataManipulation()) + { + String[] NameList; + NameList = new String[0]; + NameList = JavaTools.ArrayoutofString(_DisplayName, "."); + if (NameList.length > 1) + { + SchemaName = NameList[0]; + TableName = NameList[1]; + } else { TableName = _DisplayName; } - setComposedCommandName(); } + else + { + TableName = _DisplayName; + } + setComposedCommandName(); } catch (Exception exception) { |