summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/query
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-22 12:23:28 +0200
committerNoel Grandin <noel@peralex.com>2014-09-22 14:28:35 +0200
commit04f43cd6a0159da29a0df4bf8e27387156f321e5 (patch)
treeaa323aaab3f91503006113217187f67fc523fe14 /wizards/com/sun/star/wizards/query
parent3c6da8e49a96513eda73656f3f6212f980a74b51 (diff)
84059 - form wizard : files required could not be found
I've essentially unwound most the Java changes I made te wizards module in the last few months. I will revisit my changes at a later date and make them more carefully :-) Change-Id: I9221a825dc8de6edc96d6db07072aefcd1a37107
Diffstat (limited to 'wizards/com/sun/star/wizards/query')
-rw-r--r--wizards/com/sun/star/wizards/query/CallQueryWizard.java12
-rw-r--r--wizards/com/sun/star/wizards/query/Finalizer.java20
-rw-r--r--wizards/com/sun/star/wizards/query/QuerySummary.java16
-rw-r--r--wizards/com/sun/star/wizards/query/QueryWizard.java21
4 files changed, 35 insertions, 34 deletions
diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
index 229caff877fe..204fe281dd66 100644
--- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
@@ -24,7 +24,7 @@ import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
import com.sun.star.wizards.common.PropertyNames;
-/** This class encapsulates the class, that implements the minimal component, a
+/** This class capsulates the class, that implements the minimal component, a
* factory for creating the service (<CODE>__getServiceFactory</CODE>).
*/
public class CallQueryWizard
@@ -56,8 +56,8 @@ public class CallQueryWizard
public static class QueryWizardImplementation extends com.sun.star.lib.uno.helper.PropertySet implements com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, com.sun.star.task.XJobExecutor
{
private PropertyValue[] m_wizardContext;
-
-
+ public String Command;
+ public final Integer CommandType = com.sun.star.sdb.CommandType.QUERY;
/** The constructor of the inner class has a XMultiServiceFactory parameter.
* @param i_serviceFactory A special service factory could be introduced while initializing.
@@ -77,7 +77,7 @@ public class CallQueryWizard
if (sEvent.equals(PropertyNames.START))
{
QueryWizard CurQueryWizard = new QueryWizard( m_serviceFactory, m_wizardContext );
- CurQueryWizard.start();
+ Command = CurQueryWizard.start();
}
}
catch (Exception exception)
@@ -108,7 +108,7 @@ public class CallQueryWizard
/** This method returns an array of all supported service names.
* @return Array of supported service names.
*/
- public String[] getSupportedServiceNames()
+ public java.lang.String[] getSupportedServiceNames()
{
String[] stringSupportedServiceNames = new String[1];
@@ -142,7 +142,7 @@ public class CallQueryWizard
/** Return the class name of the component.
* @return Class name of the component.
*/
- public String getImplementationName()
+ public java.lang.String getImplementationName()
{
return (QueryWizardImplementation.class.getName());
}
diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java
index c6567f1d931c..9f39ef49232b 100644
--- a/wizards/com/sun/star/wizards/query/Finalizer.java
+++ b/wizards/com/sun/star/wizards/query/Finalizer.java
@@ -63,7 +63,7 @@ public class Finalizer
},
new Object[]
{
- 8, reslblQueryTitle, 95, 27, Integer.valueOf(QueryWizard.SOSUMMARY_PAGE), Short.valueOf(curtabindex++), 52
+ 8, reslblQueryTitle, 95, 27, new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 52
});
m_aTxtTitle = m_queryWizard.insertTextField("txtQueryTitle", "changeTitle", this, new String[]
{
@@ -71,7 +71,7 @@ public class Finalizer
},
new Object[]
{
- 12, HelpIds.getHelpIdString(curHelpIndex++), 95, 37, Integer.valueOf(QueryWizard.SOSUMMARY_PAGE), Short.valueOf(curtabindex++), 90
+ 12, HelpIds.getHelpIdString(curHelpIndex++), 95, 37, new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 90
});
m_queryWizard.insertLabel("lblHowGoOn", new String[]
{
@@ -79,7 +79,7 @@ public class Finalizer
},
new Object[]
{
- 16, reslblHowGoOn, Boolean.TRUE, 192, 27, Integer.valueOf(QueryWizard.SOSUMMARY_PAGE), Short.valueOf(curtabindex++), 112
+ 16, reslblHowGoOn, Boolean.TRUE, 192, 27, new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 112
});
this.xRadioDisplayQuery = m_queryWizard.insertRadioButton("optDisplayQuery",
new String[]
@@ -88,7 +88,7 @@ public class Finalizer
},
new Object[]
{
- 9, HelpIds.getHelpIdString(curHelpIndex++), resoptDisplayQuery, 192, 46, Short.valueOf((short) 1), Integer.valueOf(QueryWizard.SOSUMMARY_PAGE), Short.valueOf(curtabindex++), 118
+ 9, HelpIds.getHelpIdString(curHelpIndex++), resoptDisplayQuery, 192, 46, new Short((short) 1), new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 118
});
m_queryWizard.insertRadioButton("optModifyQuery",
@@ -98,7 +98,7 @@ public class Finalizer
},
new Object[]
{
- 10, HelpIds.getHelpIdString(curHelpIndex++), resoptModifyQuery, 192, 56, Integer.valueOf(QueryWizard.SOSUMMARY_PAGE), Short.valueOf(curtabindex++), 118
+ 10, HelpIds.getHelpIdString(curHelpIndex++), resoptModifyQuery, 192, 56, new Integer(QueryWizard.SOSUMMARY_PAGE), new Short(curtabindex++), 118
});
m_queryWizard.insertFixedLine("flnSummary", new String[]
{
@@ -106,7 +106,7 @@ public class Finalizer
},
new Object[]
{
- 10, resflnSummary, 95, 68, 8, Short.valueOf(curtabindex++), 209
+ 10, resflnSummary, 95, 68, 8, new Short(curtabindex++), 209
});
m_queryWizard.insertTextField("txtSummary", 0, null, new String[]
{
@@ -118,7 +118,11 @@ public class Finalizer
});
}
-
+ public void changeTitle()
+ {
+ final String TitleName = m_aTxtTitle.getText();
+ m_queryWizard.enableFinishButton( TitleName.length() > 0 );
+ }
/* TODO: The title textbox always has to be updated when
a new Table has been selected if it is clear that the user has not made any input meanwhile
@@ -138,7 +142,6 @@ public class Finalizer
Helper.setUnoPropertyValue(UnoDialog.getModel(m_aTxtTitle), "Text", sCurQueryName);
}
}
-
CurDBMetaData.setSummaryString();
m_queryWizard.setControlProperty("txtSummary", "Text", CurDBMetaData.getSummaryString());
return sCurQueryName;
@@ -153,6 +156,7 @@ public class Finalizer
exception.printStackTrace(System.err);
return PropertyNames.EMPTY_STRING;
}
+
}
private String getTitle()
diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java
index e6999b63be85..47dc89fa2432 100644
--- a/wizards/com/sun/star/wizards/query/QuerySummary.java
+++ b/wizards/com/sun/star/wizards/query/QuerySummary.java
@@ -29,10 +29,10 @@ import com.sun.star.wizards.ui.FilterComponent;
public class QuerySummary extends QueryMetaData
{
- final private int RID_QUERY = 2300;
-
- private String sSummary;
- private Resource oResource;
+ final protected int RID_QUERY = 2300;
+ final protected int RID_REPORT = 2400;
+ String sSummary;
+ Resource oResource;
private String sSeparator;
private String sReturnChar;
private String sAnd;
@@ -149,7 +149,7 @@ public class QuerySummary extends QueryMetaData
}
// TODO: How can you merge the following two methods to a single one in a smarter way??
- private String combinePartString(int _InitResID, String[] _FieldNames, int _AlternativeResID)
+ public String combinePartString(int _InitResID, String[] _FieldNames, int _AlternativeResID)
{
if (_FieldNames != null && _FieldNames.length > 0)
{
@@ -158,7 +158,7 @@ public class QuerySummary extends QueryMetaData
return oResource.getResText(_AlternativeResID);
}
- private String ArrayFieldsToString(int _InitResID, String[] _FieldNames)
+ protected String ArrayFieldsToString(int _InitResID, String[] _FieldNames)
{
String sReturn = oResource.getResText(_InitResID);
int FieldCount = _FieldNames.length;
@@ -173,7 +173,7 @@ public class QuerySummary extends QueryMetaData
return (sReturn);
}
- private String combinePartString(int _InitResID, String[][] _FieldNames, int _AlternativeResID, int _BaseStringID, String[] _ReplaceTags)
+ public String combinePartString(int _InitResID, String[][] _FieldNames, int _AlternativeResID, int _BaseStringID, String[] _ReplaceTags)
{
if (_FieldNames != null && _FieldNames.length > 0)
{
@@ -182,7 +182,7 @@ public class QuerySummary extends QueryMetaData
return oResource.getResText(_AlternativeResID);
}
- private String ArrayFieldsToString(int _InitResID, String[][] _FieldNames, int _BaseStringID, String[] _ReplaceTags)
+ public String ArrayFieldsToString(int _InitResID, String[][] _FieldNames, int _BaseStringID, String[] _ReplaceTags)
{
String CurString = PropertyNames.EMPTY_STRING;
String sReturn = oResource.getResText(_InitResID);
diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java
index 41d937732d1c..f082d8fc5d3a 100644
--- a/wizards/com/sun/star/wizards/query/QueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/QueryWizard.java
@@ -43,7 +43,7 @@ import com.sun.star.wizards.ui.TitlesComponent;
public class QueryWizard extends DatabaseObjectWizard
{
-
+ public static final String SFILLUPFIELDSLISTBOX = "fillUpFieldsListbox";
private static final int SOFIELDSELECTION_PAGE = 1;
private static final int SOSORTING_PAGE = 2;
private static final int SOFILTER_PAGE = 3;
@@ -107,7 +107,7 @@ public class QueryWizard extends DatabaseObjectWizard
},
new Object[]
{
- 210, Boolean.TRUE, "DialogQuery", 102, 41, 1, Short.valueOf((short) 0), resQueryWizard, 310
+ 210, Boolean.TRUE, "DialogQuery", 102, 41, 1, new Short((short) 0), resQueryWizard, 310
});
drawNaviBar();
setRightPaneHeaders(m_oResource, UIConsts.RID_QUERY + 70, 8);
@@ -139,7 +139,7 @@ public class QueryWizard extends DatabaseObjectWizard
return m_createdQuery;
}
- private void enableRoadmapItems(boolean _bEnabled)
+ public void enableRoadmapItems(String[] _FieldNames, boolean _bEnabled)
{
try
{
@@ -190,7 +190,7 @@ public class QueryWizard extends DatabaseObjectWizard
}
}
- private void insertQueryRelatedSteps()
+ public void insertQueryRelatedSteps()
{
try
{
@@ -221,7 +221,7 @@ public class QueryWizard extends DatabaseObjectWizard
}
}
- private void buildSteps()
+ public void buildSteps()
{
try
{
@@ -254,7 +254,6 @@ public class QueryWizard extends DatabaseObjectWizard
}
}
- @Override
public boolean finishWizard()
{
int ncurStep = getCurrentStep();
@@ -272,7 +271,6 @@ public class QueryWizard extends DatabaseObjectWizard
return false;
}
- @Override
protected void enterStep(int nOldStep, int nNewStep)
{
try
@@ -320,14 +318,13 @@ public class QueryWizard extends DatabaseObjectWizard
}
}
- @Override
protected void leaveStep(int nOldStep, int nNewStep)
{
switch (nOldStep)
{
case SOFIELDSELECTION_PAGE:
m_DBMetaData.reorderFieldColumns(m_DBCommandFieldSelectio.getSelectedFieldNames());
- m_DBMetaData.initializeFieldTitleSet();
+ m_DBMetaData.initializeFieldTitleSet(true);
m_DBMetaData.setNumericFields();
searchForOutdatedFields();
break;
@@ -390,13 +387,13 @@ public class QueryWizard extends DatabaseObjectWizard
boolean bEnabled = NewItems.length > 0;
setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, bEnabled);
setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, bEnabled);
- enableRoadmapItems(bEnabled); // Note: Performancewise this could be improved
+ enableRoadmapItems(NewItems, bEnabled); // Note: Performancewise this could be improved
}
- private class FieldSelectionListener implements com.sun.star.wizards.ui.XFieldSelectionListener
+ public class FieldSelectionListener implements com.sun.star.wizards.ui.XFieldSelectionListener
{
- private int ID;
+ protected int ID;
public int getID()
{