From 55d7592433bf4b70bdd4bcbe957eabf9052de44e Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 9 Dec 2009 14:34:43 +0100 Subject: sb111: #i107556# do not depend on order of XNameAccess::getElementNames; removed some unused com.sun.star.wizards code --- wizards/com/sun/star/wizards/common/Configuration.java | 6 ------ wizards/com/sun/star/wizards/table/CGCategory.java | 6 ++++-- wizards/com/sun/star/wizards/table/FieldDescription.java | 3 --- wizards/com/sun/star/wizards/table/ScenarioSelector.java | 16 ++-------------- 4 files changed, 6 insertions(+), 25 deletions(-) (limited to 'wizards') diff --git a/wizards/com/sun/star/wizards/common/Configuration.java b/wizards/com/sun/star/wizards/common/Configuration.java index ead63de88183..36421599da9a 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.java +++ b/wizards/com/sun/star/wizards/common/Configuration.java @@ -368,12 +368,6 @@ public abstract class Configuration } } - public static XNameAccess getChildNodebyIndex(Object _oNode, int _index) - { - XNameAccess xNameAccessNode = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, _oNode); - return getChildNodebyIndex(xNameAccessNode, _index); - } - public static XNameAccess getChildNodebyIndex(XNameAccess _xNameAccess, int _index) { try diff --git a/wizards/com/sun/star/wizards/table/CGCategory.java b/wizards/com/sun/star/wizards/table/CGCategory.java index 4179011cb368..06c8a6b28b23 100644 --- a/wizards/com/sun/star/wizards/table/CGCategory.java +++ b/wizards/com/sun/star/wizards/table/CGCategory.java @@ -59,12 +59,14 @@ public class CGCategory xMSF = _xMSF; } - public void initialize(int _index) + public void initialize(String category) { try { oconfigView = Configuration.getConfigurationRoot(xMSF, CGROOTPATH, false); //business/Tables - xNameAccessCurBusinessNode = Configuration.getChildNodebyIndex(oconfigView, _index); + xNameAccessCurBusinessNode = Configuration.getChildNodebyName( + UnoRuntime.queryInterface(XNameAccess.class, oconfigView), + category); } catch (Exception e) { diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java index 7c4b2bcaa409..8d75de343c11 100644 --- a/wizards/com/sun/star/wizards/table/FieldDescription.java +++ b/wizards/com/sun/star/wizards/table/FieldDescription.java @@ -42,8 +42,6 @@ import com.sun.star.wizards.common.Properties; public class FieldDescription { - - int category; private String tablename = ""; // String fieldname; private String keyname; @@ -63,7 +61,6 @@ public class FieldDescription { xMSF = _xMSF; aLocale = _aLocale; - category = _curscenarioselector.getCategory(); tablename = _curscenarioselector.getTableName(); Name = _fieldname; keyname = _keyname; diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index cf0389b84ff3..831c4e7d5a35 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -168,19 +168,6 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X initializeCategory(BUSINESS); } - public int getCategory() - { - if (optBusiness.getState()) - { - curcategory = BUSINESS; - } - else - { - curcategory = PRIVATE; - } - return curcategory; - } - public void selectCategory() { if (optBusiness.getState()) @@ -197,7 +184,8 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X { try { - oCGCategory.initialize(_iCategory); + oCGCategory.initialize( + _iCategory == PRIVATE ? "private" : "business"); xTableListBox.removeItems((short) 0, xTableListBox.getItemCount()); xTableListBox.addItems(oCGCategory.getTableNames(), (short) _iCategory); initializeTable(0); -- cgit