summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/util
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-08 12:44:57 +0200
committerNoel Grandin <noel@peralex.com>2014-08-13 08:49:23 +0200
commit68cd011c907d00493bf2bfde531c1e244819596b (patch)
tree0225318c908b00faaa701a19aaf7aa567c3582a0 /qadevOOo/runner/util
parent70f56bc22fe952c75ec714e05e1bb5296491a36a (diff)
java: reduce scope, make some methods private
found by UCDetector Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
Diffstat (limited to 'qadevOOo/runner/util')
-rw-r--r--qadevOOo/runner/util/AccessibilityTools.java6
-rw-r--r--qadevOOo/runner/util/CalcTools.java2
-rw-r--r--qadevOOo/runner/util/DBTools.java16
-rw-r--r--qadevOOo/runner/util/DesktopTools.java4
-rw-r--r--qadevOOo/runner/util/DrawTools.java2
-rw-r--r--qadevOOo/runner/util/DynamicClassLoader.java2
-rw-r--r--qadevOOo/runner/util/FormTools.java2
-rw-r--r--qadevOOo/runner/util/RegistryTools.java6
-rw-r--r--qadevOOo/runner/util/SOfficeFactory.java2
-rw-r--r--qadevOOo/runner/util/UITools.java2
-rw-r--r--qadevOOo/runner/util/ValueComparer.java16
-rw-r--r--qadevOOo/runner/util/WriterTools.java2
-rw-r--r--qadevOOo/runner/util/XMLTools.java12
-rw-r--r--qadevOOo/runner/util/compare/GraphicalComparator.java4
-rw-r--r--qadevOOo/runner/util/dbg.java10
-rw-r--r--qadevOOo/runner/util/utils.java6
16 files changed, 47 insertions, 47 deletions
diff --git a/qadevOOo/runner/util/AccessibilityTools.java b/qadevOOo/runner/util/AccessibilityTools.java
index 3e4553755fa1..6b893106c65b 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -104,7 +104,7 @@ public class AccessibilityTools {
}
}
- public static XAccessibleContext getAccessibleObjectForRoleIgnoreShowing_(XAccessible xacc,
+ private static XAccessibleContext getAccessibleObjectForRoleIgnoreShowing_(XAccessible xacc,
short role) {
XAccessibleContext ac = xacc.getAccessibleContext();
if (ac == null) {
@@ -136,7 +136,7 @@ public class AccessibilityTools {
}
}
- public static XAccessibleContext getAccessibleObjectForRole_(XAccessible xacc,
+ private static XAccessibleContext getAccessibleObjectForRole_(XAccessible xacc,
short role) {
XAccessibleContext ac = xacc.getAccessibleContext();
boolean isShowing = ac.getAccessibleStateSet()
@@ -318,7 +318,7 @@ public class AccessibilityTools {
printAccessibleTree(log, xacc, "");
}
- protected static void printAccessibleTree(PrintWriter log,
+ private static void printAccessibleTree(PrintWriter log,
XAccessible xacc, String indent) {
XAccessibleContext ac = xacc.getAccessibleContext();
diff --git a/qadevOOo/runner/util/CalcTools.java b/qadevOOo/runner/util/CalcTools.java
index 3cc885e1107e..dd6defab8050 100644
--- a/qadevOOo/runner/util/CalcTools.java
+++ b/qadevOOo/runner/util/CalcTools.java
@@ -113,7 +113,7 @@ public class CalcTools {
* @return calc sheet
* @see com.sun.star.sheet.XSpreadsheet
*/
- public static XSpreadsheet getSpreadSheetFromSheetDoc(XComponent xSheetDoc, int sheetNumber)
+ private static XSpreadsheet getSpreadSheetFromSheetDoc(XComponent xSheetDoc, int sheetNumber)
throws java.lang.Exception {
XSpreadsheet xSheet = null;
diff --git a/qadevOOo/runner/util/DBTools.java b/qadevOOo/runner/util/DBTools.java
index e0bf47016e6e..5f22f5407dd2 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -191,7 +191,7 @@ public class DBTools {
* Prints datasource info.
* @param out Stream to which information is printed.
*/
- public void printInfo(PrintWriter out) {
+ private void printInfo(PrintWriter out) {
out.println("Name = '" + Name + "'") ;
out.println(" URL = '" + URL + "'") ;
out.print(" Info = ") ;
@@ -294,7 +294,7 @@ public class DBTools {
* @param dataSource <code>DataSource</code> object which is to
* be registered.
*/
- public void registerDB(String name, Object dataSource)
+ private void registerDB(String name, Object dataSource)
throws com.sun.star.uno.Exception {
dbContext.registerObject(name, dataSource) ;
@@ -424,7 +424,7 @@ public class DBTools {
* @return <code>com.sun.star.sdb.DataSource</code> service
* implementation which represents TestDB.
*/
- public Object registerTestDB(String docPath)
+ private Object registerTestDB(String docPath)
throws com.sun.star.uno.Exception {
String testURL = null ;
@@ -490,7 +490,7 @@ public class DBTools {
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Currently doesn't work because of bugs 85509, 85510
- public int deleteAllRows(XConnection con, String table)
+ private int deleteAllRows(XConnection con, String table)
throws com.sun.star.sdbc.SQLException {
XStatement stat = con.createStatement() ;
@@ -535,7 +535,7 @@ public class DBTools {
* </code> types specified. In this case the parameter specifies
* the length of the stream for inserting.
*/
- public void addRowToTestTable(XConnection con, String table, Object[] values,
+ private void addRowToTestTable(XConnection con, String table, Object[] values,
int streamLength)
throws com.sun.star.sdbc.SQLException {
@@ -698,7 +698,7 @@ public class DBTools {
* statement and obtaining the results produced by it.
* @param tbl_name Test table name.
*/
- protected void insertContentMySQLTable(Statement statement, String tbl_name)
+ private void insertContentMySQLTable(Statement statement, String tbl_name)
throws java.sql.SQLException {
@@ -746,7 +746,7 @@ public class DBTools {
* statement and obtaining the results produced by it.
* @param tbl_name Test table name.
*/
- protected void createMySQLTable(Statement statement, String tbl_name)
+ private void createMySQLTable(Statement statement, String tbl_name)
throws java.sql.SQLException {
final String empty_col_name = "Column";
@@ -794,7 +794,7 @@ public class DBTools {
* statement and obtaining the results produced by it.
* @param tbl_name Test table name.
*/
- protected void dropMySQLTable(Statement statement, String tbl_name)
+ private void dropMySQLTable(Statement statement, String tbl_name)
throws java.sql.SQLException {
statement.executeUpdate("drop table if exists " + tbl_name);
}
diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java
index f790ad93924a..30bfd8725d43 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -56,7 +56,7 @@ public class DesktopTools
* @param xMSF the MultiServiceFactory
* @return the gained XComponentLoader
*/
- public static XComponentLoader getCLoader(XMultiServiceFactory xMSF)
+ private static XComponentLoader getCLoader(XMultiServiceFactory xMSF)
{
XDesktop oDesktop = UnoRuntime.queryInterface(
XDesktop.class, createDesktop(xMSF));
@@ -178,7 +178,7 @@ public class DesktopTools
* </ul>
* or <CODE>null</CODE>
*/
- public static String getDocumentType(XComponent xComponent)
+ private static String getDocumentType(XComponent xComponent)
{
XServiceInfo sInfo = UnoRuntime.queryInterface(
XServiceInfo.class, xComponent);
diff --git a/qadevOOo/runner/util/DrawTools.java b/qadevOOo/runner/util/DrawTools.java
index 05c5551c117d..acb89d88e26c 100644
--- a/qadevOOo/runner/util/DrawTools.java
+++ b/qadevOOo/runner/util/DrawTools.java
@@ -119,7 +119,7 @@ public class DrawTools {
* @return the created XShape
*/
- public XShape createShape( XComponent oDoc, int height, int width, int x,
+ private XShape createShape( XComponent oDoc, int height, int width, int x,
int y, String kind ) {
//possible values for kind are 'Ellipse', 'Line' and 'Rectangle'
diff --git a/qadevOOo/runner/util/DynamicClassLoader.java b/qadevOOo/runner/util/DynamicClassLoader.java
index dbb3dd7972c2..ff70becefbba 100644
--- a/qadevOOo/runner/util/DynamicClassLoader.java
+++ b/qadevOOo/runner/util/DynamicClassLoader.java
@@ -31,7 +31,7 @@ public class DynamicClassLoader {
* @param className The name of the class to create.
* @return The created class.
*/
- public static Class<?> forName(String className)
+ private static Class<?> forName(String className)
throws ClassNotFoundException {
return Class.forName(className) ;
diff --git a/qadevOOo/runner/util/FormTools.java b/qadevOOo/runner/util/FormTools.java
index 9b6a3ae6db6d..9064487f791c 100644
--- a/qadevOOo/runner/util/FormTools.java
+++ b/qadevOOo/runner/util/FormTools.java
@@ -184,7 +184,7 @@ public class FormTools {
return oFS.getForms();
} //finish getForms
- public static XIndexContainer getIndexedForms ( XDrawPage oDP )
+ private static XIndexContainer getIndexedForms ( XDrawPage oDP )
{
XFormsSupplier oFS = UnoRuntime.queryInterface(
XFormsSupplier.class,oDP);
diff --git a/qadevOOo/runner/util/RegistryTools.java b/qadevOOo/runner/util/RegistryTools.java
index 686411495feb..ff33c8c1442e 100644
--- a/qadevOOo/runner/util/RegistryTools.java
+++ b/qadevOOo/runner/util/RegistryTools.java
@@ -71,7 +71,7 @@ public class RegistryTools {
* return <code>true</code> if key names, value types
* and values are equal, else returns <code>false</code>.
*/
- public static boolean compareKeys
+ private static boolean compareKeys
(XRegistryKey key1, XRegistryKey key2) {
if (key1 == null || key2 == null ||
@@ -152,7 +152,7 @@ public class RegistryTools {
* @param keyName Full key name.
* @return Short key name.
*/
- public static String getShortKeyName(String keyName) {
+ private static String getShortKeyName(String keyName) {
if (keyName == null) return null ;
int idx = keyName.lastIndexOf("/") ;
if (idx < 0) return keyName ;
@@ -166,7 +166,7 @@ public class RegistryTools {
* comparing from children of root keys.
* @return <code>true</code> if keys and their sub keys are equal.
*/
- protected static boolean compareKeyTrees
+ private static boolean compareKeyTrees
(XRegistryKey tree1, XRegistryKey tree2, boolean compareRoot) {
if (compareRoot && !compareKeys(tree1, tree2)) return false ;
diff --git a/qadevOOo/runner/util/SOfficeFactory.java b/qadevOOo/runner/util/SOfficeFactory.java
index f6db1c696bcd..8a841397ee5c 100644
--- a/qadevOOo/runner/util/SOfficeFactory.java
+++ b/qadevOOo/runner/util/SOfficeFactory.java
@@ -590,7 +590,7 @@ public class SOfficeFactory {
} // finished openDoc
- public XComponent openDoc(String kind, String frameName, PropertyValue[] mediaDescriptor)
+ private XComponent openDoc(String kind, String frameName, PropertyValue[] mediaDescriptor)
throws com.sun.star.lang.IllegalArgumentException,
com.sun.star.io.IOException,
com.sun.star.uno.Exception {
diff --git a/qadevOOo/runner/util/UITools.java b/qadevOOo/runner/util/UITools.java
index 0df280360c83..c97c6d47c008 100644
--- a/qadevOOo/runner/util/UITools.java
+++ b/qadevOOo/runner/util/UITools.java
@@ -457,7 +457,7 @@ public class UITools {
* @throws java.lang.Exception if something fail
* @return the value of the named numeric filed
*/
- public String getNumericFieldValue(String NumericFieldName)
+ private String getNumericFieldValue(String NumericFieldName)
throws java.lang.Exception
{
try{
diff --git a/qadevOOo/runner/util/ValueComparer.java b/qadevOOo/runner/util/ValueComparer.java
index e9f9fa9d1473..dfc0768c5322 100644
--- a/qadevOOo/runner/util/ValueComparer.java
+++ b/qadevOOo/runner/util/ValueComparer.java
@@ -69,7 +69,7 @@ public class ValueComparer {
return eq;
} // end of equalValue
- static boolean compareArrayOfPropertyValue(PropertyValue[] pv1, PropertyValue[] pv2){
+ private static boolean compareArrayOfPropertyValue(PropertyValue[] pv1, PropertyValue[] pv2){
if ( pv1.length != pv2.length) {
return false;
}
@@ -89,7 +89,7 @@ public class ValueComparer {
return result;
}
- static boolean compareArrays(Object op1, Object op2) throws Exception {
+ private static boolean compareArrays(Object op1, Object op2) throws Exception {
if (op1 instanceof PropertyValue[] && op2 instanceof PropertyValue[]) {
return compareArrayOfPropertyValue((PropertyValue[])op1,(PropertyValue[])op2);
@@ -109,11 +109,11 @@ public class ValueComparer {
return result;
}
- static boolean compareInterfaces(XInterface op1, XInterface op2) {
+ private static boolean compareInterfaces(XInterface op1, XInterface op2) {
return op1 == op2;
}
- static boolean compareUntil(Class<?> zClass, Class<?> untilClass, Object op1, Object op2) throws Exception {
+ private static boolean compareUntil(Class<?> zClass, Class<?> untilClass, Object op1, Object op2) throws Exception {
boolean result = true;
// write inherited members first
@@ -156,7 +156,7 @@ public class ValueComparer {
return result;
}
- static boolean compareStructs(Object op1, Object op2) throws Exception {
+ private static boolean compareStructs(Object op1, Object op2) throws Exception {
boolean result = true;
if(op1.getClass() != op2.getClass())
@@ -168,7 +168,7 @@ public class ValueComparer {
return result;
}
- static boolean compareThrowable(Throwable op1, Throwable op2) throws Exception {
+ private static boolean compareThrowable(Throwable op1, Throwable op2) throws Exception {
boolean result = true;
if(op1.getClass() != op2.getClass())
@@ -182,11 +182,11 @@ public class ValueComparer {
return result;
}
- static boolean compareEnums(Enum en1, Enum en2) {
+ private static boolean compareEnums(Enum en1, Enum en2) {
return en1.getValue() == en2.getValue();
}
- static boolean compareObjects(Object op1, Object op2) throws Exception {
+ private static boolean compareObjects(Object op1, Object op2) throws Exception {
boolean result = false;
if(op1 == op2)
diff --git a/qadevOOo/runner/util/WriterTools.java b/qadevOOo/runner/util/WriterTools.java
index 77ca32fd68e2..aec10a16ba4d 100644
--- a/qadevOOo/runner/util/WriterTools.java
+++ b/qadevOOo/runner/util/WriterTools.java
@@ -51,7 +51,7 @@ public class WriterTools {
return WriterDoc;
} // finish createTextDoc
- public static XTextDocument loadTextDoc(XMultiServiceFactory xMSF,
+ private static XTextDocument loadTextDoc(XMultiServiceFactory xMSF,
String url, PropertyValue[] Args) {
XComponent comp = DesktopTools.loadDoc(xMSF, url, Args);
XTextDocument WriterDoc = UnoRuntime.queryInterface(
diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java
index 1b8ccf183ea2..f706d9c5878a 100644
--- a/qadevOOo/runner/util/XMLTools.java
+++ b/qadevOOo/runner/util/XMLTools.java
@@ -275,7 +275,7 @@ public class XMLTools {
* Reset all values. This is important e.g. for test of XFilter
* interface, where 'filter()' method istbstarted twice.
*/
- public void reset() {
+ void reset() {
docStarted = false ;
docEnded = false ;
tagStack = new ArrayList<String>() ;
@@ -352,7 +352,7 @@ public class XMLTools {
* Also prints "Tag trace" in case if the full XML data isn't
* printed.
*/
- public void printError(String msg) {
+ void printError(String msg) {
log.println("!!! Error: " + msg) ;
if (printXMLData) return ;
log.println(" Tag trace :") ;
@@ -586,7 +586,7 @@ public class XMLTools {
return ret ;
}
- protected boolean checkAttr(int attrListIdx, XAttributeList list) {
+ private boolean checkAttr(int attrListIdx, XAttributeList list) {
short j = 0 ;
int listLen = list.getLength();
while(j < listLen) {
@@ -609,7 +609,7 @@ public class XMLTools {
* with values method checks if these attributes exist and
* have appropriate values.
*/
- public boolean isMatchTo(String tagName, XAttributeList list) {
+ private boolean isMatchTo(String tagName, XAttributeList list) {
if (!name.equals(tagName)) return false;
boolean result = true ;
for (int i = 0; i < attrList.length; i++) {
@@ -813,7 +813,7 @@ public class XMLTools {
* XML data is written.
* @return SAX handler to which XML data has to be written.
*/
- public static XDocumentHandler getFileXMLWriter(XMultiServiceFactory xMSF, String fileURL)
+ private static XDocumentHandler getFileXMLWriter(XMultiServiceFactory xMSF, String fileURL)
throws com.sun.star.uno.Exception
{
XInterface oFacc = (XInterface)xMSF.createInstance(
@@ -842,7 +842,7 @@ public class XMLTools {
* @param handler SAX handler to which XML data from file will
* be transferred.
*/
- public static void parseXMLFile(XMultiServiceFactory xMSF,
+ private static void parseXMLFile(XMultiServiceFactory xMSF,
String fileURL, XDocumentHandler handler) throws com.sun.star.uno.Exception
{
XInterface oFacc = (XInterface)xMSF.createInstance(
diff --git a/qadevOOo/runner/util/compare/GraphicalComparator.java b/qadevOOo/runner/util/compare/GraphicalComparator.java
index 47b99b8aa218..f52e8f0bbfd7 100644
--- a/qadevOOo/runner/util/compare/GraphicalComparator.java
+++ b/qadevOOo/runner/util/compare/GraphicalComparator.java
@@ -75,7 +75,7 @@ class GraphicalComparator implements DocComparator
* replacing the path equals to _sInputPath with _sReferencePath and replace it's suffix by _sNewSuffix.
* If _sInputPath is empty, replace the whole path by _sReferencePath.
*/
- protected String createSpecialFile(String _sEntry, String _sInputPath, String _sReferencePath, String _sNewSuffix)
+ private String createSpecialFile(String _sEntry, String _sInputPath, String _sReferencePath, String _sNewSuffix)
{
String fs = System.getProperty("file.separator");
String sNewSubDir = "";
@@ -100,7 +100,7 @@ class GraphicalComparator implements DocComparator
return sNewReferencePath;
}
- boolean isReferenceOrDiffExistent(String _sNewSuffix)
+ private boolean isReferenceOrDiffExistent(String _sNewSuffix)
{
boolean isExistent = false;
diff --git a/qadevOOo/runner/util/dbg.java b/qadevOOo/runner/util/dbg.java
index 43a25668c1b8..99b0929bfbb4 100644
--- a/qadevOOo/runner/util/dbg.java
+++ b/qadevOOo/runner/util/dbg.java
@@ -54,7 +54,7 @@ public class dbg {
* @param extendedInfo Should extended information be printed?
* @see com.sun.star.uno.XInterface
*/
- public static void printInterfaces(XInterface xTarget,
+ private static void printInterfaces(XInterface xTarget,
boolean extendedInfo){
Type[] types = getInterfaceTypes(xTarget);
if( null != types ) {
@@ -75,7 +75,7 @@ public class dbg {
* @return An array with all interface types; null if there are none.
* @see com.sun.star.uno.XInterface
*/
- public static Type[] getInterfaceTypes(XInterface xTarget) {
+ private static Type[] getInterfaceTypes(XInterface xTarget) {
Type[] types = null;
XTypeProvider xTypeProvider = UnoRuntime.queryInterface( XTypeProvider.class, xTarget);
if( xTypeProvider != null )
@@ -113,7 +113,7 @@ public class dbg {
* @param aType The type of the given interface.
* @see com.sun.star.uno.Type
*/
- public static void printInterfaceInfo(Type aType) {
+ private static void printInterfaceInfo(Type aType) {
try {
Class<?> zClass = aType.getZClass();
Method[] methods = zClass.getDeclaredMethods();
@@ -223,7 +223,7 @@ public class dbg {
* @param out The print writer which is used as output.
* @see com.sun.star.beans.PropertyValue
*/
- public static void printProperyValueSequenzePairs(PropertyValue[] ps, PrintWriter out){
+ private static void printProperyValueSequenzePairs(PropertyValue[] ps, PrintWriter out){
for( int i = 0; i < ps.length; i++){
printProperyValuePairs(ps[i], out);
}
@@ -244,7 +244,7 @@ public class dbg {
* @param out The print writer which is used as output.
* @see com.sun.star.beans.PropertyValue
*/
- public static void printProperyValuePairs(PropertyValue ps, PrintWriter out){
+ private static void printProperyValuePairs(PropertyValue ps, PrintWriter out){
if (ps.Value instanceof String[] ){
String[] values = (String[]) ps.Value;
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 183daadee8dc..73664ce6989a 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -286,7 +286,7 @@ public class utils {
* @see com.sun.star.util.PathSettings
* @return the value as String
*/
- public static String getOfficeSettingsValue(XMultiServiceFactory msf, String setting) {
+ private static String getOfficeSettingsValue(XMultiServiceFactory msf, String setting) {
String settingPath = null;
try {
@@ -813,7 +813,7 @@ public class utils {
* @param checkAppExecutionCommand If the AppExecutionCommand is checked, the error messages willbe different.
* @return The error message, or OK, if no error was detected.
*/
- public static String validateConnectString(String connectString, boolean checkAppExecutionCommand) {
+ private static String validateConnectString(String connectString, boolean checkAppExecutionCommand) {
String acceptPrefix = "";
if (checkAppExecutionCommand) {
acceptPrefix = "--accept=";
@@ -926,7 +926,7 @@ public class utils {
* @param URL the <CODE>URL</CODE> to dispatch
* @throws java.lang.Exception throws <CODE>java.lang.Exception</CODE> on any error
*/
- public static void dispatchURL(XMultiServiceFactory xMSF, XController xCont, String URL) throws java.lang.Exception {
+ private static void dispatchURL(XMultiServiceFactory xMSF, XController xCont, String URL) throws java.lang.Exception {
try {
XDispatchProvider xDispProv = UnoRuntime.queryInterface(XDispatchProvider.class, xCont);