java: remove ((unnecessary)) parentheses
Change-Id: I39fbe3a260c8dbfc203662c54eec4db064b88195
This commit is contained in:
parent
b73db446ac
commit
3f50c6e050
@ -704,7 +704,7 @@ public class LocalOfficeConnection
|
||||
if (unoPath == null)
|
||||
throw new java.io.IOException( "UNO_PATH environment variable is not set (required system path to the office program directory)" );
|
||||
|
||||
cmdArray[0] = (new File(unoPath, OFFICE_APP_NAME)).getPath();
|
||||
cmdArray[0] = new File(unoPath, OFFICE_APP_NAME).getPath();
|
||||
cmdArray[1] = "--nologo";
|
||||
cmdArray[2] = "--nodefault";
|
||||
if ( mConnType.equals( "pipe" ) )
|
||||
|
@ -55,16 +55,16 @@ public class DBaseDriverTest extends ComplexTestCase implements TestCase
|
||||
|
||||
public void Functions() throws com.sun.star.uno.Exception, com.sun.star.beans.UnknownPropertyException
|
||||
{
|
||||
DBaseStringFunctions aStringTest = new DBaseStringFunctions((param.getMSF()), this);
|
||||
DBaseStringFunctions aStringTest = new DBaseStringFunctions(param.getMSF(), this);
|
||||
aStringTest.testFunctions();
|
||||
|
||||
DBaseNumericFunctions aNumericTest = new DBaseNumericFunctions((param.getMSF()), this);
|
||||
DBaseNumericFunctions aNumericTest = new DBaseNumericFunctions(param.getMSF(), this);
|
||||
aNumericTest.testFunctions();
|
||||
|
||||
DBaseDateFunctions aDateTest = new DBaseDateFunctions((param.getMSF()), this);
|
||||
DBaseDateFunctions aDateTest = new DBaseDateFunctions(param.getMSF(), this);
|
||||
aDateTest.testFunctions();
|
||||
|
||||
DBaseSqlTests aSqlTest = new DBaseSqlTests((param.getMSF()), this);
|
||||
DBaseSqlTests aSqlTest = new DBaseSqlTests(param.getMSF(), this);
|
||||
aSqlTest.testFunctions();
|
||||
}
|
||||
}
|
||||
|
@ -573,7 +573,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
|
||||
// obtain the DataSource associated with the document. Keeping this alive
|
||||
// ensures that the "impl data" of the document is kept alive, too, so when closing
|
||||
// and re-opening it, this "impl data" must be re-used.
|
||||
XDocumentDataSource dataSource = UnoRuntime.queryInterface(XDocumentDataSource.class, (UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, databaseDoc)).getDataSource());
|
||||
XDocumentDataSource dataSource = UnoRuntime.queryInterface(XDocumentDataSource.class, UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, databaseDoc).getDataSource());
|
||||
|
||||
// close and reload the doc
|
||||
impl_closeDocument(databaseDoc);
|
||||
|
@ -669,7 +669,7 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ( "f_time" ).equals(fieldName) )
|
||||
if ( "f_time".equals(fieldName) )
|
||||
// http://bugs.mysql.com/bug.php?id=5681
|
||||
return true;
|
||||
if (fieldName == null) {
|
||||
|
@ -767,7 +767,7 @@ public class AcceleratorsConfigurationTest
|
||||
|
||||
private XMultiServiceFactory getMSF()
|
||||
{
|
||||
return(UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()));
|
||||
return UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
|
||||
}
|
||||
|
||||
// setup and close connections
|
||||
|
@ -133,7 +133,7 @@ public class KeyMapping
|
||||
|
||||
public short mapIdentifier2Code(String sIdentifier)
|
||||
{
|
||||
return (aIdentifierHashMap.get(sIdentifier)).shortValue();
|
||||
return aIdentifierHashMap.get(sIdentifier).shortValue();
|
||||
}
|
||||
|
||||
public String mapCode2Identifier(short nCode)
|
||||
|
@ -61,9 +61,9 @@ public class ContextMenuInterceptor implements XContextMenuInterceptor
|
||||
UnoRuntime.queryInterface(com.sun.star.container.XIndexContainer.class, xMenuElementFactory.createInstance("com.sun.star.ui.ActionTriggerContainer"));
|
||||
|
||||
// intialize root menu entry "Help"
|
||||
xRootMenuEntry.setPropertyValue("Text", ("Help"));
|
||||
xRootMenuEntry.setPropertyValue("CommandURL", ("slot:5410"));
|
||||
xRootMenuEntry.setPropertyValue("HelpURL", ("5410"));
|
||||
xRootMenuEntry.setPropertyValue("Text", "Help");
|
||||
xRootMenuEntry.setPropertyValue("CommandURL", "slot:5410");
|
||||
xRootMenuEntry.setPropertyValue("HelpURL", "5410");
|
||||
xRootMenuEntry.setPropertyValue("SubContainer", xSubMenuContainer);
|
||||
xRootMenuEntry.setPropertyValue("Image", myBitmap);
|
||||
|
||||
@ -71,9 +71,9 @@ public class ContextMenuInterceptor implements XContextMenuInterceptor
|
||||
// intialize help/content menu entry
|
||||
// entry "Content"
|
||||
XPropertySet xMenuEntry = UnoRuntime.queryInterface(XPropertySet.class, xMenuElementFactory.createInstance("com.sun.star.ui.ActionTrigger"));
|
||||
xMenuEntry.setPropertyValue("Text", ("Content"));
|
||||
xMenuEntry.setPropertyValue("CommandURL", ("slot:5401"));
|
||||
xMenuEntry.setPropertyValue("HelpURL", ("5401"));
|
||||
xMenuEntry.setPropertyValue("Text", "Content");
|
||||
xMenuEntry.setPropertyValue("CommandURL", "slot:5401");
|
||||
xMenuEntry.setPropertyValue("HelpURL", "5401");
|
||||
|
||||
// insert menu entry to sub menu
|
||||
xSubMenuContainer.insertByIndex(0, xMenuEntry);
|
||||
@ -81,18 +81,18 @@ public class ContextMenuInterceptor implements XContextMenuInterceptor
|
||||
// intialize help/help agent
|
||||
// entry "Help Agent"
|
||||
xMenuEntry = UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xMenuElementFactory.createInstance("com.sun.star.ui.ActionTrigger"));
|
||||
xMenuEntry.setPropertyValue("Text", ("Help Agent"));
|
||||
xMenuEntry.setPropertyValue("CommandURL", ("slot:5962"));
|
||||
xMenuEntry.setPropertyValue("HelpURL", ("5962"));
|
||||
xMenuEntry.setPropertyValue("Text", "Help Agent");
|
||||
xMenuEntry.setPropertyValue("CommandURL", "slot:5962");
|
||||
xMenuEntry.setPropertyValue("HelpURL", "5962");
|
||||
|
||||
// insert menu entry to sub menu
|
||||
xSubMenuContainer.insertByIndex(1, xMenuEntry);
|
||||
// intialize help/tips
|
||||
// entry "Tips"
|
||||
xMenuEntry = UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xMenuElementFactory.createInstance("com.sun.star.ui.ActionTrigger"));
|
||||
xMenuEntry.setPropertyValue("Text", ("Tips"));
|
||||
xMenuEntry.setPropertyValue("CommandURL", ("slot:5404"));
|
||||
xMenuEntry.setPropertyValue("HelpURL", ("5404"));
|
||||
xMenuEntry.setPropertyValue("Text", "Tips");
|
||||
xMenuEntry.setPropertyValue("CommandURL", "slot:5404");
|
||||
xMenuEntry.setPropertyValue("HelpURL", "5404");
|
||||
|
||||
// insert menu entry to sub menu
|
||||
xSubMenuContainer.insertByIndex(2, xMenuEntry);
|
||||
|
@ -304,6 +304,6 @@ public class Interceptor implements XDispatch,
|
||||
private boolean impl_match(String sVal1, String sVal2)
|
||||
{
|
||||
// TODO implement wildcard match
|
||||
return (sVal1.equals(sVal2));
|
||||
return sVal1.equals(sVal2);
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public final class XInputStreamToInputStreamAdapter extends InputStream {
|
||||
throw newEx;
|
||||
}
|
||||
|
||||
return (bytesRead);
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -126,14 +126,14 @@ public final class PropertySetMixin {
|
||||
idlClass = getReflection(type.getTypeName());
|
||||
XTypeDescription ifc;
|
||||
try {
|
||||
ifc = UnoRuntime.queryInterface(
|
||||
XTypeDescription.class,
|
||||
(UnoRuntime.queryInterface(
|
||||
XHierarchicalNameAccess xhna = UnoRuntime.queryInterface(
|
||||
XHierarchicalNameAccess.class,
|
||||
context.getValueByName(
|
||||
"/singletons/com.sun.star.reflection."
|
||||
+ "theTypeDescriptionManager")).
|
||||
getByHierarchicalName(type.getTypeName())));
|
||||
+ "theTypeDescriptionManager"));
|
||||
ifc = UnoRuntime.queryInterface(
|
||||
XTypeDescription.class,
|
||||
xhna.getByHierarchicalName(type.getTypeName()));
|
||||
} catch (NoSuchElementException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -636,9 +636,7 @@ public final class PropertySetMixin {
|
||||
break;
|
||||
}
|
||||
attrAttribs |= n;
|
||||
t = (UnoRuntime.queryInterface(
|
||||
XStructTypeDescription.class, t)).
|
||||
getTypeArguments()[0];
|
||||
t = UnoRuntime.queryInterface(XStructTypeDescription.class, t).getTypeArguments()[0];
|
||||
}
|
||||
String name = members[i].getMemberName();
|
||||
boolean present = true;
|
||||
|
@ -78,7 +78,7 @@ public class WeakBase implements XWeak, XTypeProvider
|
||||
for(int i = 0; i < interfaces.length; ++ i)
|
||||
{
|
||||
// Test if it is a UNO interface
|
||||
if (com.sun.star.uno.XInterface.class.isAssignableFrom((interfaces[i])))
|
||||
if (com.sun.star.uno.XInterface.class.isAssignableFrom(interfaces[i]))
|
||||
vec.add(new Type(interfaces[i]));
|
||||
}
|
||||
// get the superclass the currentClass inherits from
|
||||
|
@ -74,11 +74,11 @@ class Proxy implements IQueryInterface, XEventListener
|
||||
if (object instanceof IQueryInterface)
|
||||
{
|
||||
IQueryInterface iquery = (IQueryInterface) object;
|
||||
return (iquery.getOid().equals(oid));
|
||||
return iquery.getOid().equals(oid);
|
||||
}
|
||||
|
||||
String oidObj = UnoRuntime.generateOid(object);
|
||||
return (oidObj.equals(oid));
|
||||
return oidObj.equals(oid);
|
||||
}
|
||||
|
||||
public Object queryInterface(Type type) {
|
||||
|
@ -119,7 +119,7 @@ XComponent xDoc = DesktopTools.loadDoc(xMSF, FileToLoad,
|
||||
|
||||
while (!done) {
|
||||
String[] HangulHanja = getLeftAndRight(counter, xSheet);
|
||||
done = (HangulHanja[0].equals(""));
|
||||
done = HangulHanja[0].equals("");
|
||||
counter++;
|
||||
|
||||
if (!done) {
|
||||
|
@ -119,7 +119,7 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
|
||||
int posLeftParenthesis = entryName.indexOf('(');
|
||||
if (posLeftParenthesis != -1)
|
||||
{
|
||||
String sParameter = (entryName.substring(posLeftParenthesis + 1, entryName.indexOf(')')));
|
||||
String sParameter = entryName.substring(posLeftParenthesis + 1, entryName.indexOf(')'));
|
||||
mTestMethodName = entryName;
|
||||
parameter = new String[] { sParameter };
|
||||
entryName = entryName.substring(0, posLeftParenthesis);
|
||||
|
@ -83,7 +83,7 @@ public class BuildEnvTools {
|
||||
error = true;
|
||||
}
|
||||
|
||||
mCygwin = (param.getBool(PropertyName.CYGWIN));
|
||||
mCygwin = param.getBool(PropertyName.CYGWIN);
|
||||
|
||||
if (error) {
|
||||
throw new ParameterNotFoundException(msg);
|
||||
|
@ -88,7 +88,7 @@ public class InstCreator implements XInstCreator {
|
||||
XFootnotesSupplier oTTS = UnoRuntime.queryInterface(
|
||||
XFootnotesSupplier.class, xParent );
|
||||
|
||||
return( oTTS.getFootnotes() );
|
||||
return oTTS.getFootnotes();
|
||||
}
|
||||
|
||||
if ( iDsc instanceof TextSectionDsc ) {
|
||||
|
@ -153,7 +153,7 @@ public class ValueChanger {
|
||||
com.sun.star.style.TabAlign TA1 = com.sun.star.style.TabAlign.CENTER;
|
||||
com.sun.star.style.TabAlign TA2 = com.sun.star.style.TabAlign.RIGHT;
|
||||
|
||||
if ((TSold.Alignment).equals(TA1))
|
||||
if (TSold.Alignment.equals(TA1))
|
||||
TS.Alignment = TA2;
|
||||
else
|
||||
TS.Alignment = TA1;
|
||||
|
@ -537,7 +537,7 @@ public class utils {
|
||||
public static boolean isVoid(Object aObject) {
|
||||
if (aObject instanceof com.sun.star.uno.Any) {
|
||||
com.sun.star.uno.Any oAny = (com.sun.star.uno.Any) aObject;
|
||||
return (oAny.getType().getTypeName().equals("void"));
|
||||
return oAny.getType().getTypeName().equals("void");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ public class _XControl extends MultiMethodTest {
|
||||
requiredMethod("setModel()");
|
||||
XControlModel the_model = (XControlModel) tEnv.getObjRelation("MODEL");
|
||||
XControlModel get = oObj.getModel();
|
||||
boolean res = (get.equals(the_model));
|
||||
boolean res = get.equals(the_model);
|
||||
if (!res) {
|
||||
log.println("getting: "+get.toString());
|
||||
log.println("expected: "+the_model.toString());
|
||||
|
@ -44,7 +44,7 @@ public class _XIntrospection extends MultiMethodTest {
|
||||
public void _inspect() {
|
||||
boolean result = true;
|
||||
XIntrospectionAccess xIA = oObj.inspect(oObj);
|
||||
result = (xIA.hasMethod("acquire",1));
|
||||
result = xIA.hasMethod("acquire",1);
|
||||
tRes.tested("inspect()",result);
|
||||
}
|
||||
|
||||
|
@ -155,8 +155,7 @@ public class _XMultiPropertyStates extends MultiMethodTest {
|
||||
the_first[0] = propName;
|
||||
log.println("Setting " + propName + " to default");
|
||||
oObj.setPropertiesToDefault(the_first);
|
||||
result = (oObj.getPropertyStates(the_first)[0].equals
|
||||
(PropertyState.DEFAULT_VALUE));
|
||||
result = oObj.getPropertyStates(the_first)[0].equals(PropertyState.DEFAULT_VALUE);
|
||||
} catch (com.sun.star.beans.UnknownPropertyException e) {
|
||||
log.println("some properties seem to be unknown: " + e.toString());
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public class _XPropertyState extends MultiMethodTest {
|
||||
boolean result = true ;
|
||||
String localName = pName;
|
||||
if (localName == null) {
|
||||
localName = (propertySetInfo.getProperties()[0]).Name;
|
||||
localName = propertySetInfo.getProperties()[0].Name;
|
||||
}
|
||||
try {
|
||||
propDef = oObj.getPropertyDefault(localName);
|
||||
@ -147,7 +147,7 @@ public class _XPropertyState extends MultiMethodTest {
|
||||
|
||||
String localName = pName;
|
||||
if (localName == null) {
|
||||
localName = (propertySetInfo.getProperties()[0]).Name;
|
||||
localName = propertySetInfo.getProperties()[0].Name;
|
||||
}
|
||||
|
||||
try {
|
||||
@ -175,7 +175,7 @@ public class _XPropertyState extends MultiMethodTest {
|
||||
|
||||
String localName = pName;
|
||||
if (localName == null) {
|
||||
localName = (propertySetInfo.getProperties()[0]).Name;
|
||||
localName = propertySetInfo.getProperties()[0].Name;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -73,7 +73,7 @@ public class _XDiagram extends MultiMethodTest {
|
||||
|
||||
String stype = oObj.getDiagramType();
|
||||
log.println("Current Diagram Type is " + stype);
|
||||
result = (stype.startsWith("com.sun.star.chart."));
|
||||
result = stype.startsWith("com.sun.star.chart.");
|
||||
|
||||
tRes.tested("getDiagramType()", result);
|
||||
}
|
||||
|
@ -125,8 +125,7 @@ public class _XAcceptor extends MultiMethodTest {
|
||||
|
||||
// creating services required
|
||||
try {
|
||||
Object oConnector = (tParam.getMSF()).
|
||||
createInstance("com.sun.star.connection.Connector") ;
|
||||
Object oConnector = tParam.getMSF().createInstance("com.sun.star.connection.Connector") ;
|
||||
|
||||
xConnector = UnoRuntime.queryInterface
|
||||
(XConnector.class, oConnector) ;
|
||||
|
@ -324,7 +324,7 @@ public class _XCalendar extends MultiMethodTest {
|
||||
log.println("*** " + lang + " ... FAILED ***");
|
||||
log.println(error);
|
||||
}
|
||||
res &= (error.equals(""));
|
||||
res &= error.equals("");
|
||||
}
|
||||
|
||||
tRes.tested("setValue()", res);
|
||||
|
@ -233,7 +233,7 @@ public class _XLocaleData extends MultiMethodTest {
|
||||
for (int i=0;i<7;i++) {
|
||||
Implementation[] impl = oObj.getCollatorImplementations(getLocale(i));
|
||||
for (int j=0;j<impl.length;j++) {
|
||||
if ((impl[j].unoID.equals(""))) {
|
||||
if (impl[j].unoID.equals("")) {
|
||||
printit = true;
|
||||
}
|
||||
res &= (!impl[j].unoID.equals(""));
|
||||
@ -258,7 +258,7 @@ public class _XLocaleData extends MultiMethodTest {
|
||||
for (int i=0;i<7;i++) {
|
||||
String[] str = oObj.getSearchOptions(getLocale(i));
|
||||
for (int j=0;j<str.length;j++) {
|
||||
if ((str[j].equals(""))) {
|
||||
if (str[j].equals("")) {
|
||||
printit = true;
|
||||
}
|
||||
res &= (!str[j].equals(""));
|
||||
@ -283,7 +283,7 @@ public class _XLocaleData extends MultiMethodTest {
|
||||
for (int i=0;i<7;i++) {
|
||||
String[] str = oObj.getCollationOptions(getLocale(i));
|
||||
for (int j=0;j<str.length;j++) {
|
||||
if ((str[j].equals(""))) {
|
||||
if (str[j].equals("")) {
|
||||
printit = true;
|
||||
}
|
||||
res &= (!str[j].equals(""));
|
||||
@ -308,7 +308,7 @@ public class _XLocaleData extends MultiMethodTest {
|
||||
for (int i=0;i<7;i++) {
|
||||
String[] str = oObj.getTransliterations(getLocale(i));
|
||||
for (int j=0;j<str.length;j++) {
|
||||
if ((str[j].equals(""))) {
|
||||
if (str[j].equals("")) {
|
||||
printit = true;
|
||||
}
|
||||
res &= (!str[j].equals(""));
|
||||
@ -355,7 +355,7 @@ public class _XLocaleData extends MultiMethodTest {
|
||||
for (int i=0;i<7;i++) {
|
||||
String[] str = oObj.getReservedWord(getLocale(i));
|
||||
for (int j=0;j<str.length;j++) {
|
||||
if ((str[j].equals(""))) {
|
||||
if (str[j].equals("")) {
|
||||
printit = true;
|
||||
}
|
||||
res &= (!str[j].equals(""));
|
||||
|
@ -160,7 +160,7 @@ public class _XPersistObject extends MultiMethodTest {
|
||||
|
||||
persCopy.read(iStream);
|
||||
|
||||
bResult = ( persCopy.getServiceName().equals(sname) );
|
||||
bResult = persCopy.getServiceName().equals(sname);
|
||||
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest {
|
||||
try{
|
||||
String filter = "\"Identifier\" = 'BOR02b'";
|
||||
xComposer.setFilter(filter);
|
||||
tRes.tested("getFilter()", (oObj.getFilter().equals(filter)));
|
||||
tRes.tested("getFilter()", oObj.getFilter().equals(filter));
|
||||
|
||||
} catch (com.sun.star.sdbc.SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -154,7 +154,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest {
|
||||
PropertyValue[][] aStructuredFilter = oObj.getStructuredFilter();
|
||||
xComposer.setFilter("");
|
||||
xComposer.setStructuredFilter(aStructuredFilter);
|
||||
tRes.tested("getStructuredFilter()", (oObj.getFilter().equals(complexFilter)));
|
||||
tRes.tested("getStructuredFilter()", oObj.getFilter().equals(complexFilter));
|
||||
|
||||
} catch (com.sun.star.sdbc.SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -173,7 +173,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest {
|
||||
try{
|
||||
String group = "\"Identifier\"";
|
||||
xComposer.setGroup(group);
|
||||
tRes.tested("getGroup()", (oObj.getGroup().equals(group)));
|
||||
tRes.tested("getGroup()", oObj.getGroup().equals(group));
|
||||
|
||||
} catch (com.sun.star.sdbc.SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -210,8 +210,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest {
|
||||
try{
|
||||
String clause = "\"Identifier\" = 'BOR02b'";
|
||||
xComposer.setHavingClause(clause);
|
||||
tRes.tested("getHavingClause()", (
|
||||
oObj.getHavingClause().equals(clause)));
|
||||
tRes.tested("getHavingClause()", oObj.getHavingClause().equals(clause));
|
||||
|
||||
} catch (com.sun.star.sdbc.SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -242,7 +241,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest {
|
||||
xComposer.setHavingClause("");
|
||||
xComposer.setStructuredHavingClause(aStructuredHaving);
|
||||
tRes.tested("getStructuredHavingClause()",
|
||||
(oObj.getHavingClause().equals(complexFilter)));
|
||||
oObj.getHavingClause().equals(complexFilter));
|
||||
|
||||
} catch (com.sun.star.sdbc.SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -258,7 +257,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest {
|
||||
try{
|
||||
String order = "\"Identifier\"";
|
||||
xComposer.setOrder(order);
|
||||
tRes.tested("getOrder()", (oObj.getOrder().equals(order)));
|
||||
tRes.tested("getOrder()", oObj.getOrder().equals(order));
|
||||
|
||||
} catch (com.sun.star.sdbc.SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
|
@ -128,7 +128,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest {
|
||||
try{
|
||||
String filter = "\"Identifier\" = 'BOR02b'";
|
||||
oObj.setFilter(filter);
|
||||
tRes.tested("setFilter()", (xQueryAna.getFilter().equals(filter)));
|
||||
tRes.tested("setFilter()", xQueryAna.getFilter().equals(filter));
|
||||
|
||||
} catch (SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -152,7 +152,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest {
|
||||
PropertyValue[][] aStructuredFilter = xQueryAna.getStructuredFilter();
|
||||
oObj.setFilter("");
|
||||
oObj.setStructuredFilter(aStructuredFilter);
|
||||
tRes.tested("setStructuredFilter()", (xQueryAna.getFilter().equals(complexFilter)));
|
||||
tRes.tested("setStructuredFilter()", xQueryAna.getFilter().equals(complexFilter));
|
||||
|
||||
} catch (SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -312,7 +312,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest {
|
||||
try{
|
||||
String group = "\"Identifier\"";
|
||||
oObj.setGroup(group);
|
||||
tRes.tested("setGroup()", (xQueryAna.getGroup().equals(group)));
|
||||
tRes.tested("setGroup()", xQueryAna.getGroup().equals(group));
|
||||
|
||||
} catch (SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -330,8 +330,8 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest {
|
||||
try{
|
||||
String clause = "\"Identifier\" = 'BOR02b'";
|
||||
oObj.setHavingClause(clause);
|
||||
tRes.tested("setHavingClause()", (
|
||||
xQueryAna.getHavingClause().equals(clause)));
|
||||
tRes.tested("setHavingClause()",
|
||||
xQueryAna.getHavingClause().equals(clause));
|
||||
|
||||
} catch (SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -367,7 +367,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest {
|
||||
oObj.setHavingClause("");
|
||||
oObj.setStructuredHavingClause(aStructuredHaving);
|
||||
tRes.tested("setStructuredHavingClause()",
|
||||
(xQueryAna.getHavingClause().equals(complexFilter)));
|
||||
xQueryAna.getHavingClause().equals(complexFilter));
|
||||
|
||||
} catch (SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
@ -509,7 +509,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest {
|
||||
try{
|
||||
String order = "\"Identifier\"";
|
||||
oObj.setOrder(order);
|
||||
tRes.tested("setOrder()", (xQueryAna.getOrder().equals(order)));
|
||||
tRes.tested("setOrder()", xQueryAna.getOrder().equals(order));
|
||||
|
||||
} catch (SQLException e){
|
||||
log.println("unexpected Exception: " + e.toString());
|
||||
|
@ -116,7 +116,7 @@ public class _XWarningsSupplier extends MultiMethodTest {
|
||||
try {
|
||||
oObj.clearWarnings();
|
||||
Object warns = oObj.getWarnings();
|
||||
res = (utils.isVoid(warns));
|
||||
res = utils.isVoid(warns);
|
||||
} catch (SQLException e) {
|
||||
log.println("Exception occurred :");
|
||||
e.printStackTrace(log);
|
||||
|
@ -85,7 +85,7 @@ public class _XFootnote extends MultiMethodTest {
|
||||
String res = oObj.getLabel();
|
||||
|
||||
log.println("verify setLabel result");
|
||||
result = (res.equals(str));
|
||||
result = res.equals(str);
|
||||
if (result) {
|
||||
log.println(" ... setLabel() - OK");
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class _XPagePrintable extends MultiMethodTest {
|
||||
Boolean newlandscape = Boolean.valueOf(!landscape.booleanValue());
|
||||
PrintSettings[8].Value = newlandscape;
|
||||
oObj.setPagePrintSettings(PrintSettings);
|
||||
res = (oObj.getPagePrintSettings()[8].Value.equals(newlandscape));
|
||||
res = oObj.getPagePrintSettings()[8].Value.equals(newlandscape);
|
||||
|
||||
tRes.tested("setPagePrintSettings()",res);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ public class ODatasourceBrowser extends TestCase {
|
||||
}
|
||||
|
||||
// get a soffice factory object
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a text document");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -216,7 +216,7 @@ public class GenericModelTest extends TestCase {
|
||||
@Override
|
||||
protected void initialize(TestParameters tParam, PrintWriter log) throws Exception {
|
||||
log.println("creating a textdocument");
|
||||
m_xTextDoc = WriterTools.createTextDoc((tParam.getMSF()));
|
||||
m_xTextDoc = WriterTools.createTextDoc(tParam.getMSF());
|
||||
m_ConnectionColsed = false;
|
||||
debug = tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE);
|
||||
m_propertiesToSet.clear();
|
||||
@ -392,7 +392,7 @@ public class GenericModelTest extends TestCase {
|
||||
utils.copyFile(xMSF, sourceTestDB, destTestDB);
|
||||
|
||||
m_dbTools = new DBTools( xMSF );
|
||||
String tmpDir = utils.getOfficeTemp((xMSF));
|
||||
String tmpDir = utils.getOfficeTemp(xMSF);
|
||||
|
||||
DBTools.DataSourceInfo srcInf = m_dbTools.newDataSourceInfo();
|
||||
srcInf.URL = "sdbc:dbase:" + DBTools.dirToUrl(tmpDir);
|
||||
|
@ -91,7 +91,7 @@ public class OCheckBoxControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize ( TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory( (Param.getMSF()) );
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() );
|
||||
log.println( "creating a textdocument" );
|
||||
xTextDoc = SOF.createTextDoc( null );
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class OComboBoxControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -229,7 +229,7 @@ public class ODatabaseForm extends TestCase {
|
||||
|
||||
@Override
|
||||
protected void initialize(TestParameters tParam, PrintWriter log) throws Exception {
|
||||
tmpDir = utils.getOfficeTemp((tParam.getMSF()));
|
||||
tmpDir = utils.getOfficeTemp(tParam.getMSF());
|
||||
|
||||
origDB = util.utils.getFullTestDocName("TestDB/testDB.dbf");
|
||||
|
||||
@ -296,7 +296,7 @@ public class ODatabaseForm extends TestCase {
|
||||
oldF = utils.getFullURL(origDB);
|
||||
newF = utils.getOfficeTemp(tParam.getMSF()) + tableName +
|
||||
".dbf";
|
||||
} while (!utils.tryOverwriteFile((tParam.getMSF()), oldF, newF) &&
|
||||
} while (!utils.tryOverwriteFile(tParam.getMSF(), oldF, newF) &&
|
||||
(uniqueSuffix++ < 50));
|
||||
}
|
||||
}
|
||||
@ -322,7 +322,7 @@ public class ODatabaseForm extends TestCase {
|
||||
}
|
||||
|
||||
log.println("creating a text document");
|
||||
xTextDoc = WriterTools.createTextDoc((Param.getMSF()));
|
||||
xTextDoc = WriterTools.createTextDoc(Param.getMSF());
|
||||
|
||||
//initialize test table
|
||||
if (isMySQLDB) {
|
||||
@ -439,11 +439,8 @@ public class ODatabaseForm extends TestCase {
|
||||
formLoader.load();
|
||||
|
||||
try {
|
||||
oObj = (XForm) AnyConverter.toObject(new Type(XForm.class),
|
||||
(FormTools.getForms(
|
||||
WriterTools.getDrawPage(
|
||||
xTextDoc)))
|
||||
.getByName("MyForm"));
|
||||
Object temp1 = FormTools.getForms( WriterTools.getDrawPage(xTextDoc) ).getByName("MyForm");
|
||||
oObj = (XForm) AnyConverter.toObject(new Type(XForm.class), temp1);
|
||||
|
||||
XPropertySet xSetProp = UnoRuntime.queryInterface(
|
||||
XPropertySet.class, oObj);
|
||||
|
@ -94,7 +94,7 @@ public class ODateControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -95,7 +95,7 @@ public class OEditControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -94,7 +94,7 @@ public class OFileControlModel extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters tParam, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((tParam.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(tParam.getMSF());
|
||||
log.println("creating a draw document");
|
||||
xDrawDoc = SOF.createDrawDoc(null);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public class OFormattedControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -77,7 +77,7 @@ public class OFormsCollection extends TestCase {
|
||||
@Override
|
||||
protected void initialize(TestParameters tParam, PrintWriter log) throws Exception {
|
||||
log.println("creating a draw document");
|
||||
xDrawDoc = DrawTools.createDrawDoc((tParam.getMSF()));
|
||||
xDrawDoc = DrawTools.createDrawDoc(tParam.getMSF());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -229,7 +229,7 @@ class OGridControlModelold extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters tParam, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((tParam.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(tParam.getMSF());
|
||||
log.println("creating a draw document");
|
||||
xDrawDoc = SOF.createDrawDoc(null);
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class OGroupBoxControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -91,7 +91,7 @@ public class OHiddenModel extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters tParam, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((tParam.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(tParam.getMSF());
|
||||
|
||||
log.println("creating a draw document");
|
||||
xDrawDoc = SOF.createDrawDoc(null);
|
||||
@ -136,7 +136,7 @@ public class OHiddenModel extends TestCase {
|
||||
log.println("creating a test environment");
|
||||
|
||||
// get a soffice factory object
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
String objName = "HiddenControl";
|
||||
XInterface ctrl = SOF.createControl(xDrawDoc, objName);
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class OImageButtonControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -79,7 +79,7 @@ public class OImageControlControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -47,7 +47,7 @@ public class OListBoxControl extends TestCase {
|
||||
|
||||
@Override
|
||||
protected void initialize ( TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory( (Param.getMSF()) );
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() );
|
||||
log.println( "creating a textdocument" );
|
||||
xTextDoc = SOF.createTextDoc( null );
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public class ONumericControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -94,7 +94,7 @@ public class OPatternControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -82,7 +82,7 @@ public class ORadioButtonControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
|
@ -42,7 +42,7 @@ public class OScrollBarModel extends TestCase {
|
||||
protected void initialize( TestParameters tParam, PrintWriter log ) throws Exception {
|
||||
|
||||
log.println( "creating a textdocument" );
|
||||
xTextDoc = WriterTools.createTextDoc((tParam.getMSF()));
|
||||
xTextDoc = WriterTools.createTextDoc(tParam.getMSF());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,7 @@ public class OSpinButtonModel extends TestCase {
|
||||
protected void initialize( TestParameters tParam, PrintWriter log ) throws Exception {
|
||||
|
||||
log.println( "creating a textdocument" );
|
||||
xTextDoc = WriterTools.createTextDoc((tParam.getMSF()));
|
||||
xTextDoc = WriterTools.createTextDoc(tParam.getMSF());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -95,7 +95,7 @@ public class OTimeControl extends TestCase {
|
||||
*/
|
||||
@Override
|
||||
protected void initialize(TestParameters Param, PrintWriter log) throws Exception {
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory((Param.getMSF()));
|
||||
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
|
||||
|
||||
log.println("creating a textdocument");
|
||||
xTextDoc = SOF.createTextDoc(null);
|
||||
@ -217,7 +217,7 @@ public class OTimeControl extends TestCase {
|
||||
textComp.addTextListener(listener);
|
||||
tEnv.addObjRelation("TestTextListener", listener);
|
||||
|
||||
FormTools.switchDesignOf((Param.getMSF()), xTextDoc);
|
||||
FormTools.switchDesignOf(Param.getMSF(), xTextDoc);
|
||||
util.utils.waitForEventIdle(Param.getMSF());
|
||||
|
||||
return tEnv;
|
||||
|
@ -147,8 +147,7 @@ public class SdXCustomPresentationAccess extends TestCase {
|
||||
|
||||
// INDEX : _XNameContainer
|
||||
log.println( "adding XNameContainerINDEX as mod relation to environment" );
|
||||
tEnv.addObjRelation("XNameContainerINDEX",
|
||||
(Integer.valueOf(THRCNT)).toString());
|
||||
tEnv.addObjRelation("XNameContainerINDEX", Integer.valueOf(THRCNT).toString());
|
||||
|
||||
// INSTANCEn : _XNameContainer; _XNameReplace
|
||||
log.println( "adding INSTANCEn as mod relation to environment" );
|
||||
|
@ -257,7 +257,7 @@ public class SwXMailMerge extends TestCase {
|
||||
|
||||
String tmpDatabaseFile = tmpDatabaseUrl + databaseName + ".odb";
|
||||
System.out.println("try to delete '"+tmpDatabaseFile+"'");
|
||||
utils.deleteFile((Param.getMSF()), tmpDatabaseFile);
|
||||
utils.deleteFile(Param.getMSF(), tmpDatabaseFile);
|
||||
|
||||
|
||||
tmpDatabaseUrl = "sdbc:dbase:file:///" + tmpDatabaseUrl ;
|
||||
|
@ -117,7 +117,7 @@ public class SwXTextPortion extends TestCase {
|
||||
XEnumeration oEnum = oEnumA.createEnumeration();
|
||||
|
||||
int n = 0;
|
||||
while ((oEnum.hasMoreElements())) {
|
||||
while (oEnum.hasMoreElements()) {
|
||||
param = (XInterface) AnyConverter.toObject(new Type(
|
||||
XInterface.class), oEnum.nextElement());
|
||||
log.println("Element Nr.: " + n);
|
||||
|
@ -115,7 +115,7 @@ public class SwXTextPortionEnumeration extends TestCase {
|
||||
XEnumerationAccess.class, oText);
|
||||
XEnumeration oEnum = oEnumA.createEnumeration();
|
||||
|
||||
while ((oEnum.hasMoreElements())) {
|
||||
while (oEnum.hasMoreElements()) {
|
||||
param = (XInterface) AnyConverter.toObject(new Type(
|
||||
XInterface.class), oEnum.nextElement());
|
||||
}
|
||||
|
@ -91,11 +91,8 @@ public class TabController extends TestCase {
|
||||
XForm form = null;
|
||||
|
||||
try {
|
||||
form = (XForm) AnyConverter.toObject(new Type(XForm.class),
|
||||
(FormTools.getForms(
|
||||
WriterTools.getDrawPage(
|
||||
xTextDoc)))
|
||||
.getByName("MyForm"));
|
||||
Object temp = FormTools.getForms( WriterTools.getDrawPage(xTextDoc) ).getByName("MyForm");
|
||||
form = (XForm) AnyConverter.toObject(new Type(XForm.class), temp);
|
||||
} catch (Exception e) {
|
||||
log.println("Couldn't get Form");
|
||||
e.printStackTrace(log);
|
||||
|
@ -127,8 +127,7 @@ public final class TypeDescription_Test {
|
||||
@Test public void testUnsigned() throws ClassNotFoundException {
|
||||
assertEquals(
|
||||
"TypeDescription for UNSIGNED LONG", "unsigned long",
|
||||
(TypeDescription.getTypeDescription(Type.UNSIGNED_LONG).
|
||||
getTypeName()));
|
||||
TypeDescription.getTypeDescription(Type.UNSIGNED_LONG).getTypeName());
|
||||
}
|
||||
|
||||
@Test public void testGetMethodDescription() {
|
||||
@ -139,8 +138,7 @@ public final class TypeDescription_Test {
|
||||
@Test public void testSequence() throws ClassNotFoundException {
|
||||
assertEquals(
|
||||
"unsigned short",
|
||||
(TypeDescription.getTypeDescription("[]unsigned short").
|
||||
getComponentType().getTypeName()));
|
||||
TypeDescription.getTypeDescription("[]unsigned short").getComponentType().getTypeName());
|
||||
}
|
||||
|
||||
public interface XBase extends XInterface {
|
||||
|
@ -49,9 +49,7 @@ public final class Type_Test {
|
||||
assertSame(
|
||||
"sequence of sequence of XComponentContext",
|
||||
XComponentContext[][].class,
|
||||
(new Type(
|
||||
"[][]com.sun.star.uno.XComponentContext", TypeClass.SEQUENCE).
|
||||
getZClass()));
|
||||
new Type("[][]com.sun.star.uno.XComponentContext", TypeClass.SEQUENCE).getZClass());
|
||||
assertSame(
|
||||
"enum TypeClass", TypeClass.class,
|
||||
new Type("com.sun.star.uno.TypeClass", TypeClass.ENUM).getZClass());
|
||||
@ -60,27 +58,20 @@ public final class Type_Test {
|
||||
new Type("com.sun.star.uno.Uik", TypeClass.STRUCT).getZClass());
|
||||
assertSame(
|
||||
"exception Exception", com.sun.star.uno.Exception.class,
|
||||
(new Type("com.sun.star.uno.Exception", TypeClass.EXCEPTION).
|
||||
getZClass()));
|
||||
new Type("com.sun.star.uno.Exception", TypeClass.EXCEPTION).getZClass());
|
||||
assertSame(
|
||||
"exception RuntimeException",
|
||||
com.sun.star.uno.RuntimeException.class,
|
||||
(new Type("com.sun.star.uno.RuntimeException", TypeClass.EXCEPTION).
|
||||
getZClass()));
|
||||
new Type("com.sun.star.uno.RuntimeException", TypeClass.EXCEPTION).getZClass());
|
||||
assertSame(
|
||||
"exception DeploymentException", DeploymentException.class,
|
||||
(new Type(
|
||||
"com.sun.star.uno.DeploymentException", TypeClass.EXCEPTION).
|
||||
getZClass()));
|
||||
new Type("com.sun.star.uno.DeploymentException", TypeClass.EXCEPTION).getZClass());
|
||||
assertSame(
|
||||
"interface XInterface", XInterface.class,
|
||||
(new Type("com.sun.star.uno.XInterface", TypeClass.INTERFACE).
|
||||
getZClass()));
|
||||
new Type("com.sun.star.uno.XInterface", TypeClass.INTERFACE).getZClass());
|
||||
assertSame(
|
||||
"interface XComponentContext", XComponentContext.class,
|
||||
(new Type(
|
||||
"com.sun.star.uno.XComponentContext", TypeClass.INTERFACE).
|
||||
getZClass()));
|
||||
new Type("com.sun.star.uno.XComponentContext", TypeClass.INTERFACE). getZClass());
|
||||
|
||||
assertSame(boolean.class, new Type(boolean.class).getZClass());
|
||||
assertSame(boolean.class, new Type(Boolean.class).getZClass());
|
||||
|
@ -35,12 +35,11 @@ public class CheckIndexedPropertyValues {
|
||||
@Test public void checkIndexedPropertyValues()
|
||||
throws com.sun.star.uno.Exception
|
||||
{
|
||||
XIndexContainer xCont = UnoRuntime.queryInterface(
|
||||
XIndexContainer.class,
|
||||
(connection.getComponentContext().getServiceManager().
|
||||
createInstanceWithContext(
|
||||
"com.sun.star.document.IndexedPropertyValues",
|
||||
connection.getComponentContext())));
|
||||
Object instance = connection.getComponentContext().getServiceManager().
|
||||
createInstanceWithContext(
|
||||
"com.sun.star.document.IndexedPropertyValues",
|
||||
connection.getComponentContext());
|
||||
XIndexContainer xCont = UnoRuntime.queryInterface(XIndexContainer.class, instance);
|
||||
|
||||
assertNotNull("XIndexContainer was queried but returned null.", xCont);
|
||||
PropertyValue[] prop1 = new PropertyValue[1];
|
||||
|
@ -35,12 +35,9 @@ public class CheckNamedPropertyValues {
|
||||
@Test public void checkNamedPropertyValues()
|
||||
throws com.sun.star.uno.Exception
|
||||
{
|
||||
XNameContainer xCont = UnoRuntime.queryInterface(
|
||||
XNameContainer.class,
|
||||
(connection.getComponentContext().getServiceManager().
|
||||
createInstanceWithContext(
|
||||
"com.sun.star.document.NamedPropertyValues",
|
||||
connection.getComponentContext())));
|
||||
Object instance = connection.getComponentContext().getServiceManager().
|
||||
createInstanceWithContext( "com.sun.star.document.NamedPropertyValues", connection.getComponentContext());
|
||||
XNameContainer xCont = UnoRuntime.queryInterface(XNameContainer.class, instance);
|
||||
|
||||
assertNotNull("XNameContainer was queried but returned null.", xCont);
|
||||
PropertyValue[] prop1 = new PropertyValue[1];
|
||||
|
@ -253,7 +253,7 @@ abstract class ContentNode extends TreeNode
|
||||
return super.toString() + "\tcontent: " + m_Content;
|
||||
}
|
||||
boolean equals(ContentNode other) {
|
||||
return (other.m_Content.equals(m_Content));
|
||||
return other.m_Content.equals(m_Content);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4145,8 +4145,8 @@ public class TextPortionEnumerationTest
|
||||
|
||||
static boolean eq(StringPair i_Left, StringPair i_Right)
|
||||
{
|
||||
return ((i_Left.First).equals(i_Right.First)) &&
|
||||
((i_Left.Second).equals(i_Right.Second));
|
||||
return (i_Left.First.equals(i_Right.First)) &&
|
||||
(i_Left.Second.equals(i_Right.Second));
|
||||
}
|
||||
|
||||
@BeforeClass public static void setUpConnection() throws Exception {
|
||||
|
@ -20,6 +20,7 @@ package servicetests;
|
||||
|
||||
import com.sun.star.bridge.XBridgeFactory;
|
||||
import com.sun.star.bridge.XInstanceProvider;
|
||||
import com.sun.star.bridge.XUnoUrlResolver;
|
||||
import com.sun.star.bridge.UnoUrlResolver;
|
||||
import com.sun.star.comp.helper.Bootstrap;
|
||||
import com.sun.star.connection.Acceptor;
|
||||
@ -44,12 +45,11 @@ public final class RemoteServiceTest extends TestBase {
|
||||
Thread.sleep(5000); // wait for server to start accepting
|
||||
return new TestServiceFactory() {
|
||||
public Object get() throws Exception {
|
||||
return (UnoUrlResolver.create(
|
||||
Bootstrap.createInitialComponentContext(null))).
|
||||
resolve(
|
||||
"uno:" + CONNECTION_DESCRIPTION + ";"
|
||||
XUnoUrlResolver resolver = UnoUrlResolver.create(Bootstrap.createInitialComponentContext(null));
|
||||
String sUrl = "uno:" + CONNECTION_DESCRIPTION + ";"
|
||||
+ PROTOCOL_DESCRIPTION
|
||||
+ ";testtools.servicetests.TestService2");
|
||||
+ ";testtools.servicetests.TestService2";
|
||||
return resolver.resolve(sUrl);
|
||||
}
|
||||
|
||||
public void dispose() throws Exception {
|
||||
|
@ -242,7 +242,7 @@ class CanvasShape
|
||||
*/
|
||||
public boolean contains (int x, int y)
|
||||
{
|
||||
return (maShape.contains (x,y));
|
||||
return maShape.contains (x,y);
|
||||
}
|
||||
|
||||
public void highlight ()
|
||||
|
@ -112,7 +112,7 @@ public class ContextView
|
||||
@Override
|
||||
public String GetTitle ()
|
||||
{
|
||||
return ("Context");
|
||||
return "Context";
|
||||
}
|
||||
|
||||
/** Listen for changes regarding displayed values.
|
||||
|
@ -116,7 +116,7 @@ public class FocusView
|
||||
@Override
|
||||
public String GetTitle ()
|
||||
{
|
||||
return ("Focus");
|
||||
return "Focus";
|
||||
}
|
||||
|
||||
synchronized public void actionPerformed (ActionEvent aEvent)
|
||||
|
@ -110,7 +110,7 @@ public class TextView
|
||||
@Override
|
||||
public String GetTitle ()
|
||||
{
|
||||
return ("Text");
|
||||
return "Text";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -596,8 +596,7 @@ public class RDFRepositoryTest
|
||||
throw new RuntimeException();
|
||||
}
|
||||
for (int i = 0; i < left.length; ++i) {
|
||||
int eq = (left[i].getStringValue().compareTo(
|
||||
right[i].getStringValue()));
|
||||
int eq = left[i].getStringValue().compareTo(right[i].getStringValue());
|
||||
if (eq != 0) return eq;
|
||||
}
|
||||
return 0;
|
||||
|
@ -55,7 +55,7 @@ public class RelationController extends CommandName
|
||||
try
|
||||
{
|
||||
ArrayList<String> aReferencedTableVector = new ArrayList<String>();
|
||||
XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getExportedKeys((getCatalogName(this)), getSchemaName(), getTableName());
|
||||
XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getExportedKeys(getCatalogName(this), getSchemaName(), getTableName());
|
||||
XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet);
|
||||
while (xResultSet.next())
|
||||
{
|
||||
|
@ -189,11 +189,11 @@ public class Control extends Shape
|
||||
// when we change the border from "3D" to "Flat"
|
||||
if (getControlType() == FormHandler.SOCHECKBOX)
|
||||
{
|
||||
return ((aPeerSize.Width * oFormHandler.getXPixelFactor()));
|
||||
return aPeerSize.Width * oFormHandler.getXPixelFactor();
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((aPeerSize.Width * oFormHandler.getXPixelFactor()) + 200);
|
||||
return (aPeerSize.Width * oFormHandler.getXPixelFactor()) + 200;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ public class ReportFinalizer
|
||||
}
|
||||
public void initialize(RecordParser _CurDBMetaData)
|
||||
{
|
||||
String FirstCommandName = (_CurDBMetaData.getIncludedCommandNames())[0];
|
||||
String FirstCommandName = _CurDBMetaData.getIncludedCommandNames()[0];
|
||||
String DefaultName = Desktop.getUniqueName(_CurDBMetaData.getReportDocuments(), FirstCommandName);
|
||||
if (!DefaultName.equals(OldDefaultName))
|
||||
{
|
||||
|
@ -420,17 +420,17 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
|
||||
}
|
||||
else if (optUseExisting.getState())
|
||||
{
|
||||
return (new String[]
|
||||
return new String[]
|
||||
{
|
||||
lstSinglePrimeKey.getSelectedItem()
|
||||
});
|
||||
};
|
||||
}
|
||||
else if (optAddAutomatically.getState())
|
||||
{
|
||||
return (new String[]
|
||||
return new String[]
|
||||
{
|
||||
SAUTOMATICKEYFIELDNAME
|
||||
});
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ public class AggregateComponent extends ControlScroller
|
||||
oControlRow = ControlRowVector.get(fieldcount);
|
||||
oControlRow.setVisible(false);
|
||||
}
|
||||
super.setScrollValue(getScrollValue() - 1, (fieldcount));
|
||||
super.setScrollValue(getScrollValue() - 1, fieldcount);
|
||||
super.unregisterControlGroup(fieldcount);
|
||||
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator<
|
||||
{
|
||||
return sCommandname.substring(sTablePrefix.length());
|
||||
}
|
||||
else if ((sCommandname.startsWith(this.sQueryPrefix)))
|
||||
else if (sCommandname.startsWith(this.sQueryPrefix))
|
||||
{
|
||||
return sCommandname.substring(sQueryPrefix.length());
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ public class FilterComponent
|
||||
{
|
||||
boolean bisany = true;
|
||||
int ifilterstate = SOI_MATCHALL;
|
||||
bisany = (this.optMatchAny.getState());
|
||||
bisany = this.optMatchAny.getState();
|
||||
if (bisany)
|
||||
{
|
||||
ifilterstate = SOI_MATCHANY;
|
||||
@ -722,8 +722,8 @@ public class FilterComponent
|
||||
Object oValue = Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "EffectiveValue");
|
||||
if (!AnyConverter.isVoid(oValue))
|
||||
{
|
||||
String sValue = (String.valueOf(oValue));
|
||||
return (!sValue.equals(PropertyNames.EMPTY_STRING));
|
||||
String sValue = String.valueOf(oValue);
|
||||
return !sValue.equals(PropertyNames.EMPTY_STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -916,7 +916,7 @@ public class FilterComponent
|
||||
// TODO make a difference between Text and Numbers
|
||||
private Object getValue()
|
||||
{
|
||||
return (Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "EffectiveValue"));
|
||||
return Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "EffectiveValue");
|
||||
}
|
||||
|
||||
|
||||
|
@ -194,7 +194,7 @@ public class UnoDialog
|
||||
XControl xControl2 = xDlgContainer.getControl(ControlName);
|
||||
XView xView = UnoRuntime.queryInterface(XView.class, xControl2);
|
||||
Size aSize = xView.getSize();
|
||||
double dblMAPWidth = (((Integer) Helper.getUnoPropertyValue(xControl2.getModel(), PropertyNames.PROPERTY_WIDTH)).intValue());
|
||||
double dblMAPWidth = ((Integer) Helper.getUnoPropertyValue(xControl2.getModel(), PropertyNames.PROPERTY_WIDTH)).intValue();
|
||||
return ((aSize.Width) / dblMAPWidth);
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ public class XMergeBridge {
|
||||
origName=origName.substring(origName.lastIndexOf("/")+1,origName.length());
|
||||
}
|
||||
if (origName.lastIndexOf(".")>=0){
|
||||
name = origName.substring(0,(origName.lastIndexOf(".")));
|
||||
name = origName.substring(0, origName.lastIndexOf("."));
|
||||
}
|
||||
else{
|
||||
name=origName;
|
||||
|
@ -228,6 +228,6 @@ public class Convert implements Cloneable {
|
||||
*/
|
||||
public Document getOfficeDocument(String name, InputStream is)
|
||||
throws IOException {
|
||||
return(ci.getPluginFactory().createOfficeDocument(name, is));
|
||||
return ci.getPluginFactory().createOfficeDocument(name, is);
|
||||
}
|
||||
}
|
@ -322,7 +322,7 @@ public class ParaStyle extends Style implements Cloneable {
|
||||
private void setAttribute(int attr, String value) {
|
||||
isSet[attr] = true;
|
||||
try {
|
||||
this.value[attr] = (((conversionAlgorithm)algor[attr].newInstance())).I(value);
|
||||
this.value[attr] = ((conversionAlgorithm)algor[attr].newInstance()).I(value);
|
||||
} catch (Exception e) {
|
||||
Debug.log(Debug.ERROR, "Instantiation error", e);
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public class SheetSettings implements OfficeConstants {
|
||||
* @return The position as a {@code Point}.
|
||||
*/
|
||||
public Point getCursor() {
|
||||
return (new Point(cursorX, cursorY));
|
||||
return new Point(cursorX, cursorY);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -124,7 +124,7 @@ public class SheetSettings implements OfficeConstants {
|
||||
*/
|
||||
public Point getSplit() {
|
||||
|
||||
return (new Point(splitPointX, splitPointY));
|
||||
return new Point(splitPointX, splitPointY);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -134,7 +134,7 @@ public class SheetSettings implements OfficeConstants {
|
||||
*/
|
||||
public Point getSplitType() {
|
||||
|
||||
return (new Point(splitTypeX, splitTypeY));
|
||||
return new Point(splitTypeX, splitTypeY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -76,7 +76,7 @@ public final class CharacterBaseParagraphMerge implements NodeMergeAlgorithm {
|
||||
|
||||
int extraChar = 0;
|
||||
int orgDiffCount = diffCount;
|
||||
TextNodeEntry orgTextNode = (orgNodeList.get(i));
|
||||
TextNodeEntry orgTextNode = orgNodeList.get(i);
|
||||
|
||||
Debug.log(Debug.INFO, "checking node " + (i + 1) + " of " + numNode);
|
||||
|
||||
|
@ -95,7 +95,7 @@ public final class XmlUtil {
|
||||
case Node.ELEMENT_NODE:
|
||||
Element oldElem = (Element)newNode;
|
||||
String tagName = newNode.getNodeName();
|
||||
Element newElem = (docNode.createElement(tagName));
|
||||
Element newElem = docNode.createElement(tagName);
|
||||
|
||||
// copy the attributes
|
||||
NamedNodeMap attrs = oldElem.getAttributes();
|
||||
|
@ -260,7 +260,7 @@ public class ConverterInfo {
|
||||
* device mime-type.
|
||||
*/
|
||||
public Iterator<String> getDeviceMime() {
|
||||
return(piDeviceMime.iterator());
|
||||
return piDeviceMime.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,7 +114,7 @@ public final class ConverterInfoMgr {
|
||||
* exist.
|
||||
*/
|
||||
private static Iterator<ConverterInfo> getConverterInfoEnumeration() {
|
||||
return (converterInfoList.iterator());
|
||||
return converterInfoList.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -247,6 +247,6 @@ public class ConverterInfoReader {
|
||||
* @return An {@code Enumeration} of {@code ConverterInfo} objects.
|
||||
*/
|
||||
public Iterator<ConverterInfo> getConverterInfoEnumeration() {
|
||||
return (converterInfoList.iterator());
|
||||
return converterInfoList.iterator();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user