diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-08 12:44:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-13 08:49:23 +0200 |
commit | 68cd011c907d00493bf2bfde531c1e244819596b (patch) | |
tree | 0225318c908b00faaa701a19aaf7aa567c3582a0 /wizards | |
parent | java: reduce scope, make member classes private (diff) | |
download | core-68cd011c907d00493bf2bfde531c1e244819596b.tar.gz core-68cd011c907d00493bf2bfde531c1e244819596b.zip |
java: reduce scope, make some methods private
found by UCDetector
Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
Diffstat (limited to 'wizards')
60 files changed, 233 insertions, 233 deletions
diff --git a/wizards/com/sun/star/wizards/common/Configuration.java b/wizards/com/sun/star/wizards/common/Configuration.java index c61810dee083..ab774d787e2e 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.java +++ b/wizards/com/sun/star/wizards/common/Configuration.java @@ -196,7 +196,7 @@ public abstract class Configuration } } - public static String getLocaleString(XMultiServiceFactory xMSF, String root, String key) + private static String getLocaleString(XMultiServiceFactory xMSF, String root, String key) { String sLocale = PropertyNames.EMPTY_STRING; try @@ -215,7 +215,7 @@ public abstract class Configuration return sLocale; } - public static Locale getLocale(XMultiServiceFactory xMSF, String root, String key) + private static Locale getLocale(XMultiServiceFactory xMSF, String root, String key) { Locale aLocLocale = new Locale(); String sLocale = getLocaleString(xMSF, root, key); @@ -382,7 +382,7 @@ public abstract class Configuration return getChildNodebyDisplayName(_xNameAccessNode, _displayname, PropertyNames.PROPERTY_NAME); } - public static XNameAccess getChildNodebyDisplayName(XNameAccess _xNameAccessNode, String _displayname, String _nodename) + private static XNameAccess getChildNodebyDisplayName(XNameAccess _xNameAccessNode, String _displayname, String _nodename) { String[] snames = null; try diff --git a/wizards/com/sun/star/wizards/common/Desktop.java b/wizards/com/sun/star/wizards/common/Desktop.java index f6f39533371b..fc6d15866b87 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.java +++ b/wizards/com/sun/star/wizards/common/Desktop.java @@ -80,7 +80,7 @@ public class Desktop return xFrameSuppl.getActiveFrame(); } - public static XComponent getActiveComponent(XMultiServiceFactory _xMSF) + private static XComponent getActiveComponent(XMultiServiceFactory _xMSF) { XFrame xFrame = getActiveFrame(_xMSF); return UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel()); @@ -98,7 +98,7 @@ public class Desktop return UnoRuntime.queryInterface(XSpreadsheetDocument.class, xComponent); } - public static XDispatch getDispatcher(XFrame xFrame, String _stargetframe, com.sun.star.util.URL oURL) + private static XDispatch getDispatcher(XFrame xFrame, String _stargetframe, com.sun.star.util.URL oURL) { try { @@ -114,7 +114,7 @@ public class Desktop return null; } - public static com.sun.star.util.URL getDispatchURL(XMultiServiceFactory xMSF, String _sURL) + private static com.sun.star.util.URL getDispatchURL(XMultiServiceFactory xMSF, String _sURL) { try { @@ -133,7 +133,7 @@ public class Desktop return null; } - public static void dispatchURL(XMultiServiceFactory xMSF, String sURL, XFrame xFrame, String _stargetframe) + private static void dispatchURL(XMultiServiceFactory xMSF, String sURL, XFrame xFrame, String _stargetframe) { com.sun.star.util.URL oURL = getDispatchURL(xMSF, sURL); XDispatch xDispatch = getDispatcher(xFrame, _stargetframe, oURL); @@ -145,13 +145,13 @@ public class Desktop dispatchURL(xMSF, sURL, xFrame, PropertyNames.EMPTY_STRING); } - public static void dispatchURL(XDispatch _xDispatch, com.sun.star.util.URL oURL) + private static void dispatchURL(XDispatch _xDispatch, com.sun.star.util.URL oURL) { PropertyValue[] oArg = new PropertyValue[0]; _xDispatch.dispatch(oURL, oArg); } - public static XMultiComponentFactory getMultiComponentFactory() throws com.sun.star.uno.Exception, RuntimeException, java.lang.Exception + private static XMultiComponentFactory getMultiComponentFactory() throws com.sun.star.uno.Exception, RuntimeException, java.lang.Exception { XComponentContext xcomponentcontext = Bootstrap.createInitialComponentContext(null); // initial serviceManager @@ -188,7 +188,7 @@ public class Desktop return sIncSuffix; } - public static String getIncrementSuffix(XHierarchicalNameAccess xElementContainer, String ElementName) + private static String getIncrementSuffix(XHierarchicalNameAccess xElementContainer, String ElementName) { boolean bElementexists = true; int i = 1; @@ -210,7 +210,7 @@ public class Desktop return sIncSuffix; } - public static int checkforfirstSpecialCharacter(XMultiServiceFactory _xMSF, String _sString, Locale _aLocale) + private static int checkforfirstSpecialCharacter(XMultiServiceFactory _xMSF, String _sString, Locale _aLocale) { try { @@ -353,7 +353,7 @@ public class Desktop } } - public static String getTemplatePath(XMultiServiceFactory _xMSF) + private static String getTemplatePath(XMultiServiceFactory _xMSF) { try { diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java index 106f5bd33346..febdb5612ac8 100644 --- a/wizards/com/sun/star/wizards/common/FileAccess.java +++ b/wizards/com/sun/star/wizards/common/FileAccess.java @@ -75,7 +75,7 @@ public class FileAccess ResultPath += PropertyNames.SEMI_COLON + sAddPath; } - public static String deleteLastSlashfromUrl(String _sPath) + private static String deleteLastSlashfromUrl(String _sPath) { if (_sPath.endsWith("/")) { @@ -361,7 +361,7 @@ public class FileAccess return ReturnPath; } - public static boolean createSubDirectory(XMultiServiceFactory xMSF, XSimpleFileAccess xSimpleFileAccess, String Path) + private static boolean createSubDirectory(XMultiServiceFactory xMSF, XSimpleFileAccess xSimpleFileAccess, String Path) { String sNoDirCreation = PropertyNames.EMPTY_STRING; try @@ -540,7 +540,7 @@ public class FileAccess /** * We search in all given path for a given file */ - public static String addPath(String _sPath, String _sPath2) + private static String addPath(String _sPath, String _sPath2) { String sNewPath; if (!_sPath.endsWith("/")) @@ -718,7 +718,7 @@ public class FileAccess /** * @return the extension of the given filename. */ - public static String getExtension(String filename) + private static String getExtension(String filename) { int p = filename.indexOf("."); if (p == -1) @@ -736,7 +736,7 @@ public class FileAccess return filename; } - public boolean mkdir(String s) + private boolean mkdir(String s) { try { @@ -842,7 +842,7 @@ public class FileAccess return getFilename(path, File.separator); } - public static String getFilename(String path, String pathSeparator) + private static String getFilename(String path, String pathSeparator) { String[] s = JavaTools.ArrayoutofString(path, pathSeparator); return s[s.length - 1]; @@ -919,7 +919,7 @@ public class FileAccess } } - public String getNewFile(String parentDir, String name, String extension) + private String getNewFile(String parentDir, String name, String extension) { int i = 0; diff --git a/wizards/com/sun/star/wizards/common/Helper.java b/wizards/com/sun/star/wizards/common/Helper.java index 798378e7e359..9287bbccea31 100644 --- a/wizards/com/sun/star/wizards/common/Helper.java +++ b/wizards/com/sun/star/wizards/common/Helper.java @@ -270,7 +270,7 @@ public class Helper * @param oValue the parameter that has to represent an object * @return a null reference if the array is empty */ - public static Object getArrayValue(Object oValue) + private static Object getArrayValue(Object oValue) { try { @@ -347,7 +347,7 @@ public class Helper * @param date a VCL date in form of 20041231 * @return a document relative date */ - public synchronized double getDocumentDateAsDouble(int date) + private synchronized double getDocumentDateAsDouble(int date) { calendar.clear(); calendar.set(date / 10000, @@ -362,12 +362,12 @@ public class Helper return (date1 - docNullTime) / DAY_IN_MILLIS + 1; } - public double getDocumentDateAsDouble(DateTime date) + private double getDocumentDateAsDouble(DateTime date) { return getDocumentDateAsDouble(date.Year * 10000 + date.Month * 100 + date.Day); } - public synchronized double getDocumentDateAsDouble(long javaTimeInMillis) + private synchronized double getDocumentDateAsDouble(long javaTimeInMillis) { calendar.clear(); JavaTools.setTimeInMillis(calendar, javaTimeInMillis); diff --git a/wizards/com/sun/star/wizards/common/JavaTools.java b/wizards/com/sun/star/wizards/common/JavaTools.java index 109e0f091837..0c52e9115d52 100644 --- a/wizards/com/sun/star/wizards/common/JavaTools.java +++ b/wizards/com/sun/star/wizards/common/JavaTools.java @@ -372,7 +372,7 @@ public class JavaTools } } - public static String getFilenameOutOfPath(String sPath) + private static String getFilenameOutOfPath(String sPath) { String[] Hierarchy = ArrayoutofString(sPath, "/"); return Hierarchy[Hierarchy.length - 1]; @@ -421,7 +421,7 @@ public class JavaTools return dt; } - public static long getTimeInMillis(Calendar _calendar) + private static long getTimeInMillis(Calendar _calendar) { java.util.Date dDate = _calendar.getTime(); return dDate.getTime(); @@ -591,7 +591,7 @@ public class JavaTools return -1; } - public static boolean isEqual(PropertyValue firstPropValue, PropertyValue secPropValue) + private static boolean isEqual(PropertyValue firstPropValue, PropertyValue secPropValue) { if (!firstPropValue.Name.equals(secPropValue.Name)) { diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java b/wizards/com/sun/star/wizards/common/NumberFormatter.java index b05b7624d39e..273af7def411 100644 --- a/wizards/com/sun/star/wizards/common/NumberFormatter.java +++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java @@ -151,7 +151,7 @@ public class NumberFormatter /** * @return a numberformat for a FormatString. */ - public int defineNumberFormat(String _FormatString, Locale _aLocale) + private int defineNumberFormat(String _FormatString, Locale _aLocale) { try { diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java index 58f53d8f4f0c..95c24a0b061e 100644 --- a/wizards/com/sun/star/wizards/common/NumericalHelper.java +++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java @@ -84,7 +84,7 @@ public class NumericalHelper * @return a byte * @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted */ - public static byte toByte(Object aValue) + private static byte toByte(Object aValue) throws com.sun.star.lang.IllegalArgumentException { @@ -295,7 +295,7 @@ public class NumericalHelper @return true, if the parameter aValue is type of real numbers @deprecate, use isRealNumber() instead. */ - public static boolean isNumerical(Object aValue) + private static boolean isNumerical(Object aValue) { try { @@ -335,7 +335,7 @@ public class NumericalHelper @param aValue a object this can contain anything * @return true, if the value is type of any integer values. double / float are not(!) integer values */ - public static boolean isInteger(Object aValue) throws com.sun.star.lang.IllegalArgumentException + private static boolean isInteger(Object aValue) throws com.sun.star.lang.IllegalArgumentException { TypeObject aTypeObject = getTypeObject(aValue); switch (aTypeObject.iType) @@ -449,7 +449,7 @@ public class NumericalHelper * @return a long * @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted */ - public static long toLong(Object aValue) + private static long toLong(Object aValue) throws com.sun.star.lang.IllegalArgumentException { long retValue = 0; @@ -504,7 +504,7 @@ public class NumericalHelper * @return a float * @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted */ - public static float toFloat(Object aValue) + private static float toFloat(Object aValue) throws com.sun.star.lang.IllegalArgumentException { float retValue = (float) 0.0; @@ -614,7 +614,7 @@ public class NumericalHelper * @return a String * @throws com.sun.star.lang.IllegalArgumentException if the object cannot be converted */ - public static String toString(Object aValue) + private static String toString(Object aValue) throws com.sun.star.lang.IllegalArgumentException { String retValue = null; @@ -718,7 +718,7 @@ public class NumericalHelper * @param anArrayValue a value that is constructed into an array * @return an integer array */ - public static int[] toIntArray(Object anArrayValue) + private static int[] toIntArray(Object anArrayValue) throws com.sun.star.lang.IllegalArgumentException { int[] retValue = null; @@ -747,7 +747,7 @@ public class NumericalHelper * @param anArrayValue a value that is constructed into an array * @return a byte array */ - public static byte[] toByteArray(Object anArrayValue) + private static byte[] toByteArray(Object anArrayValue) throws com.sun.star.lang.IllegalArgumentException { byte[] retValue = null; @@ -776,7 +776,7 @@ public class NumericalHelper * @param anArrayValue a value that is constructed into an array * @return a short array */ - public static short[] toShortArray(Object anArrayValue) + private static short[] toShortArray(Object anArrayValue) throws com.sun.star.lang.IllegalArgumentException { short[] retValue = null; @@ -805,7 +805,7 @@ public class NumericalHelper * @param anArrayValue a value that is constructed into an array * @return a short array */ - public static String[] toStringArray(Object anArrayValue) + private static String[] toStringArray(Object anArrayValue) throws com.sun.star.lang.IllegalArgumentException { String[] retValue = null; @@ -1134,7 +1134,7 @@ public class NumericalHelper * @return * @throws com.sun.star.lang.IllegalArgumentException */ - static int getInt(TypeObject typeObject) + private static int getInt(TypeObject typeObject) throws com.sun.star.lang.IllegalArgumentException { if (typeObject.iType != INT_TYPE) @@ -1149,7 +1149,7 @@ public class NumericalHelper * get the simple float type * @throws com.sun.star.lang.IllegalArgumentException */ - static float getFloat(TypeObject typeObject) + private static float getFloat(TypeObject typeObject) throws com.sun.star.lang.IllegalArgumentException { if (typeObject.iType != FLOAT_TYPE) @@ -1348,7 +1348,7 @@ public class NumericalHelper return roundDouble(_Dblvalue.doubleValue(), _ndecimals); } - public static double roundDouble(double _dblvalue, int _ndecimals) + private static double roundDouble(double _dblvalue, int _ndecimals) { double dblfactor = java.lang.Math.pow(10.0, _ndecimals); return ((int) (_dblvalue * dblfactor)) / dblfactor; diff --git a/wizards/com/sun/star/wizards/common/ParaStyled.java b/wizards/com/sun/star/wizards/common/ParaStyled.java index 31d7327ca320..48ba18f7e625 100644 --- a/wizards/com/sun/star/wizards/common/ParaStyled.java +++ b/wizards/com/sun/star/wizards/common/ParaStyled.java @@ -32,7 +32,7 @@ class ParaStyled implements TemplateElement paraStyle = paraStyle_; } - void format(Object textRange) + private void format(Object textRange) { XText o; o = UnoRuntime.queryInterface(XText.class, textRange); diff --git a/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java b/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java index ea0a84cbd983..e9aa2f42c858 100644 --- a/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java +++ b/wizards/com/sun/star/wizards/common/PlaceholderTextElement.java @@ -69,7 +69,7 @@ public class PlaceholderTextElement extends TextElement } } - public static XTextContent createPlaceHolder(XMultiServiceFactory xmsf, String ph, String hint) + private static XTextContent createPlaceHolder(XMultiServiceFactory xmsf, String ph, String hint) { Object placeHolder; try diff --git a/wizards/com/sun/star/wizards/common/Properties.java b/wizards/com/sun/star/wizards/common/Properties.java index 4c4a69df044e..ee098842e2ac 100644 --- a/wizards/com/sun/star/wizards/common/Properties.java +++ b/wizards/com/sun/star/wizards/common/Properties.java @@ -64,7 +64,7 @@ public class Properties extends HashMap<String,Object> return getProperties(this); } - public static PropertyValue[] getProperties(Map<String,Object> map) + private static PropertyValue[] getProperties(Map<String,Object> map) { PropertyValue[] pv = new PropertyValue[map.size()]; @@ -76,7 +76,7 @@ public class Properties extends HashMap<String,Object> return pv; } - public static PropertyValue createProperty(String name, Map<String,Object> map) + private static PropertyValue createProperty(String name, Map<String,Object> map) { return createProperty(name, map.get(name)); } diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.java b/wizards/com/sun/star/wizards/common/PropertySetHelper.java index 304b6e58b1bc..f319000cd9c9 100644 --- a/wizards/com/sun/star/wizards/common/PropertySetHelper.java +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.java @@ -72,7 +72,7 @@ public class PropertySetHelper @param _sName name of the property to set @param _aValue property value as object */ - public void setPropertyValue(String _sName, Object _aValue) throws java.lang.Exception + private void setPropertyValue(String _sName, Object _aValue) throws java.lang.Exception { if (m_xPropertySet != null) { @@ -351,7 +351,7 @@ public class PropertySetHelper /** Debug helper, to show all properties which are available in the current object. */ - public void showProperties() + private void showProperties() { String sName = PropertyNames.EMPTY_STRING; diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.java b/wizards/com/sun/star/wizards/common/SystemDialog.java index 5e03edb45126..cf744fe779c5 100644 --- a/wizards/com/sun/star/wizards/common/SystemDialog.java +++ b/wizards/com/sun/star/wizards/common/SystemDialog.java @@ -128,7 +128,7 @@ public class SystemDialog * * given url to a local path. */ - public String callStoreDialog(String displayDir, String defaultName) + private String callStoreDialog(String displayDir, String defaultName) { sStorePath = null; try @@ -197,7 +197,7 @@ public class SystemDialog } //("writer_StarOffice_XML_Writer_Template") 'StarOffice XML (Writer) - public void addFilterToDialog(String sExtension, String filterName, boolean setToDefault) + private void addFilterToDialog(String sExtension, String filterName, boolean setToDefault) { try { @@ -214,7 +214,7 @@ public class SystemDialog } } - public void addFilter(String uiName, String pattern, boolean setToDefault) + private void addFilter(String uiName, String pattern, boolean setToDefault) { try { @@ -373,7 +373,7 @@ public class SystemDialog return iMessage; } - public static XStringSubstitution createStringSubstitution(XMultiServiceFactory xMSF) + private static XStringSubstitution createStringSubstitution(XMultiServiceFactory xMSF) { Object xPathSubst = null; try diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 973345a7a882..304f4d610c4b 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -359,7 +359,7 @@ public class CommandMetaData extends DBMetaData CommandType = _commandType; } - public boolean isnumeric(FieldColumn _oFieldColumn) + private boolean isnumeric(FieldColumn _oFieldColumn) { try { @@ -652,7 +652,7 @@ public class CommandMetaData extends DBMetaData return skeycolumnnames; } - public void setCommandComposingAttributes() + private void setCommandComposingAttributes() { try { diff --git a/wizards/com/sun/star/wizards/db/CommandName.java b/wizards/com/sun/star/wizards/db/CommandName.java index 5dda8ef4f3aa..161af0457c6c 100644 --- a/wizards/com/sun/star/wizards/db/CommandName.java +++ b/wizards/com/sun/star/wizards/db/CommandName.java @@ -131,7 +131,7 @@ public class CommandName } } - public void setComposedCommandName() + private void setComposedCommandName() { if (this.setMetaDataAttributes()) { @@ -186,7 +186,7 @@ public class CommandName } } - public String quoteName(String _sName) + private String quoteName(String _sName) { if (baddQuotation) { diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index 4204ebcc48f8..980221dba203 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -567,7 +567,7 @@ public class DBMetaData } } - public void getDataSourceInterfaces() throws Exception + private void getDataSourceInterfaces() throws Exception { xDataSourcePropertySet = UnoRuntime.queryInterface( XPropertySet.class, getDataSource() ); bPasswordIsRequired = ((Boolean) xDataSourcePropertySet.getPropertyValue("IsPasswordRequired")).booleanValue(); @@ -785,7 +785,7 @@ public class DBMetaData return supportsPrimaryKeys; } - public boolean supportsCoreSQLGrammar() + private boolean supportsCoreSQLGrammar() { try { @@ -909,7 +909,7 @@ public class DBMetaData * the document may not be open * @param i_createTemplate describes the type of the document: "form" or "report" */ - public void addDatabaseDocument(XComponent _xComponent, XHierarchicalNameAccess _xDocNameAccess, boolean i_createTemplate) + private void addDatabaseDocument(XComponent _xComponent, XHierarchicalNameAccess _xDocNameAccess, boolean i_createTemplate) { try { diff --git a/wizards/com/sun/star/wizards/db/FieldColumn.java b/wizards/com/sun/star/wizards/db/FieldColumn.java index b153908df7f0..a2c0b090359a 100644 --- a/wizards/com/sun/star/wizards/db/FieldColumn.java +++ b/wizards/com/sun/star/wizards/db/FieldColumn.java @@ -386,7 +386,7 @@ public class FieldColumn } } - public void initDefaultValue() + private void initDefaultValue() { switch (getFieldType()) { diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index 946bf8838db4..4f8cb8994e14 100644 --- a/wizards/com/sun/star/wizards/db/RecordParser.java +++ b/wizards/com/sun/star/wizards/db/RecordParser.java @@ -125,7 +125,7 @@ public class RecordParser extends QueryMetaData return Any.VOID; } - public Object getColumnValue(int ColIndex, int iType) + private Object getColumnValue(int ColIndex, int iType) { Object oAny = Any.VOID; switch (iType) diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 16abe115d3fa..7cdc8678b8d2 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -109,7 +109,7 @@ public class SQLQueryComposer return sSelectClause; } - public String getAliasFieldNameClause(String _FieldName) + private String getAliasFieldNameClause(String _FieldName) { String FieldTitle = CurDBMetaData.getFieldTitle(_FieldName); if (!FieldTitle.equals(_FieldName)) @@ -142,7 +142,7 @@ public class SQLQueryComposer prependSortingCriteria(false); } - public void prependSortingCriteria(boolean _baddAliasFieldNames) throws SQLException + private void prependSortingCriteria(boolean _baddAliasFieldNames) throws SQLException { XIndexAccess xColumnIndexAccess = m_xQueryAnalyzer.getOrderColumns(); m_queryComposer.setOrder(""); @@ -183,7 +183,7 @@ public class SQLQueryComposer m_queryComposer.appendOrderByColumn(xColumn, bascend); } - public void appendSortingcriteria(boolean _baddAliasFieldNames) throws SQLException + private void appendSortingcriteria(boolean _baddAliasFieldNames) throws SQLException { String sOrder = ""; m_queryComposer.setOrder(""); @@ -212,7 +212,7 @@ public class SQLQueryComposer sOrder = m_queryComposer.getOrder(); } - public void appendGroupByColumns(boolean _baddAliasFieldNames) throws SQLException + private void appendGroupByColumns(boolean _baddAliasFieldNames) throws SQLException { for (int i = 0; i < CurDBMetaData.GroupFieldNames.length; i++) { @@ -280,12 +280,12 @@ public class SQLQueryComposer return setQueryCommand(_xParentWindow, _bincludeGrouping, _baddAliasFieldNames, true); } - public boolean setQueryCommand(XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames, boolean addQuery) + private boolean setQueryCommand(XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames, boolean addQuery) { return setQueryCommand(_xParentWindow, _bincludeGrouping, _baddAliasFieldNames, addQuery, false); } - public boolean setQueryCommand(XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames, boolean addQuery, boolean prependSortingCriteria) + private boolean setQueryCommand(XWindow _xParentWindow, boolean _bincludeGrouping, boolean _baddAliasFieldNames, boolean addQuery, boolean prependSortingCriteria) { try { @@ -362,7 +362,7 @@ public class SQLQueryComposer return null; } - public CommandName getComposedCommandByDisplayName(String _DisplayName) + private CommandName getComposedCommandByDisplayName(String _DisplayName) { if (composedCommandNames != null) { @@ -377,7 +377,7 @@ public class SQLQueryComposer return null; } - public String getuniqueAliasName(String _TableName) + private String getuniqueAliasName(String _TableName) { int a = 0; String AliasName = ""; @@ -404,7 +404,7 @@ public class SQLQueryComposer return CommandName.quoteName(_sname, CurDBMetaData.getIdentifierQuote()); } - public void displaySQLErrorDialog(Exception _exception, XWindow _xParentWindow) + private void displaySQLErrorDialog(Exception _exception, XWindow _xParentWindow) { try { diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index 7de631020ced..db77203b62c6 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -137,7 +137,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen } } - public boolean createPrimaryKeys(String[] _fieldnames, boolean _bAutoincrementation) + private boolean createPrimaryKeys(String[] _fieldnames, boolean _bAutoincrementation) { try { @@ -203,7 +203,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen return false; } - public boolean isColunnNameDuplicate(XNameAccess _xColumns, XPropertySet _xToBeAppendedPropertySet) + private boolean isColunnNameDuplicate(XNameAccess _xColumns, XPropertySet _xToBeAppendedPropertySet) { try { @@ -384,7 +384,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen } } - public boolean modifyColumn(String _sname, String _spropname, Object _oValue) + private boolean modifyColumn(String _sname, String _spropname, Object _oValue) { try { @@ -667,7 +667,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen return false; } - public XPropertySet addPrimaryKeyColumn(String _columnname) + private XPropertySet addPrimaryKeyColumn(String _columnname) { try { @@ -793,7 +793,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { } - public boolean appendTableNameToFilter(String _scomposedtablename) + private boolean appendTableNameToFilter(String _scomposedtablename) { boolean bhastoinsert = true; for (int i = 0; i < sTableFilters.length; i++) diff --git a/wizards/com/sun/star/wizards/db/TypeInspector.java b/wizards/com/sun/star/wizards/db/TypeInspector.java index fa08c1737e93..b0dbda221857 100644 --- a/wizards/com/sun/star/wizards/db/TypeInspector.java +++ b/wizards/com/sun/star/wizards/db/TypeInspector.java @@ -242,7 +242,7 @@ public class TypeInspector return -1; } - public boolean supportsDataType(int _curDataType) + private boolean supportsDataType(int _curDataType) { return (JavaTools.FieldInIntTable(nDataTypeInfos, _curDataType) > -1); } diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java index 3ba66acbff60..1da3b217548b 100644 --- a/wizards/com/sun/star/wizards/document/Control.java +++ b/wizards/com/sun/star/wizards/document/Control.java @@ -83,7 +83,7 @@ public class Control extends Shape createControl(_icontroltype, null, null); } - public void createControl(int _icontroltype, XShapes _xGroupShapes, String _FieldName) + private void createControl(int _icontroltype, XShapes _xGroupShapes, String _FieldName) { try { @@ -117,7 +117,7 @@ public class Control extends Shape } } - public void insertControlInContainer(String _fieldname) + private void insertControlInContainer(String _fieldname) { try { @@ -135,7 +135,7 @@ public class Control extends Shape } } - public String getControlName(String _fieldname) + private String getControlName(String _fieldname) { String controlname = PropertyNames.EMPTY_STRING; switch (getControlType()) @@ -227,7 +227,7 @@ public class Control extends Shape } } - public Size getPreferredSize(String sText) + private Size getPreferredSize(String sText) { try { diff --git a/wizards/com/sun/star/wizards/document/DatabaseControl.java b/wizards/com/sun/star/wizards/document/DatabaseControl.java index 97298e864d25..d896560c8775 100644 --- a/wizards/com/sun/star/wizards/document/DatabaseControl.java +++ b/wizards/com/sun/star/wizards/document/DatabaseControl.java @@ -53,7 +53,7 @@ public class DatabaseControl extends Control createGridColumn(_oGridControl, _curfieldcolumn, _fieldtype, _columntitle); } - protected int getFieldType() + private int getFieldType() { return m_nFieldType; } @@ -183,7 +183,7 @@ public class DatabaseControl extends Control } return m_nLongMax; } - public void setNumericLimits() + private void setNumericLimits() { try { diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java index 72306436c1ca..74d2f54a14dd 100644 --- a/wizards/com/sun/star/wizards/document/FormHandler.java +++ b/wizards/com/sun/star/wizards/document/FormHandler.java @@ -177,7 +177,7 @@ public class FormHandler } } - public void initializeBasicControlValues() + private void initializeBasicControlValues() { Control oLabelControl = new Control(this, SOLABEL, new Point(), new Size()); XDevice xDevice = UnoRuntime.queryInterface(XDevice.class, oLabelControl.xWindowPeer); @@ -192,7 +192,7 @@ public class FormHandler xDrawPage.remove(oTextControl.xShape); } - public ControlData createControlData(int _datatype, int _controltype, String _scontrolservicename, String _gridcolumnname, boolean _bIsTextControl) + private ControlData createControlData(int _datatype, int _controltype, String _scontrolservicename, String _gridcolumnname, boolean _bIsTextControl) { ControlData curControlData = new ControlData(); curControlData.DataType = _datatype; @@ -247,7 +247,7 @@ public class FormHandler } } - public boolean hasFormByName(String _FormName) + private boolean hasFormByName(String _FormName) { xNamedFormContainer = getDocumentForms(); xNamedForms = UnoRuntime.queryInterface(XNameAccess.class, xNamedFormContainer); @@ -305,7 +305,7 @@ public class FormHandler } } - public boolean belongsToForm(Object _oDrawPageElement, String _FormName) + private boolean belongsToForm(Object _oDrawPageElement, String _FormName) { XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, _oDrawPageElement); if (xServiceInfo.supportsService("com.sun.star.drawing.ControlShape")) @@ -359,7 +359,7 @@ public class FormHandler return insertFormbyName(_FormName, getDocumentForms()); } - public XNameContainer getFormByName(String _sname) + private XNameContainer getFormByName(String _sname) { XNameContainer xNamedForm = null; try diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.java b/wizards/com/sun/star/wizards/document/OfficeDocument.java index 3d0479cc314a..69051833078e 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.java +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.java @@ -182,7 +182,7 @@ public class OfficeDocument return xFrame; } - public static XFrame createNewPreviewFrame(XMultiServiceFactory xMSF, XTerminateListener listener) + private static XFrame createNewPreviewFrame(XMultiServiceFactory xMSF, XTerminateListener listener) { XToolkit xToolkit = null; try diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index 1159888fae34..170a32bdd197 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -151,7 +151,7 @@ public class FormConfiguration Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bsupportsRelations && (chkcreateSubForm.getState() == 1))); } - public void toggleSteps() + private void toggleSteps() { if (chkcreateSubForm.getState() == 1) { @@ -190,7 +190,7 @@ public class FormConfiguration return PropertyNames.EMPTY_STRING; } - public void onexistingRelationSelection() + private void onexistingRelationSelection() { String scurreferencedTableName = getreferencedTableName(); if (scurreferencedTableName.length() > 0) diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java index 583953e37d77..295a5c6879f8 100644 --- a/wizards/com/sun/star/wizards/form/FormDocument.java +++ b/wizards/com/sun/star/wizards/form/FormDocument.java @@ -266,7 +266,7 @@ public class FormDocument extends TextDocument } } - public ControlForm getControlFormByName(String _sname) + private ControlForm getControlFormByName(String _sname) { for (int i = 0; i < oControlForms.size(); i++) { @@ -539,7 +539,7 @@ public class FormDocument extends TextDocument } } - public void finalizeControls() + private void finalizeControls() { Control[] oLabelControls = getLabelControls(); Control[] oDBControls = getDatabaseControls(); diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java index 661b86eed06b..293b6c8c8965 100644 --- a/wizards/com/sun/star/wizards/form/FormWizard.java +++ b/wizards/com/sun/star/wizards/form/FormWizard.java @@ -220,7 +220,7 @@ public class FormWizard extends DatabaseObjectWizard } } - public void buildSteps() + private void buildSteps() { curDBCommandFieldSelection = new CommandFieldSelection(this, curFormDocument.oMainFormDBMetaData, 92, slblFields, slblSelFields, slblTables, true, 34411); curDBCommandFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); @@ -321,7 +321,7 @@ public class FormWizard extends DatabaseObjectWizard xDialog.endExecute(); } - public void insertFormRelatedSteps() + private void insertFormRelatedSteps() { addRoadmap(); int i = 0; diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 2a8b19a78931..bcb01d7bfea9 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -356,7 +356,7 @@ public class StyleApplier } } - public void applyDBControlProperties(int[] _iStyleColors) + private void applyDBControlProperties(int[] _iStyleColors) { try { diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java index b8048a577eae..7abe24f985bc 100644 --- a/wizards/com/sun/star/wizards/query/QuerySummary.java +++ b/wizards/com/sun/star/wizards/query/QuerySummary.java @@ -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?? - public String combinePartString(int _InitResID, String[] _FieldNames, int _AlternativeResID) + private 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); } - protected String ArrayFieldsToString(int _InitResID, String[] _FieldNames) + private 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); } - public String combinePartString(int _InitResID, String[][] _FieldNames, int _AlternativeResID, int _BaseStringID, String[] _ReplaceTags) + private 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); } - public String ArrayFieldsToString(int _InitResID, String[][] _FieldNames, int _BaseStringID, String[] _ReplaceTags) + private 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 4e9c1ee40a20..008c0510295d 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -139,7 +139,7 @@ public class QueryWizard extends DatabaseObjectWizard return m_createdQuery; } - public void enableRoadmapItems(boolean _bEnabled) + private void enableRoadmapItems(boolean _bEnabled) { try { @@ -190,7 +190,7 @@ public class QueryWizard extends DatabaseObjectWizard } } - public void insertQueryRelatedSteps() + private void insertQueryRelatedSteps() { try { @@ -221,7 +221,7 @@ public class QueryWizard extends DatabaseObjectWizard } } - public void buildSteps() + private void buildSteps() { try { diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 9da1ed770379..09c5f954ca17 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -241,7 +241,7 @@ public class DBColumn replaceValueCellofTable(_bIsLandscape); } - public void insertUserFieldToTableCell(TextFieldHandler oTextFieldHandler) + private void insertUserFieldToTableCell(TextFieldHandler oTextFieldHandler) { XTextCursor xTextCursor = TextDocument.createTextCursor(xNameCell); xTextCursor.gotoStart(false); @@ -293,7 +293,7 @@ public class DBColumn } } - public void modifyCellContent(Object CurGroupValue) + private void modifyCellContent(Object CurGroupValue) { double dblValue = 0; try @@ -345,7 +345,7 @@ public class DBColumn } } // If the parameter CurGroupValue is null the placeholders are inserted - public void replaceValueCellofTable(boolean _bIsLandscape) + private void replaceValueCellofTable(boolean _bIsLandscape) { try { diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index df11132d8371..10e0aa372235 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -64,7 +64,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi CurReportDocument.StopProcess(); } - public void showProgressDisplay(boolean bgetConnection) + private void showProgressDisplay(boolean bgetConnection) { try { @@ -149,7 +149,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi } } - public void importReportData(final XMultiServiceFactory _xMSF, PropertyValue[] _properties) + private void importReportData(final XMultiServiceFactory _xMSF, PropertyValue[] _properties) { if (CurReportDocument.reconnectToDatabase(_xMSF, _properties)) { diff --git a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java index d0e2c1ee0a29..d62fe3f2165d 100644 --- a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java +++ b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java @@ -65,7 +65,7 @@ public class GroupFieldHandler extends FieldSelection } } - public boolean isGroupField(String _FieldName) + private boolean isGroupField(String _FieldName) { return (JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, _FieldName) != -1); } diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index 15f8d4b99b63..599d376a18ed 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -366,7 +366,7 @@ public class ReportLayouter } } - public void clearConstants() + private void clearConstants() { constRangeList.clear(); trTitleconst = null; @@ -385,7 +385,7 @@ public class ReportLayouter te.write(tr); } - public List<XTextRange> searchFillInItems(int type) + private List<XTextRange> searchFillInItems(int type) { try { diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index 67036c7437a2..0cd7b9a5b102 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -216,7 +216,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen m_xDocProps.setTitle(_sTitleName); } - public void getReportPageStyles() + private void getReportPageStyles() { try { @@ -260,7 +260,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } - public boolean loadSectionsfromTemplate(String sTemplateUrl) + private boolean loadSectionsfromTemplate(String sTemplateUrl) { try { @@ -346,7 +346,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } - public void updateTextSections(String[] SelGroupNames) + private void updateTextSections(String[] SelGroupNames) { String TableName; DBColumn OldDBColumn; @@ -364,7 +364,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } - public void replaceFieldValueInGroupTable(DBColumn CurDBColumn, int TableIndex) + private void replaceFieldValueInGroupTable(DBColumn CurDBColumn, int TableIndex) { String TableName = TBLGROUPSECTION + (TableIndex + 1); // Note: for some reason the table might lose its name and has to be renamed therefor @@ -393,7 +393,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } - public void insertColumnstoRecordTable() + private void insertColumnstoRecordTable() { int GroupCount = CurDBMetaData.GroupFieldNames.length; DBColumn CurDBColumn; @@ -478,7 +478,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen DBColumnsVector.remove(iSelItemCount); } - public void removeGroupNamesofRecordTable(int GroupFieldCount) + private void removeGroupNamesofRecordTable(int GroupFieldCount) { int CurFieldCount = DBColumnsVector.size(); if (CurFieldCount > GroupFieldCount) @@ -490,7 +490,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } - public void showCommonReportErrorBox(Exception exception) + private void showCommonReportErrorBox(Exception exception) { String SystemContentPath = JavaTools.convertfromURLNotation(ContentTemplatePath); String sMsgCurCommonReportError = JavaTools.replaceSubString(sMsgCommonReportError, SystemContentPath, "%PATH"); @@ -587,7 +587,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen return null; } - public static FieldColumn[] removeFieldColumnByFieldName(String _FieldName, FieldColumn[] _FieldColumns) + private static FieldColumn[] removeFieldColumnByFieldName(String _FieldName, FieldColumn[] _FieldColumns) { try { diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index da5089f5fe4e..1bb3cc93ac0e 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -70,7 +70,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme * We have to remove this!!! * @return */ - ReportTextDocument getDoc() + private ReportTextDocument getDoc() { if (m_aDoc == null) { @@ -142,7 +142,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme sMsgNoConnection = m_resource.getResText(UIConsts.RID_DB_COMMON + 14); } - public void addTextSectionCopies() + private void addTextSectionCopies() { m_aDoc.setLayoutSectionsVisible(false); XTextCursor xTextCursor = ReportTextDocument.createTextCursor(m_aDoc.xTextDocument.getText()); diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 3798bba8637e..1dc886b437da 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -306,7 +306,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener return bQueryCreated; } - public void buildSteps() + private void buildSteps() { // CurReportDocument.getDoc().xProgressBar.setValue(30); CurDBCommandFieldSelection = new CommandFieldSelection(this, m_reportDocument.getRecordParser(), 100, slblFields, slblSelFields, slblTables, true, 34330); @@ -359,7 +359,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener xDialog.endExecute(); } - public void insertQueryRelatedSteps() + private void insertQueryRelatedSteps() { setRMItemLabels(m_oResource, UIConsts.RID_QUERY + 80); addRoadmap(); @@ -529,7 +529,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener m_reportDocument.getRecordParser().dispose(); } - public boolean getReportResources(boolean bgetProgressResourcesOnly) + private boolean getReportResources(boolean bgetProgressResourcesOnly) { sMsgWizardName = super.m_oResource.getResText(UIConsts.RID_REPORT); if (!bgetProgressResourcesOnly) @@ -561,7 +561,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener return sBlindTextNote; } - public void enableRoadmapItems(boolean _bEnabled) + private void enableRoadmapItems(boolean _bEnabled) { try { diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java index c7c34c68cb06..0524e42c894c 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java @@ -163,7 +163,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter /** * Remove all Groups */ - protected void clearGroups() + private void clearGroups() { final XGroups xGroups = getReportDefinition().getGroups(); while (xGroups.hasElements()) @@ -297,7 +297,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return aUsedStyle; } - protected int getFromPageStyles(String _sStyleName, int _nDefault) + private int getFromPageStyles(String _sStyleName, int _nDefault) { int nValue = _nDefault; final XStyle xStyle = getUsedStyle("PageStyles"); @@ -310,7 +310,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return nValue; } - protected void setToPageStyles(String _sStyleName, Object _aObj) + private void setToPageStyles(String _sStyleName, Object _aObj) { final XStyle xStyle = getUsedStyle("PageStyles"); if (xStyle != null) @@ -381,7 +381,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } - protected int insertGroups() + private int insertGroups() { final XGroups xGroups = getReportDefinition().getGroups(); int lastGroupPosition = -1; @@ -473,7 +473,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } - protected String getTitleFromFieldName(String _sField) + private String getTitleFromFieldName(String _sField) { for (int i = 0; i < m_aFieldNames.length; i++) { @@ -485,7 +485,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return PropertyNames.EMPTY_STRING; } - protected int getTypeFromFieldName(String _sField) + private int getTypeFromFieldName(String _sField) { for (int i = 0; i < m_aFieldNames.length; i++) { @@ -497,7 +497,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return 0; } - protected boolean listContains(String[] _aList, String _aValue) + private boolean listContains(String[] _aList, String _aValue) { for (int i = 0; i < _aList.length; i++) { @@ -516,7 +516,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter * @param _aGetResultFrom * @return */ - protected String[] getNamesWithoutGroupNames(String[] _aList, String[] _aGetResultFrom) + private String[] getNamesWithoutGroupNames(String[] _aList, String[] _aGetResultFrom) { if (_aList == null) { @@ -694,7 +694,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } - protected String convertFromFieldName(String _sName) + private String convertFromFieldName(String _sName) { if (_sName.startsWith("field:[")) { @@ -722,7 +722,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return insertFormattedField(_xSection, _sFormattedfield, _aRect, _nWidth, _aSO, (short) com.sun.star.awt.TextAlign.LEFT); } - protected Rectangle insertFormattedField(XSection _xSection, String _sFormattedfield, Rectangle _aRect, int _nWidth, SectionObject _aSO, short _nAlignment) + private Rectangle insertFormattedField(XSection _xSection, String _sFormattedfield, Rectangle _aRect, int _nWidth, SectionObject _aSO, short _nAlignment) { if (_xSection != null) { @@ -833,7 +833,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } private XMultiServiceFactory m_xMSF; - protected XMultiServiceFactory getMSFofReportDefinition() + private XMultiServiceFactory getMSFofReportDefinition() { if (m_xMSF == null) { @@ -848,12 +848,12 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return insertLine(_xSection, _aRect, _nWidth, _nHeight, 1); } - protected Rectangle insertHorizontalLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight) + private Rectangle insertHorizontalLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight) { return insertLine(_xSection, _aRect, _nWidth, _nHeight, 0); } - protected Rectangle insertLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight, int _nOrientation) + private Rectangle insertLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight, int _nOrientation) { if (_xSection != null) { @@ -883,7 +883,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } - protected void clearReportHeader() + private void clearReportHeader() { XSection xSection; try @@ -900,7 +900,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } } - protected void insertReportHeader() + private void insertReportHeader() { if (getDesignTemplate() != null) { @@ -933,7 +933,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } } - protected void clearReportFooter() + private void clearReportFooter() { XSection xSection; try @@ -950,7 +950,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } } - protected void insertReportFooter() + private void insertReportFooter() { if (getDesignTemplate() != null) { @@ -984,7 +984,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } - protected void clearPageHeader() + private void clearPageHeader() { XSection xSection; try @@ -1001,7 +1001,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } } - protected void clearPageFooter() + private void clearPageFooter() { XSection xSection; try @@ -1053,7 +1053,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter * @param _aFont * @return width of given text in 1/100mm */ - Size getPreferredSize(String _sText, FontDescriptor _aFont) + private Size getPreferredSize(String _sText, FontDescriptor _aFont) { Size aSizeMM_100TH = new Size(0, 0); try @@ -1100,7 +1100,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return aSizeMM_100TH; } - protected String getTableName() + private String getTableName() { if (m_sTableName != null) { @@ -1109,7 +1109,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return PropertyNames.EMPTY_STRING; } - protected String getUserNameFromConfiguration() + private String getUserNameFromConfiguration() { String sFirstName = PropertyNames.EMPTY_STRING; String sLastName = PropertyNames.EMPTY_STRING; @@ -1202,7 +1202,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } } - protected void insertPageHeader() + private void insertPageHeader() { if (getDesignTemplate() != null) { @@ -1303,7 +1303,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter } } - protected void insertPageFooter() + private void insertPageFooter() { if (getDesignTemplate() != null) { @@ -1462,14 +1462,14 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter * @param _sLabel * @return the width in 1/100mm */ - protected int getLabelWidth(String _sLabel) + private int getLabelWidth(String _sLabel) { return getLabelWidth(_sLabel, 0.0f, 0.0f); } private XFixedText m_aFixedTextHelper = null; private HashMap<String, Integer> m_aLabelWidthMap; - protected int getLabelWidth(String _sLabel, FontDescriptor _aFD) + private int getLabelWidth(String _sLabel, FontDescriptor _aFD) { float fCharWeight = 0.0f; float fCharHeight = 0.0f; @@ -1481,7 +1481,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter return getLabelWidth(_sLabel, fCharWeight, fCharHeight); } - protected int getLabelWidth(String _sLabel, float _nCharWeight, float _nCharHeight) + private int getLabelWidth(String _sLabel, float _nCharWeight, float _nCharHeight) { int nWidth = 0; diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java index aeb091300444..6bbc1d0a74e3 100644 --- a/wizards/com/sun/star/wizards/table/FieldFormatter.java +++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java @@ -211,7 +211,7 @@ public class FieldFormatter implements XItemListener CurUnoDialog.setFocus("lstfieldnames"); } - public void toggleButtons() + private void toggleButtons() { boolean benableShiftUpButton = false; boolean benableShiftDownButton = false; @@ -355,7 +355,7 @@ public class FieldFormatter implements XItemListener toggleButtons(); } - public String[] shiftArrayItem(String[] _slist, int _oldindex, int _shiftcount) + private String[] shiftArrayItem(String[] _slist, int _oldindex, int _shiftcount) { int newindex = _oldindex + _shiftcount; if ((newindex >= 0) && (newindex < _slist.length)) diff --git a/wizards/com/sun/star/wizards/table/Finalizer.java b/wizards/com/sun/star/wizards/table/Finalizer.java index 684055f3ee96..162edb2e3599 100644 --- a/wizards/com/sun/star/wizards/table/Finalizer.java +++ b/wizards/com/sun/star/wizards/table/Finalizer.java @@ -344,7 +344,7 @@ public class Finalizer return (txtTableName.getText().length() > 0); } - public void setCompletionFlag() + private void setCompletionFlag() { CurUnoDialog.setcompleted(TableWizard.SOFINALPAGE, iscompleted()); } diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java index e58b5cc2a549..946b71b9e34f 100644 --- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java +++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java @@ -244,7 +244,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener return false; } - public void togglePrimeKeyFields() + private void togglePrimeKeyFields() { boolean bdoEnable = (this.chkcreatePrimaryKey.getState() == 1); Helper.setUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable)); diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index bfa079651e25..458f95612844 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -164,7 +164,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X } } - public void initializeCategory(int _iCategory) + private void initializeCategory(int _iCategory) { try { @@ -180,7 +180,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X } } - public void initializeTable(int _iTable) + private void initializeTable(int _iTable) { Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.SELECTED_ITEMS, new short[] { diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java index 16e90eb59c3c..9431b821872b 100644 --- a/wizards/com/sun/star/wizards/table/TableWizard.java +++ b/wizards/com/sun/star/wizards/table/TableWizard.java @@ -238,7 +238,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener } } */ - public void buildSteps() + private void buildSteps() { curScenarioSelector = new ScenarioSelector(this, this.curTableDescriptor, slblFields, slblSelFields); curFieldFormatter = new FieldFormatter(this); @@ -250,7 +250,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener enableNavigationButtons(false, false, false); } - public boolean createTable() + private boolean createTable() { boolean bIsSuccessfull = true; boolean bTableCreated = false; @@ -343,7 +343,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener xDialog.endExecute(); } - public void insertFormRelatedSteps() + private void insertFormRelatedSteps() { addRoadmap(); int i = 0; diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java index dfc48860a9b3..33739c56b1d5 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.java +++ b/wizards/com/sun/star/wizards/text/TextDocument.java @@ -135,7 +135,7 @@ public class TextDocument private String m_identifier; - protected final String getIdentifier() + private final String getIdentifier() { return m_identifier; } @@ -235,7 +235,7 @@ public class TextDocument xProgressBar.setValue(5); } - public XTextDocument loadAsPreview(String sDefaultTemplate, boolean asTemplate) + private XTextDocument loadAsPreview(String sDefaultTemplate, boolean asTemplate) { PropertyValue loadValues[] = new PropertyValue[3]; // open document in the Preview mode diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java index 8d3bf6f91c2e..d3ab23a51651 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java @@ -57,7 +57,7 @@ public class TextFieldHandler xTextFieldsSupplier = UnoRuntime.queryInterface(XTextFieldsSupplier.class, xTextDocument); } - public void refreshTextFields() + private void refreshTextFields() { XRefreshable xUp = UnoRuntime.queryInterface(XRefreshable.class, xTextFieldsSupplier.getTextFields()); xUp.refresh(); @@ -111,7 +111,7 @@ public class TextFieldHandler } } - public XPropertySet createUserField(String FieldName, String FieldTitle) throws com.sun.star.uno.Exception + private XPropertySet createUserField(String FieldName, String FieldTitle) throws com.sun.star.uno.Exception { Object oMaster = xMSFDoc.createInstance("com.sun.star.text.FieldMaster.User"); XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, oMaster); diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.java b/wizards/com/sun/star/wizards/text/TextSectionHandler.java index 0500e60f6031..44642f5c4f00 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.java +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.java @@ -88,7 +88,7 @@ public class TextSectionHandler } } - public void removeTextSection(Object _oTextSection) + private void removeTextSection(Object _oTextSection) { try { @@ -196,7 +196,7 @@ public class TextSectionHandler } } - public void linkSectiontoTemplate(Object oTextSection, String TemplateName, String SectionName) + private void linkSectiontoTemplate(Object oTextSection, String TemplateName, String SectionName) { SectionFileLink oSectionLink = new SectionFileLink(); oSectionLink.FileURL = TemplateName; @@ -236,7 +236,7 @@ public class TextSectionHandler } } - public void insertTextSection(String sectionName, String templateName, XTextCursor position) + private void insertTextSection(String sectionName, String templateName, XTextCursor position) { try { diff --git a/wizards/com/sun/star/wizards/text/TextTableHandler.java b/wizards/com/sun/star/wizards/text/TextTableHandler.java index c4b40eacdc1e..ad6c2684b393 100644 --- a/wizards/com/sun/star/wizards/text/TextTableHandler.java +++ b/wizards/com/sun/star/wizards/text/TextTableHandler.java @@ -159,7 +159,7 @@ public class TextTableHandler } } - public void removeTextTable(Object oTextTable) + private void removeTextTable(Object oTextTable) { try { diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index 6b78a39d01c2..f6607f47df49 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -232,7 +232,7 @@ public class AggregateComponent extends ControlScroller } } - protected void addRow() + private void addRow() { int fieldcount = super.getTotalFieldCount(); registerControlGroupAtIndex(fieldcount); @@ -254,7 +254,7 @@ public class AggregateComponent extends ControlScroller CurUnoDialog.repaintDialogStep(); } - protected void removeRow() + private void removeRow() { int fieldcount = super.getTotalFieldCount(); if (fieldcount > 0) @@ -274,7 +274,7 @@ public class AggregateComponent extends ControlScroller CurUnoDialog.repaintDialogStep(); } - protected void toggleButtons() + private void toggleButtons() { ControlRow curcontrolrow = null; boolean biscomplete = true; @@ -290,7 +290,7 @@ public class AggregateComponent extends ControlScroller togglefollowingDialogSteps(); } - public void toggleComponent() + private void toggleComponent() { CurDBMetaData.Type = getQueryType(); boolean benableComponent = isAggregateComponentEnabled(); diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index 2bb9d607d536..e6c084a6c7cd 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -192,7 +192,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< } } - public void fillUpFieldsListbox() + private void fillUpFieldsListbox() { try { @@ -330,7 +330,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< toggleCommandListBox(bdoenable); } - public void toggleCommandListBox(boolean _bdoenable) + private void toggleCommandListBox(boolean _bdoenable) { Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable)); Helper.setUnoPropertyValue(UnoDialog.getModel(xlblTable), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bdoenable)); @@ -386,7 +386,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< } } - public void preselectCommand(String _selitem, int _nCommandType, boolean _bReadOnly) + private void preselectCommand(String _selitem, int _nCommandType, boolean _bReadOnly) { if (_selitem.length() > 0) { diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java index 46ffd48cbdd9..171b642efd6e 100644 --- a/wizards/com/sun/star/wizards/ui/ControlScroller.java +++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java @@ -164,7 +164,7 @@ public abstract class ControlScroller } } - protected void fillupControls(boolean binitialize) + private void fillupControls(boolean binitialize) { for (int a = 0; a < this.nblockincrement; a++) { @@ -183,7 +183,7 @@ public abstract class ControlScroller } } - protected void fillupControls(int guiRow) + private void fillupControls(int guiRow) { PropertyValue[] nameProps = scrollfields.get(guiRow); PropertyValue[] valueProps = scrollfields.get(guiRow + nscrollvalue); @@ -200,7 +200,7 @@ public abstract class ControlScroller } } - protected void setScrollValue(int _nscrollvalue) + private void setScrollValue(int _nscrollvalue) { if (_nscrollvalue >= 0) { @@ -329,7 +329,7 @@ public abstract class ControlScroller } } - protected void scrollRowsInfo() + private void scrollRowsInfo() { int cols = scrollfields.size() > 0 @@ -352,7 +352,7 @@ public abstract class ControlScroller * @return the propertyValue object corresponding to * this control. */ - protected PropertyValue fieldInfo(int guiRow, int column) + private PropertyValue fieldInfo(int guiRow, int column) { if (guiRow + nscrollvalue < scrollfields.size()) { @@ -366,7 +366,7 @@ public abstract class ControlScroller } } - protected PropertyValue fieldInfo(PropertyValue valueProp, PropertyValue nameProp) + private PropertyValue fieldInfo(PropertyValue valueProp, PropertyValue nameProp) { if (CurUnoDialog.getDlgNameAccess().hasByName(nameProp.Name)) { @@ -405,7 +405,7 @@ public abstract class ControlScroller return scrollfields.get(_i); } - protected void setControlData(String controlname, Object newvalue) + private void setControlData(String controlname, Object newvalue) { Object oControlModel = UnoDialog.getModel(CurUnoDialog.xDlgContainer.getControl(controlname)); String propertyname = UnoDialog.getDisplayProperty(oControlModel); @@ -415,7 +415,7 @@ public abstract class ControlScroller } } - protected Object getControlData(String controlname) + private Object getControlData(String controlname) { Object oControlModel = UnoDialog.getModel(CurUnoDialog.xDlgContainer.getControl(controlname)); String propertyname = UnoDialog.getDisplayProperty(oControlModel); diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java index fd2ba4bd17c1..cb3576413621 100644 --- a/wizards/com/sun/star/wizards/ui/FieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java @@ -585,7 +585,7 @@ public class FieldSelection } } - public void deselectFields(boolean bMoveAll) + private void deselectFields(boolean bMoveAll) { String SearchString; short iOldFieldSelected = xFieldsListBox.getSelectedItemPos(); diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 364d304cd410..2feef4716a77 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -181,7 +181,7 @@ public class FilterComponent } } - public static String getIndexNumber(String _sStr) + private static String getIndexNumber(String _sStr) { return _sStr.substring(_sStr.length() - 1, _sStr.length()); } @@ -702,7 +702,7 @@ public class FilterComponent * @returns true if the current condition is complete, all needed fields are filled with values. * So we can enable the next. */ - boolean isConditionComplete() + private boolean isConditionComplete() { try { @@ -746,7 +746,7 @@ public class FilterComponent } } - protected void setCondition(PropertyValue _filtercondition) + private void setCondition(PropertyValue _filtercondition) { try { @@ -816,13 +816,13 @@ public class FilterComponent } } - protected void setFieldNames(String[] _FieldNames) + private void setFieldNames(String[] _FieldNames) { Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), PropertyNames.STRING_ITEM_LIST, _FieldNames); FieldNames = _FieldNames; } - protected boolean isEnabled() + private boolean isEnabled() { return m_bEnabled; } @@ -869,7 +869,7 @@ public class FilterComponent } } - protected String getSelectedFieldName() + private String getSelectedFieldName() { try { @@ -885,7 +885,7 @@ public class FilterComponent // TODO: check if it is really useful to match the indices of the listbox the API constants // =, <>, <, >, <=, >=, like, !like, is null, !is null - protected short getSelectedOperator() + private short getSelectedOperator() { try { @@ -924,7 +924,7 @@ public class FilterComponent } // TODO make a difference between Text and Numbers - protected Object getValue() + private Object getValue() { return (Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "EffectiveValue")); } diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index b6f00a0e3f54..ffec486adc4a 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -194,7 +194,7 @@ public class SortingComponent * sets the controls of a Sorting criterion to readonly or not. * @param _index index of the Sorting criterion */ - public void setReadOnly(int _index, boolean _breadonly) + private void setReadOnly(int _index, boolean _breadonly) { CurUnoDialog.setControlProperty("lstSort" + Integer.toString(_index + 1), PropertyNames.READ_ONLY, Boolean.valueOf(_breadonly)); } diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 4d91bbd3d988..8745987e875b 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -109,7 +109,7 @@ public class UnoDialog implements EventNames return iKey; } - public void createPeerConfiguration() + private void createPeerConfiguration() { m_oPeerConfig = new PeerConfig(this); } @@ -387,7 +387,7 @@ public class UnoDialog implements EventNames return insertEditField("com.sun.star.awt.UnoControlFormattedFieldModel", sName, iControlKey, xTextListener, sProperties, sValues); } - public XTextComponent insertEditField(String ServiceName, String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues) + private XTextComponent insertEditField(String ServiceName, String sName, int iControlKey, XTextListener xTextListener, String[] sProperties, Object[] sValues) { try { @@ -794,7 +794,7 @@ public class UnoDialog implements EventNames setEnabled(control, enabled ? Boolean.TRUE : Boolean.FALSE); } - public static void setEnabled(Object control, Boolean enabled) + private static void setEnabled(Object control, Boolean enabled) { Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled); } @@ -803,7 +803,7 @@ public class UnoDialog implements EventNames * @param oControlModel the model of a control * @return the LabelType according to UIConsts.CONTROLTYPE */ - public static int getControlModelType(Object oControlModel) + private static int getControlModelType(Object oControlModel) { XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, oControlModel); if (xServiceInfo.supportsService("com.sun.star.awt.UnoControlFixedTextModel")) @@ -898,7 +898,7 @@ public class UnoDialog implements EventNames * @param itype The type of the control conforming to UIConst.ControlType * @return the name of the property that contains the value of a controlmodel */ - public static String getDisplayProperty(int itype) + private static String getDisplayProperty(int itype) { switch (itype) { @@ -988,20 +988,20 @@ public class UnoDialog implements EventNames } } - public static int getRedColorShare(int _nColor) + private static int getRedColorShare(int _nColor) { int nRed = _nColor / 65536; return nRed; } - public static int getGreenColorShare(int _nColor) + private static int getGreenColorShare(int _nColor) { int nRedModulo = _nColor % 65536; int nGreen = nRedModulo / 256; return nGreen; } - public static int getBlueColorShare(int _nColor) + private static int getBlueColorShare(int _nColor) { int nRedModulo = _nColor % 65536; int nGreenModulo = (nRedModulo % 256); diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index 25d4766c5e8d..9d0d65badc4a 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -42,7 +42,7 @@ public class UnoDialog2 extends UnoDialog * Override this method to return another listener. * @return */ - protected AbstractListener createListener() + private AbstractListener createListener() { return new CommonListener(); } @@ -105,7 +105,7 @@ public class UnoDialog2 extends UnoDialog return insertCheckBox(sName, itemChanged, this, sPropNames, oPropValues); } - public XComboBox insertComboBox(String sName, String actionPerformed, String itemChanged, String textChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) + private XComboBox insertComboBox(String sName, String actionPerformed, String itemChanged, String textChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) { XComboBox xComboBox = (XComboBox) insertControlModel2("com.sun.star.awt.UnoControlComboBoxModel", sName, sPropNames, oPropValues, XComboBox.class); if (actionPerformed != null) @@ -220,7 +220,7 @@ public class UnoDialog2 extends UnoDialog return UnoRuntime.queryInterface(type, xField); } - public XControl insertFileControl(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) + private XControl insertFileControl(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) { return (XControl) insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlFileControlModel", sPropNames, oPropValues, XControl.class); } @@ -230,7 +230,7 @@ public class UnoDialog2 extends UnoDialog return insertFileControl(sName, sTextChanged, this, sPropNames, oPropValues); } - public XCurrencyField insertCurrencyField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) + private XCurrencyField insertCurrencyField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) { return (XCurrencyField) insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlCurrencyFieldModel", sPropNames, oPropValues, XCurrencyField.class); } @@ -240,7 +240,7 @@ public class UnoDialog2 extends UnoDialog return insertCurrencyField(sName, sTextChanged, this, sPropNames, oPropValues); } - public XDateField insertDateField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) + private XDateField insertDateField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) { return (XDateField) insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlDateFieldModel", sPropNames, oPropValues, XDateField.class); } @@ -250,7 +250,7 @@ public class UnoDialog2 extends UnoDialog return insertDateField(sName, sTextChanged, this, sPropNames, oPropValues); } - public XNumericField insertNumericField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) + private XNumericField insertNumericField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) { return (XNumericField) insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlNumericFieldModel", sPropNames, oPropValues, XNumericField.class); } @@ -260,7 +260,7 @@ public class UnoDialog2 extends UnoDialog return insertNumericField(sName, sTextChanged, this, sPropNames, oPropValues); } - public XTimeField insertTimeField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) + private XTimeField insertTimeField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) { return (XTimeField) insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlTimeFieldModel", sPropNames, oPropValues, XTimeField.class); } @@ -270,7 +270,7 @@ public class UnoDialog2 extends UnoDialog return insertTimeField(sName, sTextChanged, this, sPropNames, oPropValues); } - public XPatternField insertPatternField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) + private XPatternField insertPatternField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) { return (XPatternField) insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlPatternFieldModel", sPropNames, oPropValues, XPatternField.class); } @@ -280,7 +280,7 @@ public class UnoDialog2 extends UnoDialog return insertPatternField(sName, sTextChanged, this, sPropNames, oPropValues); } - public XTextComponent insertFormattedField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) + private XTextComponent insertFormattedField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) { return (XTextComponent) insertEditField(sName, sTextChanged, eventTarget, "com.sun.star.awt.UnoControlFormattedFieldModel", sPropNames, oPropValues, XTextComponent.class); } @@ -314,7 +314,7 @@ public class UnoDialog2 extends UnoDialog return UnoRuntime.queryInterface(XControl.class, oGroupBox); } - public Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues) + private Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues) { try { @@ -333,7 +333,7 @@ public class UnoDialog2 extends UnoDialog return xDlgContainer.getControl(componentName); } - public Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues, Class<? extends XInterface> type) + private Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues, Class<? extends XInterface> type) { return UnoRuntime.queryInterface(type, insertControlModel2(serviceName, componentName, sPropNames, oPropValues)); } diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index c014dfa605d1..a927ebb39964 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -91,7 +91,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL return oWizardResource; } - public void activate() + private void activate() { try { @@ -366,7 +366,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL abstract protected void enterStep(int nOldStep, int nNewStep); - protected void changeToStep(int nNewStep) + private void changeToStep(int nNewStep) { Helper.setUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP, new Integer(nNewStep)); setCurrentRoadmapItemID((short) (nNewStep)); @@ -522,7 +522,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL enableFinishButton(_bEnableFinish); } - public void enableBackButton(boolean enabled) + private void enableBackButton(boolean enabled) { setControlProperty("btnWizardBack", PropertyNames.PROPERTY_ENABLED, enabled ? Boolean.TRUE : Boolean.FALSE); } @@ -566,7 +566,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL } } - public boolean isStepEnabled(int _nStep) + private boolean isStepEnabled(int _nStep) { try { @@ -612,7 +612,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL } //TODO discuss with rp - protected int getNextAvailableStep() + private int getNextAvailableStep() { if (isRoadmapComplete()) { @@ -721,7 +721,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL //should be overwritten by extending class } - public void removeTerminateListener() + private void removeTerminateListener() { if (bTerminateListenermustberemoved) { @@ -736,7 +736,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL * if this method was not called before, * perform a cancel. */ - public void cancelWizard_1() + private void cancelWizard_1() { cancelWizard(); removeTerminateListener(); diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java index 132e0cbf22f8..295bcab56e14 100644 --- a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java +++ b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java @@ -65,7 +65,7 @@ public class AbstractListener mHashtable.put(componentName + eventName, mi); } - public MethodInvocation get(String componentName, String eventName) + private MethodInvocation get(String componentName, String eventName) { return mHashtable.get(componentName + eventName); } diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java index 1ba8db1a13f7..10d7d58fe147 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java @@ -71,7 +71,7 @@ public abstract class DataAware { * @param obj the new data object. * @param updateUI if true updateUI() will be called. */ - public void setDataObject(Object obj, boolean updateUI) { + private void setDataObject(Object obj, boolean updateUI) { if (obj != null && !value.isAssignable(obj.getClass())) throw new ClassCastException("can not cast new DataObject to original Class"); @@ -90,7 +90,7 @@ public abstract class DataAware { * another kind of Data is needed. * @param newValue the new value to set to the DataObject. */ - protected void setToData(Object newValue) { + private void setToData(Object newValue) { value.set(newValue,getDataObject()); } @@ -100,7 +100,7 @@ public abstract class DataAware { * the value object. * @return the current value of the data object. */ - protected Object getFromData() { + private Object getFromData() { return value.get(getDataObject()); } @@ -120,7 +120,7 @@ public abstract class DataAware { * updates the UI control according to the * current state of the data object. */ - public void updateUI() { + private void updateUI() { Object data = getFromData(); Object ui = getFromUI(); if (!equals(data, ui)) @@ -164,7 +164,7 @@ public abstract class DataAware { * @param b second object to compare. * @return true if both are null or both are equal. */ - protected boolean equals(Object a, Object b) { + private boolean equals(Object a, Object b) { if (a == null && b == null) return true; if (a == null || b == null) @@ -273,7 +273,7 @@ public abstract class DataAware { * @param obj the object which contains the property. * @return the get method reflection object. */ - protected Method createGetMethod(String propName, Object obj) + private Method createGetMethod(String propName, Object obj) { Method m = null; try @@ -311,7 +311,7 @@ public abstract class DataAware { return null; } - protected Method createSetMethod(String propName, Object obj, Class<?> paramClass) { + private Method createSetMethod(String propName, Object obj, Class<?> paramClass) { Method m = null; try { m = obj.getClass().getMethod("set" + propName, paramClass); diff --git a/wizards/com/sun/star/wizards/ui/event/Task.java b/wizards/com/sun/star/wizards/ui/event/Task.java index b142e2444094..c0440ee5d74c 100644 --- a/wizards/com/sun/star/wizards/ui/event/Task.java +++ b/wizards/com/sun/star/wizards/ui/event/Task.java @@ -58,7 +58,7 @@ public class Task fireTaskStatusChanged(); } - public void advance(boolean success_) + private void advance(boolean success_) { if (success_) { @@ -96,7 +96,7 @@ public class Task listeners.remove(tl); } - protected void fireTaskStatusChanged() + private void fireTaskStatusChanged() { TaskEvent te = new TaskEvent(this, TaskEvent.TASK_STATUS_CHANGED); @@ -106,7 +106,7 @@ public class Task } } - protected void fireTaskStarted() + private void fireTaskStarted() { TaskEvent te = new TaskEvent(this, TaskEvent.TASK_STARTED); @@ -116,7 +116,7 @@ public class Task } } - protected void fireTaskFailed() + private void fireTaskFailed() { TaskEvent te = new TaskEvent(this, TaskEvent.TASK_FAILED); @@ -126,7 +126,7 @@ public class Task } } - protected void fireTaskFinished() + private void fireTaskFinished() { TaskEvent te = new TaskEvent(this, TaskEvent.TASK_FINISHED); @@ -136,7 +136,7 @@ public class Task } } - protected void fireSubtaskNameChanged() + private void fireSubtaskNameChanged() { TaskEvent te = new TaskEvent(this, TaskEvent.SUBTASK_NAME_CHANGED); diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java index 779c02122900..8130fc5c8d76 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java @@ -84,7 +84,7 @@ public class UnoDataAware extends DataAware * @param value * @return */ - protected Boolean getBoolean(Object value) + private Boolean getBoolean(Object value) { if (value == null) { @@ -232,7 +232,7 @@ public class UnoDataAware extends DataAware setEnabled(control, enabled ? Boolean.TRUE : Boolean.FALSE); } - public static void setEnabled(Object control, Boolean enabled) + private static void setEnabled(Object control, Boolean enabled) { Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled); } |