diff options
310 files changed, 12 insertions, 4988 deletions
diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java index 4f60fb8375af..9415e089d9fd 100644 --- a/bean/com/sun/star/comp/beans/OOoBean.java +++ b/bean/com/sun/star/comp/beans/OOoBean.java @@ -78,7 +78,6 @@ public class OOoBean // debugging method private void dbgPrint( String aMessage ) { - // System.err.println( "OOoBean: " + aMessage ); } // @requirement FUNC.PER/0.2 diff --git a/bean/qa/complex/bean/OOoBeanTest.java b/bean/qa/complex/bean/OOoBeanTest.java index 82a604bdfc1d..d223fb74a9be 100644 --- a/bean/qa/complex/bean/OOoBeanTest.java +++ b/bean/qa/complex/bean/OOoBeanTest.java @@ -24,9 +24,7 @@ import com.sun.star.uno.UnoRuntime; import java.awt.*; -// import org.junit.After; import org.junit.AfterClass; -// import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.openoffice.test.OfficeConnection; @@ -43,23 +41,6 @@ class PrivateLocalOfficeConnection extends com.sun.star.comp.beans.LocalOfficeCo public class OOoBeanTest { -// public String[] getTestMethodNames() -// { -// // TODO think about trigger of sub-tests from outside -// return new String[] -// { -// "test1", -// "test2", -// "test3", -// "test4", -// "test5", -// "test6", -// "test6a", -// "test7", -// "test8" -// }; -// } - /** For X-Windows we need to prolong the time between painting windows. Because it takes longer than on Windows. */ diff --git a/bean/qa/complex/bean/ScreenComparer.java b/bean/qa/complex/bean/ScreenComparer.java index c415c8404345..9b4815bc3caf 100644 --- a/bean/qa/complex/bean/ScreenComparer.java +++ b/bean/qa/complex/bean/ScreenComparer.java @@ -18,16 +18,11 @@ package complex.bean; -// import complexlib.ComplexTestCase; import java.io.File; import java.awt.Rectangle; -// import java.awt.BorderLayout; import java.awt.image.BufferedImage; import java.awt.image.PixelGrabber; -// import java.awt.event.*; -// import java.awt.Frame; import javax.imageio.ImageIO; -// import javax.imageio.stream.FileImageOutputStream; diff --git a/bean/qa/complex/bean/WriterFrame.java b/bean/qa/complex/bean/WriterFrame.java index 470c43f42fc0..d1efaaeb47b7 100644 --- a/bean/qa/complex/bean/WriterFrame.java +++ b/bean/qa/complex/bean/WriterFrame.java @@ -18,7 +18,6 @@ package complex.bean; -// import com.sun.star.comp.beans.LocalOfficeConnection; import com.sun.star.uno.XComponentContext; import java.awt.Rectangle; import java.awt.Insets; diff --git a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java index 6dcc106ed194..82731b54b635 100644 --- a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java +++ b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java @@ -181,7 +181,6 @@ public final class JNI_proxy implements java.lang.reflect.InvocationHandler { if (method_name.equals( "queryInterface" )) { - // Object queryInterface( Type type ) Object registered_proxy = m_java_env.getRegisteredInterface( m_oid, (Type)args[ 0 ] ); if (null == registered_proxy) @@ -200,7 +199,6 @@ public final class JNI_proxy implements java.lang.reflect.InvocationHandler } else if (method_name.equals( "getOid" )) { - // String getOid() return m_oid; } } diff --git a/chart2/qa/TestCaseOldAPI.java b/chart2/qa/TestCaseOldAPI.java index 4e02f35d114d..a3f0aeee9c6f 100644 --- a/chart2/qa/TestCaseOldAPI.java +++ b/chart2/qa/TestCaseOldAPI.java @@ -273,21 +273,6 @@ public class TestCaseOldAPI extends ComplexTestCase { xProp.getPropertyValue( "HasYAxisDescription" )); assure( "Removing description of first y-axis", bNewFirstYAxisText == bFirstYAxisText ); -// boolean bYAxisTitle = true; -// xProp.setPropertyValue( "HasYAxisTitle", new Boolean( bYAxisTitle )); -// boolean bNewYAxisTitle = AnyConverter.toBoolean( -// xProp.getPropertyValue( "HasYAxisTitle" )); -// assure( "Adding y-axis title", bNewYAxisTitle == bYAxisTitle ); - - // set title text -// XAxisYSupplier xYAxisSuppl = (XAxisYSupplier) UnoRuntime.queryInterface( -// XAxisYSupplier.class, mxOldDoc.getDiagram() ); -// assure( "Diagram is no y-axis supplier", xYAxisSuppl != null ); -// XPropertySet xAxisTitleProp = (XPropertySet) UnoRuntime.queryInterface( -// XPropertySet.class, xYAxisSuppl.getYAxisTitle() ); -// assure( "Y-Axis Title is no XPropertySet", xAxisTitleProp != null ); -// xAxisTitleProp.setPropertyValue( "String", "New y axis title" ); - // second y-axis boolean bSecondaryYAxis = true; xProp.setPropertyValue( "HasSecondaryYAxis", new Boolean( bSecondaryYAxis )); @@ -315,8 +300,6 @@ public class TestCaseOldAPI extends ComplexTestCase { xDiagramShape.setPosition( aSetPos ); Point aNewPos = xDiagramShape.getPosition(); - //System.out.println( "set X = " + aSetPos.X + ", new X = " + aNewPos.X ); - //System.out.println( "set Y = " + aSetPos.Y + ", new Y = " + aNewPos.Y ); assure( "Diagram Position X", approxEqual( aNewPos.X, aSetPos.X, 1 )); assure( "Diagram Position Y", approxEqual( aNewPos.Y, aSetPos.Y, 1 )); } @@ -335,8 +318,6 @@ public class TestCaseOldAPI extends ComplexTestCase { xDiagramShape.setSize( aSetSize ); Size aNewSize = xDiagramShape.getSize(); - //System.out.println( "set width = " + aSetSize.Width + ", new width = " + aNewSize.Width ); - //System.out.println( "set height = " + aSetSize.Height + ", new height = " + aNewSize.Height ); assure( "Diagram Width", approxEqual( aNewSize.Width, aSetSize.Width, 2 )); assure( "Diagram Height", approxEqual( aNewSize.Height, aSetSize.Height, 2 )); } @@ -504,19 +485,6 @@ public class TestCaseOldAPI extends ComplexTestCase { int nColor = 0xf5fffa; // mint cream xArea.setPropertyValue( "FillColor", new Integer( nColor ) ); xArea.setPropertyValue( "FillStyle", FillStyle.SOLID ); -// XPropertySetInfo xInfo = xArea.getPropertySetInfo(); -// assure( "Area does not support ChartUserDefinedAttributes", -// xInfo.hasPropertyByName( "ChartUserDefinedAttributes" )); - -// String aTestAttributeName = "test:foo"; -// String aTestAttributeValue = "content"; -// XNameContainer xUserDefAttributes = (XNameContainer) AnyConverter.toObject( -// new Type( XNameContainer.class ), xArea.getPropertyValue( "ChartUserDefinedAttributes" )); -// xUserDefAttributes.insertByName( aTestAttributeName, aTestAttributeValue ); - -// String aContent = AnyConverter.toString( xUserDefAttributes.getByName( aTestAttributeName )); -// assure( "Wrong content in UserDefinedAttributes container", -// aContent.equals( aTestAttributeValue )); int nNewColor = AnyConverter.toInt( xArea.getPropertyValue( "FillColor" ) ); assure( "Changing FillColor of Area failed", nNewColor == nColor ); diff --git a/comphelper/qa/complex/comphelper/Map.java b/comphelper/qa/complex/comphelper/Map.java index 0603ba34e13f..062179223823 100644 --- a/comphelper/qa/complex/comphelper/Map.java +++ b/comphelper/qa/complex/comphelper/Map.java @@ -29,10 +29,8 @@ import com.sun.star.container.XIdentifierAccess; import com.sun.star.container.XMap; import com.sun.star.container.XSet; import com.sun.star.form.XFormComponent; -// import com.sun.star.lang.DisposedException; import com.sun.star.lang.EventObject; import com.sun.star.lang.Locale; -// import com.sun.star.lang.NoSupportException; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.Any; import com.sun.star.uno.AnyConverter; @@ -43,9 +41,7 @@ import com.sun.star.uno.XInterface; import java.util.HashSet; import java.util.Set; -// import org.junit.After; import org.junit.AfterClass; -// import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.openoffice.test.OfficeConnection; @@ -55,23 +51,6 @@ import static org.junit.Assert.*; */ public class Map /* extends complexlib.ComplexTestCase */ { -// @Override -// public String[] getTestMethodNames() -// { -// return new String[] { -// "testSimpleKeyTypes", -// "testComplexKeyTypes", -// "testValueTypes", -// "testEnumerations", -// "testSpecialValues" -// }; -// } - -// public static String getShortTestDescription() -// { -// return "tests the css.container.Map implementation from comphelper/source/misc/map.cxx"; -// } - private static String impl_getNth( int n ) { switch ( n % 10 ) diff --git a/comphelper/qa/complex/comphelper/SequenceOutputStreamUnitTest.java b/comphelper/qa/complex/comphelper/SequenceOutputStreamUnitTest.java index b5b4d56da34b..ab37ad911a4a 100644 --- a/comphelper/qa/complex/comphelper/SequenceOutputStreamUnitTest.java +++ b/comphelper/qa/complex/comphelper/SequenceOutputStreamUnitTest.java @@ -17,7 +17,6 @@ */ package complex.comphelper; -// import complexlib.ComplexTestCase; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRuntime; @@ -38,7 +37,6 @@ import static org.junit.Assert.*; class TestHelper { - // LogWriter m_aLogWriter; String m_sTestPrefix; /** Creates a new instance of TestHelper @@ -61,19 +59,6 @@ public class SequenceOutputStreamUnitTest /* extends ComplexTestCase*/ { TestHelper m_aTestHelper = null; -// public String[] getTestMethodNames() { -// return new String[] { -// "ExecuteTest01"}; -// } - -// public String getTestObjectName () { -// return "SequenceOutputStreamUnitTest"; -// } - -// public static String getShortTestDescription() { -// return "tests the SequenceOutput/InputStream implementations"; -// } - @Before public void before() { try { m_xMSF = getMSF(); @@ -90,11 +75,6 @@ public class SequenceOutputStreamUnitTest /* extends ComplexTestCase*/ { m_xMSF = null; } -// @Test public void ExecuteTest01() { -// Test01 aTest = new Test01 (m_xMSF); -// assertTrue( "Test01 failed!", aTest.test() ); -// } - @Test public void test () { try { final int nBytesCnt = 20; diff --git a/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java b/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java index b34a8185be87..822f1bc1fefd 100644 --- a/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java +++ b/connectivity/qa/complex/connectivity/JdbcLongVarCharTest.java @@ -57,11 +57,9 @@ public class JdbcLongVarCharTest extends ComplexTestCase System.out.println("== Start testing =="); String url = "jdbc:mysql://localhost:3306/mysql?user=root"; - //String url = "jdbc:ingres://localhost:II7/demodb;AUTO=multi"; com.sun.star.sdbc.XConnection xConnection = null; com.sun.star.beans.PropertyValue prop[] = new PropertyValue[1]; prop[0] = new PropertyValue("JavaDriverClass", 0, "com.mysql.jdbc.Driver", PropertyState.DIRECT_VALUE); - //prop[0] = new PropertyValue("JavaDriverClass", 0, "com.ingres.jdbc.IngresDriver", PropertyState.DIRECT_VALUE); // get the remote office component context XMultiServiceFactory xServiceManager = param.getMSF(); @@ -70,7 +68,6 @@ public class JdbcLongVarCharTest extends ComplexTestCase com.sun.star.sdbc.XDriver xDriver = xDriverAccess.getDriverByURL(url); xConnection = xDriver.connect(url, prop); - //Object prepStmnt = xConnection.prepareStatement("SELECT * FROM t1 WHERE t1.c1 = ?"); Object prepStmnt = xConnection.prepareStatement("SELECT * FROM i90114 WHERE i90114.c1 = ?"); UnoRuntime.queryInterface(XParameters.class, prepStmnt).clearParameters(); UnoRuntime.queryInterface(XParameters.class, prepStmnt).setInt(1, 1); diff --git a/connectivity/qa/connectivity/tools/HsqlDatabase.java b/connectivity/qa/connectivity/tools/HsqlDatabase.java index dd6831d7828e..3e1395be9cdd 100644 --- a/connectivity/qa/connectivity/tools/HsqlDatabase.java +++ b/connectivity/qa/connectivity/tools/HsqlDatabase.java @@ -179,7 +179,6 @@ public class HsqlDatabase extends AbstractDatabase createStatement.append(')'); - //System.err.println( createStatement ); executeSQL(createStatement.toString()); } diff --git a/dbaccess/qa/complex/dbaccess/Beamer.java b/dbaccess/qa/complex/dbaccess/Beamer.java index effc4cc555a5..5c9af57354e8 100644 --- a/dbaccess/qa/complex/dbaccess/Beamer.java +++ b/dbaccess/qa/complex/dbaccess/Beamer.java @@ -41,11 +41,8 @@ import java.io.IOException; // ---------- junit imports ----------------- import org.junit.After; -// import org.junit.AfterClass; import org.junit.Before; -// import org.junit.BeforeClass; import org.junit.Test; -// import org.openoffice.test.OfficeConnection; import static org.junit.Assert.*; diff --git a/dbaccess/qa/complex/dbaccess/PropertyBag.java b/dbaccess/qa/complex/dbaccess/PropertyBag.java index ea1c570b86b2..941549c67223 100644 --- a/dbaccess/qa/complex/dbaccess/PropertyBag.java +++ b/dbaccess/qa/complex/dbaccess/PropertyBag.java @@ -18,8 +18,6 @@ package complex.dbaccess; -// import complexlib.ComplexTestCase; - import com.sun.star.beans.NamedValue; import com.sun.star.beans.PropertyState; import com.sun.star.beans.PropertyValue; diff --git a/dbaccess/qa/complex/dbaccess/Query.java b/dbaccess/qa/complex/dbaccess/Query.java index 20d4c41d16ed..8881bb3edecb 100644 --- a/dbaccess/qa/complex/dbaccess/Query.java +++ b/dbaccess/qa/complex/dbaccess/Query.java @@ -56,11 +56,6 @@ public class Query extends TestCase } -// private XMultiServiceFactory getFactory() -// { -// return (XMultiServiceFactory)param.getMSF(); -// } - @Test public void testQueryColumns() { diff --git a/dbaccess/qa/complex/dbaccess/TestCase.java b/dbaccess/qa/complex/dbaccess/TestCase.java index b30bf7c2a3c1..86d3425db473 100644 --- a/dbaccess/qa/complex/dbaccess/TestCase.java +++ b/dbaccess/qa/complex/dbaccess/TestCase.java @@ -23,7 +23,6 @@ import com.sun.star.beans.PropertyValue; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XModel; import com.sun.star.lang.XMultiServiceFactory; -// import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XComponentContext; import helper.FileTools; diff --git a/embeddedobj/test/Container1/BitmapPainter.java b/embeddedobj/test/Container1/BitmapPainter.java index 75e9c8a07069..482421bd52ae 100644 --- a/embeddedobj/test/Container1/BitmapPainter.java +++ b/embeddedobj/test/Container1/BitmapPainter.java @@ -61,9 +61,6 @@ class BitmapPainter implements XPaintListener, XMouseListener, XMouseMotionListe private PaintThread m_aPaintThread; - // private XJob m_xMainThreadExecutor; - // private NamedValue[] m_pValuesForExecutor; - private boolean m_bFree = true; private boolean m_bProceedWithPainting = true; @@ -84,10 +81,6 @@ class BitmapPainter implements XPaintListener, XMouseListener, XMouseMotionListe throw new com.sun.star.uno.RuntimeException(); } - // m_xMainThreadExecutor = xJob; - // m_pValuesForExecutor = new NamedValue[1]; - // m_pValuesForExecutor[0] = new NamedValue( "JobToExecute", (Object)this ); - m_xWindow = xWindow; m_xBitmap = xBitmap; @@ -171,29 +164,14 @@ class BitmapPainter implements XPaintListener, XMouseListener, XMouseMotionListe XBitmap xBitmap = null; com.sun.star.awt.Rectangle aRect = null; - // boolean bFree = false; synchronized( m_oImageLock ) { xBitmap = m_xBitmap; aRect = m_aDrawRect; - // if ( m_bFree ) - // { - // bFree = true; - // m_bFree = false; - // } } m_aPaintThread.setPaintRequest( xBitmap, aRect, e.UpdateRect ); - // if ( bFree ) - // { - // try { - // m_xMainThreadExecutor.execute( m_pValuesForExecutor ); - // } catch( Exception ex ) - // { - // m_bFree = true; - // } - // } System.out.println( "VCL window paint event!" ); } diff --git a/embeddedobj/test/Container1/PaintThread.java b/embeddedobj/test/Container1/PaintThread.java index 4e6b166fa94c..f7eb63ef2735 100644 --- a/embeddedobj/test/Container1/PaintThread.java +++ b/embeddedobj/test/Container1/PaintThread.java @@ -73,18 +73,6 @@ class PaintThread extends java.lang.Thread { synchronized( m_oRequestsLock ) { - /* - System.out.println( "Paint request Pos( " - + aRect.X + ", " - + aRect.Y + ", " - + aRect.Width + ", " - + aRect.Height + " ), Clip ( " - + aClip.X + ", " - + aClip.Y + ", " - + aClip.Width + ", " - + aClip.Height + " )" ); - */ - if ( PaintThread.interceptedRects( aRect, aClip ) ) { m_xBitmap = xBitmap; @@ -92,8 +80,6 @@ class PaintThread extends java.lang.Thread m_bToPaint = true; } } - - // System.out.println( "Paint request to paint thread is done! xBitmap = " + xBitmap ); } public void disposeThread() @@ -126,15 +112,12 @@ class PaintThread extends java.lang.Thread if ( bPaint ) { - // System.out.println( "The bitmap is going to be painted!" ); XDevice xDevice = (XDevice)UnoRuntime.queryInterface( XDevice.class, m_xWindow ); if ( xDevice != null ) { - // System.out.println( "Step1" ); XGraphics xGraphics = xDevice.createGraphics(); if ( xBitmap != null ) { - // System.out.println( "Step2" ); XDisplayBitmap xDisplayBitmap = xDevice.createDisplayBitmap( xBitmap ); com.sun.star.awt.Size aSize = xBitmap.getSize(); @@ -142,8 +125,6 @@ class PaintThread extends java.lang.Thread aRect.X, aRect.Y, aRect.Width, aRect.Height ); } - // System.out.println( "Step3" ); - // xGraphics.drawRect( aRect.X - 1, aRect.Y - 1, aRect.Width + 2, aRect.Height + 2 ); xGraphics.drawLine( aRect.X - 1, aRect.Y - 1, aRect.X + aRect.Width + 1, aRect.Y - 1 ); xGraphics.drawLine( aRect.X + aRect.Width + 1, aRect.Y - 1, @@ -152,17 +133,6 @@ class PaintThread extends java.lang.Thread aRect.X - 1, aRect.Y + aRect.Height + 1 ); xGraphics.drawLine( aRect.X - 1, aRect.Y + aRect.Height + 1, aRect.X - 1, aRect.Y - 1 ); - - // draw resize squares - // System.out.println( "Step4" ); - // xGraphics.drawRect( aRect.X - 2, aRect.Y - 2, 4, 4 ); - // xGraphics.drawRect( aRect.X + aRect.Width - 2, aRect.Y - 2, 4, 4 ); - // xGraphics.drawRect( aRect.X - 2, aRect.Y + aRect.Height - 2, 4, 4 ); - // xGraphics.drawRect( aRect.X + aRect.Width - 2, aRect.Y + aRect.Height - 2, 4, 4 ); - - // System.out.println( "Step5" ); - - // System.out.println( "The bitmap is painted by paint thread!" ); } } } diff --git a/extensions/qa/complex/extensions/OfficeResourceLoader.java b/extensions/qa/complex/extensions/OfficeResourceLoader.java index 45e91e338639..cbc57f2fc739 100644 --- a/extensions/qa/complex/extensions/OfficeResourceLoader.java +++ b/extensions/qa/complex/extensions/OfficeResourceLoader.java @@ -45,21 +45,6 @@ public class OfficeResourceLoader } /* ------------------------------------------------------------------ */ -// public String[] getTestMethodNames() -// { -// return new String[] { -// "checkSimpleStringAccess", -// "checkLocales" -// }; -// } - - /* ------------------------------------------------------------------ */ -// public String getTestObjectName() -// { -// return "Extensions - OfficeResourceLoader"; -// } - - /* ------------------------------------------------------------------ */ @Before public void before() throws com.sun.star.uno.Exception, java.lang.Exception { XPropertySet orb = UnoRuntime.queryInterface(XPropertySet.class, getMSF()); diff --git a/extensions/test/pgp/TestPGP.java b/extensions/test/pgp/TestPGP.java index 78d4285f707d..d11164cb0187 100644 --- a/extensions/test/pgp/TestPGP.java +++ b/extensions/test/pgp/TestPGP.java @@ -33,7 +33,6 @@ import com.sun.star.uno.Type; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.uno.XNamingService; -// import com.sun.star.comp.bootstrap.Bootstrap; @@ -57,7 +56,6 @@ public class TestPGP { System.err.println(" couldn't get XSet from ServiceFactory"); return; } -// try{ SimplePGPMailerFactoryReg mailerReg= new SimplePGPMailerFactoryReg(); XSingleServiceFactory factory= mailerReg.getServiceFactory( "com.sun.star.pgp.SimplePGPMailerImpl", rSmgr, null, null); @@ -69,10 +67,6 @@ public class TestPGP { set.insert(factory ); System.err.println("PGP factory inserted into service manager"); -// }catch(Exception e ){ -// System.err.println( "exception caught in TestPGP"); -// } - } } @@ -84,7 +78,6 @@ public class TestPGP { System.exit(-1); } -// try { XUnoUrlResolver resolver = UnoUrlResolver.create(Bootstrap.createInitialComponentContext(null)); XConnector xConnector = UnoRuntime.queryInterface(XConnector.class, resolver.resolve("com.sun.star.connection.Connector")); @@ -94,16 +87,11 @@ public class TestPGP { IBridge iBridge = UnoRuntime.getBridgeByName("java", null, "remote", null, new Object[]{"iiop", xConnection, null}); Object rInitialObject = iBridge.mapInterfaceFrom(rootOid, new Type(XInterface.class)); -// Object rInitialObject = xBridge.getInstance("NamingService"); if(rInitialObject != null) { System.err.println("got the remote object"); doSomething(rInitialObject); } -// } -// catch (Exception exception) { -// System.err.println("Exception thrown:" + exception); -// } } } diff --git a/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java index a78a76e75f6c..fcf8efdb8a74 100644 --- a/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java +++ b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java @@ -29,8 +29,6 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.util.XFlushable; -// import complexlib.ComplexTestCase; -// import util.utils; import org.junit.AfterClass; import org.junit.Before; @@ -75,14 +73,6 @@ public class FinalizedMandatoryTest static XMultiServiceFactory xMSF; - /** - * A function to tell the framework, which test functions are available. - * @return All test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkReadonlySupportFilterFactory", -// "checkReadonlySupportTypeDetection"}; -// } /** Create the environment for following tests. * Use either a component loader from desktop or * from frame @@ -109,10 +99,6 @@ public class FinalizedMandatoryTest Object oInterface = xMSF.createInstance(serviceName); assertNotNull("Service wan't created", oInterface); -// if (oInterface == null) { -// failed("Service wasn't created") ; -// throw new Exception("could not create service '"+serviceName+"'"); -// } return (XInterface) oInterface; } diff --git a/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java b/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java index 14c04273f7d3..33a1b1d7e9d4 100644 --- a/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java +++ b/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java @@ -43,14 +43,6 @@ public class TypeDetection6FileFormat static XMultiServiceFactory xMSF; - /** - * A function to tell the framework, which test functions are available. - * @return All test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkFilterFactory", -// "checkTypeDetection"}; -// } /** Create the environment for following tests. * Use either a component loader from desktop or * from frame diff --git a/forms/qa/complex/forms/CheckOGroupBoxModel.java b/forms/qa/complex/forms/CheckOGroupBoxModel.java index b1f4bbadf022..8e0cea8a9655 100644 --- a/forms/qa/complex/forms/CheckOGroupBoxModel.java +++ b/forms/qa/complex/forms/CheckOGroupBoxModel.java @@ -45,7 +45,6 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRuntime; import com.sun.star.util.CloseVetoException; import com.sun.star.util.XCloseable; -// import complexlib.ComplexTestCase; /** */ @@ -55,12 +54,8 @@ public class CheckOGroupBoxModel private XMultiPropertySet m_xPropSet; private XComponent m_xDrawDoc; -// public String[] getTestMethodNames() { -// return new String[] {"setPropertyValues"}; -// } @Before public void before() { - // XComponent xDrawDoc = null; SOfficeFactory SOF = SOfficeFactory.getFactory(getMSF()); try diff --git a/framework/qa/complex/ModuleManager/CheckXModuleManager.java b/framework/qa/complex/ModuleManager/CheckXModuleManager.java index ef43d156ee73..f4e1a6d81c8d 100644 --- a/framework/qa/complex/ModuleManager/CheckXModuleManager.java +++ b/framework/qa/complex/ModuleManager/CheckXModuleManager.java @@ -62,24 +62,6 @@ public class CheckXModuleManager // test environment - /** @short A function to tell the framework, - which test functions are available. - - @return All test methods. - @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkModuleIdentification" , -// "checkModuleConfigurationReadable" , -// "checkModuleConfigurationWriteable", -// "checkModuleConfigurationQueries" -// }; -// } - - /** @short Create the environment for following tests. @descr Use either a component loader from desktop or diff --git a/framework/qa/complex/XUserInputInterception/EventTest.java b/framework/qa/complex/XUserInputInterception/EventTest.java index 1ce381454d58..aef6fca6b4df 100644 --- a/framework/qa/complex/XUserInputInterception/EventTest.java +++ b/framework/qa/complex/XUserInputInterception/EventTest.java @@ -92,33 +92,6 @@ public class EventTest { /** - * The test methods are: - * <ul> - * <li><CODE>checkTextDocument</CODE></LI> - * <li><CODE>checkCalcDocument</CODE></LI> - * <li><CODE>checkDrawDocument</CODE></LI> - * <li><CODE>checkImpressDocument</CODE></LI> - * <li><CODE>checkChartDocument</CODE></LI> - * <li><CODE>checkMathDocument</CODE></li> - * </ul> - * @short A function to tell the framework, - * which test functions are available. - * @return All test methods. - * @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() { -// return new String[] -// { "checkTextDocument", -// "checkCalcDocument", -// "checkDrawDocument", -// "checkImpressDocument", -// "checkChartDocument", -// "checkMathDocument", -// }; -// } - - - /** * creates the mebmer <CODE>m_xMSF</CODE> and <CODE>m_SOF</CODE> * @short Create the environment for following tests. * @descr create an empty test frame, where we can load diff --git a/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java b/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java index 9d2a55a59add..95314dbf3b17 100644 --- a/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java +++ b/framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java @@ -36,9 +36,6 @@ import com.sun.star.uno.AnyConverter; import com.sun.star.uno.UnoRuntime; import com.sun.star.util.XChangesBatch; -// import complex.accelerators.KeyMapping; - - // ---------- junit imports ----------------- import org.junit.After; import org.junit.AfterClass; @@ -69,18 +66,6 @@ public class AcceleratorsConfigurationTest // test environment - /** @short todo document me - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkGlobalAccelCfg", -// "checkModuleAccelCfg", -// "checkDocumentAccelCfg" -// }; -// } - /** @short Create the environment for following tests. */ @Before @@ -355,10 +340,8 @@ public class AcceleratorsConfigurationTest String tempDirURL = util.utils.getOfficeTemp/*Dir*/(getMSF()); sDocCfgName = FileHelper.appendPath(tempDirURL, "test.cfg"); - // sDocCfgName = "file:///c:/test.cfg"; SaveDocumentAcceleratorConfiguration(sDocCfgName); - // sDocCfgName = "file:///c:/test.cfg"; LoadDocumentAcceleratorConfiguration(sDocCfgName); } diff --git a/framework/qa/complex/api_internal/CheckAPI.java b/framework/qa/complex/api_internal/CheckAPI.java index a57afecd015a..ce73df14cea4 100644 --- a/framework/qa/complex/api_internal/CheckAPI.java +++ b/framework/qa/complex/api_internal/CheckAPI.java @@ -15,7 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -// package name: as default, start with complex package complex.api_internal; // imports @@ -50,14 +49,6 @@ import com.sun.star.uno.UnoRuntime; public class CheckAPI { /** - * Return all test methods. - * @return The test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkAPI"}; -// } - - /** * The test parameters */ private static TestParameters param = null; diff --git a/framework/qa/complex/broken_document/LoadDocument.java b/framework/qa/complex/broken_document/LoadDocument.java index b1ef17e25008..61edec968d39 100644 --- a/framework/qa/complex/broken_document/LoadDocument.java +++ b/framework/qa/complex/broken_document/LoadDocument.java @@ -18,7 +18,6 @@ package complex.broken_document; import com.sun.star.beans.PropertyValue; -// import com.sun.star.frame.FrameSearchFlag; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XFrame; import com.sun.star.lang.XMultiServiceFactory; @@ -38,16 +37,6 @@ import static org.junit.Assert.*; */ public class LoadDocument { - /** defect file to load **/ - // private final String mFileName = "dbf.dbf.emf"; - - /** - * Get all test methods. - * @return The test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkHeadlessState"}; -// } /** * Start Office with "--headless" parameter, then @@ -70,8 +59,6 @@ public class LoadDocument { System.out.println("xDektopLoader is null: " + (xDesktopLoader == null)); PropertyValue[] val = new PropertyValue[0]; - // String workingDir = (String)param.get("WorkingDir") + System.getProperty("file.separator") + mFileName; - // System.out.println("Working dir: " + workingDir); String fileUrl = complex.broken_document.TestDocument.getUrl("dbf.dbf.emf"); System.out.println("File Url: " + fileUrl); diff --git a/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java b/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java index 586c362e4030..f621a5a5ef0b 100644 --- a/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java +++ b/framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java @@ -109,21 +109,8 @@ public class CheckContextMenuInterceptor xFrame = null; -// xClose = UnoRuntime.queryInterface(XCloseable.class, xDrawDoc); -// try -// { -// xClose.close(true); -// } -// catch (com.sun.star.util.CloseVetoException exVeto) -// { -// fail("Test DrawDoc couldn't be closed successfully."); -// } - } -// public String[] getTestMethodNames() { -// return new String[]{"checkContextMenuInterceptor"}; -// } @Test public void checkContextMenuInterceptor() { @@ -156,7 +143,6 @@ public class CheckContextMenuInterceptor try { String sFile = OfficeFileUrl.getAbsolute(new File("space-metal.jpg")); - // String sFile = util.utils.getFullTestURL("space-metal.jpg"); oShapeProps.setPropertyValue("GraphicURL", sFile); Object oProp = oShapeProps.getPropertyValue("GraphicObjectFillBitmap"); xBitmap = (XBitmap) AnyConverter.toObject(new Type(XBitmap.class), oProp); diff --git a/framework/qa/complex/desktop/DesktopTerminate.java b/framework/qa/complex/desktop/DesktopTerminate.java index f716e40bc6fb..468dcc59f478 100644 --- a/framework/qa/complex/desktop/DesktopTerminate.java +++ b/framework/qa/complex/desktop/DesktopTerminate.java @@ -41,19 +41,6 @@ public class DesktopTerminate private int iOfficeCloseTime = 1000; /** - * A frunction to tell the framework, which test functions are available. - * Right now, it's only 'checkPersistentWindowState'. - * @return All test methods. - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkPersistentWindowState" -// }; -// } - - /** * Test if all available document types change the * persistent Window Attributes * @@ -80,14 +67,6 @@ public class DesktopTerminate { System.out.println("Connect the first time."); -// System.out.println("AppExecCommand: " + (String) param.get("AppExecutionCommand")); -// System.out.println("ConnString: " + (String) param.get("ConnectionString")); -// oProvider = new OfficeProvider(); -// iOfficeCloseTime = param.getInt("OfficeCloseTime"); -// if (iOfficeCloseTime == 0) -// { -// iOfficeCloseTime = 1000; -// } if (!connect()) { diff --git a/framework/qa/complex/dispatches/checkdispatchapi.java b/framework/qa/complex/dispatches/checkdispatchapi.java index 451b4e600870..32f91388ceec 100644 --- a/framework/qa/complex/dispatches/checkdispatchapi.java +++ b/framework/qa/complex/dispatches/checkdispatchapi.java @@ -69,36 +69,6 @@ public class checkdispatchapi // test environment - /** @short A function to tell the framework, - which test functions are available. - - @return All test methods. - @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkDispatchInfoOfWriter", -// "checkDispatchInfoOfCalc", -// "checkDispatchInfoOfDraw", -// "checkDispatchInfoOfImpress", -// "checkDispatchInfoOfMath", -// "checkDispatchInfoOfChart", -// "checkDispatchInfoOfBibliography", -// "checkDispatchInfoOfQueryDesign", -// "checkDispatchInfoOfTableDesign", -// "checkDispatchInfoOfFormGridView", -// "checkDispatchInfoOfDataSourceBrowser", -// "checkDispatchInfoOfRelationDesign", -// "checkDispatchInfoOfBasic", -// "checkDispatchInfoOfStartModule", -// "checkInterceptorLifeTime", -// "checkInterception" -// }; -// } - - /** @short Create the environment for following tests. @descr create an empty test frame, where we can load diff --git a/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java b/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java index 31e6262291a4..6d042dd8ac18 100644 --- a/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java +++ b/framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java @@ -36,14 +36,6 @@ import static org.junit.Assert.*; public class GetServiceWhileDisposingOffice { -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkServiceWhileDisposing" -// }; -// } - @Test public void checkServiceWhileDisposing() { XMultiServiceFactory xMSF = getMSF(); diff --git a/framework/qa/complex/framework/autosave/AutoSave.java b/framework/qa/complex/framework/autosave/AutoSave.java index 6cb9e7ace213..1125755ec45b 100644 --- a/framework/qa/complex/framework/autosave/AutoSave.java +++ b/framework/qa/complex/framework/autosave/AutoSave.java @@ -172,21 +172,6 @@ public class AutoSave // test environment - /** @short A function to tell the framework, - which test functions are available. - - @return All test methods. - @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkConcurrentAutoSaveToNormalUISave", -// }; -// } - - /** @short Create the environment for following tests. @descr create an empty test frame, where we can load diff --git a/framework/qa/complex/imageManager/CheckImageManager.java b/framework/qa/complex/imageManager/CheckImageManager.java index e91d9eef49f1..02111c0d89f4 100644 --- a/framework/qa/complex/imageManager/CheckImageManager.java +++ b/framework/qa/complex/imageManager/CheckImageManager.java @@ -127,7 +127,6 @@ public class CheckImageManager { _XUIConfigurationPersistence _xUIConfigPersistence = new _XUIConfigurationPersistence(param, xUIConfigPersistence); _xUIConfigPersistence.before(); assertTrue(testObjectName + "::XUIConfigPersistence.isModified", _xUIConfigPersistence._isModified()); - // System.out.println(testObjectName + "::XUIConfigPersistence.isReadOnly "+ _xUIConfigPersistence._isReadOnly()); assertTrue(testObjectName + "::XUIConfigPersistence.isReadOnly", _xUIConfigPersistence._isReadOnly()); assertTrue(testObjectName + "::XUIConfigPersistence.reload", _xUIConfigPersistence._reload()); assertTrue(testObjectName + "::XUIConfigPersistence.store", _xUIConfigPersistence._store()); diff --git a/framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java b/framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java index 40c5548f04e0..3e2b37bda924 100644 --- a/framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java +++ b/framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java @@ -115,26 +115,6 @@ public class CheckXComponentLoader // test environment - /** @short A function to tell the framework, - which test functions are available. - - @return All test methods. - @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() -// { -// // TODO think about trigger of sub-tests from outside -// return new String[] -// { -// "checkURLEncoding" , -// "checkURLHandling" , -// "checkUsingOfMediaDescriptor", -// "checkStreamLoading" , -// "checkLoadingWithPassword" -// }; -// } - - /** @short Create the environment for following tests. @descr Use either a component loader from desktop or @@ -207,12 +187,6 @@ public class CheckXComponentLoader String sCompletePath = aFile.getAbsolutePath(); String sSubPath = sCompletePath.substring(nBasePathLength); - // Some test files are checked into CVS. ignore CVS helper files! -// if (sSubPath.indexOf("CVS") > -1) -// { -// continue; -// } - m_lTestFiles.add(sSubPath); } } @@ -295,10 +269,6 @@ public class CheckXComponentLoader { File aDir = new File(sTempPath); aDir.mkdirs(); -// if (!aDir.exists()) -// { -// fail("Could not access temp directory \"" + sTempPath + "\"."); -// } // TODO: create a temp file which not exist! for (int i=0; i<999999; ++i) @@ -467,112 +437,6 @@ public class CheckXComponentLoader } } - /** - * Check url handling with a load of URLs. - * 1. unsupported URLs. - * 2. "stupid" URLs - * 3. case sensitive URLs - * 4. FTP URLs - * 5. HTTP URLs - */ -// public void checkURLHandling() { -// PropertyValue[] lProps = new PropertyValue[1]; -// -// lProps[0] = new PropertyValue(); -// lProps[0].Name = "Hidden"; -// lProps[0].Value = Boolean.TRUE; -// -// System.out.println("check possible but unsupported URLs"); -// -// String[] sIllegalArgs = new String[] { -// "slot:5000", "slot:10909", ".uno:SaveAs", ".uno:Open", -// }; -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sIllegalArgs, -// "_blank", 0, lProps); -// -// System.out.println("check stupid URLs"); -// -// sIllegalArgs = new String[] { -// "slot:xxx", "slot:111111111", ".uno:save_as", ".uno:open_this", -// ".UnO:*", -// }; -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sIllegalArgs, -// "_blank", 0, lProps); -// -// String[] sEmptyDocs = new String[] { -// "mailo:hansi.meier@germany.sun.com", "file:/c:\\test/file.cxx", -// "file:///c|:\\test/file.cxx", "http_server://staroffice-doc\\", -// "c:\\\\test///\\test.sxw", "news_:staroffice-doc", -// "newsletter@blubber", "private_factory/swriter", -// "private:factory//swriter", "private:factory/swriter/___", -// "c:\\test\\test.sxw", "macro:///ImportWizard.Main.Main", -// "macro:///Euro.AutoPilotRun.StartAutoPilot", -// "service:com.sun.star.frame.Frame", -// "mailto:steffen.grund@germany.sun.com", "news:staroffice-doc", -// "macro:/ExportWizard", "macro://Euro.AutoPilotRun.StartAutoPilot", -// "service:com.sun.star.frame." -// }; -// -// //with cws_loadenv01 changed to IllegalArgumentException -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sEmptyDocs, "_blank", 0, -// lProps); -// -// System.out.println("check case sensitive URLs"); -// -// sIllegalArgs = new String[] { -// "sLot:5000", "sloT:10909", ".unO:SaveAs", ".uno:OPEN", -// }; -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sIllegalArgs, -// "_blank", 0, lProps); -// -// sEmptyDocs = new String[] { -// "private:factory/SWRITER", "private:factory/SWRITER/WEB", -// "macro:///importwizard.main.main", -// "Macro:///euro.autopilotrun.startautopilot", -// "Service:Com.Sun.Star.Frame.Frame", -// "Mailto:andreas.schluens@germany.sun.com", "neWs:staroffice-doc", -// "News:Staroffice-doc" -// }; -// -// //with cws_loadenv01 changed to IllegalArgumentException -// loadURL(m_xLoader, RESULT_ILLEGALARGUMENTEXCEPTION, sEmptyDocs, "_blank", 0, -// lProps); -// -// System.out.println("check FTP URLs"); -// -// String sFTPURL = (String) param.get("FtpAccess"); -// Enumeration aSnapshot = m_lTestFiles.elements(); -// -// while (aSnapshot.hasMoreElements()) { -// String doc = (String) aSnapshot.nextElement(); -// -// -// // if os is windows -// doc = doc.replace('\\', '/'); -// if (doc.indexOf("CVS")<0) { -// loadURL(m_xLoader, RESULT_VALID_DOC, sFTPURL + "/" + doc, -// "_blank", 0, lProps); -// } -// } -// -// System.out.println("check HTTP URLs"); -// -// String sHTTPURL = (String) param.get("HttpAccess"); -// aSnapshot = m_lTestFiles.elements(); -// -// while (aSnapshot.hasMoreElements()) { -// String doc = (String) aSnapshot.nextElement(); -// -// -// // if os is windows -// doc = doc.replace('\\', '/'); -// if (doc.indexOf("CVS")<0) { -// loadURL(m_xLoader, RESULT_VALID_DOC, sHTTPURL + "/" + doc, -// "_blank", 0, lProps); -// } -// } -// } - /** TODo document me */ @Test public void checkStreamLoading() @@ -592,11 +456,6 @@ public class CheckXComponentLoader File aFile = new File(m_sTestDocPath, aSnapshot.next()); String sURL = URLHelper.getFileURLFromSystemPath(aFile); -// if (sURL.indexOf("CVS") > -1) -// { -// continue; -// } - try { XInputStream xStream = m_xStreamProvider.openFileRead(sURL); @@ -609,8 +468,6 @@ public class CheckXComponentLoader // check different version of "private:stream" URL! loadURL(m_xLoader, RESULT_VALID_DOC, "private:stream" , "_blank", 0, lProps); - // loadURL(m_xLoader, RESULT_VALID_DOC, "private:stream" , "_blank", 0, lProps); - // loadURL(m_xLoader, RESULT_VALID_DOC, "private:stream/", "_blank", 0, lProps); } } diff --git a/framework/qa/complex/loadAllDocuments/StatusIndicator.java b/framework/qa/complex/loadAllDocuments/StatusIndicator.java index ad1a63c6cba7..eb96e2d428a1 100644 --- a/framework/qa/complex/loadAllDocuments/StatusIndicator.java +++ b/framework/qa/complex/loadAllDocuments/StatusIndicator.java @@ -158,17 +158,6 @@ public class StatusIndicator implements com.sun.star.task.XStatusIndicator */ private void impl_show() { -/* synchronized(this) - { - if ((m_nOut & SHOWSTATUS_LOG) == SHOWSTATUS_LOG) - //m_aProtocol.log("\t["+m_nValue+"/"+m_nRange+"] "+m_sText+"\n"); - - //if ((m_nOut & SHOWSTATUS_DIALOG) == SHOWSTATUS_DIALOG) - // not supported yet! - - //if ((m_nOut & SHOWSTATUS_LINK) == SHOWSTATUS_LINK) - // not supported yet! - } */ } public boolean wasUsed() { diff --git a/framework/qa/complex/path_settings/PathSettingsTest.java b/framework/qa/complex/path_settings/PathSettingsTest.java index c05becb0705c..f23cf0e9ffa4 100644 --- a/framework/qa/complex/path_settings/PathSettingsTest.java +++ b/framework/qa/complex/path_settings/PathSettingsTest.java @@ -91,17 +91,6 @@ public class PathSettingsTest ArrayList<Property> aListOfWorkingProperty; /** - * A function to tell the framework, which test functions are available. - * Right now, it's only 'checkComplexTemplateState'. - * @return All test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkXFastPropertySet", -// "checkXMultiPropertySet", -// "checkXPropertySet" -// }; -// } - /** * Initialize before the tests start: this has to be done only once. * This methods sets the 'aPathSettings' and 'xPropertyInfoOfPathSettings' variables. */ @@ -112,8 +101,6 @@ public class PathSettingsTest { aPathSettings = thePathSettings.get(connection.getComponentContext()); assertNotNull("Can't instantiate com.sun.star.util.thePathSettings.", aPathSettings); -// System.out.println("Implementation: " + util.utils.getImplName(aPathSettings)); -// System.out.println("Service: "); util.dbg.getSuppServices(aPathSettings); final XPropertySet xPropSet_of_PathSettings = UnoRuntime.queryInterface(XPropertySet.class, aPathSettings); @@ -127,7 +114,6 @@ public class PathSettingsTest for (int i = 0; i < xPropertyInfoOfPathSettings.length; i++) { final String sName = xPropertyInfoOfPathSettings[i].Name; - // System.out.println(sName); aPathSettingNames[i] = sName; Object o = xPropSet_of_PathSettings.getPropertyValue(sName); @@ -251,29 +237,18 @@ public class PathSettingsTest System.out.println("\n---- All properties ----"); final XPropertySet xPropSet_of_PathSettings = UnoRuntime.queryInterface(XPropertySet.class, aPathSettings); -// for (int i = 0; i < xPropertyInfoOfPathSettings.length; i++) for (int i = 0; i < aListOfWorkingProperty.size(); i++) { final String sName = aListOfWorkingProperty.get(i).Name; - // aPathSettingWorkingNames[i] = sName; -// System.out.print("PathSettings: Name:="); System.out.print(sName); Object o = xPropSet_of_PathSettings.getPropertyValue(sName); - // System.out.println("#### Object: '" + o.getClass().getName() + "' - '" + o.toString() + "'"); try { final String sValue = AnyConverter.toString(o); - // aPathSettingValues[i] = sValue; - // System.out.println("#### String " + sValue); - // System.out.println("Property Name: " + sName); - // System.out.println("Property Value: " + sValue); -// System.out.print(" ==> "); -// System.out.print(sValue); } catch (com.sun.star.lang.IllegalArgumentException e) { -// System.out.print(" FAILED "); } System.out.println(); } @@ -653,222 +628,11 @@ public class PathSettingsTest } - /** - * This tests the XMultiPropertySet interface implementation. - */ - - // The test checkXMultiPropertySet() has been marked as outdated! - -// @Test -// public void checkXMultiPropertySet() -// { -// System.out.println("---- Testing the XMultiPropertySet interface ----"); -// XMultiPropertySet xMPS = UnoRuntime.queryInterface(XMultiPropertySet.class, aPathSettings); -// -// // xPropertyInfoOfPathSettings.length -// String[] propertiesToTest = new String[1]; -// propertiesToTest[0] = availablePropNames[0]; -// -// String[] correctVals = new String[propertiesToTest.length]; -// String[] incorrectVals = new String[propertiesToTest.length]; -// -// String[] aPathSettingWorkingNames = null; -// aPathSettingWorkingNames = new String[propertiesToTest.length]; -// -// // get intitial values and create new ones -// for (int i = 0; i < propertiesToTest.length; i++) -// { -// // Property aProp = aListOfWorkingProperty.get(i); -// final String sName = propertiesToTest[i]; -// final String sValue = getPropertyValueAsString(sName); -// aPathSettingWorkingNames[i] = sName; -// correctVals[i] = changeToCorrectValue(sValue); -// incorrectVals[i] = changeToIncorrectValue(sValue); -// } -// -// try -// { -// // add a change listener -// MyChangeListener mListener = new MyChangeListener(); -// xMPS.addPropertiesChangeListener(aPathSettingWorkingNames, mListener); -// -// // first change xPropertyInfoOfPathSettings to correct values -// System.out.println("Change to correct values."); -// xMPS.setPropertyValues(aPathSettingWorkingNames, correctVals); -// assertTrue("Could not change to correct values with XMultiPropertySet.", -// verifyPropertySet(xMPS, aPathSettingWorkingNames, correctVals) > 0); -// -// // second, change to incorrect values: expect an exception -// System.out.println("Try to change to incorrect values."); -// try -// { -// xMPS.setPropertyValues(aPathSettingWorkingNames, incorrectVals); -// } -// catch (com.sun.star.lang.IllegalArgumentException r) -// { -// System.out.println("Correctly thrown Exception caught."); -// } -// assertTrue("Did change to incorrect values with XMultiPropertySet," -// + " but should not have.", -// verifyPropertySet(xMPS, aPathSettingWorkingNames, correctVals) > 0); -// -// // third, change back to initial values -// System.out.println("Change back to initial values."); -// xMPS.setPropertyValues(aPathSettingWorkingNames, aPathSettingValues); -// assertTrue("Could not change back to initial values with" -// + " XMultiPropertySet.", -// verifyPropertySet(xMPS, aPathSettingWorkingNames, aPathSettingValues) > 0); -// -// // fire the event for the listener -// System.out.println("Fire event."); -// xMPS.firePropertiesChangeEvent(aPathSettingWorkingNames, mListener); -// assertTrue("Event was not fired on XMultiPropertySet.", -// mListener.changePropertiesEventFired()); -// } -// catch (com.sun.star.uno.Exception e) -// { -//// e.printStackTrace(); -// System.out.println(e.getClass().getName()); -// System.out.println("Message: " + e.getMessage()); -// fail("Unexpected exception on XMultiPropertySet."); -// } -// -// // test finished -// System.out.println("---- Test of XMultiPropertySet finished ----\n"); -// } - - /** - * Verify if the values of xPropSet_of_PathSettings are the same as vals. - * @param xPropSet_of_PathSettings A XMultiPropertySet. - * @param aPathSettingWorkingNames An array with property names. - * @param vals An array with values of the properties - * @return -1 if none are equal, 1 if all are equal, 0 if some were equal - * and some not. - * @throws com.sun.star.lang.IllegalArgumentException - */ -// private int verifyPropertySet(XMultiPropertySet xProp, -// String[] propNames, String[] vals) -// { -// int ret = 0; -// if (vals.length != propNames.length) -// { -// System.out.println("Length of array parameters must be equal."); -// return ret; -// } -// for (int i = 0; i < vals.length; i++) -// { -// Object[] objs = xProp.getPropertyValues(new String[] -// { -// propNames[i] -// }); -// String retVal = (String) objs[0]; -// boolean nCheck = retVal.equals(vals[i]); -// if (!nCheck) -// { -// System.out.println("Property '" + propNames[i] -// + "' was supposed to have value:"); -// System.out.println(vals[i]); -// System.out.println("but has value:"); -// System.out.println(retVal); -// } -// // initialize -// if (i == 0) -// { -// ret = nCheck ? 1 : -1; -// continue; -// } -// // return 0 if equal state changes compared to initial value -// if ((nCheck && ret < 0) || (!nCheck && ret > 0)) -// { -// ret = 0; -// } -// } -// return ret; -// } - // ____________________ /** * This tests the XPropertySet interface implementation. */ -// The test checkXPropertySet() has been marked as outdated! - - -// @Test -// public void checkXPropertySet() -// { -// System.out.println("---- Testing the XPropertySet interface ----"); -// -// XPropertySet xPS = UnoRuntime.queryInterface(XPropertySet.class, aPathSettings); -// -// MyChangeListener mListener1 = new MyChangeListener(); -// MyChangeListener mListener2 = new MyChangeListener(); -// -// for (int i = 0; i < xPropertyInfoOfPathSettings.length; i++) -// { -// // adding listeners -// String name = aPathSettingNames[i]; -// System.out.println("Testing property '" + name + "'"); -// try -// { -// System.out.println("Add 2 Listeners."); -// xPS.addPropertyChangeListener(name, mListener1); -// xPS.addVetoableChangeListener(name, mListener1); -// xPS.addPropertyChangeListener(name, mListener2); -// xPS.addVetoableChangeListener(name, mListener2); -// -// // change the property -// System.out.println("Change value."); -// String changeVal = changeToCorrectValue(aPathSettingValues[i]); -// xPS.setPropertyValue(name, changeVal); -// String newVal = (String) xPS.getPropertyValue(name); -// -// assertTrue("Value did not change on property " + name + ".", -// newVal.equals(changeVal)); -// -// assertTrue("Listener 1 was not called.", checkListener(mListener1)); -// assertTrue("Listener 2 was not called.", checkListener(mListener2)); -// -// mListener1.resetListener(); -// mListener2.resetListener(); -// -// System.out.println("Remove Listener 1."); -// -// xPS.removePropertyChangeListener(name, mListener1); -// xPS.removeVetoableChangeListener(name, mListener1); -// -// // change the property -// System.out.println("Change value back."); -// xPS.setPropertyValue(name, aPathSettingValues[i]); -// newVal = (String) xPS.getPropertyValue(name); -// assertTrue("Value did not change on property " + name, -// newVal.equals(aPathSettingValues[i])); -// -// assertTrue("Listener was called, although it was removed on" -// + " property " + name + ".", !checkListener(mListener1)); -// assertTrue("Listener 2 was not called on property " + name + ".", -// checkListener(mListener2)); -// } -// catch (com.sun.star.uno.Exception e) -// { -// System.out.println(e.getClass().getName()); -// System.out.println("Message: " + e.getMessage()); -// fail("Unexpcted exception on property " + name); -// } -// System.out.println("Finish testing property '" + aPathSettingNames[i] + "'\n"); -// } -// System.out.println("---- Test of XPropertySet finished ----\n"); -// -// } - -// private boolean checkListener(MyChangeListener ml) -// { -// return ml.changePropertyEventFired() -// || ml.changePropertiesEventFired() -// || ml.vetoableChangeEventFired(); -// } - - /** * Change the given String to a correct path URL. * @return The changed path URL. diff --git a/framework/qa/complex/path_substitution/PathSubstitutionTest.java b/framework/qa/complex/path_substitution/PathSubstitutionTest.java index b2d7c86410fc..2c55aeae2cd4 100644 --- a/framework/qa/complex/path_substitution/PathSubstitutionTest.java +++ b/framework/qa/complex/path_substitution/PathSubstitutionTest.java @@ -43,14 +43,6 @@ public class PathSubstitutionTest private VariableContainer substVars = null; /** - * A function to tell the framework, which test functions are available. - * Right now, it's only 'checkXStringSubstitution'. - * @return All test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkXStringSubstitution"}; -// } - /** * Create an array with all substitution variables */ @Before public void initialize() diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java index 1557bfde5a15..fd6553aecaca 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java @@ -45,7 +45,6 @@ public class ByteArrayToXInputStreamAdapter } public void init(byte[] bytes) { - // System.err.println("ByteArrayXInputStream"); m_bytes = bytes; m_length = bytes.length; m_pos = 0; @@ -54,11 +53,9 @@ public class ByteArrayToXInputStreamAdapter private void _check() throws com.sun.star.io.NotConnectedException, com.sun.star.io.IOException { if (m_bytes == null) { - // System.err.println("check failed no bytes!"); throw new com.sun.star.io.NotConnectedException("no bytes"); } if(!m_open) { - // System.err.println("check failed: closed"); throw new com.sun.star.io.IOException("input closed"); } } @@ -69,19 +66,16 @@ public class ByteArrayToXInputStreamAdapter if (a != (int)a) throw new com.sun.star.io.IOException("integer overflow"); else { - // System.err.println("available() -> "+a); return (int)a; } } public void closeInput() throws com.sun.star.io.NotConnectedException, com.sun.star.io.IOException { - // System.err.println("closeInput()"); _check(); m_open = false; } public int readBytes(byte[][] values, int param) throws com.sun.star.io.NotConnectedException, com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException { - // System.err.println("readbytes(..., "+param+")"); _check(); try { int remain = (m_length - m_pos); @@ -89,30 +83,24 @@ public class ByteArrayToXInputStreamAdapter /* ARGH!!! */ if (values[0] == null){ values[0] = new byte[param]; - // System.err.println("allocated new buffer of "+param+" bytes"); } System.arraycopy(m_bytes, m_pos, values[0], 0, param); - // System.err.println("readbytes() -> "+param); m_pos += param; return param; } catch (ArrayIndexOutOfBoundsException ae) { - // System.err.println("readbytes() -> ArrayIndexOutOfBounds"); ae.printStackTrace(); throw new com.sun.star.io.BufferSizeExceededException("buffer overflow"); } catch (Exception e) { - // System.err.println("readbytes() -> Exception: "+e.getMessage()); e.printStackTrace(); throw new com.sun.star.io.IOException("error accessing buffer"); } } public int readSomeBytes(byte[][] values, int param) throws com.sun.star.io.NotConnectedException, com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException { - // System.err.println("readSomebytes()"); return readBytes(values, param); } public void skipBytes(int param) throws com.sun.star.io.NotConnectedException, com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException { - // System.err.println("skipBytes("+param+")"); _check(); if (param > (m_length - m_pos)) throw new com.sun.star.io.BufferSizeExceededException("buffer overflow"); @@ -120,28 +108,19 @@ public class ByteArrayToXInputStreamAdapter } public long getLength() throws com.sun.star.io.IOException { - // System.err.println("getLength() -> "+m_length); if (m_bytes != null) return m_length; else throw new com.sun.star.io.IOException("no bytes"); } public long getPosition() throws com.sun.star.io.IOException { - // System.err.println("getPosition() -> "+m_pos); if (m_bytes != null) return m_pos; else throw new com.sun.star.io.IOException("no bytes"); } public void seek(long param) throws com.sun.star.lang.IllegalArgumentException, com.sun.star.io.IOException { - // System.err.println("seek("+param+")"); if (m_bytes != null){ if (param < 0 || param > m_length) throw new com.sun.star.lang.IllegalArgumentException("invalid seek position"); else m_pos = (int)param; }else throw new com.sun.star.io.IOException("no bytes"); } - - public void finalize() throws Throwable{ - // System.err.println("finalizer called for ByteArrayXInputStream!"); - super.finalize(); - } - } diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java index 8488e22f7225..ad6079346c77 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java @@ -47,11 +47,9 @@ public class XOutputStreamToByteArrayAdapter externalBuffer = true; buffer = aBuffer; size = buffer.length; - // System.err.println("new outputbuffer with external storage"); } else { size = initialSize; buffer = new byte[size]; - // System.err.println("new outputbuffer with internal storage"); } } @@ -85,14 +83,12 @@ public class XOutputStreamToByteArrayAdapter com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException { - // System.err.println("writeBytes("+values.length+")"); if ( values.length > size-position ) { if ( externalBuffer ) throw new BufferSizeExceededException("out of buffer space, cannot grow external buffer"); while ( values.length > size-position ) size *= 2; - // System.err.println("new buffer size is "+size+" bytes."); byte[] newBuffer = new byte[size]; System.arraycopy(buffer, 0, newBuffer, 0, position); buffer = newBuffer; diff --git a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java index 342e732e1af4..02b926539d6a 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java @@ -100,7 +100,6 @@ public class InterfaceContainer implements Cloneable private int size; - //private ArrayList data= new ArrayList(); /** Creates a new instance of InterfaceContainer */ public InterfaceContainer() { diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java b/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java index 275ae5195060..1217b0274a9a 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/AWeakBase.java @@ -33,7 +33,6 @@ public class AWeakBase extends WeakBase implements XEventListener public void disposing(com.sun.star.lang.EventObject eventObject) { -// System.out.println(getClass().getName() + " .disposing called"); nDisposingCalled++; } diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java index 8e79811fd4aa..976968f1a6a0 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java @@ -23,7 +23,6 @@ import java.util.ListIterator; import com.sun.star.uno.XWeak; import com.sun.star.lang.XTypeProvider; import java.util.ArrayList; -//import com.sun.star.lib.uno.environments.java.Proxy; import com.sun.star.lib.uno.environments.java.java_environment; import java.util.List; diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer_Test.java index 3aaa764a037d..e8bef98a427c 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer_Test.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer_Test.java @@ -22,13 +22,11 @@ import com.sun.star.uno.XWeak; import com.sun.star.lang.XTypeProvider; import java.util.ArrayList; import com.sun.star.uno.Type; -//import com.sun.star.lib.uno.environments.java.Proxy; import com.sun.star.uno.XInterface; import com.sun.star.lang.XSingleComponentFactory; public class MultiTypeInterfaceContainer_Test { -// java_environment env= new java_environment(null); /** Creates a new instance of InterfaceContainerTest */ AWeakBase obj1,obj2,obj3,obj4; Object proxyObj1Weak1; @@ -71,39 +69,6 @@ public class MultiTypeInterfaceContainer_Test list3.add(proxyObj2TypeProv); list3.add(proxyObj3Weak1); } - /** returns Holder proxy objects for the specified interface. If the method is called - * several times with the same arguments then each time a new HolderProxy is returned. - * Then all HolderProxy s refer to the same Proxy object. - * The proxy can be queried for XEventListener. On the returned proxy disposing can be called - * - */ -// public Object getHolderProxy(Object obj, Class iface) -// { -// Object retVal= null; -// if (obj == null || iface == null || iface.isInstance(obj) == false ) -// return retVal; -// -// Type type= new Type(TypeDescription.getTypeDescription(iface)); -// Type evtType= new Type(TypeDescription.getTypeDescription(com.sun.star.lang.XEventListener.class)); -// // find the object identifier -// String sOid= UnoRuntime.generateOid(obj); -// retVal= env.getRegisteredInterface(sOid, type); -// // if retVal == null then probably not registered -// if (retVal == null) -// { -// // create the XEventListener proxy -// Requester eventRequester = new Requester(false, false, null); -// Object aProxyEvt = Proxy.create(eventRequester, sOid, evtType, false, false); -// String[] arOid= new String[]{sOid}; -// retVal= env.registerInterface(aProxyEvt, arOid, evtType); -// -// Requester requester = new Requester(false, false, aProxyEvt); -// Object aProxy = Proxy.create(requester, sOid, type, false, false); -// arOid= new String[] {sOid}; -// retVal= env.registerInterface(aProxy, arOid, type); -// } -// return retVal; -// } public boolean addInterface() { diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java b/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java index f25beefbe805..d2c1bbfa7b48 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/ProxyProvider.java @@ -22,9 +22,7 @@ import com.sun.star.lib.uno.typedesc.TypeDescription; import com.sun.star.uno.UnoRuntime; import com.sun.star.lang.XEventListener; import com.sun.star.uno.IQueryInterface; -//import com.sun.star.lib.uno.environments.java.Proxy; import com.sun.star.lib.uno.environments.java.java_environment; -//import com.sun.star.lib.uno.environments.java.IRequester; public class ProxyProvider @@ -108,49 +106,5 @@ class Proxy implements IQueryInterface, XEventListener } -//class Requester //implements IRequester -//{ -// int _modus; -// boolean _virtual; -// boolean _forceSynchronous; -// boolean _passed = true; -// -// Object _xEventListenerProxy; -// int nDisposingCalled= 0; -// -// Requester(boolean virtual, boolean forceSynchronous, Object evtListener) -// { -// _virtual = virtual; -// _forceSynchronous = forceSynchronous; -// _xEventListenerProxy= evtListener; -// -// } -// -// public Object sendRequest(Object object, -// Type type, -// String operation, -// Object params[], -// Boolean synchron[], -// Boolean mustReply[]) throws Throwable -// { -// -// Object result = null; -// if (operation.equals("disposing")) -// { -// System.out.println("Disposing called on XEventListener proxy"); -// nDisposingCalled++; -// } -// else if (operation.equals("queryInterface")) -// { -// if (params[0] instanceof Type) -// { -// Type t= (Type) params[0]; -// if (t.equals( new Type("com.sun.star.lang.XEventListener"))) -// result= _xEventListenerProxy; -// } -// } -// return result; -// } -//} diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java index f70f1b210993..6177a82e53db 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java @@ -85,11 +85,9 @@ public class WeakBase_Test StringBuffer buff= new StringBuffer(); for (int c= 0; c < ar.length - 4; c++){ buff.append((char) ar[4 + c]); -// buff.append(" "); } String retStr= buff.toString(); r[i++]= retStr.equals("com.sun.star.lib.uno.helper.SomeClass"); -// System.out.println(buff.toString()); Foo1 f1= new Foo1(); Foo1 f2= new Foo1(); diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java index 64ef51fbca5f..2a712011346a 100644 --- a/jurt/com/sun/star/comp/loader/FactoryHelper.java +++ b/jurt/com/sun/star/comp/loader/FactoryHelper.java @@ -55,7 +55,6 @@ public class FactoryHelper { static protected class Factory implements XSingleServiceFactory, XSingleComponentFactory, XServiceInfo, XTypeProvider { -// private static final boolean DEBUG = false; protected XMultiServiceFactory _xMultiServiceFactory; protected XRegistryKey _xRegistryKey; diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java index 4a4a4e6f05e6..a4a5f8d865c8 100644 --- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java +++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java @@ -284,7 +284,6 @@ public class ServiceManager implements XMultiServiceFactory, } return null; } -// public String[] getAvailableServiceNames(); /** * Removes all listeners from the <code>ServiceManager</code> and clears the diff --git a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java index b5e240bc3a0a..6cd54f0b2e1a 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java @@ -94,15 +94,6 @@ public class JobQueue { } if(DEBUG) System.err.println("##### " + getClass().getName() + ".run - exit:" + _threadId); - -// try { -// Object object = new Object(); -// synchronized(object) { -// object.wait(); -// } -// } -// catch(InterruptedException interruptedException) { -// } } } diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java index 6be7a7bdd06f..f907a3c1cb08 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java +++ b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java @@ -52,23 +52,15 @@ class TestWorkAt implements TestIWorkAt { if(_sync_thread == null) _sync_thread = Thread.currentThread(); -// if(_sync_thread != Thread.currentThread()) -// _passedAync = false; - if(DEBUG) System.err.println("syncCall:" + _sync_counter + " " + _passedAync + " " + Thread.currentThread()); } public synchronized void asyncCall() throws Throwable { -// Thread.sleep(50); - ++ _async_counter; if(_async_thread == null) _async_thread = Thread.currentThread(); -// if(_async_thread != Thread.currentThread()) -// _passedAync = false; - if(DEBUG) System.err.println("asyncCall:" + _async_counter + " " + Thread.currentThread()); } diff --git a/jurt/workbench/com/sun/star/comp/urlresolver/UrlResolver_Test.java b/jurt/workbench/com/sun/star/comp/urlresolver/UrlResolver_Test.java index 89f1d9008f93..05b91a1d466c 100644 --- a/jurt/workbench/com/sun/star/comp/urlresolver/UrlResolver_Test.java +++ b/jurt/workbench/com/sun/star/comp/urlresolver/UrlResolver_Test.java @@ -25,7 +25,6 @@ import com.sun.star.bridge.UnoUrlResolver; import com.sun.star.bridge.XUnoUrlResolver; import com.sun.star.beans.XPropertySet; import com.sun.star.uno.UnoRuntime; -//import com.sun.star.connection.NoConnectionException; /** start the office with these options <br> soffice --accept=socket,host=localhost,port=8100;urp; diff --git a/linguistic/qa/complex/linguistic/HangulHanjaConversion.java b/linguistic/qa/complex/linguistic/HangulHanjaConversion.java index a391bd5a8c24..85274a06b48d 100644 --- a/linguistic/qa/complex/linguistic/HangulHanjaConversion.java +++ b/linguistic/qa/complex/linguistic/HangulHanjaConversion.java @@ -41,7 +41,6 @@ import com.sun.star.uno.UnoRuntime; import util.DesktopTools; -// import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -55,10 +54,6 @@ public class HangulHanjaConversion { Locale aLocale = new Locale("ko", "KR", ""); short dictType = ConversionDictionaryType.HANGUL_HANJA; -// public String[] getTestMethodNames() { -// return new String[] { "ConversionDictionaryList" }; -// } - @Before public void before() { xMSF = getMSF(); } @@ -113,7 +108,6 @@ public class HangulHanjaConversion { assertTrue("getDictionaryContainer didn't work as expected", localRes); String FileToLoad = TestDocument.getUrl("hangulhanja.sxc"); - // String FileToLoad = util.utils.getFullTestURL(); XComponent xDoc = DesktopTools.loadDoc(xMSF, FileToLoad, new PropertyValue[] { }); diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java index b494d462bb6d..ffe03200e4cb 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java @@ -62,15 +62,6 @@ public class GlobalFile { raFile.seek(raFile.length()); raFile.writeBytes(inStr); raFile.close(); - - -// String oldFileStr = getStringFromFile(fileStr); -// String newFileStr = inStr; -// if (oldFileStr != null) { -// newFileStr = oldFileStr+inStr; -// } -// saveStringToFile(newFileStr,fileStr); - } public static Object loadObjectFromFile(String fileName) throws Exception { diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java index 45204c44497d..47d03c1256bf 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java @@ -31,7 +31,6 @@ public class RandomGenerator { * Example: for find [0,1,2] */ public static int intRangeRandom(int lowLimit,int upLimit){ -// int num = (int)Math.rint(doubleRangeRandom(lowLimit,upLimit)); int num = (int)Math.floor(doubleRangeRandom(lowLimit,upLimit+1)-1E-10); return(num); } @@ -75,29 +74,6 @@ public static double doubleRangeRandom(double lowLimit,double upLimit){ return randomSelection(totalIndices, times); } -// public static int[] randomSelection(boolean[] types, int times) { -// int realTimes = times; -// if(realTimes>types.length) realTimes = types.length; -// boolean[] internalTypes = (boolean[])types.clone(); -// int upper = types.length-1; -// int[] indices = new int[realTimes]; -// if(realTimes==types.length) { -// for(int i=0; i<indices.length; i++) { -// indices[i] = i; -// } -// return indices; -// } -// int i = 0; -// while(i<realTimes) { -// indices[i] = intRangeRandom(0, upper); -// if(!internalTypes[indices[i]]) { -// internalTypes[indices[i]] = true; -// i++; -// } -// } -// return indices; -// } - public static int[] randomSelection(int low, int up, int times){ int[] totalIndices = new int[up-low]; for (int i=low; i<up; i++) { diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java index 32473a3ce10a..74f53fdaef2c 100644 --- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java +++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java @@ -65,7 +65,6 @@ import com.sun.star.test.XTestDialogHandler; // ComponentBase, see implementation of TestComponentA. public class DialogComponent { - // public static class _DialogComponent extends WeakBase public static class _DialogComponent implements XTypeProvider, XServiceInfo, XTestDialogHandler, XDialogEventHandler { diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java index cac019463982..37debea990ff 100644 --- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java +++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java @@ -863,8 +863,6 @@ public class ConfigExamples String sSampleDataSourceName = "SampleTextDatabase"; String sSampleDataSourceURL = "sdbc:flat:$(userurl)/database/SampleTextDatabase"; - // String sSampleDataSourceURL = "sdbc:flat:file:///usr/local/database/SampleTextDatabase"; - // String sSampleDataSourceURL = "sdbc:flat:file:///C:/data/database/SampleTextDatabase"; com.sun.star.beans.NamedValue [] aSettings = new com.sun.star.beans.NamedValue [2]; aSettings[0] = new com.sun.star.beans.NamedValue("HeaderLine",new Boolean(true)); diff --git a/odk/examples/DevelopersGuide/Database/Sales.java b/odk/examples/DevelopersGuide/Database/Sales.java index c90ae134b3b1..12f68e9f6b45 100644 --- a/odk/examples/DevelopersGuide/Database/Sales.java +++ b/odk/examples/DevelopersGuide/Database/Sales.java @@ -32,7 +32,6 @@ * *************************************************************************/ -// import com.sun.star.bridge.XUnoUrlResolver; import com.sun.star.uno.*; import com.sun.star.util.Date; import com.sun.star.beans.XPropertySet; diff --git a/odk/examples/DevelopersGuide/Database/SalesMan.java b/odk/examples/DevelopersGuide/Database/SalesMan.java index 0eaa3cdab070..5aead056c4c6 100644 --- a/odk/examples/DevelopersGuide/Database/SalesMan.java +++ b/odk/examples/DevelopersGuide/Database/SalesMan.java @@ -32,7 +32,6 @@ * *************************************************************************/ -// import com.sun.star.bridge.XUnoUrlResolver; import com.sun.star.uno.*; import com.sun.star.util.Date; import com.sun.star.sdbc.*; diff --git a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java index 0bc329cd26a7..ac8d6430874b 100644 --- a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java +++ b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java @@ -161,159 +161,3 @@ public class FirstLoadComponent { } } - - -// import com.sun.star.uno.UnoRuntime; -// import com.sun.star.uno.XComponentContext; -// import com.sun.star.lang.XMultiComponentFactory; -// import com.sun.star.lang.XComponent; -// import com.sun.star.beans.XPropertySet; -// import com.sun.star.beans.PropertyValue; -// import com.sun.star.sheet.XSpreadsheetDocument; -// import com.sun.star.sheet.XSpreadsheets; -// import com.sun.star.sheet.XSpreadsheet; -// import com.sun.star.sheet.XSpreadsheetView; -// import com.sun.star.sheet.XCellRangesQuery; -// import com.sun.star.sheet.XSheetCellRanges; -// import com.sun.star.sheet.XCellAddressable; -// import com.sun.star.table.XCell; -// import com.sun.star.frame.XModel; -// import com.sun.star.frame.XController; -// import com.sun.star.frame.XComponentLoader; -// import com.sun.star.container.XEnumeration; -// import com.sun.star.container.XEnumerationAccess; - -// import com.sun.star.uno.AnyConverter; - -// public class FirstLoadComponent { - -// /** Creates a new instance of FirstLoadComponent */ -// public FirstLoadComponent() { -// } - -// /** -// * @param args the command line arguments -// */ -// private XComponentContext xRemoteContext = null; -// private XMultiComponentFactory xRemoteServiceManager = null; - -// public static void main(String[] args) { -// FirstLoadComponent firstLoadComponent1 = new FirstLoadComponent(); -// try { -// firstLoadComponent1.useConnection(); -// } -// catch (java.lang.Exception e){ -// System.out.println(e.getMessage()); -// e.printStackTrace(); -// } -// finally { -// System.exit(0); -// } -// } - -// private void useConnection() throws java.lang.Exception { -// try { -// // get the remote office component context -// xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); -// System.out.println("Connected to a running office ..."); - -// xRemoteServiceManager = xRemoteContext.getServiceManager(); -// } -// catch( Exception e) { -// e.printStackTrace(); -// System.exit(1); -// } - -// try { -// Object desktop = xRemoteServiceManager.createInstanceWithContext( -// "com.sun.star.frame.Desktop", xRemoteContext); -// XComponentLoader xComponentLoader = (XComponentLoader) -// UnoRuntime.queryInterface(XComponentLoader.class, desktop); - -// PropertyValue[] loadProps = new PropertyValue[0]; -// XComponent xSpreadsheetComponent = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, loadProps); - -// XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument) -// UnoRuntime.queryInterface(XSpreadsheetDocument.class, -// xSpreadsheetComponent); - -// XSpreadsheets xSpreadsheets = xSpreadsheetDocument.getSheets(); -// xSpreadsheets.insertNewByName("MySheet", (short)0); -// com.sun.star.uno.Type elemType = xSpreadsheets.getElementType(); - -// System.out.println(elemType.getTypeName()); -// Object sheet = xSpreadsheets.getByName("MySheet"); -// XSpreadsheet xSpreadsheet = (XSpreadsheet)UnoRuntime.queryInterface( -// XSpreadsheet.class, sheet); - -// XCell xCell = xSpreadsheet.getCellByPosition(0, 0); -// xCell.setValue(21); -// xCell = xSpreadsheet.getCellByPosition(0, 1); -// xCell.setValue(21); -// xCell = xSpreadsheet.getCellByPosition(0, 2); -// xCell.setFormula("=sum(A1:A2)"); - -// XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface( -// XPropertySet.class, xCell); -// xCellProps.setPropertyValue("CellStyle", "Result"); - -// XModel xSpreadsheetModel = (XModel)UnoRuntime.queryInterface( -// XModel.class, xSpreadsheetComponent); -// XController xSpreadsheetController = xSpreadsheetModel.getCurrentController(); -// XSpreadsheetView xSpreadsheetView = (XSpreadsheetView) -// UnoRuntime.queryInterface(XSpreadsheetView.class, -// xSpreadsheetController); -// xSpreadsheetView.setActiveSheet(xSpreadsheet); - -// // ********************************************************* -// // example for use of enum types -// xCellProps.setPropertyValue("VertJustify", -// com.sun.star.table.CellVertJustify.TOP); - - -// // ********************************************************* -// // example for a sequence of PropertyValue structs -// // create an array with one PropertyValue struct, it contains -// // references only -// loadProps = new PropertyValue[1]; - -// // instantiate PropertyValue struct and set its member fields -// PropertyValue asTemplate = new PropertyValue(); -// asTemplate.Name = "AsTemplate"; -// asTemplate.Value = new Boolean(true); - -// // assign PropertyValue struct to array of references for PropertyValue -// // structs -// loadProps[0] = asTemplate; - -// // load calc file as template -// //xSpreadsheetComponent = xComponentLoader.loadComponentFromURL( -// // "file:///c:/temp/DataAnalysys.ods", "_blank", 0, loadProps); - -// // ********************************************************* -// // example for use of XEnumerationAccess -// XCellRangesQuery xCellQuery = (XCellRangesQuery) -// UnoRuntime.queryInterface(XCellRangesQuery.class, sheet); -// XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells( -// (short)com.sun.star.sheet.CellFlags.FORMULA); -// XEnumerationAccess xFormulas = xFormulaCells.getCells(); -// XEnumeration xFormulaEnum = xFormulas.createEnumeration(); - -// while (xFormulaEnum.hasMoreElements()) { -// Object formulaCell = xFormulaEnum.nextElement(); -// xCell = (XCell)UnoRuntime.queryInterface(XCell.class, formulaCell); -// XCellAddressable xCellAddress = (XCellAddressable) -// UnoRuntime.queryInterface(XCellAddressable.class, xCell); -// System.out.println("Formula cell in column " + -// xCellAddress.getCellAddress().Column -// + ", row " + xCellAddress.getCellAddress().Row -// + " contains " + xCell.getFormula()); -// } - -// } -// catch( com.sun.star.lang.DisposedException e ) { //works from Patch 1 -// xRemoteContext = null; -// throw e; -// } -// } -// } diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java index a5097b1d0621..10bdcc37f2b8 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java +++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java @@ -60,7 +60,6 @@ import com.sun.star.awt.XItemEventBroadcaster; import com.sun.star.awt.XItemListener; import com.sun.star.awt.XKeyListener; import com.sun.star.awt.XListBox; -//import com.sun.star.awt.XMessageBoxFactory; import com.sun.star.awt.XMouseListener; import com.sun.star.awt.XPointer; import com.sun.star.awt.XReschedule; diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java index 5cc0b4a1ac04..dbdbc8004df2 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java @@ -51,7 +51,6 @@ public class SpreadsheetDocHelper private com.sun.star.uno.XComponentContext mxRemoteContext; private com.sun.star.lang.XMultiComponentFactory mxRemoteServiceManager; -// private com.sun.star.lang.XMultiServiceFactory mxMSFactory; private com.sun.star.sheet.XSpreadsheetDocument mxDocument; diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java b/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java index e75d1eec3f4e..4c9dc1b23d62 100644 --- a/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java +++ b/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java @@ -34,7 +34,6 @@ public class EditorFrame extends JFrame { public void windowClosing( WindowEvent e ) { - // m_aBufImage = m_aTextArea.getGraphicsConfiguration().createCompatibleImage( m_aTextArea.getWidth(), m_aTextArea.getHeight() ); m_aBufImage = new BufferedImage( m_aTextArea.getWidth(), m_aTextArea.getHeight(), BufferedImage.TYPE_INT_RGB ); Graphics2D aGr = m_aBufImage.createGraphics(); m_aTextArea.paintAll( aGr ); @@ -54,7 +53,6 @@ public class EditorFrame extends JFrame add( "Center", m_aTextArea ); pack(); - // setResizable( false ); } public String getText() @@ -82,8 +80,6 @@ public class EditorFrame extends JFrame setSize( aToSet ); validate(); - - // pack(); } public byte[] getReplacementImage() diff --git a/odk/examples/java/Inspector/Inspector.java b/odk/examples/java/Inspector/Inspector.java index 62c8f195b300..34624936466d 100644 --- a/odk/examples/java/Inspector/Inspector.java +++ b/odk/examples/java/Inspector/Inspector.java @@ -81,8 +81,6 @@ public class Inspector{ private HashMap<String, String> aApplicationHashMap = new HashMap<String, String>(); private String sTitle = "Object Inspector"; private ArrayList<XComponent> aHiddenDocuments = new ArrayList<XComponent>(); -// private String[] sApplicationDocUrls = new String[]{"private:factory/swriter", "private:factory/scalc", "private:factory/simpress", "private:factory/sdraw", "private:factory/sbase"}; -// private String[] sApplicationDocNames = new String[]{"Text Document", "Spreadsheet", "Presentation", "Drawing", "Database"}; private XComponentContext m_xComponentContext; private HashMap<String, InspectorPane> aInspectorPanes = new HashMap<String, InspectorPane>(); private XDialogProvider m_oSwingDialogProvider; @@ -100,7 +98,6 @@ public class Inspector{ aApplicationHashMap.put("private:factory/sdraw", "Drawing"); aApplicationHashMap.put("private:factory/smath", "Formula"); m_oSwingDialogProvider = new SwingDialogProvider(this, sTitle); -// aApplicationHashMap.put("private:factory/sbase", "Database"); } diff --git a/odk/examples/java/Inspector/InspectorAddon.java b/odk/examples/java/Inspector/InspectorAddon.java index b32bde1d2dfc..bf84f25a46c4 100644 --- a/odk/examples/java/Inspector/InspectorAddon.java +++ b/odk/examples/java/Inspector/InspectorAddon.java @@ -220,7 +220,4 @@ public class InspectorAddon { return Factory.writeRegistryServiceInfo(InspectorAddonImpl.class.getName(), InspectorAddonImpl.getServiceNames(), regKey); } -// __create( XComponentContext ){ - -// } } diff --git a/odk/examples/java/Inspector/InspectorPane.java b/odk/examples/java/Inspector/InspectorPane.java index 2f0d2c5c66ec..f3812d7ccff4 100644 --- a/odk/examples/java/Inspector/InspectorPane.java +++ b/odk/examples/java/Inspector/InspectorPane.java @@ -613,14 +613,11 @@ import com.sun.star.uno.XComponentContext; public void showPopUpMenu(Object _invoker, int x, int y) throws ClassCastException{ XUnoNode oUnoNode = getSelectedNode(); boolean bdoEnableInvoke = oUnoNode instanceof XUnoMethodNode; -// boolean bdoEnableSourceCodeGeneration = true; if (bdoEnableInvoke){ XUnoMethodNode oUnoMethodNode = (XUnoMethodNode) oUnoNode; bdoEnableInvoke = oUnoMethodNode.isInvokable(); -// bdoEnableSourceCodeGeneration = bdoEnableInvoke; } m_xDialogProvider.enablePopupMenuItem(XDialogProvider.SINVOKE, bdoEnableInvoke); -// m_xDialogProvider.enablePopupMenuItem(XDialogProvider.SADDTOSOURCECODE, bdoEnableSourceCodeGeneration); m_xDialogProvider.showPopUpMenu(_invoker, x, y); } } diff --git a/odk/examples/java/Inspector/SourceCodeGenerator.java b/odk/examples/java/Inspector/SourceCodeGenerator.java index 8ccba8bba944..7e158afd04ad 100644 --- a/odk/examples/java/Inspector/SourceCodeGenerator.java +++ b/odk/examples/java/Inspector/SourceCodeGenerator.java @@ -768,7 +768,6 @@ class UnoObjectDefinition{ } else{ bleaveloop = true; - // throw new NullPointerException("SourceCode Variable " + _sStemVariableName + " not defined"); } } } @@ -965,7 +964,6 @@ class UnoObjectDefinition{ bIsPropertyUnoObjectDefined = true; } sReturn += _sReturnVariableName + " = (" + sShortTypeName + ") AnyConverter.toObject(" + sShortTypeName + ".class, oUnoObject);"; -// this.bAddTypeImport = true; break; } if (!bAddAnyConverter){ @@ -1008,7 +1006,6 @@ class UnoObjectDefinition{ sReturn += ";"; sReturn = "\t" + sReturn; return sReturn; -// return "\t" + _sReturnVariableName + " = " + _sIncomingObjectName + ".getPropertyValue(\"" + _sPropertyName + "\");"; } @@ -1461,7 +1458,7 @@ class UnoObjectDefinition{ private String getHeaderOfClass(String _sClassName){ - return "#include \"" + _sClassName.replace('.', '/') + ".hpp\"\n"; // #include <com/sun/star/uno/XComponentContext.hpp> + return "#include \"" + _sClassName.replace('.', '/') + ".hpp\"\n"; } @@ -1682,7 +1679,6 @@ class UnoObjectDefinition{ public String getVariableDeclaration(String _sTypeString, String _sVariableName, boolean bIsArray, TypeClass _aTypeClass, boolean _bInitialize){ boolean bIsPrimitive = Introspector.isPrimitive(_aTypeClass); - // uno::Reference< frame::XDispatch > m_xDispatch String sReturn = ""; if (bIsArray){ bIncludeSequenceHeader = true; diff --git a/odk/examples/java/Inspector/SwingDialogProvider.java b/odk/examples/java/Inspector/SwingDialogProvider.java index 5f5a31b8818d..29774f93a6ca 100644 --- a/odk/examples/java/Inspector/SwingDialogProvider.java +++ b/odk/examples/java/Inspector/SwingDialogProvider.java @@ -423,7 +423,6 @@ public class SwingDialogProvider implements XDialogProvider{ else{ m_jInspectorDialog.pack(); } -// m_jInspectorDialog.paint(m_jInspectorDialog.getGraphics()); m_jInspectorDialog.setVisible(true); } diff --git a/odk/examples/java/Inspector/TestInspector.java b/odk/examples/java/Inspector/TestInspector.java index 804ad755630a..d1282ea7bacf 100644 --- a/odk/examples/java/Inspector/TestInspector.java +++ b/odk/examples/java/Inspector/TestInspector.java @@ -81,6 +81,5 @@ public class TestInspector { System.err.println( e + e.getMessage()); e.printStackTrace(); } -// System.exit( 0 ); } } diff --git a/odk/examples/java/Inspector/UnoNode.java b/odk/examples/java/Inspector/UnoNode.java index 7846dbd6a649..da182dd28dfe 100644 --- a/odk/examples/java/Inspector/UnoNode.java +++ b/odk/examples/java/Inspector/UnoNode.java @@ -228,20 +228,6 @@ public class UnoNode{ } -// public static String getServiceDescription(Object _oUnoObject){ -// String sClassName = ""; -// XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, _oUnoObject); -// if (xServiceInfo != null){ -// String[] sChildServiceNames = removeMandatoryServiceNames(xServiceInfo.getSupportedServiceNames()); -// if (sChildServiceNames.length > 0){ -// sClassName = sChildServiceNames[0]; -// } -// } -// return sClassName; -// } - - - private static String[] getMandatoryServiceNames(String _sServiceName){ String[] sMandatoryServiceNames = new String[]{}; try { diff --git a/odk/examples/java/Inspector/UnoTreeRenderer.java b/odk/examples/java/Inspector/UnoTreeRenderer.java index 67080baceba9..fb3295ca3899 100644 --- a/odk/examples/java/Inspector/UnoTreeRenderer.java +++ b/odk/examples/java/Inspector/UnoTreeRenderer.java @@ -81,28 +81,19 @@ public class UnoTreeRenderer extends DefaultTreeCellRenderer{ String sLabelText = (String)node.getUserObject(); if (sLabelText != null){ if (sLabelText.equals(XUnoFacetteNode.SCONTAINERDESCRIPTION)){ -// setIcon(m_oContainerIcon); } else if (sLabelText.equals(XUnoFacetteNode.SCONTENTDESCRIPTION)){ -// setIcon(m_oContentIcon); } else if (sLabelText.equals(XUnoFacetteNode.SINTERFACEDESCRIPTION)){ -// setIcon(m_oInterfaceIcon); } else if (sLabelText.equals(XUnoFacetteNode.SMETHODDESCRIPTION)){ -// setIcon(m_oMethodIcon); } else if (sLabelText.equals(XUnoFacetteNode.SPROPERTYDESCRIPTION)){ -// setIcon(m_oPropertyIcon); } else if (sLabelText.startsWith(XUnoFacetteNode.SPROPERTYINFODESCRIPTION)){ -// setIcon(m_oPropertyIcon); } else if (sLabelText.equals(XUnoFacetteNode.SPROPERTYVALUEDESCRIPTION)){ -// setIcon(m_oPropertyValueIcon); } else if (sLabelText.equals(XUnoFacetteNode.SSERVICEDESCRIPTION)){ -// setIcon(m_oServiceIcon); } else{ setText(sLabelText); rc.validate(); } - setSize(getPreferredSize()); //fm.stringWidth(sLabelText), (int) getSize().getHeight()); + setSize(getPreferredSize()); rc.validate(); -// nWidth = (int) rc.getPreferredSize().getWidth(); doLayout(); } } catch (RuntimeException e) { @@ -123,8 +114,6 @@ public class UnoTreeRenderer extends DefaultTreeCellRenderer{ x = getIcon().getIconWidth() + getIconTextGap(); } g.setColor(getForeground()); -// g.fillRect(x,y,x + fm.stringWidth(getText()),y); -// System.out.println("Text: " + getText()); super.paintComponent(g); } } diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index 7a5b37eca468..e7709e547518 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -54,7 +54,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/runner/complexlib/ComplexTestCase \ qadevOOo/runner/complexlib/MethodThread \ qadevOOo/runner/complexlib/ShowTargets \ - qadevOOo/runner/convwatch/Basename \ qadevOOo/runner/convwatch/BorderRemover \ qadevOOo/runner/convwatch/BuildID \ qadevOOo/runner/convwatch/ConvWatch \ @@ -82,7 +81,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/runner/convwatch/MSOfficePrint \ qadevOOo/runner/convwatch/NameHelper \ qadevOOo/runner/convwatch/OfficePrint \ - qadevOOo/runner/convwatch/OSHelper \ qadevOOo/runner/convwatch/PerformanceContainer \ qadevOOo/runner/convwatch/PixelCounter \ qadevOOo/runner/convwatch/PRNCompare \ @@ -190,7 +188,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/runner/util/compare/DocComparatorFactory \ qadevOOo/runner/util/compare/GraphicalComparator \ qadevOOo/runner/util/compare/PDFComparator \ - qadevOOo/runner/util/compare/XMLComparator \ qadevOOo/runner/util/ControlDsc \ qadevOOo/runner/util/db/DatabaseDocument \ qadevOOo/runner/util/db/DataSource \ diff --git a/qadevOOo/Jar_OOoRunnerLight.mk b/qadevOOo/Jar_OOoRunnerLight.mk index 3ed371edbfbb..17220c8c10ce 100644 --- a/qadevOOo/Jar_OOoRunnerLight.mk +++ b/qadevOOo/Jar_OOoRunnerLight.mk @@ -51,7 +51,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunnerLight,\ qadevOOo/runner/complexlib/ComplexTestCase \ qadevOOo/runner/complexlib/MethodThread \ qadevOOo/runner/complexlib/ShowTargets \ - qadevOOo/runner/convwatch/Basename \ qadevOOo/runner/convwatch/BorderRemover \ qadevOOo/runner/convwatch/BuildID \ qadevOOo/runner/convwatch/ConvWatch \ @@ -79,7 +78,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunnerLight,\ qadevOOo/runner/convwatch/MSOfficePrint \ qadevOOo/runner/convwatch/NameHelper \ qadevOOo/runner/convwatch/OfficePrint \ - qadevOOo/runner/convwatch/OSHelper \ qadevOOo/runner/convwatch/PerformanceContainer \ qadevOOo/runner/convwatch/PixelCounter \ qadevOOo/runner/convwatch/PRNCompare \ @@ -187,7 +185,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunnerLight,\ qadevOOo/runner/util/compare/DocComparatorFactory \ qadevOOo/runner/util/compare/GraphicalComparator \ qadevOOo/runner/util/compare/PDFComparator \ - qadevOOo/runner/util/compare/XMLComparator \ qadevOOo/runner/util/ControlDsc \ qadevOOo/runner/util/db/DatabaseDocument \ qadevOOo/runner/util/db/DataSource \ diff --git a/qadevOOo/qa/complex/junitskeleton/Skeleton.java b/qadevOOo/qa/complex/junitskeleton/Skeleton.java index d52b4502afd2..a21dc53e80ac 100644 --- a/qadevOOo/qa/complex/junitskeleton/Skeleton.java +++ b/qadevOOo/qa/complex/junitskeleton/Skeleton.java @@ -118,7 +118,6 @@ public class Skeleton @Test public void checkOpenDocumentWithOffice() { - // SOfficeFactory aFactory = new SOfficeFactory(getMSF()); SOfficeFactory SOF = SOfficeFactory.getFactory(getMSF()); final String sREADME = TestDocument.getUrl("README.txt"); try diff --git a/qadevOOo/runner/base/java_fat.java b/qadevOOo/runner/base/java_fat.java index 527f7285a161..9e5efaebe494 100644 --- a/qadevOOo/runner/base/java_fat.java +++ b/qadevOOo/runner/base/java_fat.java @@ -77,14 +77,10 @@ public class java_fat implements TestBase { exclusions = getExclusionList(ExclusionFile, m_isDebug); } - //get Job-Descriptions - // System.out.println("Getting Descriptions for Job: " + job); String sDescriptionPath = (String) m_aParams.get("DescriptionPath"); DescEntry[] entries = dg.getDescriptionFor(job, sDescriptionPath, m_isDebug); - // System.out.println(); - if (entries == null) { System.out.println("Couldn't get Description for Job: " + job); @@ -92,15 +88,6 @@ public class java_fat implements TestBase return false; } -// String officeProviderName = (String) m_aParams.get("OfficeProvider"); -// AppProvider office = (AppProvider) m_aDynamicClassLoader.getInstance(officeProviderName); - -// if (office == null) { -// System.out.println("ERROR: Wrong parameter 'OfficeProvider', " + -// " it cannot be instantiated."); -// System.exit(-1); -// } - m_aOffice = startOffice(m_aParams); boolean firstRun = true; @@ -149,10 +136,6 @@ public class java_fat implements TestBase continue; } -// if (m_isDebug) -// { -// System.out.println("sleeping 2 seconds.."); -// } util.utils.shortWait(2000); System.out.println("Creating: " + entry.entryName); @@ -182,7 +165,6 @@ public class java_fat implements TestBase continue; } - // final String sEntryName = aSubEntry.entryName; final String sLongEntryName = aSubEntry.longName; if ((exclusions != null) && (exclusions.contains(sLongEntryName))) @@ -191,7 +173,6 @@ public class java_fat implements TestBase continue; } - // System.out.println("running: '" + sLongEntryName + "' testcode: [" + sEntryName + "]"); // this will shown in test itself LogWriter ifclog = (LogWriter) m_aDynamicClassLoader.getInstance( (String) m_aParams.get("LogWriter")); @@ -207,7 +188,6 @@ public class java_fat implements TestBase tCase = tEnv.getTestCase(); } - // MultiMethodTest ifc = null; lib.TestResult res = null; // run the interface test twice if it failed. @@ -398,28 +378,6 @@ public class java_fat implements TestBase private TestEnvironment getEnv(DescEntry entry, TestParameters param) { -// if (m_aDynamicClassLoader == null) -// m_aDynamicClassLoader = new DynamicClassLoader(); -// String officeProviderName = (String) m_aParams.get("OfficeProvider"); -// AppProvider office = (AppProvider) m_aDynamicClassLoader.getInstance(officeProviderName); - -// if (office == null) { -// System.out.println("ERROR: Wrong parameter 'OfficeProvider', " + -// " it cannot be instantiated."); -// System.exit(-1); -// } - -// XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager( -// m_aParams); - -// if (msf == null) { -// return null; -// } - -// m_aParams.put("ServiceFactory", msf); - - // AppProvider office = startOffice(m_aParams); - TestCase tCase = null; try @@ -480,17 +438,6 @@ public class java_fat implements TestBase } -// private void shortWait(int millis) -// { -// try -// { -// Thread.sleep(millis); -// } -// catch (java.lang.InterruptedException ie) -// { -// } -// } - private ArrayList<String> getExclusionList(String url, boolean debug) { ArrayList<String> entryList = new ArrayList<String>(); diff --git a/qadevOOo/runner/base/java_fat_service.java b/qadevOOo/runner/base/java_fat_service.java index 2e507ff1e7f4..f9eefaa41dac 100644 --- a/qadevOOo/runner/base/java_fat_service.java +++ b/qadevOOo/runner/base/java_fat_service.java @@ -230,7 +230,6 @@ public class java_fat_service implements TestBase { } log.println("Creating: "+tCase.getObjectName()); - // LogWriter log = (LogWriter)dcl.getInstance( (String)param.get("LogWriter")); log.initialize(entry,true); entry.UserDefinedParams = param; tCase.setLogWriter((PrintWriter) log); @@ -247,10 +246,4 @@ public class java_fat_service implements TestBase { return tEnv; } -// protected void shortWait(int millis) { -// try { -// Thread.sleep(millis); -// } catch (java.lang.InterruptedException ie) {} -// } - } diff --git a/qadevOOo/runner/complexlib/Assurance.java b/qadevOOo/runner/complexlib/Assurance.java index 41f7ae4ffc4c..6c5a41931d96 100644 --- a/qadevOOo/runner/complexlib/Assurance.java +++ b/qadevOOo/runner/complexlib/Assurance.java @@ -369,7 +369,6 @@ public class Assurance state &= s; if (!s) { message += msg + "\r\n"; - // log.println(msg); if (!cont) { throw new AssureException(msg); } diff --git a/qadevOOo/runner/complexlib/ComplexTestCase.java b/qadevOOo/runner/complexlib/ComplexTestCase.java index 56f320abff03..bca42faa0fbc 100644 --- a/qadevOOo/runner/complexlib/ComplexTestCase.java +++ b/qadevOOo/runner/complexlib/ComplexTestCase.java @@ -43,8 +43,6 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest * Can be set with parameter 'ThreadTimeOut' **/ protected int m_nThreadTimeOut = 0; - /** Continue a test even if it did fail **/ - // public static final boolean CONTINUE = true; /** End a test if it did fail **/ public static final boolean BREAK = true; @@ -61,7 +59,6 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest Method before = this.getClass().getMethod("before", new Class[] {} ); before.invoke(this, new Object[] {} ); - // beforeWorked = false; m_bBeforeCalled = true; } catch (java.lang.NoSuchMethodException e) @@ -90,7 +87,6 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest } /** Description entry **/ - // protected DescEntry subEntry = null; private void test_method(DescEntry _entry) { @@ -149,7 +145,7 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest // is a useful way to detect that a office respective a test // is running and not death. // But way ThreadTimeOut? - // There exeitsts a complex test which uses no office. Therefore + // There exists a complex test which uses no office. Therefore // a logging mechanisim to detect a stalled test. int lastPing = -1; int newPing = 0; @@ -168,7 +164,6 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest { lastPing = newPing; newPing = ow.getPing(); - //System.out.println("lastPing: '" + lastPing + "' newPing '" + newPing + "'"); factor = 0; } } diff --git a/qadevOOo/runner/convwatch/Basename.java b/qadevOOo/runner/convwatch/Basename.java deleted file mode 100644 index 3d5d3850ded6..000000000000 --- a/qadevOOo/runner/convwatch/Basename.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package convwatch; - - -// Helper stuff to -// abstract class Name -// { -// abstract public String getName(); -// } -// class PRN extends Name -// { -// public String getName() {return "-ref";} -// } -// class PS extends Name -// { -// public String getName() {return "-test";} -// } - -// public class Basename /* extends *//* implements */ { -// String fs; -// Basename() -// { -// fs = System.getProperty("file.separator"); -// } -// String getJPEGName(String _sOutputPath, String _sBasename, String _sGS_PageOutput, Name _aPostNameAdd) -// { -// String sBaseNameNoSuffix = FileHelper.getNameNoSuffix(_sBasename); -// String sJPEGName = _sOutputPath + fs + sBaseNameNoSuffix + "-" + _sGS_PageOutput + _aPostNameAdd.getName() + ".jpg"; -// return sJPEGName; -// } - -// public static void main( String[] argv ) { - -// } -// } diff --git a/qadevOOo/runner/convwatch/BorderRemover.java b/qadevOOo/runner/convwatch/BorderRemover.java index 95d7e30c2852..c96b8f4853ec 100644 --- a/qadevOOo/runner/convwatch/BorderRemover.java +++ b/qadevOOo/runner/convwatch/BorderRemover.java @@ -53,15 +53,6 @@ class BorderRemover // --------------------------------- test mode --------------------------------- - // void pixelValue(int pixel) - // { - // int alpha = (pixel >> 24) & 0xff; - // int red = (pixel >> 16) & 0xff; - // int green = (pixel >> 8) & 0xff; - // int blue = (pixel ) & 0xff; - // int dummy = 0; - // } - /* * compares 2 colors with a given tolerance. So it's possible to check differences approximate. * @param _nColor1 @@ -131,40 +122,26 @@ class BorderRemover public boolean createNewImageWithoutBorder(String _sFilenameFrom, String _sFilenameTo) throws java.io.IOException { - // System.out.println("load image: " + fileName); m_aImage = ImageHelper.createImageHelper(_sFilenameFrom); - // System.out.println("image width:" + String.valueOf(m_aImage.getWidth())); - // System.out.println("image height:" + String.valueOf(m_aImage.getHeight())); - - // int nw = graphics_stuff.countNotWhitePixel(m_aImage); - // System.out.println("not white pixels:" + String.valueOf(nw)); - - // int nb = graphics_stuff.countNotBlackPixel(m_aImage); - // System.out.println("not black pixels:" + String.valueOf(nb)); - int nBorderColor = m_aImage.getPixel(0,0); Rect aInnerRect = findBorder(m_aImage, nBorderColor); RenderedImage aImage = createImage(m_aImage, aInnerRect); File aWriteFile = new File(_sFilenameTo); - // GlobalLogWriter.get().println("Hello World: File to: " + _sFilenameTo); Exception ex = null; try { Class<?> imageIOClass = Class.forName("javax.imageio.ImageIO"); - // GlobalLogWriter.get().println("Hello World: get Class"); Method getWriterMIMETypesMethod = imageIOClass.getDeclaredMethod("getWriterMIMETypes", new Class[]{ }); - // GlobalLogWriter.get().println("Hello World: get Methode"); getWriterMIMETypesMethod.invoke(imageIOClass, new Object[]{ }); Method writeMethod = imageIOClass.getDeclaredMethod("write", new Class[]{ java.awt.image.RenderedImage.class, java.lang.String.class, java.io.File.class}); - // GlobalLogWriter.get().println("Hello World: get Methode"); writeMethod.invoke(imageIOClass, new Object[]{aImage, "image/jpeg", aWriteFile}); } catch(java.lang.ClassNotFoundException e) { @@ -191,7 +168,6 @@ class BorderRemover "Cannot construct object with current Java version " + javaVersion + ": " + ex.getMessage()); } -// ImageIO.write(aImage, "jpg", aWriteFile); return true; } @@ -216,19 +192,12 @@ class BorderRemover { for (int x = 0; x < nXMin; x++) { - // handlesinglepixel(x+i, y+j, pixels[j * w + i]); int nCurrentColor = _aImage.getPixel(x, y); if (! compareColorWithTolerance(nCurrentColor, _nBorderColor, 10)) { - // pixelValue(nCurrentColor); - // System.out.print("*"); nXMin = java.lang.Math.min(nXMin, x); nYMin = java.lang.Math.min(nYMin, y); } - // else - // { - // System.out.print(" "); - // } } } for (int y = 0; y < h; y++) @@ -243,12 +212,7 @@ class BorderRemover nYMax = java.lang.Math.max(nYMax, ny); } } - // System.out.println(); } - // System.out.println("xmin: " + String.valueOf(nXMin)); - // System.out.println("xmax: " + String.valueOf(nXMax)); - // System.out.println("ymin: " + String.valueOf(nYMin)); - // System.out.println("ymax: " + String.valueOf(nYMax)); Rect aRect; if (nXMin < nXMax && nYMin < nYMax) @@ -266,10 +230,6 @@ class BorderRemover } - // m_nXMin = nXMin; - // m_nXMax = nXMax; - // m_nYMin = nYMin; - // m_nYMax = nYMax; return aRect; } @@ -298,9 +258,6 @@ class BorderRemover aBI.setRGB(x, y, _aImage.getPixel(x + nXOffset, y + nYOffset)); } } - // java.awt.image.MemoryImageSource aSource = new java.awt.image.MemoryImageSource(w, h, aPixels, 0, w); -// return java.awt.Component.createImage(aSource); - // return java.awt.Toolkit.getDefaultToolkit().createImage(aSource); return aBI; } diff --git a/qadevOOo/runner/convwatch/BuildID.java b/qadevOOo/runner/convwatch/BuildID.java index 8734ef8cdc5a..97bdf66abb5e 100644 --- a/qadevOOo/runner/convwatch/BuildID.java +++ b/qadevOOo/runner/convwatch/BuildID.java @@ -61,7 +61,6 @@ public class BuildID { int nIdx = sOfficePath.lastIndexOf(fs); sOfficePath = sOfficePath.substring(0, nIdx); - // ok. System.out.println("directory: " + sOfficePath); sBuildID = getBuildIDFromBootstrap(sOfficePath); if (sBuildID.length() == 0) { @@ -125,28 +124,5 @@ public class BuildID } return sBuildID; } -// public static void main(String[] args) -// { -// String sApp; -// sApp = "/opt/staroffice8_m116/program/soffice --headless --accept=socket,host=localhost,port=8100;urp;"; -// String sBuildID; -// sBuildID = getBuildID(sApp); -// System.out.println("BuildID is: " + sBuildID); - -// Date aDate = new Date(); -// long nStart = aDate.getTime(); -// System.out.println("Time:" + nStart); -// // LLA: Just some more tests for getBuildID -// // sApp = "/opt/staroffice8_net/program/soffice"; -// // sBuildID = getBuildID(sApp); -// // System.out.println("BuildID is: " + sBuildID); - -// // sApp = "\"/opt/staroffice8_net/program/soffice\" test blah"; -// // sBuildID = getBuildID(sApp); - -// // System.out.println("BuildID is: " + sBuildID); -// System.exit(1); -// } - } diff --git a/qadevOOo/runner/convwatch/ConvWatch.java b/qadevOOo/runner/convwatch/ConvWatch.java index 5e0d6625e825..2e089b14c2b7 100644 --- a/qadevOOo/runner/convwatch/ConvWatch.java +++ b/qadevOOo/runner/convwatch/ConvWatch.java @@ -124,12 +124,9 @@ public class ConvWatch FileHelper.makeDirectories("", _sOutputPath); - // runner.convwatch.compare(); - String sAbsoluteInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile); String sInputFile = FileHelper.getBasename(_sAbsoluteInputFile); - // System.out.println("InputFile: " + sInputFile); FileHelper.getNameNoSuffix(sInputFile); @@ -140,20 +137,13 @@ public class ConvWatch String sReferenceFile = FileHelper.getBasename(_sAbsoluteReferenceFile); String sReferenceFileNoSuffix = FileHelper.getNameNoSuffix(sReferenceFile); String sPostScriptFile = sReferenceFileNoSuffix + ".ps"; - // System.out.println("PostscriptFile: " + sPostScriptFile); String sAbsolutePrintFile = _sOutputPath + fs + sPostScriptFile; String sAbsolutePrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFile); - // System.out.println("AbsoluteInputFileURL: " + sAbsoluteInputFileURL); - // System.out.println("AbsoluteOutputFileURL: " + sAbsoluteOutputFileURL); - // System.out.println("AbsolutePrintFileURL: " + sAbsolutePrintFileURL); - // store and print the sAbsoluteInputFileURL file with StarOffice / OpenOffice.org OfficePrint.printToFile(_aGTA, sAbsoluteInputFileURL, sAbsoluteOutputFileURL, sAbsolutePrintFileURL); - // wait(2); - if (! FileHelper.exists(sAbsolutePrintFile)) { throw new ConvWatchCancelException("createPostscriptStartCheck: Printed file " + sAbsolutePrintFile + " does not exist."); @@ -175,16 +165,10 @@ public class ConvWatch PRNCompare a = new PRNCompare(); String sInputPath = FileHelper.getPath(_sAbsoluteInputFile); String sReferencePath = FileHelper.getPath(_sAbsoluteReferenceFile); - // String sReferenceFile = FileHelper.getBasename(sAbsoluteReferenceFile); - - // System.out.println("InputPath: " + sInputPath); - // System.out.println("sReferencePath: " + sReferencePath); - // System.out.println("sReferenceFile: " + sReferenceFile); a.setInputPath( sInputPath ); a.setReferencePath( sReferencePath ); a.setOutputPath( _sOutputPath ); - // a.setDocFile( "1_Gov.ppt"); a.setReferenceFile( sReferenceFile ); a.setPostScriptFile(sPostScriptFile ); if (_aGTA.printAllPages() == true) @@ -221,9 +205,6 @@ public class ConvWatch System.getProperty("file.separator"); String sBasename = FileHelper.getBasename(_sAbsoluteInputFile); String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename); -// String sHTMLFile = _sFilenamePrefix + sNameNoSuffix + ".html"; -// HTMLOutputter HTMLoutput = HTMLOutputter.create(_sOutputPath, sHTMLFile, "", ""); -// HTMLoutput.header(sNameNoSuffix); // TODO: version info was fine // HTMLoutput.checkSection(sBasename); // Status end @@ -274,12 +255,10 @@ public class ConvWatch } // Status -// HTMLoutput.checkLine(aList[i], bCurrentResult); INIoutput.checkLine(aList[i], bCurrentResult); bResultIsOk &= bCurrentResult; } // Status -// HTMLoutput.close(); INIoutput.close(); return bResultIsOk; } @@ -293,10 +272,6 @@ public class ConvWatch String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename); String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini"; -// HTMLOutputter HTMLoutput = HTMLOutputter.create(_sOutputPath, sHTMLFile, _sFilenamePrefix, ""); -// HTMLoutput.header(sNameNoSuffix); -// HTMLoutput.checkDiffDiffSection(sBasename); - INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, _sFilenamePrefix, ""); INIoutput.createHeader(); // LLA? what if the are no values in the list? true or false; @@ -311,11 +286,9 @@ public class ConvWatch INIoutput.writeSection("page" + String.valueOf(i + 1)); // list start at point 0, but this is page 1 and so on... current_page = (i + 1) boolean bCurrentResult = (aDiffDiffList[i].nDiffStatus == StatusHelper.DIFF_NO_DIFFERENCES); // logic: nDiff==0 = true if there is no difference -// HTMLoutput.checkDiffDiffLine(aDiffDiffList[i], bCurrentResult); INIoutput.checkDiffDiffLine(aDiffDiffList[i], bCurrentResult); } // Status -// HTMLoutput.close(); INIoutput.close(); } @@ -376,7 +349,6 @@ public class ConvWatch GlobalLogWriter.get().println("checkDiffDiff: Old diff file: '" + sNewDiffName + "' does not exist." ); continue; } - // String sNewDiffName = _sAbsoluteDiffPath + fs + sDiffBasename; // make a simple difference between these both diff files. String sSourcePath1 = FileHelper.getPath(sOrigDiffName); @@ -405,15 +377,4 @@ public class ConvWatch return bDiffIsOk; } - // public static void main( String[] argv ) - // { - // PRNCompare a = new PRNCompare(); - // a.setInputPath( "/cws/so-cwsserv06/qadev18/SRC680/src.m47/convwatch.keep/input/msoffice/xp/PowerPoint"); - // a.setDocFile( "1_Gov.ppt"); - // a.setReferencePath( "/cws/so-cwsserv06/qadev18/SRC680/src.m47/convwatch.keep/input/msoffice/xp/PowerPoint"); - // a.setReferenceFile( "1_Gov.prn" ); - - // a.setOutputPath( "/tmp/convwatch_java"); - // a.setPostScriptFile("1_Gov.ps" ); - // } } diff --git a/qadevOOo/runner/convwatch/ConvWatchStarter.java b/qadevOOo/runner/convwatch/ConvWatchStarter.java index d0cc8197e3a0..2a76f6c53358 100644 --- a/qadevOOo/runner/convwatch/ConvWatchStarter.java +++ b/qadevOOo/runner/convwatch/ConvWatchStarter.java @@ -49,14 +49,6 @@ import convwatch.PerformanceContainer; public class ConvWatchStarter extends EnhancedComplexTestCase { // The first of the mandatory functions: - /** - * Return the name of the test. - * In this case it is the actual name of the service. - * @return The tested service. - */ - // public String getTestObjectName() { - // return "ConvWatch runner"; - // } // The second of the mandatory functions: return all test methods as an // array. There is only one test function in this example. @@ -94,7 +86,6 @@ public class ConvWatchStarter extends EnhancedComplexTestCase String sREF = (String)param.get( PropertyName.DOC_COMPARATOR_REFERENCE_PATH ); if (sREF == null || sREF.length() == 0) { - // log.println("Please set reference file (path to good documents) REFERENCEFILE=path."); log.println("Assumtion, reference directory and input directory are the same."); m_sReferencePath = m_sInputPath; } @@ -119,7 +110,6 @@ public class ConvWatchStarter extends EnhancedComplexTestCase if (bQuit == true) { - // log.println("must quit."); assure("Must quit", false); } @@ -204,12 +194,6 @@ public class ConvWatchStarter extends EnhancedComplexTestCase String sBuildID = aGTA.getBuildID(); log.println("Current Office has buildid: " + sBuildID); - // LLA: sample code, how to access all parameters - // for (Enumeration e = param.keys() ; e.hasMoreElements() ;) - // { - // System.out.println(e.nextElement()); - // } - String fs = System.getProperty("file.separator"); String sHTMLName = "index.html"; @@ -256,17 +240,12 @@ public class ConvWatchStarter extends EnhancedComplexTestCase { if (sNewReferencePath != null) sNewReferencePath = sNewReferencePath + fs + sNewSubDir; - // String sNameNoSuffix = FileHelper.getNameNoSuffix(FileHelper.getBasename(sEntry)); - // sNewReferenceFile = sNewReferencePath + fs + sNameNoSuffix + ".prn"; sNewOutputPath = sNewOutputPath + fs + sNewSubDir; if (sNewDiffPath != null) sNewDiffPath = sNewDiffPath + fs + sNewSubDir; } - // NameHelper aNameContainer = new NameHelper(m_sOutputPath, sNewSubDir, FileHelper.getBasename(sEntry)); - // aNameContainer.print(); - if (aGTA.checkIfUsableDocumentType(sEntry)) { runGDCWithStatus(HTMLoutput, LISToutput, sEntry, sNewOutputPath, sNewReferencePath, sNewDiffPath, sNewSubDir); @@ -301,14 +280,8 @@ public class ConvWatchStarter extends EnhancedComplexTestCase GraphicalTestArguments aGTA = getGraphicalTestArguments(); OfficeProvider aProvider = null; - // SimpleFileSemaphore aSemaphore = new SimpleFileSemaphore(); if (aGTA.shouldOfficeStart()) { - // if (OSHelper.isWindows()) - // { - // aSemaphore.P(aSemaphore.getSemaphoreFile()); - // } - aGTA.getPerformance().startTime(PerformanceContainer.OfficeStart); aProvider = new OfficeProvider(); XMultiServiceFactory xMSF = (XMultiServiceFactory) aProvider.getManager(param); @@ -369,13 +342,6 @@ public class ConvWatchStarter extends EnhancedComplexTestCase if (aProvider != null) { aProvider.closeExistingOffice(param, true); - // if (OSHelper.isWindows()) - // { - // aSemaphore.V(aSemaphore.getSemaphoreFile()); - // aSemaphore.sleep(2); - // // wait some time maybe an other process will take the semaphore - // // I know, this is absolutely dirty, but the whole convwatch is dirty and need a big cleanup. - // } } // -------------------- Status -------------------- @@ -407,17 +373,8 @@ public class ConvWatchStarter extends EnhancedComplexTestCase GlobalLogWriter.get().println(" NewPath: " + _sNewSubDir); GlobalLogWriter.get().println("----------------------------------------------------------------------"); -// if (_sNewSubDir.length() > 0) -// { -// sLink = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + _sNewSubDir + fs + sFilenameNoSuffix + ".ini"; -// sLinkDD = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + _sNewSubDir + fs + "DiffDiff_" + sFilenameNoSuffix + ".ini"; -// } -// else -// { sLink = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + sFilenameNoSuffix + ".ini"; - // sLinkDD = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + _sNewSubDir + fs + "DiffDiff_" + sFilenameNoSuffix + ".ini"; sLinkDD = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + "DiffDiff_" + sFilenameNoSuffix + ".ini"; -// } sLinkName = sFilenameNoSuffix; sLinkDDName = sFilenameNoSuffix + " (DiffDiff)"; diff --git a/qadevOOo/runner/convwatch/DB.java b/qadevOOo/runner/convwatch/DB.java index af596652c9b1..30ec9b36d7d7 100644 --- a/qadevOOo/runner/convwatch/DB.java +++ b/qadevOOo/runner/convwatch/DB.java @@ -23,8 +23,6 @@ import java.util.StringTokenizer; import java.util.ArrayList; import helper.OSHelper; -// import convwatch.DBHelper; - public class DB extends DBHelper { private static DB m_aDB = null; @@ -205,48 +203,6 @@ public class DB extends DBHelper } } - // public static void insertinto_file(String _sFilename, - // String _sBasename, - // String _sFileFormat, - // String _sBuildID, - // String _sSourceType, - // int _nResolution ) - // { - // Connection aCon = new ShareConnection().getConnection(); - - // String sFilename = _sFilename.replace('\\', '/'); - - // String sDeleteOld = "DELETE FROM file WHERE filename = " + Quote(sFilename); - // ExecSQL(aCon, sDeleteOld); - - // String sValueLine = "type, filename, basename, fileformat, buildid, resolution, date"; - // StringBuffer aDataLine = new StringBuffer(); - // aDataLine.append( Quote(_sSourceType) ) . append( sComma ) . - // append( Quote( sFilename) ) . append( sComma ) . - // append( Quote( _sBasename) ) . append( sComma ) . - // append( Quote( _sFileFormat) ) . append( sComma ) . - // append( Quote( _sBuildID) ) . append( sComma ) . - // append( _nResolution) . append( sComma ) . - // append( Quote( today() ) ); - - // SQLinsertValues(aCon, "file", sValueLine, aDataLine.toString()); - // } - - // public static void updatestate_currentdocs(String _sFilename, - // String _sState) - // { - // Connection aCon = new ShareConnection().getConnection(); - - // String sFilename = _sFilename.replace('\\', '/'); - - // // String sDeleteOld = "DELETE FROM file WHERE filename = " + Quote(sFilename); - // // ExecSQL(aCon, sDeleteOld); - - // String sSet = "state=" + Quote(_sState); - // String sWhere = getWhereClause() + sAND + "name=" + Quote(sFilename); - // SQLupdateValue( aCon, "currentdocs", sSet, sWhere ); - // } - private void sql_test() { String sUUID = getDBDistinct(); @@ -265,11 +221,6 @@ public class DB extends DBHelper java.sql.ResultSetMetaData aResultSetMetaData = aResultSet.getMetaData(); int nColumnCount = aResultSetMetaData.getColumnCount(); // java sql starts with '1' - // String[] aColumnName = new String[nColumnCount]; - // for(int i=1;i<nColumnCount;i++) - // { - // String aColumnName[i - 1] = aResultSetMetaData.getColumnName(i); - // } while( aResultSet.next() ) { @@ -299,12 +250,9 @@ public class DB extends DBHelper sValue = "UNSUPPORTED TYPE"; } aResult.append(sValue).append(", "); - // String sName = aObj.getClass().getName(); - // System.out.println("sqlresult: Class name: " + sName); } String sResult = aResult.toString(); aResultList.add(sResult); - // System.out.println(sResult); } catch (java.sql.SQLException e) { @@ -324,11 +272,6 @@ public class DB extends DBHelper { Connection aCon = new ShareConnection().getConnection(); - // String sInfo = _sInfo.replace('\\', '/'); - - // String sDeleteOld = "DELETE FROM file WHERE filename = " + Quote(sFilename); - // ExecSQL(aCon, sDeleteOld); - String sSet = "state=" + Quote(_sStatus); String sWhere = getWhereClause(); if (sWhere.length() > 0) @@ -340,11 +283,6 @@ public class DB extends DBHelper { Connection aCon = new ShareConnection().getConnection(); - // String sInfo = _sInfo.replace('\\', '/'); - - // String sDeleteOld = "DELETE FROM file WHERE filename = " + Quote(sFilename); - // ExecSQL(aCon, sDeleteOld); - String sSet = "info=" + Quote(_sInfo); String sWhere = getWhereClause(); SQLupdateValue( aCon, "status", sSet, sWhere ); @@ -383,14 +321,6 @@ public class DB extends DBHelper private String getWhereClause() { StringBuffer aWhereClause = new StringBuffer(); - // WHERE environment='' and referenceversion='' and currentversion='' and documentpool='' - // aWhere.append( "environment" ). append(sEqual) . append(Quote(m_sEnvironment)) . - // append(sAND) . - // append( "referenceversion" ). append(sEqual) . append(Quote(m_sSourceVersion)) . - // append(sAND) . - // append( "currentversion" ). append(sEqual) . append(Quote(m_sDestinationVersion)) . - // append(sAND) . - // append( "documentpool" ). append(sEqual) . append(Quote(m_sDocumentPool)); boolean bAND = false; if (m_sDocID != null) { @@ -423,22 +353,12 @@ public class DB extends DBHelper while (aTokenizer.hasMoreTokens()) { String sToken = aTokenizer.nextToken(); - // System.out.println("PART: " + sToken); int nIndex = sToken.indexOf("uuid()="); - // System.out.println("Index " + nIndex); int nIndexTuettel = sToken.indexOf("'", nIndex); - // System.out.println("IndexTuettel " + nIndexTuettel); int nIndexTuettel2 = sToken.lastIndexOf("'"); - // System.out.println("IndexTuettel2 " + nIndexTuettel2); String sUuid = sToken.substring(nIndexTuettel + 1, nIndexTuettel2); - // if (sPart.startsWith("p:")) - // { - // m_sSourceVersion = sPart.substring(2); - // GlobalLogWriter.get().println("DB: source version: " + m_sSourceVersion); - // } return sUuid; } - // System.out.println(sResult); } return "0"; @@ -490,65 +410,4 @@ public class DB extends DBHelper SQLinsertValues(aCon, "documentcompare", sValueLine, aDataLine.toString()); } - // public static void filesRemove(String _sDBInfoString) - // { - // if (_sDBInfoString == null) return; - // fillVariables(_sDBInfoString); - - // Connection aCon = new ShareConnection().getConnection(); - - // String sDeleteSQL = "DELETE FROM currentdocs WHERE " + getWhereClause(); - - // ExecSQL(aCon, sDeleteSQL); - // } - - // public static void fileInsert(String _sDBInfoString, - // String _sFilename, - // String _sRemovePath) - // { - // if (_sDBInfoString == null) return; - // fillVariables(_sDBInfoString); - - // String sFilename = _sFilename.replace('\\', '/'); - - // Connection aCon = new ShareConnection().getConnection(); - - // String sValueLine = "environment, referenceversion, currentversion, documentpool, name, state"; - // StringBuffer aDataLine = new StringBuffer(); - // aDataLine.append( Quote(m_sEnvironment) ) . append( sComma ) . - // append( Quote( m_sSourceVersion) ) . append( sComma ) . - // append( Quote( m_sDestinationVersion) ) . append( sComma ) . - // append( Quote( m_sDocumentPool) ) . append( sComma ) . - // append( Quote( sFilename) ) . append( sComma ) . - // append( Quote( "undone")); - - // SQLinsertValues(aCon, "currentdocs", sValueLine, aDataLine.toString()); - // } - - - // public static void insertinto_file(String _sFilename, String _sFileFormat, String _sBuildID) - // { - // Connection aCon = new ShareConnection().getConnection(); - - // String sValueLine = "type, filename, fileformat, buildid, date"; - // StringBuffer aDataLine = new StringBuffer(); - // aDataLine.append( "1" ) . append( sComma ) . - // append( Quote( _sFilename) ) . append( sComma ) . - // append( Quote( _sFileFormat) ) . append( sComma ) . - // append( Quote( _sBuildID) ) . append( sComma ) . - // append( Quote( today() ) ); - - // SQLinsertValues(aCon, "file", sValueLine, aDataLine.toString()); - // } - - // public static void main( String[] args ) - // { - - // String _sFilename = ""; - // String _sFileFormat = ""; - // String _sBuildID = ""; - - // // insertinto_file("c:\temp\test.txt", "test", "txt", "nix", "", 0); - // fillVariables("p:m128,c:m134,d:demo"); - // } } diff --git a/qadevOOo/runner/convwatch/DBHelper.java b/qadevOOo/runner/convwatch/DBHelper.java index 27b95e29ea6c..420e9d03a9ad 100644 --- a/qadevOOo/runner/convwatch/DBHelper.java +++ b/qadevOOo/runner/convwatch/DBHelper.java @@ -70,10 +70,8 @@ class ShareConnection return; } - // Connection oCon = null; try { - // oCon = getMySQLConnection(); oStmt = m_aCon.createStatement(); GlobalLogWriter.get().println("DB: " + m_sSQL); @@ -104,10 +102,6 @@ public class DBHelper return; } - // String aInsertStr = ""; - - // aInsertStr = "INSERT INTO " + _sTableName + " (" + value_names + " ) VALUES (" + values + ")"; - // ExecSQL(_aCon, aInsertStr); StringBuffer aInsertStr = new StringBuffer(); aInsertStr.append( "INSERT INTO " ) . append( _sTableName ); @@ -124,10 +118,6 @@ public class DBHelper return; } - // String aUpdateStr = ""; - - // aUpdateStr = "UPDATE " + _sTableName + " SET " + _sSet + " WHERE " + _sWhere; - // ExecSQL( _aCon, aUpdateStr ); StringBuffer aUpdateStr = new StringBuffer(); aUpdateStr.append( "UPDATE " ).append( _sTableName ) @@ -204,7 +194,6 @@ public class DBHelper int nValue = 0; try { - // oCon = getMySQLConnection(); oStmt = _aCon.createStatement(); ResultSet oResult = oStmt.executeQuery(_sSQL); @@ -221,7 +210,6 @@ public class DBHelper { nValue = oResult.getInt(_sColumnName); } - // System.out.println("value: " + String.valueOf(nValue)); } catch (SQLException e) { diff --git a/qadevOOo/runner/convwatch/DateHelper.java b/qadevOOo/runner/convwatch/DateHelper.java index 2412f12df553..bef0a09e7a1c 100644 --- a/qadevOOo/runner/convwatch/DateHelper.java +++ b/qadevOOo/runner/convwatch/DateHelper.java @@ -43,7 +43,6 @@ public class DateHelper Locale aLocale = new Locale("en","US"); SimpleDateFormat aFormat = new SimpleDateFormat(_sFormat, aLocale); aBuf = aFormat.format(aCalendar.getTime(), aBuf, new FieldPosition(0) ); - // DebugHelper.writeInfo("Date: " + aBuf.toString()); return aBuf.toString(); } } diff --git a/qadevOOo/runner/convwatch/DocumentConverter.java b/qadevOOo/runner/convwatch/DocumentConverter.java index 9c68edbdb5ad..17877459edb2 100644 --- a/qadevOOo/runner/convwatch/DocumentConverter.java +++ b/qadevOOo/runner/convwatch/DocumentConverter.java @@ -69,12 +69,10 @@ public class DocumentConverter extends EnhancedComplexTestCase public void before() { - // System.out.println("before()"); } public void after() { - // System.out.println("after()"); } // The test method itself. @@ -112,7 +110,6 @@ public class DocumentConverter extends EnhancedComplexTestCase if (bQuit == true) { - // log.println("must quit."); assure("Must quit, Parameter problems.", false); } @@ -194,8 +191,6 @@ public class DocumentConverter extends EnhancedComplexTestCase // first do a check if the reference not already exist, this is a big speedup, due to the fact, // we don't need to start a new office. GraphicalTestArguments aGTA_local = getGraphicalTestArguments(); - // if (GraphicalDifferenceCheck.isReferenceExists(_sInputFile, _sReferencePath, aGTA_local) == false) - // { // start a fresh Office OfficeProvider aProvider = null; if (aGTA_local.restartOffice()) @@ -254,7 +249,6 @@ public class DocumentConverter extends EnhancedComplexTestCase // Office shutdown aProvider.closeExistingOffice(param, true); } - // } } } diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java index a96dc7abdaf6..a53a48b38e8e 100644 --- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java +++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java @@ -28,16 +28,6 @@ import convwatch.GraphicalTestArguments; public abstract class EnhancedComplexTestCase extends ComplexTestCase { - // public void before() - // { - // // System.out.println("before()"); - // } - - // public void after() - // { - // // System.out.println("after()"); - // } - void checkExistance(String _sScriptFile, String _sName) { // Process testshl = Runtime.getRuntime().exec(scriptFile); @@ -53,12 +43,9 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase { String sError = "Must quit. " + _sName + " may be not accessible."; assure(sError, false); - // System.exit(1); } else { - // System.out.println("Output from script:"); - // System.out.println(sText); } } diff --git a/qadevOOo/runner/convwatch/FileHelper.java b/qadevOOo/runner/convwatch/FileHelper.java index 0e2fa55a3b25..5ae392128204 100644 --- a/qadevOOo/runner/convwatch/FileHelper.java +++ b/qadevOOo/runner/convwatch/FileHelper.java @@ -29,9 +29,6 @@ public class FileHelper { public FileHelper() { - // fs = System.getProperty("file.separator"); - - String sOSName = System.getProperty("os.name"); String sOSArch = System.getProperty("os.arch"); String sOSVersion = System.getProperty("os.version"); @@ -58,22 +55,6 @@ public class FileHelper { return true; } - // This is just nice for DEBUG behaviour - // due to the fact this is absolutely context dependency no one should use it. - // else - // { - // System.out.println("FileHelper:exists() tell this path doesn't exists. Check it. path is:" ); - // System.out.println( _sFile ); - // System.out.println( aFile.getAbsolutePath() ); - // MessageBox("Der JavaProzess wartet auf eine interaktion ihrerseits."); - - // File aFile2 = new File(_sFile); - // if (aFile2.exists()) - // { - // System.out.println("Thanks, file exists." ); - // return true; - // } - // } return false; } @@ -206,7 +187,6 @@ public class FileHelper String part = path_tokenizer.nextToken(); File new_dir = new File(already_done + File.separatorChar + part); already_done = new_dir.toString(); - // System.out.println(already_done); //create the directory new_dir.mkdirs(); if (OSHelper.isUnix() && diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java b/qadevOOo/runner/convwatch/FilenameHelper.java index 35c4f188179d..85b02993c132 100644 --- a/qadevOOo/runner/convwatch/FilenameHelper.java +++ b/qadevOOo/runner/convwatch/FilenameHelper.java @@ -149,9 +149,6 @@ abstract class FilenameHelper_impl implements Filenamer * @return a created name */ abstract public String buildName(); - // { - // return getName(); - // } /** * @return the complete filename with it's suffix @@ -378,11 +375,5 @@ public class FilenameHelper new OriginalReferenceFilename("/dir1/dir2","/name",".ext"); new OriginalReferenceFilename("/dir1/dir2","name","ext"); - - // OriginalReferenceFilename b = new OriginalReferenceFilename("c:/dir1/dir2/name.ext"); - // OriginalReferenceFilename c = new OriginalReferenceFilename("file:///dir1/dir2/name.ext"); - // OriginalReferenceFilename e = new OriginalReferenceFilename("c:\\dir1\\dir2\\name"); - // OriginalReferenceFilename f = new OriginalReferenceFilename("c:\\dir1\\dir2"); - // OriginalReferenceFilename g = new OriginalReferenceFilename("c:\\dir1\\dir2\\"); } } diff --git a/qadevOOo/runner/convwatch/GfxCompare.java b/qadevOOo/runner/convwatch/GfxCompare.java index a61505e40984..69af898846ba 100644 --- a/qadevOOo/runner/convwatch/GfxCompare.java +++ b/qadevOOo/runner/convwatch/GfxCompare.java @@ -29,14 +29,6 @@ import java.io.File; public class GfxCompare extends EnhancedComplexTestCase { // The first of the mandatory functions: - /** - * Return the name of the test. - * In this case it is the actual name of the service. - * @return The tested service. - */ - // public String getTestObjectName() { - // return "ConvWatch runner"; - // } // The second of the mandatory functions: return all test methods as an // array. There is only one test function in this example. diff --git a/qadevOOo/runner/convwatch/GlobalLogWriter.java b/qadevOOo/runner/convwatch/GlobalLogWriter.java index 5215a96efed0..aedaf265c940 100644 --- a/qadevOOo/runner/convwatch/GlobalLogWriter.java +++ b/qadevOOo/runner/convwatch/GlobalLogWriter.java @@ -34,11 +34,6 @@ public class GlobalLogWriter return m_aGlobalLogWriter; } -// public static synchronized void initialize() -// { -// get().initialize(null, true); -// } - public static synchronized void set(LogWriter _aLog) { m_aGlobalLogWriter = _aLog; diff --git a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java index 5d371e48b731..0f8182b998c7 100644 --- a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java +++ b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java @@ -78,7 +78,6 @@ public class GraphicalDifferenceCheck } else { - // System.out.println("No directory."); createOneReferenceFile(_sInputPath, _sReferencePath, _aGTA); } } diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java index a45d46a7dc95..338524324120 100644 --- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java +++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java @@ -112,7 +112,6 @@ public class GraphicalTestArguments } else { - // log.println("found REFERENCE_TYPE " + sReferenceType ); setReferenceType(sReferenceType); } @@ -123,7 +122,6 @@ public class GraphicalTestArguments } else { - // log.println("found PRINTER_NAME " + sPrinterName ); setPrinterName(sPrinterName); } // DEFAULT_XML_FORMAT_APP ------ @@ -166,7 +164,6 @@ public class GraphicalTestArguments String sImportFilterName = (String)param.get(PropertyName.DOC_CONVERTER_IMPORT_FILTER_NAME); if (sImportFilterName != null && sImportFilterName.length() > 0) { - // System.out.println("found " + PropertyName.DOC_CONVERTER_IMPORT_FILTER_NAME + " " + sImportFilterName ); m_sImportFilterName = sImportFilterName; if (sImportFilterName.toLowerCase().equals("help")) @@ -179,7 +176,6 @@ public class GraphicalTestArguments String sExportFilterName = (String)param.get(PropertyName.DOC_CONVERTER_EXPORT_FILTER_NAME); if (sExportFilterName != null && sExportFilterName.length() > 0) { - // System.out.println("found " + PropertyName.DOC_CONVERTER_EXPORT_FILTER_NAME + " " + sExportFilterName ); m_sExportFilterName = sExportFilterName; if (sExportFilterName.toLowerCase().equals("help")) { @@ -318,7 +314,6 @@ public class GraphicalTestArguments { if (_sFilterName.length() == 0) { - // System.out.println("No FilterName set."); return; } @@ -327,7 +322,6 @@ public class GraphicalTestArguments GlobalLogWriter.get().println("MultiServiceFactory not set."); return; } - // XFilterFactory aFilterFactory = null; Object aObj = null; try { @@ -357,14 +351,6 @@ public class GraphicalTestArguments } } - /* - public GraphicalTestArguments(TestParameters param, Log xxx) - { - // collect interesting information from the ComplexTestCase - - } - */ - // set methods public void setReferenceType(String _sType) { @@ -622,10 +608,6 @@ public class GraphicalTestArguments } TriState m_tWithBorderMove = TriState.UNSET; - // public TriState isBorderMove() - // { - // return m_tWithBorderMove; - // } public TriState getBorderMove() { return m_tWithBorderMove; diff --git a/qadevOOo/runner/convwatch/HTMLOutputter.java b/qadevOOo/runner/convwatch/HTMLOutputter.java index b9e8f06d1b9c..7d99bda6f0ab 100644 --- a/qadevOOo/runner/convwatch/HTMLOutputter.java +++ b/qadevOOo/runner/convwatch/HTMLOutputter.java @@ -108,7 +108,6 @@ public class HTMLOutputter StringBuffer a = new StringBuffer(); if (! OSHelper.isWindows()) { - // System.out.println("Tu'nix system."); a.append("<A HREF=\""); a.append(_sHREF); a.append("\">"); @@ -117,42 +116,13 @@ public class HTMLOutputter } else { - // System.out.println("Windows system."); //! this should be replaced by a better method //! name(WIN|UNIX) a.append("<A HREF=\""); a.append(_sHREF); a.append("\">"); a.append(_sPathInfo); - // a.append("(first)"); a.append("</A>"); - // if (_sHREF.charAt(1) == ':' && (_sHREF.charAt(0) == 'x' || _sHREF.charAt(0) == 'X')) - // int index = 0; - // index = _sHREF.indexOf("X:"); - // if (index == -1) - // { - // index = _sHREF.indexOf("x:"); - // } - // if (index >= 0) - // { - // // int index = 0; - // // remove "X:" and insert "/tausch" - // StringBuffer sbUNIXPath = new StringBuffer( _sHREF.substring(0, index) ); - // sbUNIXPath.append("/tausch"); - // sbUNIXPath.append(_sHREF.substring(index + 2)); - // String sUNIXPath = sbUNIXPath.toString(); - // sUNIXPath = utils.replaceAll13(sUNIXPath, "\\", "/"); - - // a.append("<A HREF=\""); - // a.append(sUNIXPath); - // a.append("\">"); - // a.append("(second)"); - // a.append("</A>"); - // } - // else - // { - // System.out.println("Path is '" + _sHREF + "'"); - // } } return a.toString(); @@ -366,8 +336,6 @@ public class HTMLOutputter { m_aOut.write( "<TR>" + ls); // the link to the old difference can't offer here - // String sLink = getHREF(FileHelper.getBasename(_aStatus.m_sOldGfx), FileHelper.getBasename(_aStatus.m_sOldGfx)); - // m_aOut.write( tableDataCell(sLink) ); String sBasename = FileHelper.getBasename(m_sFilename); String sNew = sBasename.substring(m_sNamePrefix.length()); @@ -383,10 +351,6 @@ public class HTMLOutputter m_aOut.write( tableDataCell(sLink) ); String sPercent = String.valueOf(_aStatus.nPercent) + "%"; - // if (_aStatus.nPercent > 0 && _aStatus.nPercent < 5) - // { - // sPercent += " (less 5% is ok)"; - // } m_aOut.write(tableDataCell( sPercent ) ); // is the check positiv, in a defined range diff --git a/qadevOOo/runner/convwatch/INIOutputter.java b/qadevOOo/runner/convwatch/INIOutputter.java index 0e6c6f99c3b2..3169e42cb3bf 100644 --- a/qadevOOo/runner/convwatch/INIOutputter.java +++ b/qadevOOo/runner/convwatch/INIOutputter.java @@ -180,10 +180,6 @@ public class INIOutputter m_aOut.write( "diffgfx=" + _aStatus.m_sDiffGfx + ls); String sPercent = String.valueOf(_aStatus.nPercent) + "%"; - // if (_aStatus.nPercent > 0 && _aStatus.nPercent < 5) - // { - // sPercent += " (less 5% is ok)"; - // } m_aOut.write("percent=" + sPercent + ls); // is the check positiv, in a defined range diff --git a/qadevOOo/runner/convwatch/ImageHelper.java b/qadevOOo/runner/convwatch/ImageHelper.java index 1114a8d6aea8..6389971b7136 100644 --- a/qadevOOo/runner/convwatch/ImageHelper.java +++ b/qadevOOo/runner/convwatch/ImageHelper.java @@ -22,7 +22,6 @@ import java.awt.Image; import java.awt.image.PixelGrabber; import java.awt.image.ImageObserver; import java.io.File; -//import javax.imageio.ImageIO; import java.lang.reflect.Method; class ImageHelper @@ -64,11 +63,6 @@ class ImageHelper return m_aPixels[y * m_w + x]; } - // Write down the current image to a file. - // public void storeImage(String _sFilename) - // { - // } - public static ImageHelper createImageHelper(String _sFilename) throws java.io.IOException { diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java index 649341ecf45e..b02ddf3ebaf8 100644 --- a/qadevOOo/runner/convwatch/IniFile.java +++ b/qadevOOo/runner/convwatch/IniFile.java @@ -54,8 +54,6 @@ class IniFile if (! aFile.exists()) { GlobalLogWriter.get().println("couldn't find file " + m_sFilename); - // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, ""); - // m_bListContainUnsavedChanges = false; return aLines; } RandomAccessFile aReader = null; @@ -76,13 +74,11 @@ class IniFile { GlobalLogWriter.get().println("couldn't open file " + m_sFilename); GlobalLogWriter.get().println("Message: " + fne.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, ""); } catch (java.io.IOException ie) { GlobalLogWriter.get().println("Exception occurs while reading from file " + m_sFilename); GlobalLogWriter.get().println("Message: " + ie.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage()); } try { @@ -92,7 +88,6 @@ class IniFile { GlobalLogWriter.get().println("Couldn't close file " + m_sFilename); GlobalLogWriter.get().println("Message: " + ie.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage()); } return aLines; } @@ -287,20 +282,13 @@ class IniFile File aFile = new File(m_sFilename); if (aFile.exists()) { - // System.out.println("couldn't find file " + m_sFilename); aFile.delete(); if (aFile.exists()) { GlobalLogWriter.get().println("Couldn't delete the file " + m_sFilename); return; - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, "Couldn't delete the file " + m_sFilename); } } - // if (! aFile.canWrite()) - // { - // System.out.println("Couldn't write to file " + m_sFilename); - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ""); - // } try { RandomAccessFile aWriter = new RandomAccessFile(aFile, "rw"); @@ -317,13 +305,11 @@ class IniFile { GlobalLogWriter.get().println("couldn't open file for writing " + m_sFilename); GlobalLogWriter.get().println("Message: " + fne.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, ""); } catch(java.io.IOException ie) { GlobalLogWriter.get().println("Exception occurs while writing to file " + m_sFilename); GlobalLogWriter.get().println("Message: " + ie.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage()); } } @@ -369,75 +355,4 @@ class IniFile } } - // String replaceEvaluatedValue(String _sSection, String _sValue) - // { - // String sValue = _sValue; - // int nIndex = 0; - // while (( nIndex = sValue.indexOf("$(", nIndex)) >= 0) - // { - // int nNextIndex = sValue.indexOf(")", nIndex); - // if (nNextIndex >= 0) - // { - // String sKey = sValue.substring(nIndex + 2, nNextIndex); - // String sNewValue = getValue(_sSection, sKey); - // if (sNewValue != null && sNewValue.length() > 0) - // { - // String sRegexpKey = "\\$\\(" + sKey + "\\)"; - // sValue = sValue.replaceAll(sRegexpKey, sNewValue); - // } - // nIndex = nNextIndex; - // } - // else - // { - // nIndex += 2; - // } - // } - // return sValue; - // } - - - // public String getLocalEvaluatedValue(String _sSection, String _sKey) - // { - // String sValue = getValue(_sSection, _sKey); - // sValue = replaceEvaluatedValue(_sSection, sValue); - // return sValue; - // } - - - - // this is a special behaviour. - // public String getGlobalLocalEvaluatedValue(String _sSection, String _sKey) - // { - // String sGlobalValue = getKey("global", _sKey); - // String sLocalValue = getKey(_sSection, _sKey); - // if (sLocalValue.length() == 0) - // { - // sGlobalValue = replaceEvaluatedKey(_sSection, sGlobalValue); - // sGlobalValue = replaceEvaluatedKey("global", sGlobalValue); - // return sGlobalValue; - // } - // sLocalValue = replaceEvaluatedKey(_sSection, sLocalValue); - // sLocalValue = replaceEvaluatedKey("global", sLocalValue); - - // return sLocalValue; - // } - - - /** - * some tests for this class - */ -// public static void main(String[] args) -// { -// IniFile aIniFile = new IniFile("/tmp/inifile"); -// String sValue = aIniFile.getValue("Section","Key"); -// // insert a new value to a already exist section -// aIniFile.insertValue("Section","Key2","a new value in a existing section"); -// // replace a value -// aIniFile.insertValue("Section","Key","replaced value"); -// // create a new value -// aIniFile.insertValue("New Section", "Key", "a new key value pair"); - -// String sValue2 = aIniFile.getValue("Section2","Key"); -// aIniFile.store(); -// } } diff --git a/qadevOOo/runner/convwatch/MSOfficePrint.java b/qadevOOo/runner/convwatch/MSOfficePrint.java index be907be3c589..4df3a2f23b10 100644 --- a/qadevOOo/runner/convwatch/MSOfficePrint.java +++ b/qadevOOo/runner/convwatch/MSOfficePrint.java @@ -124,9 +124,6 @@ public class MSOfficePrint { aStartCommand = createExcelStoreHelper(); } - // else - // { - // } } else { @@ -142,11 +139,6 @@ public class MSOfficePrint sFilterName = ""; // xlXMLSpreadsheet"; } - // String sCommand = sStartCommand + " " + - // _sInputFile + " " + - // StringHelper.doubleQuote(sFilterName) + " " + - // _sOutputFile; - aStartCommand.add(_sInputFile); aStartCommand.add(sFilterName); aStartCommand.add(_sOutputFile); @@ -214,10 +206,6 @@ public class MSOfficePrint sPrinterName = ""; } - // String sCommand = sStartCommand + " " + - // _sInputFile + " " + - // StringHelper.doubleQuote(m_sPrinterName) + " " + - // _sPrintFilename; aStartCommand.add(_sInputFile); aStartCommand.add(m_sPrinterName); aStartCommand.add(_sPrintFilename); @@ -406,8 +394,6 @@ public class MSOfficePrint } String sName = aPerlScript.getAbsolutePath(); - // String sCommand = "perl " + sName; - // System.out.println(sCommand); aList.add("perl"); aList.add(sName); return aList; @@ -422,7 +408,6 @@ public class MSOfficePrint String ls = System.getProperty("line.separator"); String fs = System.getProperty("file.separator"); - // ArrayList aList = new ArrayList(); String sSaveViaWord = "saveViaWord.pl"; ArrayList<String> aList = searchLocalFile(sSaveViaWord); @@ -584,9 +569,6 @@ public class MSOfficePrint out.write( "{" + ls); out.write( " print FILE \"name=$ARGV[0]\\n\";" + ls); out.write( " print FILE \"ExcelVersion=$sVersion\\n\";" + ls); -// out.write( " print FILE \"WordStartTime=$stopWordTime\\n\";" + ls); -// out.write( " print FILE \"WordLoadTime=$stopLoadWordTime\\n\";" + ls); -// out.write( " print FILE \"WordPrintTime=$stopPrintWordTime\\n\";" + ls); out.write( " close(FILE);" + ls); out.write( "}" + ls); out.close(); @@ -776,9 +758,6 @@ public class MSOfficePrint out.write( "{" + ls); out.write( " print FILE \"name=$ARGV[0]\\n\";" + ls); out.write( " print FILE \"PowerPointVersion=$sVersion\\n\";" + ls); -// out.write( " print FILE \"WordStartTime=$stopWordTime\\n\";" + ls); -// out.write( " print FILE \"WordLoadTime=$stopLoadWordTime\\n\";" + ls); -// out.write( " print FILE \"WordPrintTime=$stopPrintWordTime\\n\";" + ls); out.write( " close(FILE);" + ls); out.write( "}" + ls); out.close(); diff --git a/qadevOOo/runner/convwatch/OSHelper.java b/qadevOOo/runner/convwatch/OSHelper.java deleted file mode 100644 index 5bb40b6519eb..000000000000 --- a/qadevOOo/runner/convwatch/OSHelper.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package convwatch; - -// class OSHelper -// { -// public static boolean isWindows() -// { -// String sOSName = System.getProperty("os.name"); -// if (sOSName.toLowerCase().startsWith("windows")) -// { -// return true; -// } -// return false; -// } -// // not need -// // public static boolean isUnix() -// public static boolean isSolarisIntel() -// { -// if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") || -// System.getProperty("os.name").toLowerCase().startsWith("sunos") ) && -// System.getProperty("os.arch").equals("x86")) -// { -// return true; -// } -// return false; -// } -// public static boolean isSolarisSparc() -// { -// if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") || -// System.getProperty("os.name").toLowerCase().startsWith("sunos") ) && -// System.getProperty("os.arch").equals("sparc")) -// { -// return true; -// } -// return false; -// } -// public static boolean isLinuxIntel() -// { -// if (System.getProperty("os.name").toLowerCase().startsWith("linux") && -// System.getProperty("os.arch").equals("i386")) -// { -// return true; -// } -// return false; -// } - -// public static boolean isUnix() -// { -// if (isLinuxIntel() || -// isSolarisIntel() || -// isSolarisSparc()) -// { -// return true; -// } -// return false; -// } - -// } diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java index 080b68534933..801987849d9c 100644 --- a/qadevOOo/runner/convwatch/OfficePrint.java +++ b/qadevOOo/runner/convwatch/OfficePrint.java @@ -40,12 +40,6 @@ import com.sun.star.uno.AnyConverter; import helper.URLHelper; import helper.PropertyHelper; import helper.OSHelper; -// import convwatch.FileHelper; -// import convwatch.MSOfficePrint; -// import convwatch.GraphicalTestArguments; -// import convwatch.ConvWatchCancelException; - -// import helper.Parameter; /** * This Object is to print a given document with OpenOffice.org / StarOffice @@ -55,39 +49,6 @@ import helper.OSHelper; public class OfficePrint { -// static long m_nStartTime; -// // static Date m_aDateCache = null; - -// /* -// simple helper functions to start/stop a timer, to know how long a process need in milliseconds -// */ -// public static void startTimer() -// { -// // if (m_aDateCache == null) -// // { -// // m_aDateCache = new Date(); -// // } -// // m_nStartTime = m_aDateCache.getTime(); -// m_nStartTime = System.currentTimeMillis(); -// } -// public static long stopTimer() -// { -// // if (m_aDateCache == null) -// // { -// // System.out.println("Forgotten to initialise start timer."); -// // return 0; -// // } -// // long m_nStopTime = m_aDateCache.getTime(); -// if (m_nStartTime == 0) -// { -// System.out.println("Forgotten to initialise start timer."); -// return 0; -// } -// long m_nStopTime = System.currentTimeMillis(); -// return m_nStopTime - m_nStartTime; -// } - - private static void showProperty(PropertyValue _aValue) { String sName = _aValue.Name; @@ -114,8 +75,6 @@ public class OfficePrint { for (int i=0;i<aArgs.length;i++) { PropertyValue aValue = aArgs[i]; - // System.out.print("Property: '" + aValue.Name); - // System.out.println("' := '" + aValue.Value + "'"); if (aValue.Name.equals("FilterName") || aValue.Name.equals("MediaType")) { @@ -157,10 +116,6 @@ public class OfficePrint { if (aDesktop != null) { GlobalLogWriter.get().println("com.sun.star.frame.Desktop created."); - // String sInputURL = aCurrentParameter.sInputURL; - // String sOutputURL = aCurrentParameter.sOutputURL; - // String sPrintFileURL = aCurrentParameter.sPrintToFileURL; - // System.out.println(_sInputURL); // set here the loadComponentFromURL() properties @@ -168,20 +123,6 @@ public class OfficePrint { ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); - // check which properties should set and count it. - // if (_aGTA.isHidden()) - // { - // nPropertyCount ++; - // } - // if (_aGTA.getImportFilterName() != null && _aGTA.getImportFilterName().length() > 0) - // { - // nPropertyCount ++; - // } - - // initialize the propertyvalue - // int nPropertyIndex = 0; - // aProps = new PropertyValue[ nPropertyCount ]; - // set all property values if (_aGTA.isHidden()) { @@ -201,12 +142,9 @@ public class OfficePrint { } GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Load document"); - // GlobalLogWriter.get().flush(); XComponentLoader aCompLoader = UnoRuntime.queryInterface( XComponentLoader.class, aDesktop); - // XComponent aDoc = null; - _aGTA.getPerformance().startTime(PerformanceContainer.Load); aDoc = aCompLoader.loadComponentFromURL(_sInputURL, "_blank", 0, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList) ); _aGTA.getPerformance().stopTime(PerformanceContainer.Load); @@ -451,10 +389,6 @@ public class OfficePrint { sBuildID = _aGTA.getBuildID(); out.write("buildid=" + sBuildID + ls); } - // if (_sSpecial != null && _sSpecial.length() > 0) - // { - // out.write("special=" + _sSpecial + ls); - // } out.write(ls); out.write("# resolution given in DPI" + ls); out.write("resolution=" + _aGTA.getResolutionInDPI() + ls); @@ -463,12 +397,6 @@ public class OfficePrint { { out.write("buildid=" + _sSpecial + ls); } - // long nTime = stopTimer(); - // if (nTime != 0) - // { - // out.write("# time is given in milli seconds" + ls); - // out.write("time=" + nTime + ls); - // } out.write(ls); out.write("# Values out of System.getProperty(...)" + ls); @@ -565,27 +493,12 @@ public class OfficePrint { try { - // System.out.println("Document loaded."); // Change Pagesettings to DIN A4 GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Print document."); XPrintable aPrintable = UnoRuntime.queryInterface( XPrintable.class, _aDoc); if (aPrintable != null) { - // System.out.println(" Set PaperFormat to DIN A4"); - // { - // PropertyValue[] aPrinterProps = aPrintable.getPrinter(); - // System.out.println("PrinterProps size: " + String.valueOf(aPrinterProps.length)); - // int nPropIndex = 0; - // while (!"PaperFormat".equals(aPrinterProps[nPropIndex].Name)) - // { - // // System.out.println(aPrinterProps[nPropIndex].Name); - // nPropIndex++; - // } - // aPrinterProps[nPropIndex].Value = com.sun.star.view.PaperFormat.A4; - // aPrintable.setPrinter(aPrinterProps); - // } - // configure Office to allow to execute macos // TODO: We need a possibility to set the printer name also for StarOffice/OpenOffice @@ -594,13 +507,11 @@ public class OfficePrint { if (_aGTA.getPrinterName() != null) { ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); - // PropertyValue [] aPrintProps = new PropertyValue[1]; PropertyValue Arg = new PropertyValue(); Arg.Name = "Name"; Arg.Value = _aGTA.getPrinterName(); aPropertyList.add(Arg); showProperty(Arg); - // GlobalLogWriter.get().println("Printername is not null, so set to " + _aGTA.getPrinterName()); aPrintable.setPrinter(PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList)); } } @@ -608,14 +519,6 @@ public class OfficePrint { // set property values for XPrintable.print() // more can be found at "http://api.libreoffice.org/docs/common/ref/com/sun/star/view/PrintOptions.html" - // int nProperties = 1; // default for 'FileName' property - // if (_aGTA.printAllPages() == false) - // { - // // we don't want to print all pages, build Pages string by ourself - // nProperties ++; - // } - // int nPropsCount = 0; - // If we are a SpreadSheet (calc), we need to set PrintAllSheets property to 'true' XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, _aDoc ); if ( xServiceInfo.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) ) @@ -631,13 +534,10 @@ public class OfficePrint { } ArrayList<PropertyValue> aPrintProps = new ArrayList<PropertyValue>(); - // GlobalLogWriter.get().println("Property FileName:=" + _sPrintFileURL); - // PropertyValue [] aPrintProps = new PropertyValue[nProperties]; PropertyValue Arg = new PropertyValue(); Arg.Name = "FileName"; Arg.Value = _sPrintFileURL; - // aPrintProps[nPropsCount ++] = Arg; aPrintProps.add(Arg); showProperty(Arg); @@ -664,8 +564,6 @@ public class OfficePrint { showProperty(Arg); } - // GlobalLogWriter.get().println("Start printing."); - _aGTA.getPerformance().startTime(PerformanceContainer.Print); aPrintable.print(PropertyHelper.createPropertyValueArrayFormArrayList(aPrintProps)); TimeHelper.waitInSeconds(1, "Start waiting for print ready."); @@ -679,7 +577,6 @@ public class OfficePrint { int nPropIndex = 0; while (!"IsBusy".equals(aPrinterProps[nPropIndex].Name)) { - // System.out.println(aPrinterProps[nPropIndex].Name); nPropIndex++; } isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE); @@ -740,32 +637,24 @@ public class OfficePrint { { if (! FileHelper.exists(_sAbsoluteInputFile)) { - // throw new ConvWatchCancelException("Input file: " + _sAbsoluteInputFile + " does not exist."); return false; } String fs = System.getProperty("file.separator"); - // String sInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile); - String sInputFileBasename = FileHelper.getBasename(_sAbsoluteInputFile); - // String sOutputFileURL = null; String sOutputPath; if (_sAbsoluteOutputPath != null) { sOutputPath = _sAbsoluteOutputPath; - // FileHelper.makeDirectories("", sOutputPath); } else { String sInputPath = FileHelper.getPath(_sAbsoluteInputFile); sOutputPath = sInputPath; } - // sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename); - // sOutputFileURL = null; String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename); - // String sPrintFileURL; String sAbsolutePrintFilename = sOutputPath + fs + sPrintFilename + ".prn"; if (FileHelper.exists(sAbsolutePrintFilename) && _aGTA.getOverwrite() == false) @@ -817,7 +706,6 @@ public class OfficePrint { String sInputPath = FileHelper.getPath(_sAbsoluteInputFile); sOutputPath = sInputPath; } - // sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename); sOutputFileURL = null; String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename); @@ -868,9 +756,6 @@ public class OfficePrint { } - // remember the current timer, to know how long a print process need. - // startTimer(); - if (_aGTA.getReferenceType().toLowerCase().equals("ooo")) { bBack = printToFileWithOOo(_aGTA, _sInputFileURL, _sOutputFileURL, _sPrintFileURL); @@ -912,7 +797,6 @@ public class OfficePrint { } else { - // System.out.println(""); throw new ConvWatchCancelException("OfficePrint.printToFile(): Unknown print type."); } return bBack; @@ -957,7 +841,6 @@ public class OfficePrint { { if (_sFilterName.length() == 0) { - // System.out.println("No FilterName set."); return null; } @@ -966,7 +849,6 @@ public class OfficePrint { GlobalLogWriter.get().println("MultiServiceFactory not set."); return null; } - // XFilterFactory aFilterFactory = null; Object aObj = null; try { @@ -983,18 +865,6 @@ public class OfficePrint { if (aNameAccess != null) { - // if (_sFilterName.toLowerCase().equals("help")) - // { - // System.out.println("Show all possible ElementNames from current version." ); - // String[] aElementNames = aNameAccess.getElementNames(); - // for (int i = 0; i<aElementNames.length; i++) - // { - // System.out.println(aElementNames[i]); - // } - // System.out.println("Must quit."); - // System.out.exit(1); - // } - if (! aNameAccess.hasByName(_sFilterName)) { GlobalLogWriter.get().println("FilterFactory.hasByName() says there exist no '" + _sFilterName + "'" ); @@ -1008,15 +878,12 @@ public class OfficePrint { if (aElements != null) { String sInternalFilterName = null; - // System.out.println("getByName().length: " + String.valueOf(aElements.length)); for (int i=0;i<aElements.length; i++) { PropertyValue aPropertyValue = (PropertyValue)aElements[i]; - // System.out.println("PropertyValue.Name: " + aPropertyValue.Name); if (aPropertyValue.Name.equals("Type")) { String sValue = (String)aPropertyValue.Value; - // System.out.println("Type: " + sValue); sInternalFilterName = sValue; } } @@ -1047,7 +914,6 @@ public class OfficePrint { { if (_sFilterName.length() == 0) { - // System.out.println("No FilterName set."); return null; } @@ -1085,14 +951,12 @@ public class OfficePrint { if (aElements != null) { String sServiceName = null; - // System.out.println("getByName().length: " + String.valueOf(aElements.length)); for (int i=0;i<aElements.length; i++) { PropertyValue aPropertyValue = (PropertyValue)aElements[i]; if (aPropertyValue.Name.equals("DocumentService")) { String sValue = (String)aPropertyValue.Value; - // System.out.println("DocumentService: " + sValue); sServiceName = sValue; break; } @@ -1123,7 +987,6 @@ public class OfficePrint { { if (_sInternalFilterName.length() == 0) { - // System.out.println("No FilterName set."); return null; } @@ -1149,13 +1012,6 @@ public class OfficePrint { if (aNameAccess != null) { - // System.out.println("Show ElementNames" ); - // String[] aElementNames = aNameAccess.getElementNames(); - // for (int i = 0; i<aElementNames.length; i++) - // { - // System.out.println(aElementNames[i]); - // } - if (! aNameAccess.hasByName(_sInternalFilterName)) { GlobalLogWriter.get().println("TypeDetection.hasByName() says there exist no '" + _sInternalFilterName + "'" ); @@ -1170,11 +1026,9 @@ public class OfficePrint { if (aElements != null) { String sExtension = null; - // System.out.println("getByName().length: " + String.valueOf(aElements.length)); for (int i=0;i<aElements.length; i++) { PropertyValue aPropertyValue = (PropertyValue)aElements[i]; - // System.out.println("PropertyValue.Name: " + aPropertyValue.Name); if (aPropertyValue.Name.equals("Extensions")) { aExtensions = (String[])aPropertyValue.Value; @@ -1222,7 +1076,6 @@ public class OfficePrint { } String sInputURL = URLHelper.getFileURLFromSystemPath(_sInputFile); - // showType(sInputURL, xMSF); XComponent aDoc = loadFromURL( _aGTA, sInputURL); if (aDoc == null) { @@ -1245,8 +1098,6 @@ public class OfficePrint { TimeHelper.waitInSeconds(1, "wait after loadFromURL."); XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, aDoc ); - // String sFilter = getFilterName_forExcel(xServiceInfo); - // System.out.println("Filter is " + sFilter); // store the document in an other directory XStorable xStorable = UnoRuntime.queryInterface( XStorable.class, aDoc); @@ -1258,9 +1109,6 @@ public class OfficePrint { String sFilterName = _aGTA.getExportFilterName(); - // initialize PropertyArray - // PropertyValue [] aStoreProps = new PropertyValue[ nPropertyCount ]; - // int nPropertyIndex = 0; ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); String sExtension = ""; @@ -1303,7 +1151,6 @@ public class OfficePrint { PropertyValue Arg = new PropertyValue(); Arg.Name = "FilterName"; Arg.Value = sFilterName; - // aStoreProps[nPropertyIndex ++] = Arg; aPropertyList.add(Arg); showProperty(Arg); GlobalLogWriter.get().println("FilterName is set to: " + sFilterName); @@ -1314,9 +1161,7 @@ public class OfficePrint { { // create the new filename with the extension, which is ok to the file format String sInputFileBasename = FileHelper.getBasename(_sInputFile); - // System.out.println("InputFileBasename " + sInputFileBasename); String sInputFileNameNoSuffix = FileHelper.getNameNoSuffix(sInputFileBasename); - // System.out.println("InputFilename no suffix " + sInputFileNameNoSuffix); String fs = System.getProperty("file.separator"); String sOutputFile = _sOutputPath; if (! sOutputFile.endsWith(fs)) diff --git a/qadevOOo/runner/convwatch/PRNCompare.java b/qadevOOo/runner/convwatch/PRNCompare.java index 2310afe143a5..81c426928c47 100644 --- a/qadevOOo/runner/convwatch/PRNCompare.java +++ b/qadevOOo/runner/convwatch/PRNCompare.java @@ -30,35 +30,17 @@ import java.util.ArrayList; // --------------------------------- PRNCompare --------------------------------- -// class DifferenceType -// { -// final static int NO_DIFFERENCE = 1; -// final static int DIFFERENCE = 2; - -// public int nValue = NO_DIFFERENCE; -// public boolean equals(int _n) -// { -// if ( _n == nValue ) return true; -// return false; -// } -// } - - public class PRNCompare { - // OSHelper m_aHelper; String fs; public PRNCompare() { - // m_aHelper = new OSHelper(); fs = System.getProperty("file.separator"); } String executeSynchronously(String _sCommand) { - // System.out.println(_sCommand); - ProcessHandler aHandler = new ProcessHandler(_sCommand); aHandler.executeSynchronously(); @@ -74,15 +56,6 @@ public class PRNCompare // TODO: check if directory exist should be done earlier File aDirectory = new File(_sDirectory); File[] aDirList = aDirectory.listFiles( - /* - new FileFilter() { - boolean accept(File filename) - { - if (filename.getName().endsWith("jpg")) - return true; - return false; - } - } */ ); int nMaxNumber = 0; @@ -95,7 +68,6 @@ public class PRNCompare if (sDirEntry.startsWith(_sBasename)) { - // System.out.println(sDirEntry); int nJpgIdx = sDirEntry.lastIndexOf(".jpg"); String sValue = sDirEntry.substring(_sBasename.length(), nJpgIdx); int nValue = 0; @@ -107,7 +79,6 @@ public class PRNCompare { } - // System.out.println(nValue); nNum = nValue; } @@ -126,7 +97,6 @@ public class PRNCompare String m_sDocFile; String m_sReferenceFile; String m_sPostScriptFile; - // String m_sOldDiff; int m_nMaxPages = 0; int m_nResolutionInDPI = 0; TriState m_tUseBorderMove; @@ -146,10 +116,6 @@ public class PRNCompare public void setBorderMove(TriState _b) {m_tUseBorderMove = _b;} public TriState getBorderMove() {return m_tUseBorderMove;} - // public void setOldDiffPath(String _sOldDiff) - // { - // m_sOldDiff = _sOldDiff; - // } public void setMaxPages(int _n) {m_nMaxPages = _n;} int getMaxPages() {return m_nMaxPages;} @@ -210,10 +176,6 @@ public class PRNCompare public static String[] createJPEGFromPostscript(String _sOutputPath, String _sSourcePath, String _sSourceFile, int _nResolutionInDPI) { String sGS_PageOutput = "%04d"; - // if ( OSHelper.isWindows() ) - // { - // sGS_PageOutput = "%%d"; - // } FileHelper.makeDirectories("", _sOutputPath); @@ -239,14 +201,6 @@ public class PRNCompare "-sOutputFile=" + sJPGFilename, sOriginalFile }; - // System.out.println("Start Command array"); - // try - // { - // Runtime.getRuntime().exec(sCommandArray); - // } catch (Exception e) { - // System.out.println("FAILED"); - // } - // System.out.println("done"); ProcessHandler aHandler = new ProcessHandler(sCommandArray); aHandler.executeSynchronously(); @@ -294,9 +248,6 @@ public class PRNCompare int nS1_Files = getMaxNumOfFileEntry(_sSourcePath1, sS1Basename); int nS2_Files = getMaxNumOfFileEntry(_sSourcePath2, sS2Basename); - // System.out.println("count of s1 files " + String.valueOf(nS1_Files)); - // System.out.println("count of s2 files " + String.valueOf(nS2_Files)); - // take the min of both int nMin = Math.min(nS1_Files, nS2_Files); nMin = Math.min(nMin, _nMaxDiffs); @@ -304,7 +255,6 @@ public class PRNCompare StatusHelper[] aList = new StatusHelper[nMin]; // TODO: if both document do not have same page count, produce an error - // System.out.println("min of both: " + String.valueOf(nMin)); int nStatusIndex = 0; for (int i=1;i<=nMin;i++) @@ -317,7 +267,6 @@ public class PRNCompare String sDiffGfx = compareJPEGs(sOldGfx, sNewGfx, sDiffGfx_); StatusHelper aStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx); - // if (FileHelper.exists(sDiffGfx)) if (sDiffGfx.length() > 0) { int nResult = identify(sDiffGfx); @@ -333,10 +282,6 @@ public class PRNCompare aStatus.nDiffStatus = StatusHelper.DIFF_DIFFERENCES_FOUND; aStatus.nPercent = nPercent; - // GlobalLogWriter.get().println("Hello World: Percent:= " + nPercent); - // GlobalLogWriter.get().println("Hello World: TriState:= " + _tUseBorderMove.intValue()); - // GlobalLogWriter.get().println("Hello World: DocType:= " + m_sDocumentType); - // TODO: insert here the new BorderRemover if the percentage value is creater than 75% if (nPercent > 75 && ((_tUseBorderMove == TriState.TRUE ) || @@ -357,7 +302,6 @@ public class PRNCompare String sDiff_BM_Gfx = compareJPEGs( sOld_BM_Gfx, sNew_BM_Gfx, sDiff_BM_Gfx_); - // if (FileHelper.exists(sDiff_BM_Gfx)) if (sDiff_BM_Gfx.length() > 0) { nResult = identify(sDiff_BM_Gfx); @@ -391,11 +335,6 @@ public class PRNCompare } } - // checkDiff(sOldGfx, sNewGfx, sDiffGfx); - // if (i >= _nMaxDiffs) - // { - // break; - // } } aList[nStatusIndex ++] = aStatus; } @@ -420,20 +359,17 @@ public class PRNCompare StatusHelper[] aList = new StatusHelper[nMin]; // TODO: if both document do not have same page count, produce an error - // System.out.println("min of both: " + String.valueOf(nMin)); int nStatusIndex = 0; for (int i=1;i<=nMin;i++) { String sOldGfx = _aRefList[i]; String sNewGfx = _aPSList[i]; - // String sDiffGfx_ = getJPEGName(_sOutputPath, sS1Basename + ".diff", StringHelper.createValueString(i, 4)); String sDiffGfx = compareJPEGs(sOldGfx, sNewGfx ); StatusHelper aStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx); - // if (FileHelper.exists(sDiffGfx)) if (sDiffGfx.length() > 0) { int nResult = identify(sDiffGfx); @@ -446,9 +382,6 @@ public class PRNCompare try { int nPercent = estimateGfx(sOldGfx, sNewGfx, sDiffGfx); - // GlobalLogWriter.get().println("Hello World: Percent:= " + nPercent); - // GlobalLogWriter.get().println("Hello World: TriState:= " + _tUseBorderMove.intValue()); - // GlobalLogWriter.get().println("Hello World: DocType:= " + m_sDocumentType); aStatus.nDiffStatus = StatusHelper.DIFF_DIFFERENCES_FOUND; aStatus.nPercent = nPercent; @@ -481,7 +414,6 @@ public class PRNCompare aStatus.setFilesForBorderMove(sOld_BM_Gfx, sNew_BM_Gfx, sDiff_BM_Gfx); - // if (FileHelper.exists(sDiff_BM_Gfx)) if (sDiff_BM_Gfx.length() > 0) { nResult = identify(sDiff_BM_Gfx); @@ -513,11 +445,6 @@ public class PRNCompare } } - // checkDiff(sOldGfx, sNewGfx, sDiffGfx); - // if (i >= _nMaxDiffs) - // { - // break; - // } } aList[nStatusIndex ++] = aStatus; } @@ -547,11 +474,6 @@ public class PRNCompare sComposite = "composite.exe"; } - // String sCommand = sComposite + " -compose difference " + - // StringHelper.doubleQuoteIfNeed(_sOldGfx) + " " + - // StringHelper.doubleQuoteIfNeed(_sNewGfx) + " " + - // StringHelper.doubleQuoteIfNeed(_sDiffGfx); - String[] sCommandArray = { sComposite, @@ -568,7 +490,6 @@ public class PRNCompare String sBack = aHandler.getOutputText(); GlobalLogWriter.get().println("'" + sBack + "'"); - // return aHandler.getExitCode(); if (FileHelper.exists(_sDiffGfx)) { return _sDiffGfx; @@ -586,10 +507,6 @@ public class PRNCompare int nResult = 0; // would like to know what the meaning of %k is for ImageMagick's 'identify' String sIM_Format = "%k"; - // if (OSHelper.isWindows()) - // { - // sIM_Format = "%%k"; - // } String sIdentify = "identify"; if (OSHelper.isWindows()) @@ -597,8 +514,6 @@ public class PRNCompare sIdentify = "identify.exe"; } - // String sCommand = sIdentify + " " + sIM_Format + " " + StringHelper.doubleQuoteIfNeed(_sDiffGfx); - String[] sCommandArray = { sIdentify, @@ -647,23 +562,6 @@ public class PRNCompare StatusHelper aCurrentStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx); - // String sComposite = "composite"; - // if (OSHelper.isWindows()) - // { - // sComposite = "composite.exe"; - // } - - // String sCommand = sComposite +" -compose difference " + - // StringHelper.doubleQuoteIfNeed(sOldGfx) + " " + - // StringHelper.doubleQuoteIfNeed(sNewGfx) + " " + - // StringHelper.doubleQuoteIfNeed(sDiffGfx); - - - // // System.out.println(sCommand); - // // executeSynchronously(sCommand); - // ProcessHandler aHandler = new ProcessHandler(sCommand); - // boolean bBackValue = aHandler.executeSynchronously(); - compareJPEGs(sOldGfx, sNewGfx, sDiffGfx); if (FileHelper.exists(sDiffGfx)) @@ -686,9 +584,6 @@ public class PRNCompare aCurrentStatus.nPercent = -1; } } - // LLA: should diffdiff file delete? - // File aFile = new File(sDiffGfx); - // aFile.delete(); } else { @@ -744,50 +639,4 @@ public class PRNCompare return nPercent; } - - -/* - * Some selftest functionallity - */ -// public static void main(String[] args) -// { - // System.out.println(FileHelper.getNameNoSuffix("doc.sxw")); - // System.out.println(FileHelper.getSuffix("doc.sxw")); - // System.out.println(FileHelper.getBasename("doc.sxw")); - // System.out.println(FileHelper.getBasename("/tmp/doc.sxw")); - -// PRNCompare a = new PRNCompare(); -// a.setInputPath( "/cws/so-cwsserv06/qadev18/SRC680/src.m47/convwatch.keep/input/msoffice/xp/PowerPoint"); -// a.setReferencePath( "/cws/so-cwsserv06/qadev18/SRC680/src.m47/convwatch.keep/input/msoffice/xp/PowerPoint"); -// a.setOutputPath( "/tmp/convwatch_java"); -// a.setDocFile( "1_Gov.ppt"); -// a.setReferenceFile( "1_Gov.prn" ); -// a.setPostScriptFile("1_Gov.ps" ); - // a.compare(); - - -// LLA: 20040804 sample how to build jpegs from reference files -// a.createJPEGFromPostscript("/tmp/convwatch_java", -// "/home/apitest/WorkFromHome/20040804/reference", "worddoc.prn" ); - -// a.createJPEGFromPostscript("/tmp/convwatch_java", -// "/home/apitest/WorkFromHome/20040804/reference", "worddoc.ps" ); - -// Status[] aList = a.createDiffs("/tmp/convwatch_java", -// "/tmp/convwatch_java", "worddoc.prn", -// "/tmp/convwatch_java", "worddoc.ps", -// 2); - -// LLA: 20040805 sample how to check 2 gfx files -// this function return DifferenceType.NO_DIFFERENCE if the pictures contain no graphically difference -// DifferenceType aReturnValue = a.checkDiffDiff("/tmp/convwatch_java", -// "/tmp/convwatch_java", "worddoc.prn.diff1.jpg", -// "/tmp/convwatch_java/old", "worddoc.prn.diff1.jpg"); -// if (aReturnValue.equals( DifferenceType.NO_DIFFERENCE )) -// { -// System.out.println("There is no difference between both diff files."); -// } - - // a.setOldDiff( "/olddiffs"); -// } } diff --git a/qadevOOo/runner/convwatch/PerformanceContainer.java b/qadevOOo/runner/convwatch/PerformanceContainer.java index 0d90fec8a15f..87612dc00531 100644 --- a/qadevOOo/runner/convwatch/PerformanceContainer.java +++ b/qadevOOo/runner/convwatch/PerformanceContainer.java @@ -220,18 +220,4 @@ public class PerformanceContainer /* extends *//* implements */ { } } -// public static void main(String[] args) { - -// BorderRemover a = new BorderRemover(); -// try -// { -// a.createNewImageWithoutBorder(args[0], args[1]); -// } -// catch(java.io.IOException e) -// { -// System.out.println("Exception caught."); -// } -// */ -// } - } diff --git a/qadevOOo/runner/convwatch/PixelCounter.java b/qadevOOo/runner/convwatch/PixelCounter.java index ccce8c93a815..ef0223a7c1e5 100644 --- a/qadevOOo/runner/convwatch/PixelCounter.java +++ b/qadevOOo/runner/convwatch/PixelCounter.java @@ -18,7 +18,6 @@ package convwatch; -// import java.awt.Image; import convwatch.ImageHelper; @@ -34,7 +33,6 @@ class CountNotWhite extends CountPixel { public CountNotWhite() { - // System.out.println("CountWhite()"); } public void count(int pixel) @@ -43,7 +41,6 @@ class CountNotWhite extends CountPixel int green = (pixel >> 8) & 0xff; int blue = (pixel ) & 0xff; - // System.out.println(String.valueOf(red) + ":" + String.valueOf(green) + ":" + String.valueOf(blue)); if (red == 0xff && green == 0xff && blue == 0xff) { return; @@ -57,7 +54,6 @@ class CountNotBlack extends CountPixel { public CountNotBlack() { - // System.out.println("CountBlack()"); } public void count(int pixel) @@ -132,7 +128,6 @@ class graphics_stuff public class PixelCounter { - // private Image m_aImage; ImageHelper m_aImage; @@ -168,23 +163,6 @@ public class PixelCounter { -// public static void main(String[] args) { - -// String a = helper.StringHelper.createValueString(10, 4); -// int dummy = 1; -// -// BorderRemover a = new BorderRemover(); -// try -// { -// a.createNewImageWithoutBorder(args[0], args[1]); -// } -// catch(java.io.IOException e) -// { -// System.out.println("Exception caught."); -// } -// */ -// } - } diff --git a/qadevOOo/runner/convwatch/ReferenceBuilder.java b/qadevOOo/runner/convwatch/ReferenceBuilder.java index a371abcafe5f..41a496eab9f0 100644 --- a/qadevOOo/runner/convwatch/ReferenceBuilder.java +++ b/qadevOOo/runner/convwatch/ReferenceBuilder.java @@ -68,12 +68,10 @@ public class ReferenceBuilder extends EnhancedComplexTestCase public void before() { - // System.out.println("before()"); } public void after() { - // System.out.println("after()"); } // The test method itself. @@ -111,7 +109,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase if (bQuit == true) { - // log.println("must quit."); assure("Must quit, Parameter problems.", false); } @@ -140,9 +137,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase // check if all need software is installed and accessible checkEnvironment(mustInstalledSoftware()); - // test_removeFirstDirectorysAndBasenameFrom(); - // Get the MultiServiceFactory. - // XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF(); GraphicalTestArguments aGTA = getGraphicalTestArguments(); if (aGTA == null) { @@ -165,13 +159,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase FileFilter aFileFilter = FileHelper.getFileFilter(); Object[] aList = DirectoryHelper.traverse(m_sInputPath, aFileFilter, aGTA.includeSubDirectories()); - // fill into DB - // DB.filesRemove(aGTA.getDBInfoString()); - // for (int j=0;j<aList.length;j++) - // { - // String sEntry = (String)aList[j]; - // DB.fileInsert(aGTA.getDBInfoString(), sEntry, sRemovePath); - // } // normal run. for (int i=0;i<aList.length;i++) @@ -195,9 +182,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase } else { - // String sRemovePath = aInputPath.getAbsolutePath(); - // DB.fileInsert(aGTA.getDBInfoString(), m_sInputPath, sRemovePath); - // DB.updatestate_status(aGTA.getDBInfoString(), "started: " + m_sInputPath); if (aGTA.checkIfUsableDocumentType(m_sInputPath)) { runGDC(m_sInputPath, m_sReferencePath); @@ -217,10 +201,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase // SimpleFileSemaphore aSemaphore = new SimpleFileSemaphore(); if (aGTA.shouldOfficeStart()) { - // if (OSHelper.isWindows()) - // { - // aSemaphore.P(aSemaphore.getSemaphoreFile()); - // } aGTA.getPerformance().startTime(PerformanceContainer.OfficeStart); aProvider = new OfficeProvider(); XMultiServiceFactory xMSF = (XMultiServiceFactory) aProvider.getManager(param); @@ -238,7 +218,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase GlobalLogWriter.get().println("Set office watcher"); Object aWatcher = param.get("Watcher"); GlobalLogWriter.get().setWatcher(aWatcher); - // initializeWatcher(param); try { @@ -269,13 +248,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase boolean bClosed = aProvider.closeExistingOffice(param, true); // Hope I can check that the close of the office fails assure("Office closed", bClosed, true); - // if (OSHelper.isWindows()) - // { - // aSemaphore.V(aSemaphore.getSemaphoreFile()); - // aSemaphore.sleep(2); - // // wait some time maybe an other process will take the semaphore - // // I know, this is absolutely dirty, but the whole convwatch is dirty and need a big cleanup. - // } } } else diff --git a/qadevOOo/runner/convwatch/ReportDesignerTest.java b/qadevOOo/runner/convwatch/ReportDesignerTest.java index 40af4452bba4..8a4be7382ba5 100644 --- a/qadevOOo/runner/convwatch/ReportDesignerTest.java +++ b/qadevOOo/runner/convwatch/ReportDesignerTest.java @@ -39,37 +39,11 @@ import com.sun.star.uno.XInterface; import com.sun.star.util.XCloseable; import com.sun.star.lang.XServiceInfo; -// import util.BasicMacroTools; -// import util.DesktopTools; -// import util.dbg; import complexlib.ComplexTestCase; import helper.OfficeProvider; import helper.URLHelper; import helper.OfficeWatcher; -// import convwatch.DB; - -// import java.util.Date; -// import java.text.SimpleDateFormat; -// import java.text.ParsePosition; -// import java.sql.Time; - -// import java.io.BufferedReader; -// import java.io.File; -// import java.io.FileReader; -// import java.io.IOException; -// import java.io.FilenameFilter; - -// import java.util.Vector; - -// import helper.AppProvider; -// import java.text.DecimalFormat; -// import util.DynamicClassLoader; -// import java.util.StringTokenizer; - - - - class PropertySetHelper { XPropertySet m_xPropertySet; @@ -173,11 +147,6 @@ public class ReportDesignerTest extends ComplexTestCase { } } - // if (sOfficePath.startsWith("\"") || - // sOfficePath.startsWith("'")) - // { - // sOfficePath = sOfficePath.substring(1); - // } sOfficePath = helper.StringHelper.removeQuoteIfExists(sOfficePath); log.println(sOfficePath); @@ -231,12 +200,10 @@ public class ReportDesignerTest extends ComplexTestCase { private static XMultiServiceFactory m_xXMultiServiceFactory = null; private void startOffice() { - // int tempTime = param.getInt("SingleTimeOut"); param.put("TimeOut", new Integer(300000)); System.out.println("TimeOut: " + param.getInt("TimeOut")); System.out.println("ThreadTimeOut: " + param.getInt("ThreadTimeOut")); - // OfficeProvider aProvider = null; m_aProvider = new OfficeProvider(); m_xXMultiServiceFactory = (XMultiServiceFactory) m_aProvider.getManager(param); param.put("ServiceFactory", m_xXMultiServiceFactory); @@ -255,9 +222,6 @@ public class ReportDesignerTest extends ComplexTestCase { private String m_sMailAddress = null; private String m_sParentDistinct = null; - // private String m_sUPDMinor; - // private String m_sCWS_WORK_STAMP; - private static String m_sSourceVersion; private static String m_sDestinationVersion; private static String m_sSourceName; @@ -285,9 +249,6 @@ public class ReportDesignerTest extends ComplexTestCase { String sUser = System.getProperty("user.name"); log.println("user.name='" + sUser + "'"); - // String sVCSID = System.getProperty("VCSID"); - // log.println("VCSID='" + sVCSID + "'"); - // m_sMailAddress = sVCSID + "@openoffice.org"; m_sMailAddress = System.getProperty("MailAddress"); log.println("Assumed mail address: " + m_sMailAddress); @@ -297,9 +258,6 @@ public class ReportDesignerTest extends ComplexTestCase { m_sSourceName = System.getProperty("SourceName"); m_sDestinationVersion = System.getProperty("DestinationVersion"); m_sDestinationName = System.getProperty("DestinationName"); - // createDBEntry(); - // log.println("Current CWS: " + m_sCWS_WORK_STAMP); - // log.println("Current MWS: " + m_sUPDMinor); if (m_sSourceVersion == null) { @@ -311,36 +269,19 @@ public class ReportDesignerTest extends ComplexTestCase { log.println("sAppExecutionCommand='" + sAppExecutionCommand + "'"); // an other way to replace strings - // sAppExecutionCommand = utils.replaceAll13(sAppExecutionCommand, "${USERNAME}", sUser); checkIfOfficeExists(sAppExecutionCommand); param.put("AppExecutionCommand", sAppExecutionCommand); - // System.exit(1); - // --------------------------- Start the given Office --------------------------- startOffice(); // ------------------------------ Start a test run ------------------------------ - // String sCurrentDirectory = System.getProperty("user.dir"); - // log.println("Current Dir: " + sCurrentDirectory); String sDocument = (String) param.get(convwatch.PropertyName.DOC_COMPARATOR_INPUT_PATH); sDocument = helper.StringHelper.removeQuoteIfExists( sDocument ); startTestForFile(sDocument); - // if (sDocument.toLowerCase().indexOf("writer") >= 0) - // { - // startTestForFile(sDocument, WRITER); - // } - // else if (sDocument.toLowerCase().indexOf("calc") >= 0) - // { - // startTestForFile(sDocument, CALC); - // } - // else - // { - // assure("Can't identify the document no 'writer' nor 'calc' in its name given.", false); - // } } catch (AssureException e) { @@ -363,15 +304,6 @@ public class ReportDesignerTest extends ComplexTestCase { XComponent xDocComponent = loadComponent(sFileURL, getXDesktop(), null); log.println("Load done"); -// context = createUnoService("com.sun.star.sdb.DatabaseContext") -// oDataBase = context.getByName("hh") -// oDBDoc = oDataBase.DatabaseDocument - -// dim args(1) as new com.sun.star.beans.PropertyValue -// args(0).Name = "ActiveConnection" -// args(0).Value = oDBDoc.getCurrentController().getPropertyValue("ActiveConnection") -// reportContainer = oDBDoc.getReportDocuments() -// report = reportContainer.loadComponentFromURL("Report40","",0,args) try { @@ -382,45 +314,25 @@ public class ReportDesignerTest extends ComplexTestCase { XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, x); showElements(xNameAccess); Object aObj = xNameAccess.getByName(sFileURL); -// log.println("1"); - // PropertySetHelper aHelper = new PropertySetHelper(aObj); XDocumentDataSource xDataSource = UnoRuntime.queryInterface(XDocumentDataSource.class, aObj); -// Object aDatabaseDocmuent = aHelper.getPropertyValueAsObject("DatabaseDocument"); XOfficeDatabaseDocument xOfficeDBDoc = xDataSource.getDatabaseDocument(); - // XOfficeDatabaseDocument xOfficeDBDoc = (XOfficeDatabaseDocument)UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, aDatabaseDocument); assure("can't access DatabaseDocument", xOfficeDBDoc != null); -// log.println("2"); XModel xDBSource = UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc); Object aController = xDBSource.getCurrentController(); assure("Controller of xOfficeDatabaseDocument is empty!", aController != null); -// log.println("3"); XDatabaseDocumentUI aDBDocUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController); aDBDocUI.connect(); -// if (aDBDocUI.isConnected()) -// { -// System.out.println("true"); -// } -// else -// { -// System.out.println("false"); -// } -// log.println("4"); - - // aHelper = new PropertySetHelper(aController); - - // Object aActiveConnectionObj = aHelper.getPropertyValueAsObject("ActiveConnection"); + Object aActiveConnectionObj = aDBDocUI.getActiveConnection(); assure("ActiveConnection is empty", aActiveConnectionObj != null); -// log.println("5"); XReportDocumentsSupplier xSupplier = UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc); xNameAccess = xSupplier.getReportDocuments(); assure("xOfficeDatabaseDocument returns no Report Document", xNameAccess != null); -// log.println("5"); showElements(xNameAccess); @@ -440,11 +352,6 @@ public class ReportDesignerTest extends ComplexTestCase { log.println("Message: " + e.getMessage()); } - // String mTestDocumentPath = (String) param.get("TestDocumentPath"); - // System.out.println("mTestDocumentPath: '" + mTestDocumentPath + "'"); - // // workaround for issue using deprecated "DOCPTH" prop - // System.setProperty("DOCPTH", mTestDocumentPath); - // Close the document closeComponent(xDocComponent); } @@ -452,7 +359,6 @@ public class ReportDesignerTest extends ComplexTestCase { private String getDocumentPoolName(/*int _nType*/) { return "AutogenReportDesignTest"; - // return getFileFormat(_nType); } @@ -464,14 +370,8 @@ public class ReportDesignerTest extends ComplexTestCase { DB.init(sDBConnection); String sSourceVersion = m_sSourceVersion; - // String sSourceVersion = sFixRefSubDirectory; String sSourceName = m_sSourceName; - // String sSourceCreatorType = "fixref"; String sSourceCreatorType = ""; - // if (sDestinationVersion.length() == 0) - // { - // sDestinationVersion = m_sUPDMinor; - // } String sDestinationName = m_sDestinationName; String sDestinationCreatorType = ""; String sDocumentPoolDir = getOutputPath(/*_nType*/); @@ -483,8 +383,6 @@ public class ReportDesignerTest extends ComplexTestCase { sDocumentPoolDir, sDocumentPoolName, m_sMailAddress, sSpecial, m_sParentDistinct); TimeHelper.waitInSeconds(1, "wait for DB."); - // DB.test(); - // System.exit(1); } private void loadAndStoreReports(XNameAccess _xNameAccess, ArrayList<PropertyValue> _aPropertyList /*, int _nType*/ ) @@ -524,36 +422,6 @@ public class ReportDesignerTest extends ComplexTestCase { return sExtension; } - // switch(_nType) - // { - // case WRITER: - // sExtension = ".odt"; - // break; - // case CALC: - // sExtension = ".ods"; - // break; - // default: - // sExtension = ".UNKNOWN"; - // } - // return sExtension; - // } - // private String getFileFormat(int _nType) - // { - // String sFileType; - // switch(_nType) - // { - // case WRITER: - // sFileType = "writer8"; - // break; - // case CALC: - // sFileType = "calc8"; - // break; - // default: - // sFileType = "UNKNOWN"; - // } - // return sFileType; - // } - private String m_sOutputPath = null; private String getOutputPath(/*int _nType*/) @@ -568,13 +436,9 @@ public class ReportDesignerTest extends ComplexTestCase { { sOutputPath += System.getProperty("file.separator"); } - // sOutputPath += "tmp_123"; sOutputPath += DateHelper.getDateTimeForFilename(); sOutputPath += System.getProperty("file.separator"); - // sOutputPath += getFileFormat(_nType); - // sOutputPath += System.getProperty("file.separator"); - File aOutputFile = new File(sOutputPath); // create the directory of the given output path aOutputFile.mkdirs(); m_sOutputPath = sOutputPath; @@ -603,11 +467,6 @@ public class ReportDesignerTest extends ComplexTestCase { ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); // set some properties for storeAsURL - // PropertyValue aFileFormat = new PropertyValue(); - // aFileFormat.Name = "FilterName"; - // aFileFormat.Value = getFileFormat(_nType); - // aPropertyList.add(aFileFormat); - PropertyValue aOverwrite = new PropertyValue(); // always overwrite already exist files aOverwrite.Name = "Overwrite"; aOverwrite.Value = Boolean.TRUE; diff --git a/qadevOOo/runner/convwatch/StatusHelper.java b/qadevOOo/runner/convwatch/StatusHelper.java index e4484e55fdd2..46a8ff38f1cf 100644 --- a/qadevOOo/runner/convwatch/StatusHelper.java +++ b/qadevOOo/runner/convwatch/StatusHelper.java @@ -26,7 +26,6 @@ public class StatusHelper final static public int DIFF_AFTER_MOVE_DONE_NO_PROBLEMS = 4; final static public int DIFF_AFTER_MOVE_DONE_DIFFERENCES_FOUND = 5; - // public String m_sOutputPath; public String m_sMainName; public String m_sOldGfx; @@ -86,14 +85,4 @@ public class StatusHelper } } - - - - -// TODO: stream output -// public stream& statusline(stream) -// { -// stream << name << "PASS" << nDiff==0?"PASS":"FAIL" << endl; -// return stream; -// } } diff --git a/qadevOOo/runner/graphical/BuildID.java b/qadevOOo/runner/graphical/BuildID.java index 04a18b91909f..2a83aa9ce2c3 100644 --- a/qadevOOo/runner/graphical/BuildID.java +++ b/qadevOOo/runner/graphical/BuildID.java @@ -117,7 +117,6 @@ public class BuildID private static String getBuildIDFromVersion(String _sOfficePath, String _sIniSection) { - // String fs = System.getProperty("file.separator"); String sBuildID = ""; String sOfficePath; if (OSHelper.isWindows()) @@ -140,29 +139,6 @@ public class BuildID return sBuildID; } -// public static void main(String[] args) -// { -// String sApp; -// sApp = "/opt/staroffice8_m116/program/soffice --headless --accept=socket,host=localhost,port=8100;urp;"; -// String sBuildID; -// sBuildID = getBuildID(sApp); -// System.out.println("BuildID is: " + sBuildID); - -// Date aDate = new Date(); -// long nStart = aDate.getTime(); -// System.out.println("Time:" + nStart); -// // LLA: Just some more tests for getBuildID -// // sApp = "/opt/staroffice8_net/program/soffice"; -// // sBuildID = getBuildID(sApp); -// // System.out.println("BuildID is: " + sBuildID); - -// // sApp = "\"/opt/staroffice8_net/program/soffice\" test blah"; -// // sBuildID = getBuildID(sApp); - -// // System.out.println("BuildID is: " + sBuildID); -// System.exit(1); -// } - public static String getMinor(String _sOfficePath) { final String sOfficePath = getOfficePath(_sOfficePath); @@ -184,23 +160,4 @@ public class BuildID return sCWSName; } -// public static void main(String[] args) -// { -// String sApp; -// sApp = "D:/staroffice9_m63/Sun/StarOffice 9/program/soffice.exe"; -// String sBuildID; -// sBuildID = getBuildID(sApp); -// System.out.println("BuildID is: " + sBuildID); - -// String sMinor; -// sMinor = getMinor(sApp); -// System.out.println("Minor is: " + sMinor); - -// String sCWSName; -// sCWSName = getCWSName(sApp); -// System.out.println("CWSName is: " + sCWSName); - -// System.exit(1); -// } - } diff --git a/qadevOOo/runner/graphical/DateHelper.java b/qadevOOo/runner/graphical/DateHelper.java index 4bbd6668ff0c..1e12d16834a8 100644 --- a/qadevOOo/runner/graphical/DateHelper.java +++ b/qadevOOo/runner/graphical/DateHelper.java @@ -43,7 +43,6 @@ public class DateHelper Locale aLocale = new Locale("en","US"); SimpleDateFormat aFormat = new SimpleDateFormat(_sFormat, aLocale); aBuf = aFormat.format(aCalendar.getTime(), aBuf, new FieldPosition(0) ); - // DebugHelper.writeInfo("Date: " + aBuf.toString()); return aBuf.toString(); } } diff --git a/qadevOOo/runner/graphical/FileHelper.java b/qadevOOo/runner/graphical/FileHelper.java index 9ae716f92cef..aa565f98efa5 100644 --- a/qadevOOo/runner/graphical/FileHelper.java +++ b/qadevOOo/runner/graphical/FileHelper.java @@ -34,9 +34,6 @@ public class FileHelper { public FileHelper() { - // fs = System.getProperty("file.separator"); - - String sOSName = System.getProperty("os.name"); String sOSArch = System.getProperty("os.arch"); String sOSVersion = System.getProperty("os.version"); @@ -66,22 +63,6 @@ public class FileHelper { return true; } - // This is just nice for DEBUG behaviour - // due to the fact this is absolutely context dependency no one should use it. - // else - // { - // System.out.println("FileHelper:exists() tell this path doesn't exists. Check it. path is:" ); - // System.out.println( _sFile ); - // System.out.println( aFile.getAbsolutePath() ); - // MessageBox("Der JavaProzess wartet auf eine interaktion ihrerseits."); - - // File aFile2 = new File(_sFile); - // if (aFile2.exists()) - // { - // System.out.println("Thanks, file exists." ); - // return true; - // } - // } return false; } @@ -113,7 +94,6 @@ public class FileHelper { return ""; } - // String fs = System.getProperty("file.separator"); int nIdx = _sFilename.lastIndexOf("\\"); if (nIdx == -1) @@ -161,7 +141,6 @@ public class FileHelper { return ""; } - // String fs = System.getProperty("file.separator"); int nIdx = _sFilename.lastIndexOf("\\"); if (nIdx == -1) @@ -175,40 +154,6 @@ public class FileHelper return ""; } -/* - static ArrayList files = new ArrayList(); - public static Object[] traverse( String afileDirectory ) - { - - File fileDirectory = new File(afileDirectory); - // Testing, if the file is a directory, and if so, it throws an exception - if ( !fileDirectory.isDirectory() ) - { - throw new IllegalArgumentException( "not a directory: " + fileDirectory.getName() ); - } - - // Getting all files and directories in the current directory - File[] entries = fileDirectory.listFiles(); - - // Iterating for each file and directory - for ( int i = 0; i < entries.length; ++i ) - { - // adding file to List - try - { - // Composing the URL by replacing all backslashs - String stringUrl = "file:///" - + entries[ i ].getAbsolutePath().replace( '\\', '/' ); - files.add(stringUrl); - } - catch( Exception exception ) - { - exception.printStackTrace(); - } - } - return files.toArray(); - } -*/ // makeDirectories("", "/tmp/a/b"); // creates all directories /tmp/a/b @@ -237,7 +182,6 @@ public class FileHelper String part = path_tokenizer.nextToken(); File new_dir = new File(already_done + File.separatorChar + part); already_done = new_dir.toString(); - // System.out.println(already_done); //create the directory new_dir.mkdirs(); if (OSHelper.isUnix() && @@ -409,28 +353,6 @@ public class FileHelper } } -// try -// { -// File inputFile = new File(_sSource); -// File outputFile = new File(_sDestination); - -// java.io.FileReader in = new java.io.FileReader(inputFile); -// java.io.FileWriter out = new java.io.FileWriter(outputFile); -// int c; - -// while ((c = in.read()) != -1) -// { -// out.write(c); -// } - -// in.close(); -// out.close(); -// } -// catch (java.io.IOException e) -// { -// GlobalLogWriter.get().println("Exception caught. FileHelper.copy('" + _sSource + ", " + _sDestination + "')"); -// GlobalLogWriter.get().println("Message: " + e.getMessage()); -// } } @@ -633,10 +555,6 @@ public class FileHelper } aIniFile.insertValue("global", "buildid", sBuildID); - // if (_sSpecial != null && _sSpecial.length() > 0) - // { - // out.write("special=" + _sSpecial + ls); - // } out.println(); out.println("# resolution given in DPI"); out.println("resolution=" + _aGTA.getResolutionInDPI()); @@ -648,13 +566,6 @@ public class FileHelper aIniFile.insertValue("global", "buildid", _sSpecial); } - // long nTime = stopTimer(); - // if (nTime != 0) - // { - // out.write("# time is given in milli seconds" + ls); - // out.write("time=" + nTime + ls); - // } - out.println(); out.println("# Values out of System.getProperty(...)"); out.println("os.name=" + System.getProperty("os.name")); @@ -684,24 +595,10 @@ public class FileHelper } aIniFile.close(); -// String sExtension = FileHelper.getSuffix(_aGTA.getInputFile()); -// if (sExtension.startsWith(".")) -// { -// sExtension = sExtension.substring(1); -// } - -// DB.writeToDB(_aGTA.getInputFile(), -// sNameNoSuffix, -// sExtension, -// sBuildID, -// _aGTA.getReferenceType(), -// _aGTA.getResolutionInDPI() -// ); } public static void addBasenameToFile(String _sIndexFilename, String _sBasename, String _sCreator, String _sType, String _sSource) { - // String sOutputDir = FileHelper.getPath(_sOutputFilename); String sPath; if (_sIndexFilename.startsWith("file:")) { @@ -717,36 +614,17 @@ public class FileHelper aIniFile.insertValue(_sBasename, "type", _sType); aIniFile.insertValue(_sBasename, "source", _sSource); aIniFile.close(); -// File aFile = new File(sIndexFilename); -// try -// { -// RandomAccessFile aRandomAccess = new RandomAccessFile(aFile, "rw"); -// // String sBasename = FileHelper.getBasename(_sOutputFilename); -// aRandomAccess.seek(aRandomAccess.length()); // jump to the end. -//// TODO: seems to be wrong, there exist no writeLine() with 'return' ending? -// aRandomAccess.writeUTF(_sBasename); -// aRandomAccess.close(); -// } -// catch (java.io.FileNotFoundException e) -// { -// } -// catch (java.io.IOException e) -// { -// } } public static void addBasenameToPostscript(String _sOutputFilename) { String sIndexFilename = FileHelper.appendPath(_sOutputFilename, "postscript.ini"); - // String sPath = FileHelper.getPath(sIndexFilename); String sBasename = FileHelper.getBasename(_sOutputFilename); addBasenameToFile(sIndexFilename, sBasename, "", "", ""); } public static void addBasenameToIndex(String _sOutputFilename, String _sBasename, String _sCreator, String _sType, String _sSource) { String sIndexFilename = FileHelper.appendPath(_sOutputFilename, "index.ini"); - // String sPath = FileHelper.getPath(sIndexFilename); - // String sBasename = FileHelper.getBasename(_sOutputFilename); addBasenameToFile(sIndexFilename, _sBasename, _sCreator, _sType, _sSource); } diff --git a/qadevOOo/runner/graphical/GlobalLogWriter.java b/qadevOOo/runner/graphical/GlobalLogWriter.java index 8a6e799e3cec..027e8c07d897 100644 --- a/qadevOOo/runner/graphical/GlobalLogWriter.java +++ b/qadevOOo/runner/graphical/GlobalLogWriter.java @@ -45,11 +45,6 @@ public class GlobalLogWriter return m_aGlobalLogWriter; } -// public static synchronized void initialize() -// { -// get().initialize(null, true); -// } - protected static synchronized void set(LogWriter _aLog) { m_aGlobalLogWriter = _aLog; diff --git a/qadevOOo/runner/graphical/HTMLResult.java b/qadevOOo/runner/graphical/HTMLResult.java index d81e677ea85e..3482dc45de10 100644 --- a/qadevOOo/runner/graphical/HTMLResult.java +++ b/qadevOOo/runner/graphical/HTMLResult.java @@ -20,14 +20,10 @@ package graphical; import java.io.File; import java.io.FileWriter; -// import util.utils; -// import helper.OSHelper; public class HTMLResult { private FileWriter m_aOut; - // private String m_sFilename; - // private String m_sNamePrefix; // the HTML files used a suffix to build it's right name /** * ls is the current line separator (carridge return) @@ -37,7 +33,6 @@ public class HTMLResult public HTMLResult( String _sOutputPath, String _sHTMLFilename ) { FileHelper.makeDirectories("", _sOutputPath); - // HTMLResult a = new HTMLResult(); String sFilename = FileHelper.appendPath(_sOutputPath, _sHTMLFilename); try @@ -50,15 +45,9 @@ public class HTMLResult { e.printStackTrace(); GlobalLogWriter.println("ERROR: Can't create HTML Outputter"); - // return null; } - // m_sFilename = sFilename; - // a.m_sNamePrefix = _sNamePrefix; - // return a; } - // public String getFilename() {return m_sFilename;} - private void writeln(String _sStr) { try diff --git a/qadevOOo/runner/graphical/ImageHelper.java b/qadevOOo/runner/graphical/ImageHelper.java index beea44fe056d..e06a6880f27b 100644 --- a/qadevOOo/runner/graphical/ImageHelper.java +++ b/qadevOOo/runner/graphical/ImageHelper.java @@ -22,7 +22,6 @@ import java.awt.Image; import java.awt.image.PixelGrabber; import java.awt.image.ImageObserver; import java.io.File; -//import javax.imageio.ImageIO; import java.lang.reflect.Method; class ImageHelper @@ -68,11 +67,6 @@ class ImageHelper return m_aPixels[y * m_w + x]; } - // Write down the current image to a file. - // public void storeImage(String _sFilename) - // { - // } - public static ImageHelper createImageHelper(String _sFilename) throws java.io.IOException { @@ -105,7 +99,6 @@ class ImageHelper "Cannot construct object with current Java version " + javaVersion + ": " + ex.getMessage()); } -// aImage = ImageIO.read(aFile); return new ImageHelper(aImage); } } diff --git a/qadevOOo/runner/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java index 23a4290548ae..7c3e31e588cf 100644 --- a/qadevOOo/runner/graphical/IniFile.java +++ b/qadevOOo/runner/graphical/IniFile.java @@ -17,7 +17,6 @@ */ package graphical; -// import java.io.BufferedReader; import java.io.File; import java.io.RandomAccessFile; import java.util.ArrayList; @@ -49,10 +48,6 @@ public class IniFile implements Enumeration<String> m_sFilename = _sFilename; m_aList = loadLines(); m_aEnumerationPos = findNextSection(0); -// if (_sFilename.endsWith(".odb.ps.ini")) -// { -// int dummy = 0; -// } } public void insertFirstComment(String[] _aList) @@ -73,13 +68,9 @@ public class IniFile implements Enumeration<String> ArrayList<String> aLines = new ArrayList<String>(); if (!aFile.exists()) { - // GlobalLogWriter.println("couldn't find file '" + m_sFilename + "', will be created."); - // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, ""); - // m_bListContainUnsavedChanges = false; return aLines; } RandomAccessFile aReader = null; - // BufferedReader aReader; try { aReader = new RandomAccessFile(aFile, "r"); @@ -97,13 +88,11 @@ public class IniFile implements Enumeration<String> { GlobalLogWriter.println("couldn't open file " + m_sFilename); GlobalLogWriter.println("Message: " + fne.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, ""); } catch (java.io.IOException ie) { GlobalLogWriter.println("Exception occurs while reading from file " + m_sFilename); GlobalLogWriter.println("Message: " + ie.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage()); } try { @@ -113,7 +102,6 @@ public class IniFile implements Enumeration<String> { GlobalLogWriter.println("Couldn't close file " + m_sFilename); GlobalLogWriter.println("Message: " + ie.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage()); } return aLines; } @@ -323,8 +311,6 @@ public class IniFile implements Enumeration<String> @param _sKey string @return the value found in the inifile which is given by the section and key parameter */ - // private int m_nCurrentPosition; - // private String m_sOldKey; public String getValue(String _sSection, String _sKey) { String sValue = ""; @@ -341,16 +327,6 @@ public class IniFile implements Enumeration<String> return sValue; } -// private String getNextValue() -// { -// if (m_nCurrentPosition >= 0) -// { -// ++m_nCurrentPosition; -// String sValue = getValue(m_nCurrentPosition); -// return sValue; -// } -// return ""; -// } /** * Returns the value at Section, Key converted to an integer * Check with hasValue(Section, Key) to check before you get into trouble. @@ -399,21 +375,14 @@ public class IniFile implements Enumeration<String> File aFile = new File(m_sFilename); if (aFile.exists()) { - // System.out.println("couldn't find file " + m_sFilename); // TODO: little bit unsafe here, first rename, after write is complete, delete the old. aFile.delete(); if (aFile.exists()) { GlobalLogWriter.println("Couldn't delete the file " + m_sFilename); return; - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, "Couldn't delete the file " + m_sFilename); } } - // if (! aFile.canWrite()) - // { - // System.out.println("Couldn't write to file " + m_sFilename); - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ""); - // } try { RandomAccessFile aWriter = new RandomAccessFile(aFile, "rw"); @@ -434,13 +403,11 @@ public class IniFile implements Enumeration<String> { GlobalLogWriter.println("couldn't open file for writing " + m_sFilename); GlobalLogWriter.println("Message: " + fne.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, ""); } catch (java.io.IOException ie) { GlobalLogWriter.println("Exception occurs while writing to file " + m_sFilename); GlobalLogWriter.println("Message: " + ie.getMessage()); - // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage()); } } @@ -504,58 +471,6 @@ public class IniFile implements Enumeration<String> } } - // String replaceEvaluatedValue(String _sSection, String _sValue) - // { - // String sValue = _sValue; - // int nIndex = 0; - // while (( nIndex = sValue.indexOf("$(", nIndex)) >= 0) - // { - // int nNextIndex = sValue.indexOf(")", nIndex); - // if (nNextIndex >= 0) - // { - // String sKey = sValue.substring(nIndex + 2, nNextIndex); - // String sNewValue = getValue(_sSection, sKey); - // if (sNewValue != null && sNewValue.length() > 0) - // { - // String sRegexpKey = "\\$\\(" + sKey + "\\)"; - // sValue = sValue.replaceAll(sRegexpKey, sNewValue); - // } - // nIndex = nNextIndex; - // } - // else - // { - // nIndex += 2; - // } - // } - // return sValue; - // } - - - // public String getLocalEvaluatedValue(String _sSection, String _sKey) - // { - // String sValue = getValue(_sSection, _sKey); - // sValue = replaceEvaluatedValue(_sSection, sValue); - // return sValue; - // } - - - - // this is a special behaviour. - // public String getGlobalLocalEvaluatedValue(String _sSection, String _sKey) - // { - // String sGlobalValue = getKey("global", _sKey); - // String sLocalValue = getKey(_sSection, _sKey); - // if (sLocalValue.length() == 0) - // { - // sGlobalValue = replaceEvaluatedKey(_sSection, sGlobalValue); - // sGlobalValue = replaceEvaluatedKey("global", sGlobalValue); - // return sGlobalValue; - // } - // sLocalValue = replaceEvaluatedKey(_sSection, sLocalValue); - // sLocalValue = replaceEvaluatedKey("global", sLocalValue); - - // return sLocalValue; - // } public void removeSection(String _sSectionToRemove) { // first, search for the name @@ -584,30 +499,8 @@ public class IniFile implements Enumeration<String> /** * some tests for this class */ -// public static void main(String[] args) -// { -// String sTempFile = System.getProperty("java.io.tmpdir"); -// sTempFile += "inifile"; -// IniFile aIniFile = new IniFile(sTempFile); -// String sValue = aIniFile.getValue("Section", "Key"); -// // insert a new value to a already exist section -// aIniFile.insertValue("Section", "Key2", "a new value in a existing section"); -// // replace a value -// aIniFile.insertValue("Section", "Key", "replaced value"); -// // create a new value -// aIniFile.insertValue("New Section", "Key", "a new key value pair"); -// aIniFile.insertValue("New Section", "Key2", "a new second key value pair"); - -// String sValue2 = aIniFile.getValue("Section2", "Key"); - -// aIniFile.removeSection("Section"); -// aIniFile.removeSection("New Section"); - -// aIniFile.close(); -// } - /** * Enumeration Interface * @return true, if there are more Key values diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java index e7bb68cfcde6..42a777ade477 100644 --- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java +++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java @@ -60,15 +60,6 @@ public class MSOfficePostscriptCreator implements IOffice { m_aParameterHelper = _aParam; m_sResult = _sResult; -// String sKillCommand = (String)_aParam.getTestParameters().get(util.PropertyName.APP_KILL_COMMAND); -// if (sKillCommand == null) -// { -// sKillCommand = ""; -// } -// if (sKillCommand.length() > 0) -// { -// sKillCommand += ";"; -// } String sKillCommand = "C:/bin/kill.exe -9 winword;C:/bin/kill.exe -9 excel"; _aParam.getTestParameters().put(util.PropertyName.APP_KILL_COMMAND, sKillCommand); } @@ -144,11 +135,6 @@ public class MSOfficePostscriptCreator implements IOffice { return true; } - /* temporal insertion by SUS - if (_sSuffix.endsWith(".xml")) - { - return true; - }*/ return false; } @@ -198,7 +184,6 @@ public class MSOfficePostscriptCreator implements IOffice { // special case, if xml we prefer word, but with DEFAULT_XML_FORMAT_APP=excel it's changeable. String sDocFormat = getXMLDocumentFormat(_sInputFile); - // if (_aGTA.getDefaultXMLFormatApp().toLowerCase().equals("excel")) if (sDocFormat.equals("excel")) { aStartCommand = createExcelStoreHelper(); @@ -207,9 +192,6 @@ public class MSOfficePostscriptCreator implements IOffice { aStartCommand = createWordStoreHelper(); } - // else - // { - // } } else { @@ -225,11 +207,6 @@ public class MSOfficePostscriptCreator implements IOffice sFilterName = ""; // xlXMLSpreadsheet"; } - // String sCommand = sStartCommand + " " + - // _sInputFile + " " + - // StringHelper.doubleQuote(sFilterName) + " " + - // _sOutputFile; - aStartCommand.add(_sInputFile); aStartCommand.add(sFilterName); aStartCommand.add(_sOutputFile); @@ -273,7 +250,6 @@ public class MSOfficePostscriptCreator implements IOffice String sOfficeType = getOfficeType(_sInputFile); // special case, if xml we prefer word, but with DEFAULT_XML_FORMAT_APP=excel it's changeable. - // if (_aGTA.getDefaultXMLFormatApp().toLowerCase().equals("excel")) if (sOfficeType.equals("excel")) { aStartCommand = createExcelPrintHelper(); @@ -302,10 +278,6 @@ public class MSOfficePostscriptCreator implements IOffice sPrinterName = ""; } - // String sCommand = sStartCommand + " " + - // _sInputFile + " " + - // StringHelper.doubleQuote(m_sPrinterName) + " " + - // _sPrintFilename; aStartCommand.add(_sInputFile); aStartCommand.add(m_sPrinterName); aStartCommand.add(_sPrintFilename); @@ -359,8 +331,6 @@ public class MSOfficePostscriptCreator implements IOffice { throw new WrongEnvironmentException("Given list is too short."); } - - // return aHandler.getExitCode(); } @@ -494,8 +464,6 @@ public class MSOfficePostscriptCreator implements IOffice } String sName = aPerlScript.getAbsolutePath(); - // String sCommand = "perl " + sName; - // System.out.println(sCommand); aList.add("perl"); aList.add(sName); return aList; @@ -955,16 +923,12 @@ public class MSOfficePostscriptCreator implements IOffice { // ---- Parse XML file ---- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - // factory.setNamespaceAware( true ); - // factory.setValidating( true ); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse( new File (_sInputFile) ); Node rootNode = document.getDocumentElement(); // ---- Get list of nodes to given tag ---- // document. - // NodeList ndList = document.getElementsByTagName( sToSearch /* argv[2] */ ); - // System.out.println( "\nNode list at the beginning:" ); String sRootNodeName = rootNode.getNodeName(); if (sRootNodeName.equals("w:wordDocument")) { @@ -988,8 +952,4 @@ public class MSOfficePostscriptCreator implements IOffice return sType; } -// public static void main(String [] _args) -// { -// String sTest = getXMLDocumentFormat("c:/cws/temp/input/Blah Fasel.xml"); -// } } diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java index 4c04e2249eaa..37cba43a2dc2 100644 --- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java +++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java @@ -43,7 +43,6 @@ import helper.URLHelper; import helper.PropertyHelper; import helper.OSHelper; -// import helper.Parameter; import java.io.File; /** @@ -158,8 +157,6 @@ public class OpenOfficePostscriptCreator implements IOffice for (int i=0;i<aArgs.length;i++) { PropertyValue aValue = aArgs[i]; - // System.out.print("Property: '" + aValue.Name); - // System.out.println("' := '" + aValue.Value + "'"); if (aValue.Name.equals("FilterName") || aValue.Name.equals("MediaType")) { @@ -198,31 +195,11 @@ public class OpenOfficePostscriptCreator implements IOffice if (aDesktop != null) { GlobalLogWriter.println("com.sun.star.frame.Desktop created."); - // String sInputURL = aCurrentParameter.sInputURL; - // String sOutputURL = aCurrentParameter.sOutputURL; - // String sPrintFileURL = aCurrentParameter.sPrintToFileURL; - // System.out.println(_sInputURL); - - // set here the loadComponentFromURL() properties // at the moment only 'Hidden' is set, so no window is opened at work ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); - // check which properties should set and count it. - // if (_aGTA.isHidden()) - // { - // nPropertyCount ++; - // } - // if (_aGTA.getImportFilterName() != null && _aGTA.getImportFilterName().length() > 0) - // { - // nPropertyCount ++; - // } - - // initialize the propertyvalue - // int nPropertyIndex = 0; - // aProps = new PropertyValue[ nPropertyCount ]; - // set all property values if (_aGTA.isHidden()) { @@ -369,31 +346,10 @@ public class OpenOfficePostscriptCreator implements IOffice -// public boolean storeAsPDF(ParameterHelper _aGTA, -// String _sInputURL, -// String _sOutputURL) -// { -// boolean bBack = false; -// XComponent aDoc = loadFromURL(_aGTA, _sInputURL); - -// if (aDoc == null) -// { -// GlobalLogWriter.println("Can't load document."); -// return bBack; -// } -// bBack = storeAsPDF(_aGTA, aDoc, _sOutputURL); -// FileHelper.createInfoFile(_sOutputURL, _aGTA, "as pdf"); - -// GlobalLogWriter.println("Close document."); -// aDoc.dispose(); -// return bBack; -// } - public boolean storeAsPDF(ParameterHelper _aGTA, XComponent _aDoc, String _sOutputURL) throws OfficeException { - // try { boolean bBack = true; _aGTA.getPerformance().startTime(PerformanceContainer.StoreAsPDF); bBack = exportToPDF(_aDoc, _sOutputURL); @@ -402,7 +358,6 @@ public class OpenOfficePostscriptCreator implements IOffice if (!bBack) { GlobalLogWriter.println("Can't store document as PDF."); -// bBack = false; throw new OfficeException("Can't store document as PDF"); } else @@ -413,50 +368,6 @@ public class OpenOfficePostscriptCreator implements IOffice } - - /** - * print the document found in file (_sInputURL) to as postscript to file (_sPrintFileURL) - * Due to the fact we use a printer to convert the file to postscript, the default printer - * to create such postscript format must be installed, this is not tested here. - * - * @return true, if print has been done. - * Be careful, true means only print returns with no errors, to be sure print is really done - * check existence of _sPrintFileURL - */ - -// public boolean printToFileWithOOo(ParameterHelper _aGTA, -// String _sInputURL, -// String _sOutputURL, -// String _sPrintFileURL) -// { -// // waitInSeconds(1); -// boolean bBack = false; - -// XComponent aDoc = loadFromURL(_aGTA, _sInputURL); -// if (aDoc != null) -// { -// if ( _sInputURL.equals(_sOutputURL) ) -// { -// // don't store document -// // input and output are equal OR -// GlobalLogWriter.println("Warning: Inputpath and Outputpath are equal. Document will not stored again."); -// disallowStore(); -// } -// bBack = impl_printToFileWithOOo(_aGTA, aDoc, _sOutputURL, _sPrintFileURL); - -// GlobalLogWriter.println("Close document."); -// aDoc.dispose(); -// } -// else -// { -// GlobalLogWriter.println("loadDocumentFromURL() failed with document: " + _sInputURL); -// } -// return bBack; -// } - - - - private boolean impl_printToFileWithOOo(ParameterHelper _aGTA, XComponent _aDoc, String _sOutputURL, @@ -488,7 +399,6 @@ public class OpenOfficePostscriptCreator implements IOffice _aGTA.getPerformance().stopTime(PerformanceContainer.Store); GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Store document done."); - // TimeHelper.waitInSeconds(1, "After store as URL to:" + _sOutputURL); GlobalLogWriter.println("Reload stored file test."); XComponent aDoc = loadFromURL(_aGTA, _sOutputURL); if (aDoc == null) @@ -506,7 +416,6 @@ public class OpenOfficePostscriptCreator implements IOffice { aDoc.dispose(); } - // TimeHelper.waitInSeconds(1, "after close temp document"); } } } @@ -533,27 +442,12 @@ public class OpenOfficePostscriptCreator implements IOffice try { - // System.out.println("Document loaded."); // Change Pagesettings to DIN A4 GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Print document."); XPrintable aPrintable = UnoRuntime.queryInterface( XPrintable.class, _aDoc); if (aPrintable != null) { - // System.out.println(" Set PaperFormat to DIN A4"); - // { - // PropertyValue[] aPrinterProps = aPrintable.getPrinter(); - // System.out.println("PrinterProps size: " + String.valueOf(aPrinterProps.length)); - // int nPropIndex = 0; - // while (!"PaperFormat".equals(aPrinterProps[nPropIndex].Name)) - // { - // // System.out.println(aPrinterProps[nPropIndex].Name); - // nPropIndex++; - // } - // aPrinterProps[nPropIndex].Value = com.sun.star.view.PaperFormat.A4; - // aPrintable.setPrinter(aPrinterProps); - // } - // configure Office to allow to execute macos // TODO: We need a possibility to set the printer name also for StarOffice/OpenOffice @@ -576,14 +470,6 @@ public class OpenOfficePostscriptCreator implements IOffice // set property values for XPrintable.print() // more can be found at "http://api.libreoffice.org/docs/common/ref/com/sun/star/view/PrintOptions.html" - // int nProperties = 1; // default for 'FileName' property - // if (_aGTA.printAllPages() == false) - // { - // // we don't want to print all pages, build Pages string by ourself - // nProperties ++; - // } - // int nPropsCount = 0; - // If we are a SpreadSheet (calc), we need to set PrintAllSheets property to 'true' XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, _aDoc ); if ( xServiceInfo.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) ) @@ -599,13 +485,10 @@ public class OpenOfficePostscriptCreator implements IOffice } ArrayList<PropertyValue> aPrintProps = new ArrayList<PropertyValue>(); - // GlobalLogWriter.println("Property FileName:=" + _sPrintFileURL); - // PropertyValue [] aPrintProps = new PropertyValue[nProperties]; PropertyValue Arg = new PropertyValue(); Arg.Name = "FileName"; Arg.Value = _sPrintFileURL; - // aPrintProps[nPropsCount ++] = Arg; aPrintProps.add(Arg); showProperty(Arg); @@ -634,8 +517,6 @@ public class OpenOfficePostscriptCreator implements IOffice showProperty(Arg); } - // GlobalLogWriter.println("Start printing."); - _aGTA.getPerformance().startTime(PerformanceContainer.Print); aPrintable.print(PropertyHelper.createPropertyValueArrayFormArrayList(aPrintProps)); TimeHelper.waitInSeconds(1, "Start waiting for print ready."); @@ -649,7 +530,6 @@ public class OpenOfficePostscriptCreator implements IOffice int nPropIndex = 0; while (!"IsBusy".equals(aPrinterProps[nPropIndex].Name)) { - // System.out.println(aPrinterProps[nPropIndex].Name); nPropIndex++; } isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE); @@ -662,9 +542,6 @@ public class OpenOfficePostscriptCreator implements IOffice throw new com.sun.star.uno.Exception("Convwatch exception, wait too long for printing."); } } -// TODO: -// TimeHelper.waitInSeconds(40, "Start waiting after print ready."); - _aGTA.getPerformance().stopTime(PerformanceContainer.Print); GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Print document done."); @@ -713,32 +590,22 @@ public class OpenOfficePostscriptCreator implements IOffice { if (! FileHelper.exists(_sAbsoluteInputFile)) { - // throw new ConvWatchCancelException("Input file: " + _sAbsoluteInputFile + " does not exist."); return false; } - // String fs = System.getProperty("file.separator"); - - // String sInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile); - String sInputFileBasename = FileHelper.getBasename(_sAbsoluteInputFile); - // String sOutputFileURL = null; String sOutputPath; if (_sAbsoluteOutputPath != null) { sOutputPath = _sAbsoluteOutputPath; - // FileHelper.makeDirectories("", sOutputPath); } else { String sInputPath = FileHelper.getPath(_sAbsoluteInputFile); sOutputPath = sInputPath; } - // sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename); - // sOutputFileURL = null; String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename); - // String sPrintFileURL; String sAbsolutePrintFilename = FileHelper.appendPath(sOutputPath, sPrintFilename + ".prn"); if (FileHelper.exists(sAbsolutePrintFilename) && _aGTA.getOverwrite() == false) @@ -750,142 +617,6 @@ public class OpenOfficePostscriptCreator implements IOffice } - /** - * create a reference file - * _sAbsoluteInputPath contains the source file, if not exists, return with failure. - * _sAbsoluteOutputPath contains the destination, where the file will store after load with StarOffice/OpenOffice.org - * if is null, print only near the Input file path - * _sPrintType ".prn" Print input file with StarOffice/OpenOffice.org and the default printer as PostScript - * - * @param _aGTA - * @return - */ -// public static boolean buildReference(ParameterHelper _aGTA, -// String _sAbsoluteOutputPath, -// String _sAbsoluteInputFile) -// throws OfficeException -// { -// if (! FileHelper.exists(_sAbsoluteInputFile)) -// { -// throw new OfficeException("buildReference(): Input file: " + _sAbsoluteInputFile + " does not exist."); -// } - -// String fs = System.getProperty("file.separator"); - -// String sInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile); - -// String sInputFileBasename = FileHelper.getBasename(_sAbsoluteInputFile); -// String sOutputFileURL = null; -// String sOutputPath; -// if (_sAbsoluteOutputPath != null) -// { -// sOutputPath = _sAbsoluteOutputPath; -// FileHelper.makeDirectories("", sOutputPath); -// } -// else -// { -// String sInputPath = FileHelper.getPath(_sAbsoluteInputFile); -// sOutputPath = sInputPath; -// } -// // sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename); -// sOutputFileURL = null; - -// String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename); -// String sPrintFileURL; - -// String sAbsolutePrintFilename = sOutputPath + fs + sPrintFilename + ".prn"; -// if (FileHelper.exists(sAbsolutePrintFilename) && _aGTA.getOverwrite() == false) -// { -// GlobalLogWriter.println("Reference already exist, don't overwrite. Set " + PropertyName.DOC_COMPARATOR_OVERWRITE_REFERENCE + "=true to force overwrite."); -// return true; -// } - -// if (_aGTA.getReferenceType().toLowerCase().equals("msoffice")) -// { -// sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename); -// } -// else if (_aGTA.getReferenceType().toLowerCase().equals("pdf")) -// { -//// TODO: If we rename the stored file to *.pdf, we have to be sure that we use *.pdf also as a available reference -// sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename ); -// } -// else if (_aGTA.getReferenceType().toLowerCase().equals("ooo")) -// { -// sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename ); -// } -// else -// { -// GlobalLogWriter.println("OfficePrint.buildreference(): Unknown print type."); -// return false; -// } -// return printToFile(_aGTA, sInputFileURL, sOutputFileURL, sPrintFileURL); -// } - - - - // TODO: Das Teil muss hier raus! - - -// public static boolean printToFile(ParameterHelper _aGTA, -// String _sInputFileURL, -// String _sOutputFileURL, -// String _sPrintFileURL) throws OfficeException -// { -// boolean bBack = false; -// String sPrintFileURL = null; - - -// // remember the current timer, to know how long a print process need. -// // startTimer(); - -// if (_aGTA.getReferenceType().toLowerCase().equals("ooo")) -// { -// bBack = printToFileWithOOo(_aGTA, _sInputFileURL, _sOutputFileURL, _sPrintFileURL); -// } -// else if (_aGTA.getReferenceType().toLowerCase().equals("pdf")) -// { -// GlobalLogWriter.println("USE PDF AS EXPORT FORMAT."); -// bBack = storeAsPDF(_aGTA, _sInputFileURL, _sPrintFileURL); -// } -// else if (_aGTA.getReferenceType().toLowerCase().equals("msoffice")) -// { -// if (MSOfficePostscriptCreator.isMSOfficeDocumentFormat(_sInputFileURL)) -// { -// GlobalLogWriter.println("USE MSOFFICE AS EXPORT FORMAT."); -// MSOfficePostscriptCreator a = new MSOfficePostscriptCreator(); -// try -// { -// a.printToFileWithMSOffice(_aGTA, FileHelper.getSystemPathFromFileURL(_sInputFileURL), -// FileHelper.getSystemPathFromFileURL(_sPrintFileURL)); -// } -// catch(OfficeException e) -// { -// e.printStackTrace(); -// GlobalLogWriter.println(e.getMessage()); -// throw new OfficeException("Exception caught. Problem with MSOffice printer methods."); -// } -// catch(java.io.IOException e) -// { -// GlobalLogWriter.println(e.getMessage()); -// throw new OfficeException("IOException caught. Problem with MSOffice printer methods."); -// } -// bBack = true; -// } -// else -// { -// GlobalLogWriter.println("This document type is not recognized as MSOffice format, as default fallback StarOffice/OpenOffice.org instead is used."); -// bBack = printToFileWithOOo(_aGTA, _sInputFileURL, _sOutputFileURL, _sPrintFileURL); -// } -// } -// else -// { -// // System.out.println(""); -// throw new OfficeException("OfficePrint.printToFile(): Unknown print type."); -// } -// return bBack; -// } - - // TODO: move this away! void showType(String _sInputURL, XMultiServiceFactory _xMSF) @@ -924,7 +655,6 @@ public class OpenOfficePostscriptCreator implements IOffice { if (_sFilterName.length() == 0) { - // System.out.println("No FilterName set."); return null; } @@ -933,7 +663,6 @@ public class OpenOfficePostscriptCreator implements IOffice GlobalLogWriter.println("MultiServiceFactory not set."); return null; } - // XFilterFactory aFilterFactory = null; Object aObj = null; try { @@ -950,18 +679,6 @@ public class OpenOfficePostscriptCreator implements IOffice if (aNameAccess != null) { - // if (_sFilterName.toLowerCase().equals("help")) - // { - // System.out.println("Show all possible ElementNames from current version." ); - // String[] aElementNames = aNameAccess.getElementNames(); - // for (int i = 0; i<aElementNames.length; i++) - // { - // System.out.println(aElementNames[i]); - // } - // System.out.println("Must quit."); - // System.out.exit(1); - // } - if (! aNameAccess.hasByName(_sFilterName)) { GlobalLogWriter.println("FilterFactory.hasByName() says there exist no '" + _sFilterName + "'" ); @@ -975,15 +692,12 @@ public class OpenOfficePostscriptCreator implements IOffice if (aElements != null) { String sInternalFilterName = null; - // System.out.println("getByName().length: " + String.valueOf(aElements.length)); for (int i=0;i<aElements.length; i++) { PropertyValue aPropertyValue = (PropertyValue)aElements[i]; - // System.out.println("PropertyValue.Name: " + aPropertyValue.Name); if (aPropertyValue.Name.equals("Type")) { String sValue = (String)aPropertyValue.Value; - // System.out.println("Type: " + sValue); sInternalFilterName = sValue; } } @@ -1014,7 +728,6 @@ public class OpenOfficePostscriptCreator implements IOffice { if (_sFilterName.length() == 0) { - // System.out.println("No FilterName set."); return null; } @@ -1023,7 +736,6 @@ public class OpenOfficePostscriptCreator implements IOffice GlobalLogWriter.println("MultiServiceFactory not set."); return null; } - // XFilterFactory aFilterFactory = null; Object aObj = null; try { @@ -1052,14 +764,12 @@ public class OpenOfficePostscriptCreator implements IOffice if (aElements != null) { String sServiceName = null; - // System.out.println("getByName().length: " + String.valueOf(aElements.length)); for (int i=0;i<aElements.length; i++) { PropertyValue aPropertyValue = (PropertyValue)aElements[i]; if (aPropertyValue.Name.equals("DocumentService")) { String sValue = (String)aPropertyValue.Value; - // System.out.println("DocumentService: " + sValue); sServiceName = sValue; break; } @@ -1090,7 +800,6 @@ public class OpenOfficePostscriptCreator implements IOffice { if (_sInternalFilterName.length() == 0) { - // System.out.println("No FilterName set."); return null; } @@ -1116,13 +825,6 @@ public class OpenOfficePostscriptCreator implements IOffice if (aNameAccess != null) { - // System.out.println("Show ElementNames" ); - // String[] aElementNames = aNameAccess.getElementNames(); - // for (int i = 0; i<aElementNames.length; i++) - // { - // System.out.println(aElementNames[i]); - // } - if (! aNameAccess.hasByName(_sInternalFilterName)) { GlobalLogWriter.println("TypeDetection.hasByName() says there exist no '" + _sInternalFilterName + "'" ); @@ -1137,11 +839,9 @@ public class OpenOfficePostscriptCreator implements IOffice if (aElements != null) { String sExtension = null; - // System.out.println("getByName().length: " + String.valueOf(aElements.length)); for (int i=0;i<aElements.length; i++) { PropertyValue aPropertyValue = (PropertyValue)aElements[i]; - // System.out.println("PropertyValue.Name: " + aPropertyValue.Name); if (aPropertyValue.Name.equals("Extensions")) { aExtensions = (String[])aPropertyValue.Value; @@ -1189,7 +889,6 @@ public class OpenOfficePostscriptCreator implements IOffice } String sInputURL = URLHelper.getFileURLFromSystemPath(_sInputFile); - // showType(sInputURL, xMSF); XComponent aDoc = loadFromURL( _aGTA, sInputURL); if (aDoc == null) { @@ -1208,12 +907,8 @@ public class OpenOfficePostscriptCreator implements IOffice GlobalLogWriter.println("It's not allowed to store, check Input/Output path."); return; } -// TODO: Do we need to wait? -// TimeHelper.waitInSeconds(1, "wait after loadFromURL."); XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, aDoc ); - // String sFilter = getFilterName_forExcel(xServiceInfo); - // System.out.println("Filter is " + sFilter); // store the document in an other directory XStorable xStorable = UnoRuntime.queryInterface( XStorable.class, aDoc); @@ -1225,9 +920,6 @@ public class OpenOfficePostscriptCreator implements IOffice String sFilterName = _aGTA.getExportFilterName(); - // initialize PropertyArray - // PropertyValue [] aStoreProps = new PropertyValue[ nPropertyCount ]; - // int nPropertyIndex = 0; ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); String sExtension = ""; @@ -1270,7 +962,6 @@ public class OpenOfficePostscriptCreator implements IOffice PropertyValue Arg = new PropertyValue(); Arg.Name = "FilterName"; Arg.Value = sFilterName; - // aStoreProps[nPropertyIndex ++] = Arg; aPropertyList.add(Arg); showProperty(Arg); GlobalLogWriter.println("FilterName is set to: " + sFilterName); @@ -1281,9 +972,7 @@ public class OpenOfficePostscriptCreator implements IOffice { // create the new filename with the extension, which is ok to the file format String sInputFileBasename = FileHelper.getBasename(_sInputFile); - // System.out.println("InputFileBasename " + sInputFileBasename); String sInputFileNameNoSuffix = FileHelper.getNameNoSuffix(sInputFileBasename); - // System.out.println("InputFilename no suffix " + sInputFileNameNoSuffix); String fs = System.getProperty("file.separator"); String sOutputFile = _sOutputPath; if (! sOutputFile.endsWith(fs)) @@ -1315,38 +1004,12 @@ public class OpenOfficePostscriptCreator implements IOffice { GlobalLogWriter.println("Can't store document '" + sOutputURL + "'. Message is :'" + e.getMessage() + "'"); } -// TODO: Do we need to wait? -// TimeHelper.waitInSeconds(1, "unknown in OfficePrint.convertDocument()"); } - /** - * - * @return false, if 'NoOffice=yes' is given - */ -// private boolean shouldOfficeStart() -// { -// String sNoOffice = (String)m_aParameterHelper.getTestParameters().get( "NoOffice" ); -// if (sNoOffice != null) -// { -// if (sNoOffice.toLowerCase().startsWith("t") || sNoOffice.toLowerCase().startsWith("y")) -// { -// return false; -// } -// } -// return true; -// } - OfficeProvider m_aProvider = null; private void startOffice() { - // SimpleFileSemaphore aSemaphore = new SimpleFileSemaphore(); -// if (shouldOfficeStart()) -// { - // if (OSHelper.isWindows()) - // { - // aSemaphore.P(aSemaphore.getSemaphoreFile()); - // } m_aParameterHelper.getTestParameters().put(util.PropertyName.DONT_BACKUP_USERLAYER, Boolean.TRUE); m_aParameterHelper.getPerformance().startTime(PerformanceContainer.OfficeStart); @@ -1356,9 +1019,7 @@ public class OpenOfficePostscriptCreator implements IOffice m_aParameterHelper.getPerformance().stopTime(PerformanceContainer.OfficeStart); long nStartTime = m_aParameterHelper.getPerformance().getTime(PerformanceContainer.OfficeStart); - // aGTA = getParameterHelper(); // get new TestArguments m_aParameterHelper.getPerformance().setTime(PerformanceContainer.OfficeStart, nStartTime); -// } // Watcher Object is need in log object to give a simple way to say if a running office is alive. // As long as a log comes, it pings the Watcher and says the office is alive, if not an @@ -1381,13 +1042,6 @@ public class OpenOfficePostscriptCreator implements IOffice { m_aProvider.closeExistingOffice(m_aParameterHelper.getTestParameters(), true); } - // if (OSHelper.isWindows()) - // { - // aSemaphore.V(aSemaphore.getSemaphoreFile()); - // aSemaphore.sleep(2); - // // wait some time maybe an other process will take the semaphore - // // I know, this is absolutely dirty, but the whole convwatch is dirty and need a big cleanup. - // } } } @@ -1400,7 +1054,6 @@ public class OpenOfficePostscriptCreator implements IOffice public boolean isStoreAllowed() { return false; - // return m_bStoreFile; } } diff --git a/qadevOOo/runner/graphical/ParameterHelper.java b/qadevOOo/runner/graphical/ParameterHelper.java index ac8c6eeffec0..3ca201ff276e 100644 --- a/qadevOOo/runner/graphical/ParameterHelper.java +++ b/qadevOOo/runner/graphical/ParameterHelper.java @@ -65,8 +65,6 @@ public class ParameterHelper */ private String m_sReferenceType = null; - // private String m_sTargetFrameName = "_blank"; - private String m_sPrinterName = null; private int m_nResolutionInDPI = 180; @@ -75,18 +73,12 @@ public class ParameterHelper private String m_sInputPath = null; private String m_sOutputPath = null; -// private String m_sReferencePath = null; private TestParameters m_aCurrentParams; - // private GlobalLogWriter m_aLog; - public ParameterHelper(TestParameters param) { m_aCurrentParams = param; - // m_aLog = log; - // interpretReferenceType(); - // interpretPrinterName(); } @@ -133,24 +125,6 @@ public class ParameterHelper return m_sOutputPath; } -// public String getReferencePath() -// { -// if (m_sReferencePath == null) -// { -// String sReferencePath = (String)getTestParameters().get( PropertyName.DOC_COMPARATOR_REFERENCE_PATH ); -// if (sReferencePath == null || sReferencePath.length() == 0) -// { -// GlobalLogWriter.println("Please set reference path (path to reference documents) " + PropertyName.DOC_COMPARATOR_REFERENCE_PATH + "=path."); -// } -// else -// { -// m_sReferencePath = sReferencePath; -// } -// } -// return m_sReferencePath; -// } - - public boolean isIncludeSubDirectories() { m_bIncludeSubdirectories = true; @@ -183,7 +157,6 @@ public class ParameterHelper } else { - // log.println("found REFERENCE_TYPE " + sReferenceType ); m_sReferenceType = sReferenceType; } } @@ -203,7 +176,6 @@ public class ParameterHelper } else { - // log.println("found PRINTER_NAME " + sPrinterName ); m_sPrinterName = sPrinterName; } } @@ -232,7 +204,6 @@ public class ParameterHelper public String getBuildID() { String sAPP = (String)m_aCurrentParams.get(util.PropertyName.APP_EXECUTION_COMMAND); - // return getBuildID(sAPP); // TODO: here we need the getBuildID(string) method String sBuildID = BuildID.getBuildID(sAPP); return sBuildID; @@ -322,27 +293,6 @@ public class ParameterHelper } -// String m_sDefaultXMLFormatApplication = null; -// public String getDefaultXMLFormatApp() -// { -// if (m_sDefaultXMLFormatApplication == null) -// { -// // DEFAULT_XML_FORMAT_APP ------ - -// String sDefaultXMLFormatApp = (String)m_aCurrentParams.get( PropertyName.DOC_COMPARATOR_DEFAULT_XML_FORMAT_APP ); -// if (sDefaultXMLFormatApp == null || sDefaultXMLFormatApp.length() == 0) -// { -// m_sDefaultXMLFormatApplication = "word"; -// } -// else -// { -// m_sDefaultXMLFormatApplication = sDefaultXMLFormatApp; -// } -// } -// return m_sDefaultXMLFormatApplication; -// } - - // Pages ------------------------------------------------------------------- /** diff --git a/qadevOOo/runner/graphical/PerformanceContainer.java b/qadevOOo/runner/graphical/PerformanceContainer.java index 26c9d39cfced..f4b4b4e5b426 100644 --- a/qadevOOo/runner/graphical/PerformanceContainer.java +++ b/qadevOOo/runner/graphical/PerformanceContainer.java @@ -19,13 +19,8 @@ package graphical; import java.io.File; -// import java.io.FileWriter; -// import java.io.OutputStream; -// import java.io.PrintStream; import java.io.PrintStream; import java.io.RandomAccessFile; -// import java.io.StringWriter; -// import java.lang.Double; public class PerformanceContainer /* extends *//* implements */ { @@ -115,8 +110,6 @@ public class PerformanceContainer /* extends *//* implements */ { public void print(PrintStream out) { - // String ls = System.getProperty("line.separator"); - // out. out.println("loadtime=" + String.valueOf(m_nTime[ Load ])); out.println("storetime=" + String.valueOf(m_nTime[ Store ])); out.println("printtime=" + String.valueOf(m_nTime[ Print ])); @@ -128,8 +121,6 @@ public class PerformanceContainer /* extends *//* implements */ { public void print(IniFile _aIniFile, String _sSection) { - // String ls = System.getProperty("line.separator"); - // out. _aIniFile.insertValue(_sSection, "loadtime" , String.valueOf(m_nTime[ Load ])); _aIniFile.insertValue(_sSection, "storetime" , String.valueOf(m_nTime[ Store ])); _aIniFile.insertValue(_sSection, "printtime" , String.valueOf(m_nTime[ Print ])); @@ -243,17 +234,4 @@ public class PerformanceContainer /* extends *//* implements */ { } } -// public static void main(String[] args) -// { -// BorderRemover a = new BorderRemover(); -// try -// { -// a.createNewImageWithoutBorder(args[0], args[1]); -// } -// catch(java.io.IOException e) -// { -// System.out.println("Exception caught."); -// } - -// } } diff --git a/qadevOOo/runner/graphical/PixelCounter.java b/qadevOOo/runner/graphical/PixelCounter.java index 69c1b232b67d..10dab09451d9 100644 --- a/qadevOOo/runner/graphical/PixelCounter.java +++ b/qadevOOo/runner/graphical/PixelCounter.java @@ -32,7 +32,6 @@ class CountNotWhite extends CountPixel { public CountNotWhite() { - // System.out.println("CountWhite()"); } public void countold(final int pixel) @@ -42,7 +41,6 @@ class CountNotWhite extends CountPixel final int green = (pixel >> 8) & 0xff; final int blue = (pixel ) & 0xff; - // System.out.println(String.valueOf(red) + ":" + String.valueOf(green) + ":" + String.valueOf(blue)); if (red == 0xff && green == 0xff && blue == 0xff) { return; @@ -78,7 +76,6 @@ class CountNotBlack extends CountPixel { public CountNotBlack() { - // System.out.println("CountBlack()"); } public void countold(final int pixel) @@ -121,38 +118,10 @@ class CountNotBlack extends CountPixel class graphics_stuff { -// public int stuff() -// { -//// (1) decoding -// int rgba = 0; // ...; // comes from PixelGrabber, BufferedImage.getRGB etc. -// int red = (rgba >> 16) & 0xff; -// int green = (rgba >> 8) & 0xff; -// int blue = rgba & 0xff; -// int alpha = (rgba >> 24) & 0xff; -//// (2) now modify red, green, blue and alpha as you like; -//// make sure that each of the four values stays in the -//// interval 0 to 255 -//// ... -//// (3) and encode back to an int, e.g. to give it to MemoryImageSource or -//// BufferedImage.setRGB -// rgba = (alpha << 24) | (red << 16) | (green << 8) | blue; -// return 0; -// } - -// public static void handlesinglepixel(int x, int y, int pixel) -// { -// int alpha = (pixel >> 24) & 0xff; -// int red = (pixel >> 16) & 0xff; -// int green = (pixel >> 8) & 0xff; -// int blue = (pixel ) & 0xff; -// // Deal with the pixel as necessary... -// } - public static void countPixel(ImageHelper img, int _x, int _y, int _w, int _h, CountPixel _aPixelCounter) { for (int y = 0; y < _h; y++) { for (int x = 0; x < _w; x++) { - // handlesinglepixel(x+i, y+j, pixels[j * w + i]); _aPixelCounter.count(img.getPixel(x,y)); } } @@ -181,9 +150,6 @@ class graphics_stuff public class PixelCounter { - // private Image m_aImage; - // ImageHelper m_aImage; - public int countNotWhitePixel(String _sFile) throws java.io.IOException @@ -216,23 +182,6 @@ public class PixelCounter { } - -// public static void main(String[] args) { - -// String a = helper.StringHelper.createValueString(10, 4); -// int dummy = 1; -// -// BorderRemover a = new BorderRemover(); -// try -// { -// a.createNewImageWithoutBorder(args[0], args[1]); -// } -// catch(java.io.IOException e) -// { -// System.out.println("Exception caught."); -// } -// */ -// } } diff --git a/qadevOOo/runner/helper/APIDescGetter.java b/qadevOOo/runner/helper/APIDescGetter.java index f8e124cfe20a..a7c97dc37b17 100644 --- a/qadevOOo/runner/helper/APIDescGetter.java +++ b/qadevOOo/runner/helper/APIDescGetter.java @@ -285,8 +285,6 @@ public class APIDescGetter extends DescGetter continue; } // TODO Probleme here - // int nFirstSemicolon = line.indexOf(";"); - // int nLastSemicolon = line.lastIndexOf(";"); String ifc_name = ""; // = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1); String meth_name = ""; // = line.substring(line.lastIndexOf(";") + 2, line.length() - 1); @@ -309,9 +307,6 @@ public class APIDescGetter extends DescGetter meth_name = StringHelper.removeQuoteIfExists(aToken.nextToken()); } - // String ifc_name = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1); - // String meth_name = line.substring(line.lastIndexOf(";") + 2, line.length() - 1); - DescEntry methDesc = createDescEntry(meth_name, ifc_name, parent); if (!ifc_name.equals(old_ifc_name)) @@ -579,10 +574,6 @@ public class APIDescGetter extends DescGetter String entry = e.nextElement().toString(); -// if (debug) { -// System.out.println("### Read from connetion: " + entry); -// } - if ((entry.lastIndexOf(sStartModule) != -1) && entry.endsWith(sEndsWithCSVName)) { diff --git a/qadevOOo/runner/helper/FileTools.java b/qadevOOo/runner/helper/FileTools.java index 8ce58e29f53a..8a859183ebf6 100644 --- a/qadevOOo/runner/helper/FileTools.java +++ b/qadevOOo/runner/helper/FileTools.java @@ -102,34 +102,10 @@ public class FileTools { */ public static boolean deleteDir(File dir) { - // if (! cleanDir(dir)) return false; - // The directory is now empty so delete it - // return dir.delete(); return cleanDir(dir); } - /** - * Deletes all files and subdirectories under dir. - * Returns true if all deletions were successful. - * If a deletion fails, the method continues to delete rest of the files. - * @return Returns true if all deletions were successful, else false. - * @param dir the directory to clean from content - */ - // public static boolean cleanDir(File dir){ - - // boolean success = true; - // if (dir.isDirectory()){ - // File [] theFiles = dir.listFiles(); - - // if (theFiles.length != 0 ) - // for (int i = 0; i < theFiles.length; i++){ - // success &= theFiles[i].delete(); - // } - // } - // return success; - // } - public static boolean cleanDir(File dir) { if (dir.isDirectory()) diff --git a/qadevOOo/runner/helper/ObjectInspectorModelImpl.java b/qadevOOo/runner/helper/ObjectInspectorModelImpl.java index 3626a0dabeee..b40888102438 100644 --- a/qadevOOo/runner/helper/ObjectInspectorModelImpl.java +++ b/qadevOOo/runner/helper/ObjectInspectorModelImpl.java @@ -59,7 +59,6 @@ public class ObjectInspectorModelImpl implements XObjectInspectorModel{ inCat =(CategoryMem == category)? ++inCat: 1; CategoryMem = category; - //System.out.println("Category" + category + "Number" + inCat); m_Categories[n].ProgrammaticName = "Category" + category; m_Categories[n].UIName = "Category" + category + "Number" + inCat; m_Categories[n].HelpURL = "h:" + n; diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java index 3f45e02894ce..a208c1e09e7d 100644 --- a/qadevOOo/runner/helper/OfficeProvider.java +++ b/qadevOOo/runner/helper/OfficeProvider.java @@ -17,7 +17,6 @@ */ package helper; -//import com.sun.star.bridge.UnoUrlResolver; import com.sun.star.beans.XFastPropertySet; import com.sun.star.bridge.XUnoUrlResolver; import com.sun.star.container.XEnumeration; diff --git a/qadevOOo/runner/helper/OfficeWatcher.java b/qadevOOo/runner/helper/OfficeWatcher.java index b7381b6657db..a45b4343b18e 100644 --- a/qadevOOo/runner/helper/OfficeWatcher.java +++ b/qadevOOo/runner/helper/OfficeWatcher.java @@ -91,13 +91,6 @@ public class OfficeWatcher extends Thread implements share.Watcher { final ProcessHandler pHdl = new ProcessHandler(sKillCommand); pHdl.executeSynchronously(); -// dbg("---> Output of killoffice:"); -// dbg(pHdl.getOutputText()); -// dbg("<--- Output of killoffice"); -// dbg("---> Error output of killoffice:"); -// dbg(pHdl.getErrorText()); -// dbg("<--- Error output of killoffice"); - } } ph.kill(); diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java index bc7f4293654b..5c477447381f 100644 --- a/qadevOOo/runner/helper/ProcessHandler.java +++ b/qadevOOo/runner/helper/ProcessHandler.java @@ -390,10 +390,6 @@ public class ProcessHandler int hangcheck = 10; while (!this.isFinished() && changedText) { - // dbg("runCommand: waiting " + mTimeOut / 1000 + " seconds while command execution is ongoing... " + count); - // shortWait(mTimeOut); - // shortWait(2000); // wait 2 seconds. - //waitFor(mTimeOut); waitFor(2000, false); // wait but don't kill if (ow != null) @@ -513,8 +509,6 @@ public class ProcessHandler */ public static long getSystemTime() { - // Calendar cal = new GregorianCalendar(); - // final long nTime = cal.getTimeInMillis(); final long nTime = System.currentTimeMillis(); return nTime; } @@ -561,7 +555,6 @@ public class ProcessHandler for (int i = 0; i < cmdLineArray.length; i++) { log.println(cmdLineArray[i]); - // log.print(" "); } showEnvVars(); log.println(""); @@ -605,9 +598,6 @@ public class ProcessHandler stderr = new Pump(m_aProcess.getErrorStream(), log, "err > ", bUseOutput); stdIn = new PrintStream(m_aProcess.getOutputStream()); - // int nExitValue = m_aProcess.exitValue(); - // int dummy = 0; - dbg("execute: flush io-streams"); flushInput(); @@ -828,7 +818,6 @@ public class ProcessHandler } catch (Exception e) { - //System.out.println("No ExitValue available"); } return exitValue; diff --git a/qadevOOo/runner/helper/StreamSimulator.java b/qadevOOo/runner/helper/StreamSimulator.java index ee5f4f06b481..4352ca8eaf49 100644 --- a/qadevOOo/runner/helper/StreamSimulator.java +++ b/qadevOOo/runner/helper/StreamSimulator.java @@ -51,7 +51,6 @@ public class StreamSimulator implements com.sun.star.io.XInputStream , private com.sun.star.io.XOutputStream m_xOutStream ; private com.sun.star.io.XSeekable m_xSeek ; - //public ComplexTestEnvironment //m_aProtocol ; public boolean m_bInWasUsed ; public boolean m_bOutWasUsed ; @@ -118,12 +117,6 @@ public class StreamSimulator implements com.sun.star.io.XInputStream , } } -/* public void finalize() - { - ////m_aProtocol.log("finalize was called. Please check if it was right or not.\n"); - } */ - - /** * following methods simulates the XInputStream. * The notice all actions inside the internal protocol @@ -135,12 +128,10 @@ public class StreamSimulator implements com.sun.star.io.XInputStream , com.sun.star.io.BufferSizeExceededException, com.sun.star.io.IOException { - //m_aProtocol.log("readBytes(lData["+lData.length+"]["+lData[0]+"],"+nBytesToRead+")\n{\n"); m_bInWasUsed = true; if (m_xInStream == null) { - //m_aProtocol.log("\tstream not open. throw NotConnectedException\n\n\tfailed\n}\n"); throw new com.sun.star.io.NotConnectedException("stream not open"); } @@ -158,11 +149,6 @@ public class StreamSimulator implements com.sun.star.io.XInputStream , catch (com.sun.star.uno.RuntimeException exRuntime) { //m_aProtocol.log("\tgot RuntimeException\n\tfailed\n}\n" ); throw exRuntime; } - //m_aProtocol.log("\treads "+nRead+" bytes\n\tOK\n}\n"); - - //if (nRead != nBytesToRead) - //m_aProtocol.log("there are some missing bytes for reading!\n"); - return nRead; } diff --git a/qadevOOo/runner/helper/URLHelper.java b/qadevOOo/runner/helper/URLHelper.java index 58a481b3f421..9bb6f7d9deaa 100644 --- a/qadevOOo/runner/helper/URLHelper.java +++ b/qadevOOo/runner/helper/URLHelper.java @@ -140,7 +140,6 @@ public class URLHelper int index = sFileURL.indexOf(sBaseURL); String sURL = sFileURL.substring(0,index) + sServerURL + sFileURL.substring(index+sBaseURL.length()); - //String sURL = sFileURL.replaceFirst(sBaseURL,sServerURL); return sURL; } diff --git a/qadevOOo/runner/lib/MultiMethodTest.java b/qadevOOo/runner/lib/MultiMethodTest.java index 2fc90d795653..0493b4bbf37e 100644 --- a/qadevOOo/runner/lib/MultiMethodTest.java +++ b/qadevOOo/runner/lib/MultiMethodTest.java @@ -152,7 +152,6 @@ public class MultiMethodTest if (! ("ifc.qadevooo._SelfTest").equals(entry.entryName)) { getInterfaceName(); - // System.out.println("checking : " + ifcName); System.out.print("checking: [" + entry.longName + "]"); // defining a name of the class corresponding to the tested interface diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java b/qadevOOo/runner/lib/MultiPropertyTest.java index 544538dadeef..531946d88eb9 100644 --- a/qadevOOo/runner/lib/MultiPropertyTest.java +++ b/qadevOOo/runner/lib/MultiPropertyTest.java @@ -360,8 +360,6 @@ public class MultiPropertyTest extends MultiMethodTest { oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue); } -// log.println("old = " + toString(oldValue)); -// log.println("new = " + toString(newValue)); log.println("result = " + toString(resValue)); } catch (com.sun.star.lang.IllegalArgumentException iae) @@ -396,8 +394,6 @@ public class MultiPropertyTest extends MultiMethodTest { oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue); } -// log.println("old = " + toString(oldValue)); -// log.println("new = " + toString(newValue)); log.println("result = " + toString(resValue)); } catch (com.sun.star.lang.IllegalArgumentException iae) @@ -422,7 +418,6 @@ public class MultiPropertyTest extends MultiMethodTest { tRes.tested(propName, false); } - //tRes.tested(propName, false); } else { @@ -433,8 +428,6 @@ public class MultiPropertyTest extends MultiMethodTest { oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue); } -// log.println("old = " + toString(oldValue)); -// log.println("new = " + toString(newValue)); log.println("result = " + toString(resValue)); } catch (com.sun.star.lang.IllegalArgumentException iae) diff --git a/qadevOOo/runner/lib/TestParameters.java b/qadevOOo/runner/lib/TestParameters.java index 9fe80bf7d921..17d5cdd95dd0 100644 --- a/qadevOOo/runner/lib/TestParameters.java +++ b/qadevOOo/runner/lib/TestParameters.java @@ -26,8 +26,6 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.XComponentContext; -//import com.sun.star.lang.XMultiServiceFactory; - /** * TestParameters describes a parameters (in a form of pairs: name, value) to * be passed to tests and which may affect the test behaviour. That can be, diff --git a/qadevOOo/runner/share/DescGetter.java b/qadevOOo/runner/share/DescGetter.java index 739e52fb67f0..463acc704b45 100644 --- a/qadevOOo/runner/share/DescGetter.java +++ b/qadevOOo/runner/share/DescGetter.java @@ -97,9 +97,6 @@ public abstract class DescGetter } } } -// DescEntry aEntry = getDescriptionForSingleJob( -// line.substring(3).trim(), descPath, -// debug); if (aEntry != null) { entryList.add(aEntry); diff --git a/qadevOOo/runner/stats/ComplexDataBaseOutProducer.java b/qadevOOo/runner/stats/ComplexDataBaseOutProducer.java index 386ec11ca844..1ba18f6e0c13 100644 --- a/qadevOOo/runner/stats/ComplexDataBaseOutProducer.java +++ b/qadevOOo/runner/stats/ComplexDataBaseOutProducer.java @@ -57,8 +57,6 @@ public class ComplexDataBaseOutProducer extends DataBaseOutProducer { testBase = testBase.substring(sep+1); // 2do fallback? -// if (os == null || os.equals("")) -// os = System.getProperty("os.name"); String descriptionString = testLanguage+":"+ os +":"+testBase+":"+apiVersion; if (apiVersion != null) apiVersion = apiVersion.substring(0, 6); diff --git a/qadevOOo/runner/stats/SimpleLogWriter.java b/qadevOOo/runner/stats/SimpleLogWriter.java index 3d3164373fbf..2610d9b0a366 100644 --- a/qadevOOo/runner/stats/SimpleLogWriter.java +++ b/qadevOOo/runner/stats/SimpleLogWriter.java @@ -77,11 +77,6 @@ public class SimpleLogWriter extends PrintWriter implements LogWriter { super.println("LOG> " + msg); super.flush(); } - // else - // { - // super.println(" ++ " + msg); - // super.flush(); - // } } public boolean summary(share.DescEntry entry) { diff --git a/qadevOOo/runner/util/AccessibilityTools.java b/qadevOOo/runner/util/AccessibilityTools.java index 1b59b251181d..e13bfcf58c68 100644 --- a/qadevOOo/runner/util/AccessibilityTools.java +++ b/qadevOOo/runner/util/AccessibilityTools.java @@ -198,7 +198,6 @@ public class AccessibilityTools { (utils.getImplName(ac).indexOf(implName) > -1)) { SearchedAccessible = xacc; - //System.out.println("FOUND the desired component -- "+ ac.getAccessibleName() +isShowing); return ac; } else { int k = ac.getAccessibleChildCount(); @@ -240,7 +239,6 @@ public class AccessibilityTools { (utils.getImplName(ac).indexOf(implName) > -1) && isShowing) { SearchedAccessible = xacc; - //System.out.println("FOUND the desired component -- "+ ac.getAccessibleName() +isShowing); return ac; } else { int k = ac.getAccessibleChildCount(); @@ -300,8 +298,6 @@ public class AccessibilityTools { } - //System.out.println("cellName: " + cellName + " cellIndex: " + cellIndex); - try { XAccessibleContext ac = xSheetAcc.getAccessibleChild(cellIndex).getAccessibleContext(); System.out.println(ac.getAccessibleRole() + "," + diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java index acb24c290475..96778354ab6a 100644 --- a/qadevOOo/runner/util/DesktopTools.java +++ b/qadevOOo/runner/util/DesktopTools.java @@ -305,22 +305,18 @@ public class DesktopTools } catch (com.sun.star.util.CloseVetoException e) { - // e.printStackTrace(); System.out.println("Couldn't close document"); } catch (com.sun.star.lang.DisposedException e) { - // e.printStackTrace(); System.out.println("Couldn't close document"); } catch (java.lang.NullPointerException e) { - // e.printStackTrace(); System.out.println("Couldn't close document"); } catch (com.sun.star.beans.PropertyVetoException e) { - // e.printStackTrace(); System.out.println("Couldn't close document"); } } @@ -483,8 +479,6 @@ public class DesktopTools */ public static void bringWindowToFront(XModel xModel) { - // System.out.println("DEBUG: bring to front xModel"); - XTopWindow xTopWindow = UnoRuntime.queryInterface( XTopWindow.class, @@ -495,7 +489,6 @@ public class DesktopTools public static void bringWindowToFront(XComponent xComponent) { - // System.out.println("DEBUG: bring to front xComponent"); XModel xModel = UnoRuntime.queryInterface(XModel.class, xComponent); if (xModel != null) { diff --git a/qadevOOo/runner/util/RegistryTools.java b/qadevOOo/runner/util/RegistryTools.java index d8129087d4f9..686411495feb 100644 --- a/qadevOOo/runner/util/RegistryTools.java +++ b/qadevOOo/runner/util/RegistryTools.java @@ -356,6 +356,4 @@ public class RegistryTools { } -// public static void compareKeyTrees - } diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java index 8df2feea3ffd..7b63dab6c161 100644 --- a/qadevOOo/runner/util/ValueChanger.java +++ b/qadevOOo/runner/util/ValueChanger.java @@ -21,7 +21,6 @@ package util; import com.sun.star.awt.Point; import com.sun.star.beans.PropertyValue; import com.sun.star.drawing.PolygonFlags; -//import util.BitmapLoader; import com.sun.star.uno.Enum ; import java.lang.reflect.Field ; import java.lang.reflect.Method ; @@ -676,14 +675,6 @@ public class ValueChanger { } else -// if (oldValue instanceof com.sun.star.text.TableColumnSeparator[]){ -// com.sun.star.text.TableColumnSeparator[] _newValue = (com.sun.star.text.TableColumnSeparator[]) oldValue; -// com.sun.star.text.TableColumnSeparator sep = new com.sun.star.text.TableColumnSeparator(); -// sep.IsVisible = ! _newValue[0].IsVisible; -// _newValue[0] = sep; -// newValue = _newValue; -// } else - if (oldValue instanceof com.sun.star.style.BreakType){ com.sun.star.style.BreakType BT1 = com.sun.star.style.BreakType.COLUMN_AFTER; com.sun.star.style.BreakType BT2 = com.sun.star.style.BreakType.COLUMN_BEFORE; diff --git a/qadevOOo/runner/util/compare/PDFComparator.java b/qadevOOo/runner/util/compare/PDFComparator.java index 4efe701c7f5d..9c4d7fd253c0 100644 --- a/qadevOOo/runner/util/compare/PDFComparator.java +++ b/qadevOOo/runner/util/compare/PDFComparator.java @@ -36,18 +36,5 @@ class PDFComparator extends GraphicalComparator implements DocComparator return a; } - // all in GraphicalComparator implemented. - // public boolean isReferenceExistent() throws IOException; - - // public void createReference() throws IOException; - - // public boolean compare() throws IOException; - - - // public boolean isDiffReferenceExistent() throws IOException; - - // public void createDiffReference() throws IOException; - - // public boolean compareDiff() throws IOException; } diff --git a/qadevOOo/runner/util/compare/XMLComparator.java b/qadevOOo/runner/util/compare/XMLComparator.java deleted file mode 100644 index de5c916fb10d..000000000000 --- a/qadevOOo/runner/util/compare/XMLComparator.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package util.compare; - -//import java.io.IOException; -//import util.compare.DocComparator; -//import lib.TestParameters; - -/** - * This Interface isn't ready yet. - * - */ -/* -class XMLComparator implements DocComparator -{ - static DocComparator getInstance(TestParameters aParams) - { - return null; - } - public boolean isReferenceExistent() throws IOException; - - public void createReference() throws IOException; - - public boolean compare() throws IOException; - - - public boolean isDiffReferenceExistent() throws IOException; - - public void createDiffReference() throws IOException; - - public boolean compareDiff() throws IOException; -} -*/ diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java index bfc8afedb0e0..183daadee8dc 100644 --- a/qadevOOo/runner/util/utils.java +++ b/qadevOOo/runner/util/utils.java @@ -177,10 +177,6 @@ public class utils { } else { if (fullDocPath.startsWith("/")) { prefix = "file://"; -// if (helper.OSHelper.isLinuxIntel()) -// { -// prefix = "file:/"; -// } } else { diff --git a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java index c19f13fe18fb..0322f4abc7af 100644 --- a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java +++ b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java @@ -31,7 +31,6 @@ import helper.BuildEnvTools; import helper.ComplexDescGetter; import helper.CwsDataExchangeImpl; import java.io.File; -// import java.io.FileFilter; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -127,14 +126,6 @@ public class CheckModuleAPI extends ComplexTestCase log.println("exit code of dmake: " + procHdl.getExitCode()); String test = procHdl.getOutputText(); test += procHdl.getErrorText(); -// if (mDebug) { -// log.println("---> Output of dmake:"); -// log.println(procHdl.getOutputText()); -// log.println("<--- Output of dmake:"); -// log.println("---> Error output of dmake:"); -// log.println(procHdl.getErrorText()); -// log.println("<--- Error output of dmake:"); -// } assure("module '" + module + "' failed", verifyOutput(test), mContinue); log.println(utils.getDateTime() + " module '" + module + "': kill existing office..."); @@ -309,8 +300,6 @@ public class CheckModuleAPI extends ComplexTestCase while (iterator.hasNext()) { String sModuleName = iterator.next(); - // String sFilename = mSRC_ROOT; // + File.separator + sModuleName; - // final File sourceRoot = new File(sFilename); if (doesQaUnoApiFolderExist(mSRC_ROOT, sModuleName)) { moduleNames.add(sModuleName); @@ -347,12 +336,6 @@ public class CheckModuleAPI extends ComplexTestCase { final String moduleName = names[i].trim(); -// File sourceRoot = new File(mSRC_ROOT + File.separator + moduleName); -// if (!sourceRoot.exists()) -// { -// sourceRoot = new File(mSRC_ROOT + File.separator + moduleName + ".lnk"); -// } - if (doesQaUnoApiFolderExist(mSRC_ROOT, moduleName)) { checkModules[i] = "checkModule(" + moduleName + ")"; @@ -361,11 +344,6 @@ public class CheckModuleAPI extends ComplexTestCase } else { -// File sourceRoot = new File(mSRC_ROOT + File.separator + module); -// if (!sourceRoot.exists()) -// { -// sourceRoot = new File(mSRC_ROOT + File.separator + module + ".lnk"); -// } if (doesQaUnoApiFolderExist(mSRC_ROOT, module)) { checkModules = new String[] @@ -478,15 +456,12 @@ public class CheckModuleAPI extends ComplexTestCase final File sourceRoot = new File(mSRC_ROOT); final File[] sourceTree = sourceRoot.listFiles(); -// assure("Could not find any files in SOURCE_ROOT=" + mSRC_ROOT, sourceTree != null, false); - for (int i = 0; i < sourceTree.length; i++) { final File moduleName = sourceTree[i]; String sModuleName = moduleName.getName(); // (String)moduleNames.get(i); if (doesQaUnoApiFolderExist(mSRC_ROOT, sModuleName)) { - // addIfQaUnoApiFolderExist(moduleName, moduleNames); moduleNames.add(sModuleName); } } @@ -590,32 +565,4 @@ public class CheckModuleAPI extends ComplexTestCase }; } -// class _FolderFilter implements FileFilter -// { - -// private String mFolderName; - -// public FolderFilter(String folderName) -// { -// mFolderName = folderName; -// } - -// public boolean accept_(File pathname) -// { - -// boolean found = false; -// if (pathname.isDirectory()) -// { -// if (pathname.getName().equals(mFolderName)) -// { -// found = true; -// } -// else if (pathname.getName().equals(mFolderName + ".lnk")) -// { -// found = true; -// } -// } -// return found; -// } -// } } diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java index 069520652450..66237639a555 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java @@ -73,13 +73,11 @@ public class _XAccessibleComponent extends MultiMethodTest { int curX = 0; - //while (!oObj.containsPoint(new Point(curX, bounds.Y)) && curX < bounds.Width+bounds.X) { while (!oObj.containsPoint(new Point(curX, 0)) && (curX < bounds.Width)) { curX++; } - //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { if (curX < bounds.Width) { log.println("Upper bound of box containsPoint point (" + curX + ",0) - OK"); @@ -91,7 +89,6 @@ public class _XAccessibleComponent extends MultiMethodTest { curX = 0; - //while (!oObj.containsPoint(new Point(curX, bounds.Y+bounds.Height - 1)) while (!oObj.containsPoint(new Point(curX, bounds.Height - 1)) && (curX < bounds.Width)) { log.println("containsPoint returns false for (" + curX + "," + @@ -99,7 +96,6 @@ public class _XAccessibleComponent extends MultiMethodTest { curX++; } - //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { if (curX < bounds.Width) { log.println("Lower bound of box containsPoint point (" + curX + "," + (bounds.Height - 1) + ") - OK"); @@ -111,13 +107,11 @@ public class _XAccessibleComponent extends MultiMethodTest { int curY = 0; - //while (!oObj.containsPoint(new Point(bounds.X, curY)) && curY < bounds.Height+bounds.Y) { while (!oObj.containsPoint(new Point(0, curY)) && (curY < bounds.Height)) { curY++; } - //if ((bounds.Y <= curY) && (curY < bounds.Height+bounds.Y)) { if (curY < bounds.Height) { log.println("Left bound of box containsPoint point (0," + curY + ") - OK"); @@ -129,14 +123,11 @@ public class _XAccessibleComponent extends MultiMethodTest { curY = 0; - //while (!oObj.containsPoint(new Point(bounds.X+bounds.Width - 1, curY)) - // && curY < bounds.Height+bounds.Y) { while (!oObj.containsPoint(new Point(bounds.Width - 1, curY)) && (curY < bounds.Height)) { curY++; } - //if ((bounds.Y <= curY) && (curY < bounds.Height + bounds.Y)) { if (curY < bounds.Height) { log.println("Right bound of box containsPoint point (" + (bounds.Width - 1) + "," + curY + ") - OK"); diff --git a/qadevOOo/tests/java/ifc/awt/_XTextComponent.java b/qadevOOo/tests/java/ifc/awt/_XTextComponent.java index 4d7d3c91ef5e..cce6b8cdecf0 100644 --- a/qadevOOo/tests/java/ifc/awt/_XTextComponent.java +++ b/qadevOOo/tests/java/ifc/awt/_XTextComponent.java @@ -241,9 +241,6 @@ public class _XTextComponent extends MultiMethodTest { */ public void _setMaxTextLen() { oObj.setMaxTextLen((short)10); - //oObj.setText("0123456789ABCDE"); - //String get = oObj.getText(); - //tRes.tested("setMaxTextLen()",get.length() == 10); tRes.tested("setMaxTextLen()",oObj.getMaxTextLen()==10); } diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java index 1c808d0fed96..a31542c19330 100644 --- a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java +++ b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java @@ -591,9 +591,6 @@ public class _XPropertySet extends MultiMethodTest { if (name.startsWith("Line")) isWritable = false; if (name.startsWith("TextWriting")) isWritable = false; - //if (name.equals("xinterfaceA") || name.equals("xtypeproviderA") - //|| name.equals("arAnyA")) isWritable=false; - if ( isWritable && isNotNull ) canChange = isChangeable(name); if ( isWritable && isNotNull && isBound && canChange) { diff --git a/qadevOOo/tests/java/ifc/document/_Settings.java b/qadevOOo/tests/java/ifc/document/_Settings.java index 7d6c3937a7d4..c1f5e3ec0cd0 100644 --- a/qadevOOo/tests/java/ifc/document/_Settings.java +++ b/qadevOOo/tests/java/ifc/document/_Settings.java @@ -23,10 +23,6 @@ import com.sun.star.i18n.XForbiddenCharacters; import com.sun.star.uno.UnoRuntime; import java.lang.reflect.Method; -//import java.awt.print.PrinterJob; - -//import javax.print.PrintService; - import lib.MultiPropertyTest; import lib.Status; import lib.StatusException; @@ -86,7 +82,6 @@ public class _Settings extends MultiPropertyTest { "Cannot execute test with current Java version (Java 1.4 required) " + javaVersion + ": " + ex.getMessage())); } -// PrintService[] services = PrinterJob.lookupPrintServices(); if (oServices.length > 1) { testProperty("PrinterName", getPrinterNameWithReflection(oServices[0]), diff --git a/qadevOOo/tests/java/ifc/document/_XViewDataSupplier.java b/qadevOOo/tests/java/ifc/document/_XViewDataSupplier.java index 62a56e1d1a56..4b6409845b0d 100644 --- a/qadevOOo/tests/java/ifc/document/_XViewDataSupplier.java +++ b/qadevOOo/tests/java/ifc/document/_XViewDataSupplier.java @@ -71,8 +71,6 @@ public class _XViewDataSupplier extends MultiMethodTest { oldProps = (PropertyValue[])xAccess.getByIndex(0); newProps = new PropertyValue[oldProps.length]; for (int j=0; j<oldProps.length; j++) { -// log.println("Name: " + oldProps[j].Name); -// log.println("Value: " + oldProps[j].Value.toString()); newProps[j] = new PropertyValue(); newProps[j].Name = oldProps[j].Name; newProps[j].Handle = oldProps[j].Handle; @@ -97,8 +95,6 @@ public class _XViewDataSupplier extends MultiMethodTest { if (count > 0) { oldProps = (PropertyValue[])xAccess.getByIndex(0); for (int j=0; j<oldProps.length; j++) { -// log.println("Name: " + oldProps[j].Name); -// log.println("Value: " + oldProps[j].Value.toString()); if (oldProps[j].Name.equals("ViewId")) { retValue = (String)newProps[j].Value; } diff --git a/qadevOOo/tests/java/ifc/form/validation/_XValidatableFormComponent.java b/qadevOOo/tests/java/ifc/form/validation/_XValidatableFormComponent.java index 3580a021203d..de425ec8dd05 100644 --- a/qadevOOo/tests/java/ifc/form/validation/_XValidatableFormComponent.java +++ b/qadevOOo/tests/java/ifc/form/validation/_XValidatableFormComponent.java @@ -123,12 +123,6 @@ public class _XValidatableFormComponent extends MultiMethodTest Object newValue = ValueChanger.changePValue(oldValue); gValues[i] = newValue; - - // System.out.println("#############################################"); - // System.out.println("Name: "+testPropsNames[i]); - // System.out.println("OldValue: "+oldValue); - // System.out.println("NewValue: "+newValue); - // System.out.println("#############################################"); } try diff --git a/qadevOOo/tests/java/ifc/frame/_XFrame.java b/qadevOOo/tests/java/ifc/frame/_XFrame.java index 41333721f8df..f4c79061cfa2 100644 --- a/qadevOOo/tests/java/ifc/frame/_XFrame.java +++ b/qadevOOo/tests/java/ifc/frame/_XFrame.java @@ -19,7 +19,6 @@ package ifc.frame; import com.sun.star.awt.XWindow; -//import com.sun.star.awt.XWindow; import com.sun.star.frame.FrameAction; import com.sun.star.frame.FrameActionEvent; import com.sun.star.frame.XController; diff --git a/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java b/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java index 6c79de4bed56..ae25433d1277 100644 --- a/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java +++ b/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java @@ -114,7 +114,6 @@ public class _XFramesSupplier extends MultiMethodTest { frames = oObj.getFrames() ; if (frames != null) { cnt = frames.getCount() ; -// if (cnt == 0) result = false ; log.println("There are " + cnt + " frames.") ; } else { log.println("getFrames() returned null !!!") ; diff --git a/qadevOOo/tests/java/ifc/frame/_XTasksSupplier.java b/qadevOOo/tests/java/ifc/frame/_XTasksSupplier.java index 44c6a4caa521..4b52450b2064 100644 --- a/qadevOOo/tests/java/ifc/frame/_XTasksSupplier.java +++ b/qadevOOo/tests/java/ifc/frame/_XTasksSupplier.java @@ -41,11 +41,6 @@ public class _XTasksSupplier extends MultiMethodTest { * Has <b> OK </b> status . */ public void _getActiveTask() { -// XTask active = oObj.getActiveTask() ; -// if (active == null) -// log.println("There is no active task"); -// else -// log.println("Active task: " + active.getName()); log.println("DEPRECATED"); tRes.tested("getActiveTask()", true) ; @@ -54,33 +49,10 @@ public class _XTasksSupplier extends MultiMethodTest { /** * DEPRECATED. <p> * Has <b> OK </b> status. + * @deprecated */ + @Deprecated public void _getTasks() { -// int cnt = 0 ; -// boolean result = true ; -// XTask task = null ; - -// XEnumerationAccess enumAcc = oObj.getTasks() ; -// XEnumeration enum = enumAcc.createEnumeration() ; -// while (enum.hasMoreElements()) { -// cnt ++ ; -// try { -// task = (XTask) enum.nextElement() ; -// } catch (com.sun.star.container.NoSuchElementException e) { -// e.printStackTrace(log); -// } catch (com.sun.star.lang.WrappedTargetException e) { -// e.printStackTrace(log); -// } -// if (task == null) -// log.println("" + cnt + " task: null !!!") ; -// else -// log.println("" + cnt + " task: " + task.getName()) ; -// result &= (task != null) ; -// } -// log.println("Totaly tasks: " + cnt) ; - -// if (cnt > 0 && result) tRes.tested("getTasks()", true) ; - log.println("DEPRECATED"); tRes.tested("getTasks()", true); diff --git a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java b/qadevOOo/tests/java/ifc/i18n/_XCalendar.java index 60ebafa2d1a3..59c983b8aaa5 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java +++ b/qadevOOo/tests/java/ifc/i18n/_XCalendar.java @@ -110,7 +110,6 @@ public class _XCalendar extends MultiMethodTest { ", Variant: "+ installed_locales[i].Country; oObj.loadDefaultCalendar(installed_locales[i]); if (oObj.getLoadedCalendar().Default) { - //log.println(lang + " ... OK"); } else { log.println(lang + " ... FAILED"); } @@ -135,7 +134,6 @@ public class _XCalendar extends MultiMethodTest { calendars[i] = oObj.getAllCalendars(installed_locales[i]); count[i] = calendars[i].length-1; if (calendars[i].length > 0) { - //log.println(lang + " ... OK"); } else { log.println(lang + " ... FAILED"); } @@ -164,7 +162,6 @@ public class _XCalendar extends MultiMethodTest { ", Variant: "+ installed_locales[i].Country; oObj.loadCalendar(calendars[i][0], installed_locales[i]); if (calendars[i][0].equals(oObj.getLoadedCalendar().Name)) { - //log.println(lang + " ... OK"); } else { log.println(lang + " ... FAILED"); } @@ -194,7 +191,6 @@ public class _XCalendar extends MultiMethodTest { ", Variant: "+ installed_locales[i].Country; oObj.loadCalendar(calendars[i][0], installed_locales[i]); if (calendars[i][0].equals(oObj.getLoadedCalendar().Name)) { - //log.println(lang + " ... OK"); } else { log.println(lang + " ... FAILED"); } @@ -222,7 +218,6 @@ public class _XCalendar extends MultiMethodTest { oObj.loadCalendar(calendars[i][0], installed_locales[i]); String uID = oObj.getUniqueID(); if (uID.equals(calendars[i][0])) { - //log.println(lang + " ... OK"); } else { log.println(lang + " ... FAILED"); } @@ -248,7 +243,6 @@ public class _XCalendar extends MultiMethodTest { oObj.setDateTime(newDTime); double aDTime = oObj.getDateTime(); if (aDTime == newDTime) { - //log.println(lang + " ... OK"); } else { log.println(lang + " ... FAILED"); } @@ -274,7 +268,6 @@ public class _XCalendar extends MultiMethodTest { oObj.setDateTime(newDTime); double aDTime = oObj.getDateTime(); if (aDTime == newDTime) { - //log.println(lang + " ... OK"); } else { log.println(lang + " ... FAILED"); } diff --git a/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java b/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java index 3422d06d4e54..29e9edb22186 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java +++ b/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java @@ -27,7 +27,6 @@ import lib.MultiMethodTest; */ public class _XExtendedTransliteration extends MultiMethodTest { public XExtendedTransliteration oObj = null; -// private Locale loc = new Locale("ja", "JP", "") ; private Locale loc = new Locale("en", "US", "") ; public void before() { diff --git a/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java b/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java index 738f4e59e6e6..b9f1ba126c51 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java +++ b/qadevOOo/tests/java/ifc/i18n/_XLocaleData.java @@ -409,34 +409,21 @@ public class _XLocaleData extends MultiMethodTest { public boolean goodCalendar(Calendar calendar) { boolean good = true; for (int i=0;i<calendar.Days.length;i++) { - //log.println("Day "+i+"(AbbrevName): "+calendar.Days[i].AbbrevName); good &= (! calendar.Days[i].AbbrevName.equals("") ); - //log.println("Day "+i+"(FullName): "+calendar.Days[i].FullName); good &= (! calendar.Days[i].FullName.equals("") ); - //log.println("Day "+i+"(ID): "+calendar.Days[i].ID); good &= (! calendar.Days[i].ID.equals("") ); } for (int i=0;i<calendar.Months.length;i++) { - //log.println("Day "+i+"(AbbrevName): "+calendar.Months[i].AbbrevName); good &= (! calendar.Months[i].AbbrevName.equals("") ); - //log.println("Day "+i+"(FullName): "+calendar.Months[i].FullName); good &= (! calendar.Months[i].FullName.equals("") ); - //log.println("Day "+i+"(ID): "+calendar.Months[i].ID); good &= (! calendar.Months[i].ID.equals("") ); } for (int i=0;i<calendar.Eras.length;i++) { - //log.println("Era "+i+"(AbbrevName): "+calendar.Eras[i].AbbrevName); good &= (! calendar.Eras[i].AbbrevName.equals("") ); - //log.println("Era "+i+"(FullName): "+calendar.Eras[i].FullName); good &= (! calendar.Eras[i].FullName.equals("") ); - //log.println("Era "+i+"(ID): "+calendar.Eras[i].ID); good &= (! calendar.Eras[i].ID.equals("") ); } - //log.println("Start of Week: "+calendar.StartOfWeek); good &= (! calendar.StartOfWeek.equals("") ); - //log.println("MinimumNumberOfDaysForFirstWeek: "+calendar.MinimumNumberOfDaysForFirstWeek); - //log.println("Default: "+calendar.Default); - //log.println("Name: "+calendar.Name); good &= (! calendar.Name.equals("") ); return good; } diff --git a/qadevOOo/tests/java/ifc/qadevooo/_SelfTest.java b/qadevOOo/tests/java/ifc/qadevooo/_SelfTest.java index f12a98d45a94..42b70fd89b86 100644 --- a/qadevOOo/tests/java/ifc/qadevooo/_SelfTest.java +++ b/qadevOOo/tests/java/ifc/qadevooo/_SelfTest.java @@ -20,9 +20,6 @@ package ifc.qadevooo; import lib.MultiMethodTest; -// import com.sun.star.uno.UnoRuntime; -// import com.sun.star.uno.XInterface; - /** * Testing <code>ifc.qadevooo._SelfTest</code> * interface methods: diff --git a/qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java b/qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java index 0b86d1b00bc1..9e27da7462f9 100644 --- a/qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java +++ b/qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java @@ -140,7 +140,6 @@ public class _XRowUpdate extends MultiMethodTest { row.getBinaryStream(i + 1) ; if (rowData.get(i) instanceof XTextInputStream) row.getCharacterStream(i + 1) ; - //if (rowData.get(i) instanceof Object[]) row.getObject(i) ; if (!row.wasNull()) { log.println("FAILED") ; @@ -613,8 +612,6 @@ public class _XRowUpdate extends MultiMethodTest { createInstance("com.sun.star.io.Pipe") ; oObj.updateObject(idx, newVal) ; - //Object getVal = row.getObject(idx) ; - //result = UnoRuntime.areSame(newVal, getVal) ; } catch (SQLException e) { e.printStackTrace(log) ; result = false ; @@ -648,8 +645,6 @@ public class _XRowUpdate extends MultiMethodTest { createInstance("com.sun.star.io.Pipe") ; oObj.updateNumericObject(idx, newVal, 0) ; - //Object getVal = row.getObject(idx) ; - //result = UnoRuntime.areSame(newVal, getVal) ; } catch (SQLException e) { e.printStackTrace(log) ; result = false ; diff --git a/qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement.java b/qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement.java index 3bb40649889b..ebd7c8020fa7 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement.java +++ b/qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement.java @@ -120,7 +120,6 @@ public class _XCellRangeMovement extends MultiMethodTest { // catch some sleight of hand threads if (oSheet.getCellByPosition(1,21).getValue() == 200){ - //log.println("Rows closed."); } else{ log.println("Cells were already inserted. "+ diff --git a/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java b/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java index a5ae8ffee5e6..3f81fd01de8d 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java +++ b/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java @@ -128,22 +128,6 @@ public class _XRangeSelection extends MultiMethodTest { clickOnSheet(closer); util.utils.shortWait(5000); -// System.out.println("X: " + closer.X + " Y: " + closer.Y); - - // just check that we do not have the page instead of the range descriptor -/* int childCount = xRoot.getAccessibleContext().getAccessibleChildCount(); - if (childCount > 3) {// too many children: wrong type - throw new StatusException(Status.failed("Could not get the Range Descriptor")); - } - XAccessible xAcc = null; - try { - xAcc = xRoot.getAccessibleContext().getAccessibleChild(1); - } - catch(com.sun.star.lang.IndexOutOfBoundsException e) { - - } - accTools.printAccessibleTree(log, xAcc); -*/ // open a new range selection props[0].Value = "C4:E6"; oObj.startRangeSelection(props); @@ -296,8 +280,6 @@ public class _XRangeSelection extends MultiMethodTest { } Point p = xAccessibleComponent.getLocationOnScreen(); -// System.out.println("ScreenPoint: " + p.X + " " + p.Y ); -// System.out.println("WindowPoint: " + posSize.X + " " + posSize.Y + " " + posSize.Width + " " + posSize.Height); Point closer = new Point(); closer.X = p.X + posSize.Width - 2; closer.Y = p.Y + 5; diff --git a/qadevOOo/tests/java/ifc/task/_XInteractionHandler.java b/qadevOOo/tests/java/ifc/task/_XInteractionHandler.java index 6d80aff4c75e..e72bc2256982 100644 --- a/qadevOOo/tests/java/ifc/task/_XInteractionHandler.java +++ b/qadevOOo/tests/java/ifc/task/_XInteractionHandler.java @@ -64,9 +64,6 @@ public class _XInteractionHandler extends MultiMethodTest { public void before() { request = (XInteractionRequest) tEnv.getObjRelation("XInteractionHandler.Request") ; - - //if (request == null) - // throw new StatusException(Status.failed("Reelation not found")) ; } /** @@ -75,66 +72,6 @@ public class _XInteractionHandler extends MultiMethodTest { * Always has <b>SKIPPED.OK</b> status . */ public void _handle() { - - /* - - final XMultiServiceFactory msf = (XMultiServiceFactory)tParam.getMSF() ; - SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF() ); - XComponent textDoc = null ; - try { - textDoc = SOF.createTextDoc( null ); - } catch (com.sun.star.uno.Exception e) { - log.println("Can't create Document") ; - tRes.tested("handle()", false) ; - return ; - } - final XComponent fTextDoc = textDoc ; - final XModel xModelDoc = (XModel) - UnoRuntime.queryInterface(XModel.class, textDoc); - - Thread thr = new Thread( new Runnable() { - public void run() { - try { - Thread.sleep(1000) ; - } catch (InterruptedException e ) {} - - //fTextDoc.dispose() ; - - XFrame docFr = xModelDoc.getCurrentController().getFrame() ; - docFr.dispose() ; - - / - try { - - Object dsk = msf.createInstance - ("com.sun.star.frame.Desktop"); - - XFrame xDsk = (XFrame) - UnoRuntime.queryInterface(XFrame.class, dsk) ; - - XFrame fr = xDsk.findFrame("_top", 55) ; - - XWindow win = fr.getContainerWindow() ; - - String name = null ; - if (fr != null) { - name = fr.getName() ; - docFr.dispose() ; - } - - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(); - } - } - }) ; - thr.start() ; - - oObj.handle(request) ; - try { - thr.join(500) ; - } catch (InterruptedException e ) {} - */ - tRes.tested("handle()", Status.skipped(true)) ; } } diff --git a/qadevOOo/tests/java/ifc/ucb/_XContentProviderManager.java b/qadevOOo/tests/java/ifc/ucb/_XContentProviderManager.java index b1a10fe72dfd..52d94530f462 100644 --- a/qadevOOo/tests/java/ifc/ucb/_XContentProviderManager.java +++ b/qadevOOo/tests/java/ifc/ucb/_XContentProviderManager.java @@ -227,13 +227,7 @@ public class _XContentProviderManager extends MultiMethodTest { } } -// boolean gotTheRightOne = util.ValueComparer.equalValue -// (result,contentProvider); - tRes.tested("queryContentProvider()", found); - -// gotTheRightOne = result.equals(contentProvider); - } /** diff --git a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java index 6d13603a4c3a..8fc1c5fae440 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java +++ b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java @@ -17,8 +17,6 @@ */ package mod._dbaccess; -//import com.sun.star.awt.XControl; -//import com.sun.star.awt.XControlModel; import com.sun.star.container.NoSuchElementException; import com.sun.star.lang.WrappedTargetException; import com.sun.star.sdbc.SQLException; @@ -199,9 +197,6 @@ public class OQueryDesign extends TestCase { //Adding ObjRelations for XInitialization tEnv.addObjRelation("XInitialization.args", params); - //Object[] ExceptionParams = new Object[3]; - //ExceptionParams = params; - //((PropertyValue) ExceptionParams[1]).Value = Frame; Object[] ExceptionParams = new Object[3]; PropertyValue ExceptionParam1 = new PropertyValue(); ExceptionParam1.Name = "DataSourceName"; diff --git a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java index 0e81eaafae19..8f42343a2b4a 100644 --- a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java +++ b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java @@ -229,8 +229,6 @@ public class ODatabaseForm extends TestCase { private Object dbSrc = null; protected void initialize(TestParameters tParam, PrintWriter log) { - //log.println( "creating a draw document" ); - //xTextDoc = WriterTools.createTextDoc(t((XMultiServiceFactory) Param.getMSF)); tmpDir = utils.getOfficeTemp((tParam.getMSF())); origDB = util.utils.getFullTestDocName("TestDB/testDB.dbf"); @@ -262,7 +260,6 @@ public class ODatabaseForm extends TestCase { PropertyValue[] propInfo = new PropertyValue[1]; propInfo[0] = new PropertyValue(); propInfo[0].Name = "JavaDriverClass"; -// propInfo[0].Value = "org.gjt.mm.mysql.Driver"; propInfo[0].Value = "util.dddriver.Driver"; srcInf.Info = propInfo; diff --git a/qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java b/qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java index 66fab02221b5..cd73eed70b72 100644 --- a/qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java +++ b/qadevOOo/tests/java/mod/_shlibloader/uno/DLLComponentLoader.java @@ -84,7 +84,6 @@ public class DLLComponentLoader extends TestCase { // adding object relation for XImplementationLoader ifc test tEnv.addObjRelation("ImplementationLoader", "com.sun.star.loader.SharedLibrary") ; - //String fs = System.getProperty("file.separator"); String os = (String) Param.get("OS"); if (os == null || os == "") throw new StatusException( diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java index 99c8bfe3ae67..8682e1e3bf61 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java @@ -198,13 +198,6 @@ public class AccessibleTreeListBox extends TestCase { final Object[] fParams = params; -// tEnv.addObjRelation("EventProducer", -// new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer(){ -// public void fireEvent() { -// fXComp.grabFocus(); -// } -// }); - tEnv.addObjRelation("EventProducer", new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer(){ public void fireEvent() { diff --git a/qadevOOo/tests/java/mod/_sw/SwXDrawPage.java b/qadevOOo/tests/java/mod/_sw/SwXDrawPage.java index 67997bfa1f50..ae7298b45412 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXDrawPage.java +++ b/qadevOOo/tests/java/mod/_sw/SwXDrawPage.java @@ -130,9 +130,6 @@ public class SwXDrawPage extends TestCase { xDP = XDPSupp.getDrawPage(); oObj = xDP; - //dbg.printInterfaces(oObj); - //System.exit(0); - log.println( "inserting some Shapes" ); oShapes = UnoRuntime.queryInterface(XShapes.class, oObj); oShapes.add(SOF.createShape(xTextDoc,2000,1500,1000,1000,"Line")); diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextView.java b/qadevOOo/tests/java/mod/_sw/SwXTextView.java index 1dd1b45c467b..9c12c67017dd 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXTextView.java +++ b/qadevOOo/tests/java/mod/_sw/SwXTextView.java @@ -255,10 +255,6 @@ public class SwXTextView extends TestCase { log.println("ERROR: could not get 'Standard' from drawpage!"); if (debug){ log.println("the draw page contains following elements:"); -// String[] elements = FormTools.getForms(WriterTools.getDrawPage(xTextDoc)).getElementNames(); -// for (int i = 0; i< elements.length; i++){ -// log.println("Element[" + i + "] :" + elements[i]); -// } } } else diff --git a/qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java b/qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java index 92e341886727..c632116fcbfe 100644 --- a/qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java +++ b/qadevOOo/tests/java/mod/_toolkit/MutableTreeNode.java @@ -48,8 +48,6 @@ public class MutableTreeNode extends TestCase { */ protected void initialize(TestParameters tParam, PrintWriter log) { mxMSF = tParam.getMSF(); -// log.println("creating a textdocument"); -// xTextDoc = WriterTools.createTextDoc(mxMSF); } /** diff --git a/qadevOOo/tests/java/mod/_toolkit/UnoTreeControl.java b/qadevOOo/tests/java/mod/_toolkit/UnoTreeControl.java index 87d632cf0bfd..fbfce88507e4 100644 --- a/qadevOOo/tests/java/mod/_toolkit/UnoTreeControl.java +++ b/qadevOOo/tests/java/mod/_toolkit/UnoTreeControl.java @@ -66,9 +66,6 @@ public class UnoTreeControl extends TestCase { } protected void cleanup(TestParameters tParam, PrintWriter log) { -// log.println(" disposing xTextDoc "); - -// util.DesktopTools.closeDoc(xTextDoc); } protected TestEnvironment createTestEnvironment(TestParameters Param, diff --git a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java index 4a08c4835939..b7508a038b2a 100644 --- a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java +++ b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java @@ -482,7 +482,6 @@ public class SDBCReportDataFactory implements DataSourceFactory final String detail = (String) it.next(); if (!handledColumns.contains(detail)) { - //String master = (String) masterIt.next(); oldFilter.append(quote); oldFilter.append(detail); oldFilter.append(quote); diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java index c70b9ee30878..cadafa0338a5 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java @@ -74,10 +74,6 @@ public class OfficeStyle extends Section setAttribute(OfficeNamespaces.STYLE_NS, "family", family); } -// public String getMasterPageName() -// { -// return (String) getAttribute(OfficeNamespaces.STYLE_NS, "master-page-name"); -// } public Element getParagraphProperties() { return findFirstChild(OfficeNamespaces.STYLE_NS, "paragraph-properties"); diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java index d1c5b41aa122..41b8458e0c22 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java @@ -724,11 +724,6 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget LOGGER.error("ReportProcessing failed", ioe); throw new ReportProcessingException("Failed to write content", ioe); } -// finally -// { -// LOGGER.debug ("Started " + getNamespaceFromAttribute(attrs) + ":" + -// getElemenTypeFromAttribute(attrs) + " -> " + getCurrentState()); -// } } protected GroupContext getGroupContext() @@ -929,7 +924,6 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget throws DataSourceException, ReportProcessingException { final AttributeMap attrs = new LazyAttributeMap(roAttrs); - // final int oldState = getCurrentState(); try { @@ -1153,8 +1147,6 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget new MemoryByteArrayOutputStream(INITIAL_BUFFER_SIZE, 256 * INITIAL_BUFFER_SIZE); final DeflaterOutputStream deflateOut = new DeflaterOutputStream(out); final OutputStreamWriter xmlBuffer = new OutputStreamWriter(deflateOut, "UTF-16"); - // final StringWriter xmlBuffer = new StringWriter - // (OfficeDocumentReportTarget.INITIAL_BUFFER_SIZE); final XmlWriter contentXmlWriter = new XmlWriter(xmlBuffer, createTagDescription()); contentXmlWriter.copyNamespaces(currentWriter); if (indent) diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/StyleUtilities.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/StyleUtilities.java index da568078afb5..53b51f026ba1 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/output/StyleUtilities.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/StyleUtilities.java @@ -381,19 +381,6 @@ public class StyleUtilities return derivedStyle; } -// final OfficeStyle commonAuto = -// commonCollection.getAutomaticStyles().getStyle(styleFamily, -// styleName); -// if (commonAuto != null) -// { -// // handle an automatic style .. -// final OfficeStyle derivedStyle = -// deriveAutomaticStyle(commonAuto, styleFamily, styleName, -// generator, commonCollection, predefCollection); -// stylesCollection.getAutomaticStyles().addStyle(derivedStyle); -// return derivedStyle; -// } - final OfficeStyle commonCommon = commonCollection.getCommonStyles().getStyle(styleFamily, styleName); if (commonCommon != null) diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java index e2434b7aeb6c..09dcb4cbb5dc 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java @@ -252,7 +252,6 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget collectBoundaryForElement(attrs); } else - // if (!isElementBoundaryCollectionPass()) { try { @@ -425,7 +424,6 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget if (TRANSPARENT.equals(raw)) { props.setAttribute(OfficeNamespaces.FO_NS, OfficeToken.BACKGROUND_COLOR, null); - // cellStyle.removeNode(props); } } } @@ -446,19 +444,6 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget columnCounter += initialColumnSpan - 1; } - // if (span < initialColumnSpan) - // { - // // ColumnBoundary cbs[] = getBoundariesForTable(tableCounter); - // // for (int i = 0; i < cbs.length; i++) - // // { - // // System.out.print(cbs[i].getBoundary() + " "); - // // } - // // System.out.println(); - - // LOGGER.error("A cell cannot span less than the declared columns: Declared=" + initialColumnSpan + " Computed=" - // + span); - // } - // there's no point to create number-columns-spanned attributes if we only span 1 column if (span > 1) { @@ -474,7 +459,6 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget final AttributeList attrList = buildAttributeList(attrs); xmlWriter.writeTag(namespace, elementType, attrList, XmlWriter.OPEN); - // System.out.println("elementType = " + elementType); } private void collectBoundaryForElement(final AttributeMap attrs) @@ -941,8 +925,6 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget { return 1; } - // System.out.println("table = " + table + " col = " + col + " rowBoundaries.length = " + tableBoundaries.length + " - // cellWidth = " + cellWidth + " span = " + span); return span; } diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/ImageReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/ImageReadHandler.java index 39f0d82326e6..2f3d9a1cc433 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/ImageReadHandler.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/ImageReadHandler.java @@ -58,7 +58,6 @@ public class ImageReadHandler extends ElementReadHandler { super.startParsing(attrs); final String formula = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "formula"); -// final String preserveIRI = attrs.getValue(OfficeNamespaces.OOREPORT_NS, OfficeToken.PRESERVE_IRI); if (formula != null && formula.length() != 0) { // now, the evaulated content ends up in the 'content' attribute of the diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/style/OfficeStyleReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/style/OfficeStyleReadHandler.java index ed6b9ddeaa23..d6689b179531 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/style/OfficeStyleReadHandler.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/style/OfficeStyleReadHandler.java @@ -61,9 +61,6 @@ public class OfficeStyleReadHandler extends ElementReadHandler final Attributes atts) throws SAXException { -// if (OfficeParserUtil.getInstance().isValidStyleElement(uri, tagName)) -// { -// } final StyleDefinitionReadHandler readHandler = new StyleDefinitionReadHandler(); children.add(readHandler); diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/NoCDATATextContentReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/NoCDATATextContentReadHandler.java index fd05be68a572..dc6464e7a961 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/NoCDATATextContentReadHandler.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/NoCDATATextContentReadHandler.java @@ -122,7 +122,6 @@ public class NoCDATATextContentReadHandler extends ElementReadHandler if ("sub-document".equals(tagName)) { final SubDocumentReadHandler subDocReadHandler = new SubDocumentReadHandler(section); - // children.add(subDocReadHandler); return subDocReadHandler; } } diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/styles/LengthCalculator.java b/reportbuilder/java/org/libreoffice/report/pentaho/styles/LengthCalculator.java index d8ade2708f94..da263ee56d6c 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/styles/LengthCalculator.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/styles/LengthCalculator.java @@ -72,7 +72,6 @@ public class LengthCalculator { pixel += value.getValue(); } - // LOGGER.debug ("Adding " + value + " [mm: " + millimeter + "] [pt: " + point + "] px: [" + pixel + "]"); } public CSSNumericValue getResult() diff --git a/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java index b7c1a657752f..4c7b5275f059 100644 --- a/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java +++ b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java @@ -38,11 +38,8 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.util.XCloseable; -// import complexlib.ComplexTestCase; -// import util.utils; import helper.OfficeProvider; import helper.URLHelper; -// import helper.OfficeWatcher; import convwatch.DB; @@ -132,18 +129,11 @@ public class ReportDesignerTest String mTestDocumentPath; -// public String[] getTestMethodNames() -// { -// return new String[] {"firsttest"}; -// } - @Before public void before() { System.out.println("before"); - // String tempdir = System.getProperty("java.io.tmpdir"); int dummy = 0; - // m_xXMultiServiceFactory = getMSF(); } @After public void after() @@ -151,33 +141,6 @@ public class ReportDesignerTest System.out.println("after"); } -// private void checkIfOfficeExists(String _sOfficePathWithTrash) -// { -// String sOfficePath = ""; -// int nIndex = _sOfficePathWithTrash.indexOf("soffice.exe"); -// if (nIndex > 0) -// { -// sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 11); -// } -// else -// { -// nIndex = _sOfficePathWithTrash.indexOf("soffice"); -// if (nIndex > 0) -// { -// sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 7); -// } -// } - -// System.out.println(sOfficePath); -// File sOffice = new File(sOfficePath); -// if (! sOffice.exists()) -// { -// System.out.println("ERROR: There exists no office installation at given path: '" + sOfficePath + "'"); -// System.exit(0); -// } -// } - - private XDesktop m_xDesktop = null; public XDesktop getXDesktop() { @@ -217,27 +180,6 @@ public class ReportDesignerTest private OfficeProvider m_aProvider = null; -// private void startOffice() -// { -// // int tempTime = param.getInt("SingleTimeOut"); -// param.put("TimeOut", new Integer(300000)); -// System.out.println("TimeOut: " + param.getInt("TimeOut")); -// System.out.println("ThreadTimeOut: " + param.getInt("ThreadTimeOut")); - -// // OfficeProvider aProvider = null; -// m_aProvider = new OfficeProvider(); -// m_xXMultiServiceFactory = (XMultiServiceFactory) m_aProvider.getManager(param); -// param.put("ServiceFactory", m_xXMultiServiceFactory); -// } - -// private void stopOffice() -// { -// if (m_aProvider != null) -// { -// m_aProvider.closeExistingOffice(param, true); -// m_aProvider = null; -// } -// } private String m_sMailAddress = null; private String m_sUPDMinor; @@ -251,8 +193,6 @@ public class ReportDesignerTest // -------------------- preconditions, try to find an office -------------------- -// String sAppExecutionCommand = (String) param.get("AppExecutionCommand"); - String sUser = System.getProperty("user.name"); System.out.println("user.name='" + sUser + "'"); @@ -264,34 +204,17 @@ public class ReportDesignerTest m_sUPDMinor = System.getProperty("UPDMINOR"); System.out.println("Current MWS: " + m_sUPDMinor); -// sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser); -// System.out.println("sAppExecutionCommand='" + sAppExecutionCommand + "'"); - -// checkIfOfficeExists(sAppExecutionCommand); -// param.put("AppExecutionCommand", new String(sAppExecutionCommand)); - // --------------------------- Start the given Office --------------------------- -// startOffice(); - // ------------------------------ Start a test run ------------------------------ -// String sCurrentDirectory = System.getProperty("user.dir"); -// System.out.println("Current Dir: " + sCurrentDirectory); - String sWriterDocument = TestDocument.getUrl("RPTWriterTests.odb"); startTestForFile(sWriterDocument, WRITER); String sCalcDocument = TestDocument.getUrl("RPTCalcTests.odb"); startTestForFile(sCalcDocument, CALC); -// catch (AssureException e) -// { -// stopOffice(); -// throw new AssureException(e.getMessage()); -// } // ------------------------------ Office shutdown ------------------------------ -// stopOffice(); } diff --git a/sc/qa/complex/calcPreview/ViewForwarder.java b/sc/qa/complex/calcPreview/ViewForwarder.java index 8ea5a9899cd9..1824dc5138f1 100644 --- a/sc/qa/complex/calcPreview/ViewForwarder.java +++ b/sc/qa/complex/calcPreview/ViewForwarder.java @@ -18,21 +18,16 @@ package complex.calcPreview; -// import complexlib.ComplexTestCase; - import com.sun.star.awt.XWindow; import com.sun.star.container.XIndexAccess; import com.sun.star.frame.XController; import com.sun.star.frame.XDispatch; import com.sun.star.frame.XDispatchProvider; import com.sun.star.frame.XModel; -// import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.sheet.XSpreadsheet; -// import com.sun.star.sheet.XSpreadsheetDocument; import com.sun.star.sheet.XSpreadsheets; import com.sun.star.table.XCell; -// import com.sun.star.uno.Any; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; @@ -50,7 +45,6 @@ import util.SOfficeFactory; import util.utils; import com.sun.star.beans.XPropertySet; -// import com.sun.star.beans.XPropertySetInfo; import com.sun.star.container.XNameAccess; import com.sun.star.lang.XComponent; import com.sun.star.sheet.XHeaderFooterContent; @@ -58,18 +52,7 @@ import com.sun.star.sheet.XSpreadsheetDocument; import com.sun.star.style.XStyle; import com.sun.star.style.XStyleFamiliesSupplier; import com.sun.star.text.XText; -// import com.sun.star.drawing.XDrawPageSupplier; -// import com.sun.star.drawing.XDrawPage; -// import com.sun.star.drawing.XShape; -// import com.sun.star.drawing.XShapes; - - -// import com.sun.star.beans.Property; -// import com.sun.star.lang.XServiceInfo; - - -// import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -86,28 +69,12 @@ public class ViewForwarder { /** The MultiServiceFactory **/ private XMultiServiceFactory mXMSF = null; - /** Get all test methods. - * @return The test methods. - */ -// public String[] getTestMethodNames() { -// return new String[]{"checkPositiveViewForwarder", -// "checkNegativeViewForwarder", -// "checkPreviewHeaderCells", -// "checkPreviewShape" -// }; -// } - /** * Get a MultiServiceFactory from the Office before the test. */ @Before public void before() { mXMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); - // SOfficeFactory SOF = SOfficeFactory.getFactory(mXMSF); - - // param = new TestParameters(); - // param.put("ServiceFactory", xMsf); - // mXMSF = (XMultiServiceFactory)param.getMSF(); } @@ -901,8 +868,6 @@ public class ViewForwarder { XWindow xWindow = AccessibilityTools.getCurrentWindow(mXMSF, xModel); XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow); -// System.out.println("ImplementationName " + utils.getImplName(oObj)); - System.out.println("Press any key when the header cell is on top."); try{ byte[]b = new byte[16]; @@ -917,9 +882,6 @@ public class ViewForwarder { try { System.out.println("Count: " +AccessibilityTools.getAccessibleObjectForRole (xRoot, AccessibleRole.TABLE, "").getAccessibleChildCount()); -// parent = at.getAccessibleObjectForRole -// (xRoot, AccessibleRole.TABLE, "").getAccessibleChild(0); -// oObj = parent.getAccessibleContext().getAccessibleChild(1); System.out.println("Getting child 2"); oObj = AccessibilityTools.getAccessibleObjectForRole (xRoot, AccessibleRole.TABLE, "").getAccessibleChild(2); @@ -935,16 +897,6 @@ public class ViewForwarder { System.out.println("*****************"); -/* XAccessibleContext accCtx = (XAccessibleContext) - UnoRuntime.queryInterface(XAccessibleContext.class, oObj); - try { - System.out.println("Children now: " + accCtx.getAccessibleChild(0).getAccessibleContext().getAccessibleChildCount()); - } catch (com.sun.star.lang.IndexOutOfBoundsException iabe) { - fail(iabe.getMessage()); - return; - } -*/ - XAccessibleValue accV = UnoRuntime.queryInterface(XAccessibleValue.class, oObj); Object o = accV.getCurrentValue(); @@ -982,7 +934,6 @@ public class ViewForwarder { try { String docName = "calcshapes.sxc"; System.out.println("Loading a spreadsheetdocument."); - // String url = utils.getFullURL((String)param.get("TestDocumentPath") + "/" + docName); String url = TestDocument.getUrl(docName); System.out.println("loading document '" + url + "'"); xComp = SOF.loadDocument(url); diff --git a/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java b/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java index 5039c2d7e4ba..77dad34a522f 100644 --- a/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java +++ b/sc/qa/complex/cellRanges/CheckXCellRangesQuery.java @@ -19,23 +19,17 @@ package complex.cellRanges; import com.sun.star.container.XIndexAccess; -// import complexlib.ComplexTestCase; import com.sun.star.lang.XMultiServiceFactory; -// import com.sun.star.sheet.CellFlags; import com.sun.star.sheet.XCellRangesQuery; import com.sun.star.sheet.XSheetCellRanges; import com.sun.star.sheet.XSpreadsheet; import com.sun.star.sheet.XSpreadsheetDocument; import com.sun.star.sheet.XSpreadsheets; import com.sun.star.table.CellAddress; -// import com.sun.star.table.XColumnRowRange; -// import com.sun.star.table.XTableColumns; -// import com.sun.star.table.XTableRows; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Type; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; -// import java.io.PrintWriter; import com.sun.star.util.XCloseable; import util.SOfficeFactory; @@ -60,20 +54,11 @@ public class CheckXCellRangesQuery /* extends ComplexTestCase */ { String sSheetName = ""; /** - * Get all test methods. - * @return The test methods. - */ -// public String[] getTestMethodNames() { -// return new String[] {"checkEmptyCell", "checkFilledCell"}; -// } - - /** * Creates Spreadsheet document and the test object, * before the actual test starts. */ @Before public void before() { // create a calc document - // SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)param.getMSF() ); final XMultiServiceFactory xMsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); SOfficeFactory SOF = SOfficeFactory.getFactory(xMsf); @@ -120,9 +105,6 @@ public class CheckXCellRangesQuery /* extends ComplexTestCase */ { m_xSpreadSheet.getCellByPosition(1, 1).setValue(15); m_xSpreadSheet.getCellByPosition(1, 3).setValue(5); m_xSpreadSheet.getCellByPosition(2, 1).setFormula("=B2+B4"); -/* m_xSpreadSheet.getCellByPosition(2, 1).setFormula("=B2+B3"); - m_xSpreadSheet.getCellByPosition(3, 2).setFormula(""); - m_xSpreadSheet.getCellByPosition(3, 3).setFormula(""); */ } catch (com.sun.star.lang.IndexOutOfBoundsException e) { e.printStackTrace(); fail("Could not fill cell (1, 1) with a value."); @@ -177,8 +159,6 @@ public class CheckXCellRangesQuery /* extends ComplexTestCase */ { assertTrue("\tQuery column differences did not return the correct value.", _queryColumnDifferences(sSheetName+".C4")); // compare an empty cell with a cell with a value assertTrue("\tQuery column differences did not return the correct value.", _queryRowDifferences(sSheetName+".C4")); - // try to get this cell -// assertTrue("\tQuery empty cells did not return the correct value.", _queryEmptyCells("Sheet1.C4")); System.out.println("...done"); } diff --git a/sc/qa/complex/dataPilot/CheckDataPilot.java b/sc/qa/complex/dataPilot/CheckDataPilot.java index 56e0a0e5a795..ee499c30c495 100644 --- a/sc/qa/complex/dataPilot/CheckDataPilot.java +++ b/sc/qa/complex/dataPilot/CheckDataPilot.java @@ -22,12 +22,10 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.container.XIndexAccess; import com.sun.star.container.XNamed; import com.sun.star.lang.XMultiServiceFactory; -// import com.sun.star.sheet.TableFilterField; import com.sun.star.sheet.XDataPilotDescriptor; import com.sun.star.sheet.XDataPilotTable; import com.sun.star.sheet.XDataPilotTables; import com.sun.star.sheet.XDataPilotTablesSupplier; -// import com.sun.star.sheet.XSheetFilterDescriptor; import com.sun.star.sheet.XSpreadsheet; import com.sun.star.sheet.XSpreadsheetDocument; import com.sun.star.sheet.XSpreadsheets; @@ -42,7 +40,6 @@ import complex.dataPilot._XPropertySet; import complex.dataPilot._XNamed; import complex.dataPilot._XDataPilotDescriptor; import complex.dataPilot._XDataPilotTable; -// import complexlib.ComplexTestCase; import lib.StatusException; import lib.TestParameters; import util.SOfficeFactory; @@ -163,9 +160,7 @@ public class CheckDataPilot { * create an environment for the test */ @Before public void before() { -// Object oInterface = null; - // SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)param.getMSF() ); final XMultiServiceFactory xMsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); SOfficeFactory SOF = SOfficeFactory.getFactory(xMsf); diff --git a/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java b/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java index f530b402b5e5..ddafe839c4a0 100644 --- a/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java +++ b/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java @@ -25,11 +25,7 @@ import com.sun.star.sheet.DataPilotFieldOrientation; import com.sun.star.sheet.XDataPilotDescriptor; import com.sun.star.table.CellRangeAddress; import com.sun.star.uno.UnoRuntime; -// import lib.MultiMethodTest; -// import lib.Status; -//import lib.StatusException; import lib.TestParameters; -// import share.LogWriter; /** * Testing <code>com.sun.star.sheet.XDataPilotDescriptor</code> @@ -70,11 +66,6 @@ public class _XDataPilotDescriptor { private TestParameters param = null; /** - * The log writer - */ -// private LogWriter log = null; - - /** * Constructor: gets the object to test, a logger and the test parameters * @param xObj The test object * @param param The test parameters @@ -82,7 +73,6 @@ public class _XDataPilotDescriptor { public _XDataPilotDescriptor(XDataPilotDescriptor xObj/*, LogWriter log*/, TestParameters param) { oObj = xObj; - // this.log = log; this.param = param; } @@ -163,7 +153,6 @@ public class _XDataPilotDescriptor { * @return */ public boolean _getTag(){ -// requiredMethod("setTag()"); boolean bResult = true; String objTag = oObj.getTag(); @@ -302,7 +291,6 @@ public class _XDataPilotDescriptor { * @return */ public boolean _getColumnFields(){ -// requiredMethod("getDataPilotFields()"); System.out.println("getColumnFields") ; XIndexAccess IA = oObj.getColumnFields(); return CheckNames(IA, 0); @@ -320,7 +308,6 @@ public class _XDataPilotDescriptor { * @return */ public boolean _getDataFields(){ -// requiredMethod("getDataPilotFields()"); System.out.println("getDataFields") ; XIndexAccess IA = oObj.getDataFields(); return CheckNames(IA, 2); @@ -338,7 +325,6 @@ public class _XDataPilotDescriptor { * @return */ public boolean _getHiddenFields(){ -// requiredMethod("getDataPilotFields()"); System.out.println("getHiddenFields") ; XIndexAccess IA = oObj.getHiddenFields(); return CheckNames(IA, 3); @@ -356,7 +342,6 @@ public class _XDataPilotDescriptor { * @return */ public boolean _getRowFields(){ -// requiredMethod("getDataPilotFields()"); System.out.println("getRowFields") ; XIndexAccess IA = oObj.getRowFields(); boolean bResult = CheckNames(IA, 1); @@ -374,7 +359,6 @@ public class _XDataPilotDescriptor { * @return */ public boolean _getPageFields(){ -// requiredMethod("getDataPilotFields()"); System.out.println("getPageFields") ; XIndexAccess IA = oObj.getPageFields(); boolean bResult = CheckNames(IA, 4); diff --git a/sc/qa/complex/dataPilot/_XDataPilotTable.java b/sc/qa/complex/dataPilot/_XDataPilotTable.java index c653bc736388..4e462d0bff99 100644 --- a/sc/qa/complex/dataPilot/_XDataPilotTable.java +++ b/sc/qa/complex/dataPilot/_XDataPilotTable.java @@ -22,10 +22,7 @@ import com.sun.star.sheet.XDataPilotTable; import com.sun.star.table.CellAddress; import com.sun.star.table.CellRangeAddress; import com.sun.star.table.XCell; -// import lib.Status; -//import lib.StatusException; import lib.TestParameters; -// import share.LogWriter; /** * Testing <code>com.sun.star.sheet.XDataPilotTable</code> @@ -60,11 +57,6 @@ public class _XDataPilotTable { private TestParameters param = null; /** - * The log writer - */ - // private LogWriter log = null; - - /** * Constructor: gets the object to test, a logger and the test parameters * @param xObj The test object @@ -73,7 +65,6 @@ public class _XDataPilotTable { public _XDataPilotTable(XDataPilotTable xObj/*, LogWriter log*/, TestParameters param) { oObj = xObj; - // this.log = log; this.param = param; } diff --git a/sc/qa/complex/dataPilot/_XNamed.java b/sc/qa/complex/dataPilot/_XNamed.java index 6ab9b9128aba..1fbfaca5ba8e 100644 --- a/sc/qa/complex/dataPilot/_XNamed.java +++ b/sc/qa/complex/dataPilot/_XNamed.java @@ -20,8 +20,6 @@ package complex.dataPilot; import com.sun.star.container.XNamed; import lib.TestParameters; -// import share.LogWriter; -// import util.utils; /** * Testing <code>com.sun.star.container.XNamed</code> @@ -48,11 +46,6 @@ public class _XNamed { public XNamed oObj = null; /** - * The log writer - */ - // private LogWriter log = null; - - /** * Constructor: gets the object to test, a logger and the test parameters * @param xObj The test object * @param log A log writer @@ -60,7 +53,6 @@ public class _XNamed { */ public _XNamed(XNamed xObj/*, LogWriter log*/, TestParameters param) { oObj = xObj; - // this.log = log; } /** @@ -110,7 +102,6 @@ public class _XNamed { * </ul> */ public boolean _setName(){ -// requiredMethod("getName()"); System.out.println("testing setName() ... "); String oldName = oObj.getName(); diff --git a/sc/qa/complex/dataPilot/_XPropertySet.java b/sc/qa/complex/dataPilot/_XPropertySet.java index e2f57896e277..d163dbef37fb 100644 --- a/sc/qa/complex/dataPilot/_XPropertySet.java +++ b/sc/qa/complex/dataPilot/_XPropertySet.java @@ -29,8 +29,6 @@ import com.sun.star.lang.EventObject; import java.util.Random; import java.util.StringTokenizer; import lib.TestParameters; -// import share.LogWriter; -//import lib.MultiMethodTest; import util.ValueChanger; import util.utils; @@ -61,11 +59,6 @@ public class _XPropertySet { private TestParameters param = null; /** - * The log writer - */ - // private LogWriter log = null; - - /** * Flag that indicates change listener was called. */ boolean propertyChanged = false; @@ -523,9 +516,6 @@ public class _XPropertySet { if (name.startsWith("LayerName")) isWritable = false; if (name.startsWith("Line")) isWritable = false; - //if (name.equals("xinterfaceA") || name.equals("xtypeproviderA") - //|| name.equals("arAnyA")) isWritable=false; - if ( isWritable && isNotNull ) canChange = isChangeable(name); if ( isWritable && isNotNull && isBound && canChange) { diff --git a/sc/qa/complex/sc/CalcRTL.java b/sc/qa/complex/sc/CalcRTL.java index ee5f3039b5cb..ea391bd2e991 100644 --- a/sc/qa/complex/sc/CalcRTL.java +++ b/sc/qa/complex/sc/CalcRTL.java @@ -35,24 +35,17 @@ import com.sun.star.sheet.XCellRangeAddressable; import com.sun.star.sheet.XSpreadsheet; import com.sun.star.sheet.XSpreadsheetDocument; import com.sun.star.sheet.XSpreadsheets; -// import com.sun.star.table.XCell; import com.sun.star.uno.Any; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Type; import com.sun.star.uno.UnoRuntime; import com.sun.star.util.XCloseable; -// import complexlib.ComplexTestCase; - -// import java.io.PrintWriter; - import util.DrawTools; import util.SOfficeFactory; import util.ValueComparer; -// import org.junit.After; import org.junit.AfterClass; -// import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.openoffice.test.OfficeConnection; @@ -74,12 +67,6 @@ public class CalcRTL /* extends ComplexTestCase */ * <br> * 3. A calc document is opened and a shape inserted, afterwards the effect of changing the TableLayout to the shape is checked */ -// public String[] getTestMethodNames() { -// return new String[] { -// "checkSpreadsheetProperties", "checkShapeProperties", -// "checkInfluenceOfSpreadsheetChange" -// }; -// } /* * In this method a spreadsheet document is opened<br> diff --git a/scripting/examples/java/MemoryUsage/MemoryUsage.java b/scripting/examples/java/MemoryUsage/MemoryUsage.java index a19f2cc5eb22..4776f2323cc0 100644 --- a/scripting/examples/java/MemoryUsage/MemoryUsage.java +++ b/scripting/examples/java/MemoryUsage/MemoryUsage.java @@ -41,7 +41,6 @@ import com.sun.star.script.provider.XScriptContext; public class MemoryUsage { - // public void updateMemoryUsage(XScriptContext ctxt, ActionEvent evt) public void updateMemoryUsage(XScriptContext ctxt) throws Exception { diff --git a/scripting/examples/java/Newsgroup/MimeConfiguration.java b/scripting/examples/java/Newsgroup/MimeConfiguration.java index d2cce9396c52..03e6c1b03116 100644 --- a/scripting/examples/java/Newsgroup/MimeConfiguration.java +++ b/scripting/examples/java/Newsgroup/MimeConfiguration.java @@ -78,7 +78,6 @@ public class MimeConfiguration { if( ! new File( java.net.URLDecoder.decode( mailcapPath ) ).exists() ) { - //System.out.println( "URLDecoder: " + java.net.URLDecoder.decode( mailcapPath ) ); File mailcapFile = new File( mailcapPath ); FileWriter out = new FileWriter( mailcapFile ); String[] lines = getMailcapText(); @@ -90,7 +89,6 @@ public class MimeConfiguration } else { - //System.out.println( "URLDecoder: " + java.net.URLDecoder.decode( mailcapPath ) ); } @@ -140,7 +138,6 @@ public class MimeConfiguration { if( ! new File( java.net.URLDecoder.decode( mimetypesPath ) ).exists() ) { - //System.out.println( "URLDecoder: " + java.net.URLDecoder.decode( mimetypesPath ) ); File mimetypesFile = new File( mimetypesPath ); FileWriter out = new FileWriter( mimetypesFile ); String[] lines = getMimeTypesText(); @@ -152,7 +149,6 @@ public class MimeConfiguration } else { - //System.out.println( "URLDecoder: " + java.net.URLDecoder.decode( mimetypesPath ) ); } MimetypesFileTypeMap mimeTypes = new MimetypesFileTypeMap( mimetypesPath ); diff --git a/scripting/examples/java/Newsgroup/OfficeAttachment.java b/scripting/examples/java/Newsgroup/OfficeAttachment.java index 327c3bdf1e89..c6b6fc9befab 100644 --- a/scripting/examples/java/Newsgroup/OfficeAttachment.java +++ b/scripting/examples/java/Newsgroup/OfficeAttachment.java @@ -98,50 +98,38 @@ public class OfficeAttachment public boolean createTempDocs() { String filenameURL = "file:///" + templocationURL + "/" + attachmentName; - //String filenameSystem = templocationSystem + System.getProperty( "file.separator" ) + attachmentName; - //JOptionPane.showMessageDialog( null, "Filename URL " + filenameURL ); try { if( isHtmlDoc ) { - //JOptionPane.showMessageDialog( null, "Saving doc in HTML format" ); statusLine = "Saving doc in HTML format"; status.setStatus( 4, statusLine ); - //System.out.print( "Saving attachment as " + filename + ".html..." ); PropertyValue[] propertyvalue_html = new PropertyValue[2]; propertyvalue_html[0] = new PropertyValue(); propertyvalue_html[0].Name = new String("Overwrite"); propertyvalue_html[0].Value = new Boolean(true); propertyvalue_html[1] = new PropertyValue(); propertyvalue_html[1].Name = ("FilterName"); -// propertyvalue_html[1].Value = new String("scalc: HTML (StarCalc)"); propertyvalue_html[1].Value = new String("swriter: HTML (StarWriter)"); storedDoc.storeAsURL( filenameURL + ".html", propertyvalue_html); File homedir = new File( templocationSystem ); - //JOptionPane.showMessageDialog( null, "homedir (Java File): " + homedir.getPath() ); File homefiles[] = homedir.listFiles(); String file = ""; for(int i=0; i < homefiles.length; i++ ) { if( homefiles[i].getName().equals( attachmentName + ".html" ) ) { - //htmlFile = new File( homefiles[i].getAbsolutePath() ); - //JOptionPane.showMessageDialog( null, "Found HTML" ); file = homefiles[i].getAbsolutePath(); } } htmlFile = new File( file ); - //htmlFile = new File( filename + ".html" ); - //htmlFile = new File( storedDoc.getLocation() ); } if( isOfficeDoc ) { - //JOptionPane.showMessageDialog( null, "Saving doc in .sxw format" ); statusLine = "Saving doc in .sxw format"; status.setStatus( 4, statusLine ); - //System.out.print( "Saving attachment as " + filename + ".sxw..." ); PropertyValue[] propertyvalue_sxw = new PropertyValue[2]; propertyvalue_sxw[0] = new PropertyValue(); propertyvalue_sxw[0].Name = new String("Overwrite"); @@ -153,8 +141,6 @@ public class OfficeAttachment File homedir = new File( templocationSystem ); - //JOptionPane.showMessageDialog( null, "homedir (Java File): " + homedir.getPath() ); - File homefiles[] = homedir.listFiles(); String file = ""; for(int i=0; i < homefiles.length; i++ ) @@ -212,24 +198,17 @@ public class OfficeAttachment { if( isOfficeDoc && isHtmlDoc ) { - //System.out.println( "Removing: " + htmlFile.getPath() + " " + officeFile.getPath() ); - //System.out.println( "htmlfile " + htmlFile.exists() + " officeFile " + officeFile.exists() ); - //JOptionPane.showMessageDialog( null, "Removing: " + htmlFile.getPath() + " " + officeFile.getPath() ); - //JOptionPane.showMessageDialog( null, "htmlfile " + htmlFile.exists() + " officeFile " + officeFile.exists() ); htmlFile.delete(); officeFile.delete(); - //JOptionPane.showMessageDialog( null, "htmlfile " + htmlFile.exists() + " officeFile " + officeFile.exists() ); } else { if( isOfficeDoc ) { - //System.out.println( "Removing: " + officeFile.getPath() ); officeFile.delete(); } else { - //System.out.println( "Removing: " + htmlFile.getPath() ); htmlFile.delete(); } } diff --git a/scripting/examples/java/Newsgroup/PostNewsgroup.java b/scripting/examples/java/Newsgroup/PostNewsgroup.java index 697b52a66a62..5f069b44dd19 100644 --- a/scripting/examples/java/Newsgroup/PostNewsgroup.java +++ b/scripting/examples/java/Newsgroup/PostNewsgroup.java @@ -321,7 +321,6 @@ public class PostNewsgroup extends JFrame if( subscribedNewsgroups == null ) { - //System.out.println( "Couldn't find any subscibed newsgroups in .mozilla" ); JOptionPane.showMessageDialog( window, "No subscribed newsgroups found in mozilla/netscape profile \nPlease enter newsgroup and host name", "Newsgroups Information", JOptionPane.INFORMATION_MESSAGE ); } @@ -467,7 +466,6 @@ public class PostNewsgroup extends JFrame Sender sender = new Sender( statusWindow, officeAttach, replyto, subject, comment, host, group ); if( !sender.sendMail() ) { - //System.out.println( "Should end here (?)" ); statusWindow.enableCancelButton( true ); officeAttach.cleanUpOnError(); return false; @@ -478,7 +476,6 @@ public class PostNewsgroup extends JFrame } else { - //System.out.println( "Non valid data" ); return false; } return true; @@ -593,7 +590,6 @@ public class PostNewsgroup extends JFrame } if( newsgroupString.length() == 0 ) { - //System.out.println( "Please enter a newsgroup name" ); newsgroupComboBox.requestFocus(); JOptionPane.showMessageDialog( window, "Please enter a newsgroup name", "Input Error", JOptionPane.ERROR_MESSAGE ); return false; @@ -604,7 +600,6 @@ public class PostNewsgroup extends JFrame String hostString = hostTextField.getText(); if( hostString.length() == 0 ) { - //System.out.println( "Please enter a hostname" ); hostTextField.requestFocus(); JOptionPane.showMessageDialog( window, "Please enter a hostname", "Input Error", JOptionPane.ERROR_MESSAGE ); return false; @@ -618,10 +613,8 @@ public class PostNewsgroup extends JFrame int atPos = replyString.indexOf( "@" ); int dotPos = replyString.lastIndexOf( "." ); int length = replyString.length(); - //System.out.println( "length: " + length + "\n atPos: " + atPos + "\n dotPos: " + dotPos ); if( length == 0 || atPos == -1 || dotPos == -1 || atPos < 2 || dotPos < atPos || dotPos + 2 == length || atPos + 2 == dotPos || atPos != replyString.lastIndexOf( "@" ) || replyString.indexOf(" ") != -1 ) { - //System.out.println( "Please enter a valid reply to email address" ); replyTextField.requestFocus(); JOptionPane.showMessageDialog( window, "Please enter a valid reply to email address", "Input Error", JOptionPane.ERROR_MESSAGE ); return false; @@ -632,7 +625,6 @@ public class PostNewsgroup extends JFrame String subjectString = subjectTextField.getText(); if( subjectString.length() == 0 ) { - //System.out.println( "Please enter subject title" ); subjectTextField.requestFocus(); JOptionPane.showMessageDialog( window, "Please enter subject title", "Input Error", JOptionPane.ERROR_MESSAGE ); return false; diff --git a/scripting/examples/java/Newsgroup/Sender.java b/scripting/examples/java/Newsgroup/Sender.java index 0efe27ca9931..efa3ed4c6753 100644 --- a/scripting/examples/java/Newsgroup/Sender.java +++ b/scripting/examples/java/Newsgroup/Sender.java @@ -91,7 +91,6 @@ public class Sender File attachs[] = attachments.getAttachments(); for(int i=0; i < attachs.length; i++ ) { - //System.out.println( "Adding file: " + attachs[i].getName() ); messageBodyPart = new MimeBodyPart(); DataSource filesource = new FileDataSource( attachs[i] ); messageBodyPart.setDataHandler( new DataHandler( filesource )); diff --git a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java index cba9d62f59dc..e73ea3310eca 100644 --- a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java +++ b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java @@ -63,35 +63,28 @@ public class SubscribedNewsgroups { if( windows ) { mozillaHome = System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "Application Data" + System.getProperty( "file.separator" ) + "Mozilla" + System.getProperty( "file.separator" ) + "Profiles"; - //System.out.println( "Windows mozilla path: " + mozillaHome ); } else { mozillaHome = System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + ".mozilla"; - //System.out.println( "Unix/Linux mozilla path: " + mozillaHome ); } if( !new File( mozillaHome ).isDirectory() ) { - //System.out.println("Could not find .mozilla directory"); return null; } - //System.out.println(".mozilla directory found"); // Get all the profiles belonging to the user File profiles[] = findProfiles( new File ( mozillaHome ) ); if( profiles.length < 1 ) { - //System.out.println("Could not find Profiles"); return null; } - //System.out.println("Profiles found"); // Get the News directory for each profile File allNewsDirs[] = new File[ profiles.length ]; for( int i=0; i < profiles.length; i++ ) { File newsDir = findNewsDir( profiles[i] ); allNewsDirs[i] = newsDir; - //System.out.println( "News is at: " + newsDir.getPath() ); } // Check that at least one News directory exists and remove nulls boolean newsFound = false; @@ -104,19 +97,15 @@ public class SubscribedNewsgroups { } if( !newsFound ) { - //System.out.println("Could not find News directory"); return null; } - //System.out.println("News directory found"); // Get all the mailrc files for each News directory File allMailrcs[] = findMailrcFiles( allNewsDirs ); if( allMailrcs == null ) { - //System.out.println("Could not find mailrc files"); return null; } - //System.out.println("mailrc files found"); ArrayList<NewsGroup> subscribed = new ArrayList<NewsGroup>(); // Get the newsgroups in each mailrc file @@ -141,10 +130,8 @@ public class SubscribedNewsgroups { // Test that at least one subscribed newsgroup has been found if( allSubscribed.length < 1 ) { - //System.out.println("Could not find Subscribed newsgroups "); return null; } - //System.out.println("Subscribed newsgroups found"); return allSubscribed; } @@ -236,16 +223,13 @@ public class SubscribedNewsgroups { for( int i=0; i < newsDirs.length; i++ ) { - //System.out.println( "Finding mailrc for: " + newsDirs[i] ); if( newsDirs[i] != null ) { File mailrcFiles[] = newsDirs[i].listFiles( new VersionFilter() ); if( mailrcFiles != null ) { - //System.out.println( "Number found: " + mailrcFiles.length ); for( int j=0; j < mailrcFiles.length; j++ ) { - //System.out.println( "This mailrc was found: " + mailrcFiles[j] ); allFiles.addElement( mailrcFiles[j] ); } } @@ -254,14 +238,10 @@ public class SubscribedNewsgroups { File allMailrcFiles[] = new File[ allFiles.size() ]; allFiles.copyInto(allMailrcFiles); - //System.out.println( "number of mailrcs in total: " + allMailrcFiles.length ); - if( allMailrcFiles.length == 0 ) { - //System.out.println( "Returning null"); return null; } - //System.out.println( "Returning an File array containing mailrcs"); return allMailrcFiles; } diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java index 7552d2d2e9d5..9d0283234b24 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java @@ -54,7 +54,6 @@ public class ParcelBrowseNode extends PropertySet implements XBrowseNode, XInvocation { private ScriptProvider provider; - //private RootBrowseNode parent; private Collection<XBrowseNode> browsenodes; private ParcelContainer container; private Parcel parcel; @@ -255,8 +254,6 @@ public class ParcelBrowseNode extends PropertySet LogUtils.DEBUG( LogUtils.getTrace( e ) ); result = new Any(new Type(Boolean.class), Boolean.FALSE); - // throw new com.sun.star.reflection.InvocationTargetException( - // "Error creating script: " + e.getMessage()); } } else if (aFunctionName.equals("Deletable")) @@ -275,9 +272,6 @@ public class ParcelBrowseNode extends PropertySet catch (Exception e) { result = new Any(new Type(Boolean.class), Boolean.FALSE); - - // throw new com.sun.star.reflection.InvocationTargetException( - // "Error deleting parcel: " + e.getMessage()); } } else if (aFunctionName.equals("Renamable")) @@ -327,9 +321,6 @@ public class ParcelBrowseNode extends PropertySet catch (Exception e) { result = new Any(new Type(Boolean.class), Boolean.FALSE); - - // throw new com.sun.star.reflection.InvocationTargetException( - // "Error renaming parcel: " + e.getMessage()); } } diff --git a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java index 63a2d8d0ddc4..7c53fae52bbb 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java @@ -245,9 +245,6 @@ public class ProviderBrowseNode extends PropertySet LogUtils.DEBUG("ProviderBrowseNode[create] failed with: " + e ); LogUtils.DEBUG( LogUtils.getTrace( e ) ); result = new Any(new Type(Boolean.class), Boolean.FALSE); - - // throw new com.sun.star.reflection.InvocationTargetException( - // "Error creating script: " + e.getMessage()); } } else { diff --git a/scripting/java/com/sun/star/script/framework/container/DeployedUnoPackagesDB.java b/scripting/java/com/sun/star/script/framework/container/DeployedUnoPackagesDB.java index 8cafb62a0f51..df018f488f99 100644 --- a/scripting/java/com/sun/star/script/framework/container/DeployedUnoPackagesDB.java +++ b/scripting/java/com/sun/star/script/framework/container/DeployedUnoPackagesDB.java @@ -18,7 +18,6 @@ package com.sun.star.script.framework.container; -import java.io.File; import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; @@ -26,10 +25,6 @@ import java.io.ByteArrayInputStream; import java.util.ArrayList; -// import javax.xml.parsers.DocumentBuilderFactory; -// import javax.xml.parsers.DocumentBuilder; -// import javax.xml.parsers.ParserConfigurationException; - import org.w3c.dom.*; public class DeployedUnoPackagesDB { diff --git a/scripting/java/com/sun/star/script/framework/container/Parcel.java b/scripting/java/com/sun/star/script/framework/container/Parcel.java index 026d1df834e5..6e3ba9fb4ce2 100644 --- a/scripting/java/com/sun/star/script/framework/container/Parcel.java +++ b/scripting/java/com/sun/star/script/framework/container/Parcel.java @@ -251,7 +251,6 @@ public class Parcel implements XNameContainer ScriptMetaData script = null; if ( ( script = (ScriptMetaData)getByName( Name ) ) != null ) { -// if ( script.hasSource() ) { if ( !script.removeSourceFile() ) { diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java index 4a28f30bbc3f..87ed54b0242e 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java +++ b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java @@ -35,9 +35,6 @@ import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; -// import javax.xml.parsers.DocumentBuilderFactory; -// import javax.xml.parsers.DocumentBuilder; -// import javax.xml.parsers.ParserConfigurationException; public class ParcelDescriptor { diff --git a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java index e592b028a921..3b1cd1db7aa1 100644 --- a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java +++ b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java @@ -211,7 +211,6 @@ public class UnoPkgContainer extends ParcelContainer DeployedUnoPackagesDB dp = null; try { -// String path = containerUrl.substring( 0, containerUrl.lastIndexOf("/") ); String packagesUrl = PathUtils.make_url( extensionDb, "/Scripts/" + extensionRepository + "-extension-desc.xml" ); LogUtils.DEBUG("getUnoPackagesDB() looking for existing db in " + packagesUrl ); if ( m_xSFA.exists( packagesUrl ) ) @@ -270,7 +269,6 @@ public class UnoPkgContainer extends ParcelContainer OutputStream os = null; try { -// String path = containerUrl.substring( 0, containerUrl.lastIndexOf("/") ); String packagesUrl = PathUtils.make_url( extensionDb, "/Scripts/" + extensionRepository + "-extension-desc.xml" ); xos = m_xSFA.openFileWrite( packagesUrl ); XTruncate xTrc = UnoRuntime.queryInterface( XTruncate.class, xos ); diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java index f033ffdf1dd5..d19a772d2d7f 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java @@ -323,7 +323,6 @@ class ScriptImpl implements XScript raiseEditor( lineNum ); - //String stackTrace = te.getScriptStackTrace(); // never seems to have any info?? if ( usefulInfoIndex > -1 ) { message = message.substring( usefulInfoIndex + 2 ); diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java index ebf3d6e7fbac..aaf6abb5d2ae 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java @@ -79,8 +79,6 @@ public class ScriptSourceModel { throws Exception { Object result = null; - // Thread execThread = new Thread() { - // public void run() { if ( cl != null ) { // sets this threads class loader @@ -118,9 +116,6 @@ public class ScriptSourceModel { else { result = interpreter.eval(getText()); } - // } - // }; - // execThread.start(); return result; } public void indicateErrorLine( int lineNum ) diff --git a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java b/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java index 73f82226b228..1d0fec35ce82 100644 --- a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java +++ b/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java @@ -38,8 +38,6 @@ public class MethodPanel extends JPanel { private File basedir; private ArrayList<String> classpath; - // private JTable table; - // private MethodTableModel model; private JList list; private ScriptEntry[] values; @@ -72,7 +70,6 @@ public class MethodPanel extends JPanel { private void initUI() { JLabel label = new JLabel("Available Methods:"); - // table = new JTable(model); list = new JList(values); JScrollPane pane = new JScrollPane(list); diff --git a/scripting/java/org/openoffice/idesupport/xml/Manifest.java b/scripting/java/org/openoffice/idesupport/xml/Manifest.java index 720aa482b139..a349ff51d60f 100644 --- a/scripting/java/org/openoffice/idesupport/xml/Manifest.java +++ b/scripting/java/org/openoffice/idesupport/xml/Manifest.java @@ -60,7 +60,6 @@ public class Manifest { el = document.createElement("manifest:file-entry"); el.setAttribute("manifest:media-type", type); el.setAttribute("manifest:full-path", entry); - // System.out.println("added: " + el.toString()); root.appendChild(el); } catch (Exception e) { @@ -91,7 +90,6 @@ public class Manifest { for (int i = 0; i < len; i++) { el = (Element)nl.item(i); if (el.getAttribute("manifest:full-path").startsWith(entry)) { - // System.out.println("found: " + el.toString()); list.add(el); } } @@ -99,8 +97,6 @@ public class Manifest { Iterator iter = list.iterator(); while (iter.hasNext()) root.removeChild((Element)iter.next()); - - // System.out.println("and after root is: " + root.toString()); } catch (Exception e) { System.err.println("Error removing entry: " + e.getMessage()); @@ -115,7 +111,6 @@ public class Manifest { out = new ByteArrayOutputStream(); write(out); result = new ByteArrayInputStream(out.toByteArray()); - // result = replaceNewlines(out.toByteArray()); } finally { if (out != null) diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/DeployParcelAction.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/DeployParcelAction.java index 2cb4099d4c65..e7da54240c71 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/DeployParcelAction.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/actions/DeployParcelAction.java @@ -143,7 +143,6 @@ public class DeployParcelAction extends CookieAction implements Presenter.Popup if (result == true && target.isDirectory()) { showNagDialog(); - // refreshOffice((String)versions.get(label)); } } }); diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorEditorSupport.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorEditorSupport.java index 634a5ed65591..00402b93409d 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorEditorSupport.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelDescriptorEditorSupport.java @@ -90,8 +90,6 @@ public class ParcelDescriptorEditorSupport extends DataEditorSupport implements */ private static class ParcelDescriptorEnv extends DataEditorSupport.Env { - //private static final long serialVersionUID = ...L; - /** Create a new environment based on the data object. * @param obj the data object to edit */ diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java index 663f2119ae6a..968173dcefc1 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/OfficeDocumentDataLoader.java @@ -69,7 +69,6 @@ public class OfficeDocumentDataLoader extends UniFileLoader { jarFs.setJarFile(document); } catch (IOException e) { - // TopManager.getDefault().notify(new NotifyDescriptor.Exception(e, "asdf")); return null; } catch (Exception e) { @@ -81,7 +80,6 @@ public class OfficeDocumentDataLoader extends UniFileLoader { protected SystemAction[] defaultActions() { return new SystemAction[] { SystemAction.get(OpenAction.class), - // SystemAction.get(MountDocumentAction.class), null, SystemAction.get(CutAction.class), SystemAction.get(CopyAction.class), @@ -90,7 +88,6 @@ public class OfficeDocumentDataLoader extends UniFileLoader { SystemAction.get(DeleteAction.class), SystemAction.get(RenameAction.class), null, - // SystemAction.get(ToolsAction.class), SystemAction.get(PropertiesAction.class), }; } diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoader.java index b41063ff5092..14e968668f71 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoader.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDataLoader.java @@ -57,17 +57,14 @@ public class ParcelDataLoader extends UniFileLoader { protected SystemAction[] defaultActions() { return new SystemAction[] { - // SystemAction.get(MountParcelAction.class), SystemAction.get(DeployParcelAction.class), null, SystemAction.get(CutAction.class), SystemAction.get(CopyAction.class), - // SystemAction.get(PasteAction.class), null, SystemAction.get(DeleteAction.class), SystemAction.get(RenameAction.class), null, - // SystemAction.get(ToolsAction.class), SystemAction.get(PropertiesAction.class), }; } diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoader.java index 810a3f9ed48e..8f6083ae00d8 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoader.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelDescriptorDataLoader.java @@ -48,17 +48,12 @@ public class ParcelDescriptorDataLoader extends UniFileLoader { protected void initialize() { super.initialize(); - // ExtensionList extensions = new ExtensionList(); - // extensions.addMimeType("text/x-parcel+xml"); - // extensions.addExtension("pml"); getExtensions().addMimeType("text/x-parcel+xml"); - // setExtensions(extensions); } protected SystemAction[] defaultActions() { return new SystemAction[] { SystemAction.get(OpenAction.class), - // SystemAction.get(GenerateParcelAction.class), null, SystemAction.get(CutAction.class), SystemAction.get(CopyAction.class), @@ -67,9 +62,6 @@ public class ParcelDescriptorDataLoader extends UniFileLoader { SystemAction.get(DeleteAction.class), SystemAction.get(RenameAction.class), null, - // SystemAction.get(SaveAsTemplateAction.class), - // null, - // SystemAction.get(ToolsAction.class), SystemAction.get(PropertiesAction.class), }; } diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolder.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolder.java index dbcb806adf34..cb03c0c8f35d 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolder.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolder.java @@ -126,18 +126,12 @@ public class ParcelFolder extends DataFolder { sheet.put(props); } - // prop = createLocationProperty(); - // props.put(prop); - prop = createFilterProperty(); props.put(prop); prop = createFilterProperty(); props.put(prop); - // prop = createLanguageProperty(); - // props.put(prop); - prop = createClasspathProperty(); props.put(prop); diff --git a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java index 3f0684655ac4..3b435fe5b17d 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/loader/ParcelFolderDataLoader.java @@ -68,25 +68,16 @@ public class ParcelFolderDataLoader extends UniFileLoader { protected SystemAction[] defaultActions() { return new SystemAction[] { - // SystemAction.get(OpenLocalExplorerAction.class), - // SystemAction.get(FindAction.class), - // null, - // SystemAction.get(FileSystemAction.class), - // null, SystemAction.get(CompileParcelAction.class), SystemAction.get(BuildParcelAction.class), SystemAction.get(ConfigureParcelAction.class), null, SystemAction.get(CutAction.class), SystemAction.get(CopyAction.class), - // SystemAction.get(PasteAction.class), null, SystemAction.get(DeleteAction.class), SystemAction.get(RenameAction.class), null, - // SystemAction.get(SaveAsTemplateAction.class), - // null, - // SystemAction.get(ToolsAction.class), SystemAction.get(PropertiesAction.class), }; } diff --git a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettings.java b/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettings.java index 1279ffe9e45a..1b0283e96678 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettings.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/options/OfficeSettings.java @@ -34,8 +34,6 @@ import org.openoffice.idesupport.OfficeInstallation; */ public class OfficeSettings extends SystemOption { - // private static final long serialVersionUID = ...; - public static final String OFFICE_DIRECTORY = "OfficeDirectory"; public static final String WARN_BEFORE_DOC_DEPLOY = "WarnBeforeDocDeploy"; public static final String WARN_BEFORE_PARCEL_DELETE = "WarnBeforeParcelDelete"; diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java index c5bb4acc2d88..de74e8b181d3 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/utils/FrameworkJarChecker.java @@ -63,7 +63,6 @@ public class FrameworkJarChecker { } if(result == null) { - // warnBeforeMount(); JarFileSystem newjfs = new JarFileSystem(); try { newjfs.setJarFile(unoilFile); diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java index 844bcf24cf88..bf22ecfc35d2 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/wizard/JavaScriptIterator.java @@ -54,8 +54,6 @@ import org.openoffice.netbeans.modules.office.utils.PackageRemover; public class JavaScriptIterator implements TemplateWizard.Iterator { - // private static final long serialVersionUID = ...L; - // You should define what panels you want to use here: protected WizardDescriptor.Panel[] createPanels() { diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java index 03a8a0bfe4cf..7fbcd34bfe97 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java @@ -55,8 +55,6 @@ import org.openoffice.netbeans.modules.office.filesystem.OpenOfficeDocFileSystem public class ParcelContentsIterator implements TemplateWizard.Iterator { - // private static final long serialVersionUID = ...L; - // You should define what panels you want to use here: public static final String PROP_LANGUAGE = diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java index 65bb1b3ebb03..66fb0a29821a 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/wizard/SelectPathPanel.java @@ -85,9 +85,6 @@ public class SelectPathPanel implements WizardDescriptor.Panel /* .FinishPanel * // and uncomment the complicated stuff below. } - // public final void addChangeListener(ChangeListener l) {} - // public final void removeChangeListener(ChangeListener l) {} - private final Set listeners = new HashSet(1); // Set<ChangeListener> public final void addChangeListener(ChangeListener l) { synchronized (listeners) { diff --git a/scripting/workben/ifc/scripting/SecurityDialogUtil.java b/scripting/workben/ifc/scripting/SecurityDialogUtil.java index 7999bcef7e06..d0858dfc4c72 100644 --- a/scripting/workben/ifc/scripting/SecurityDialogUtil.java +++ b/scripting/workben/ifc/scripting/SecurityDialogUtil.java @@ -111,20 +111,15 @@ public void run() XInterface oObj = null; try { - /* System.err.println("Name of the AccessibleContext:\n\t"+ - xCon.getAccessibleName()); */ int count = xCon.getAccessibleChildCount(); - // System.err.println("Number of children: "+count); for (int i=0; i<count; i++) { XAccessible xAcc = xCon.getAccessibleChild(i); String name = xAcc.getAccessibleContext().getAccessibleName(); - // System.out.println("Child "+i+": "+ name); // check for button if ( name.equals( btnName ) && ( UnoRuntime.queryInterface( XButton.class, xAcc ) != null ) ) { - // System.out.println("Child "+i+": "+ name); oObj = xAcc.getAccessibleContext(); } // check for checkbox diff --git a/scripting/workben/ifc/scripting/_XScriptInfoAccess.java b/scripting/workben/ifc/scripting/_XScriptInfoAccess.java index 87d7dbbf38ae..9cc0a3429fe2 100644 --- a/scripting/workben/ifc/scripting/_XScriptInfoAccess.java +++ b/scripting/workben/ifc/scripting/_XScriptInfoAccess.java @@ -68,7 +68,6 @@ public class _XScriptInfoAccess extends MultiMethodTest { log.println(testdata.get("description")); - // try { log.println("In _XScriptInfoAccess.getScriptLogicalNames()"); String[] logicalNames = oObj.getScriptLogicalNames(); @@ -84,11 +83,6 @@ public class _XScriptInfoAccess extends MultiMethodTest { } } } - // } - // catch (com.sun.star.uno.Exception e) { - // log.println("Caught UNO Exception :" + e); - // output = "com.sun.star.uno.Exception"; - // } log.println("expected: " + expected + ", output: " + output); if (output.equals(expected)) diff --git a/scripting/workben/installer/FileUpdater.java b/scripting/workben/installer/FileUpdater.java index 17d1ad9ba88d..11f24e719f07 100644 --- a/scripting/workben/installer/FileUpdater.java +++ b/scripting/workben/installer/FileUpdater.java @@ -98,7 +98,6 @@ public class FileUpdater { FileWriter out = null; int count = 0; - //System.out.println("updateScriptXLC"); try { in_file = new File( installPath+File.separator+"user"+File.separator+"basic"+File.separator+"script.xlc" ); @@ -128,7 +127,6 @@ public class FileUpdater { out = new FileWriter( out_file ); //split the string into a string array with one line of xml in each element - //String[] xmlArray = xmlLine.split("\n"); for(int i=0; i<count + 1; i++) { out.write(xmlArray[i]+"\n"); if( ( xmlArray[i].indexOf( "<library:libraries xmlns:library" ) != -1 ) && ( xmlArray[i+1].indexOf( "ScriptBindingLibrary" ) == -1 ) ) { @@ -169,7 +167,6 @@ public class FileUpdater { FileWriter out = null; int count = 0; - //System.out.println( "updateDialogXLC" ); try { in_file = new File( installPath+File.separator+"user"+File.separator+"basic"+File.separator+"dialog.xlc" ); @@ -199,7 +196,6 @@ public class FileUpdater { out = new FileWriter( out_file ); //split the string into a string array with one line of xml in each element - // String[] xmlArray = xmlLine.split("\n"); for(int i=0; i<count + 1; i++) { out.write(xmlArray[i]+"\n"); if( ( xmlArray[i].indexOf( "<library:libraries xmlns:library" ) != -1 ) && ( xmlArray[i+1].indexOf( "ScriptBindingLibrary" ) == -1 ) ) { diff --git a/scripting/workben/installer/Final.java b/scripting/workben/installer/Final.java index 51646315d2b1..01c0cec23976 100644 --- a/scripting/workben/installer/Final.java +++ b/scripting/workben/installer/Final.java @@ -77,14 +77,12 @@ public class Final extends javax.swing.JPanel implements ActionListener, Install nav.enableBack(false); nav.enableCancel(false); ArrayList<?> locations = InstallWizard.getLocations(); - //System.out.println("here "+locations.size()); // Returned 1 String progpath=null; String path=null; String classespath=null; for (int i =0;i<locations.size();i++){ path= (String)locations.get(i); - //InstallWizard.currentPath = path; xud = new XmlUpdater(path, statusLine,progressBar,InstallWizard.bNetworkInstall,InstallWizard.bBindingsInstall); xud.addInstallListener(this); InstallWizard.setInstallStarted(true); @@ -111,9 +109,7 @@ public class Final extends javax.swing.JPanel implements ActionListener, Install public void installationComplete(InstallationEvent ev) { - //System.out.println("Detected installation complete"); if( InstUtil.hasNetbeansInstallation() ) { - //System.out.println("Detected installation complete (IDE(s) detected)"); nav.removeCancelListener(this); nav.setCancelListener(nav); nav.navCancel.setText("Finish"); @@ -122,7 +118,6 @@ public class Final extends javax.swing.JPanel implements ActionListener, Install xud = null; } else { - //System.out.println("Detected installation complete (No IDE(s) detected)"); nav.removeCancelListener(this); nav.setCancelListener(nav); nav.navCancel.setText("Finish"); diff --git a/scripting/workben/installer/IdeFinal.java b/scripting/workben/installer/IdeFinal.java index eac052191731..8d0ecc1786a9 100644 --- a/scripting/workben/installer/IdeFinal.java +++ b/scripting/workben/installer/IdeFinal.java @@ -74,19 +74,14 @@ public class IdeFinal extends javax.swing.JPanel implements ActionListener, Inst nav.enableBack(false); nav.enableCancel(false); ArrayList<?> locations = InstallWizard.getLocations(); - //System.out.println("here "+locations.size()); // Returned 1 String path=null; for (int i =0;i<locations.size();i++){ path= (String)locations.get(i); - //InstallWizard.currentPath = path; ideupdater = new IdeUpdater( path, statusLine, progressBar ); ideupdater.addInstallListener(this); InstallWizard.setInstallStarted(true); - //InstallWizard.setPatchedTypes(false); - //InstallWizard.setPatchedJava(false); - //InstallWizard.setPatchedRDB(false); ideupdater.start(); } } @@ -107,9 +102,6 @@ public class IdeFinal extends javax.swing.JPanel implements ActionListener, Inst public void installationComplete(InstallationEvent ev) { - //System.out.println("Detected installation complete"); - //if( InstUtil.hasNetbeansInstallation() || InstUtil.hasJeditInstallation() ) { - //System.out.println("Detected installation complete (IDE(s) detected)"); nav.removeCancelListener(this); nav.setCancelListener(nav); nav.navCancel.setText("Finish"); @@ -122,7 +114,6 @@ public class IdeFinal extends javax.swing.JPanel implements ActionListener, Inst private javax.swing.JLabel statusLine; private InstallWizard wizard; private NavPanel nav; - //private XmlUpdater xud; private IdeUpdater ideupdater; // End of variables declaration//GEN-END:variables diff --git a/scripting/workben/installer/IdeVersion.java b/scripting/workben/installer/IdeVersion.java index a90ccb13a73e..20aa5501ebc7 100644 --- a/scripting/workben/installer/IdeVersion.java +++ b/scripting/workben/installer/IdeVersion.java @@ -63,34 +63,15 @@ public class IdeVersion extends javax.swing.JPanel implements ActionListener, Ta System.out.println("It got here1"); String path = null; if ( (path = netbeansProps.getProperty(key) ) != null ) { - //System.out.println( "n="+n+" v="+v + " Netbeans " + " key=" + key + " path=" + path ); ideProps.put(key, path); } } } } - //System.out.println("*** About to look for jedit install"); - /* - if(jeditProps!=null) - { - for( int j = 0; j < jeditProps.size(); j++ ) { - for( int v = 0; v < InstUtil.versions.length; v++ ) { - System.out.println("j: " +j+" v: " +v); - String key = InstUtil.versions[v]; - String path = null; - if ((path = jeditProps.getProperty(key)) != null) { - //System.out.println( "j="+j+" v="+v + " jEdit " + " key=" + key + " path=" + path ); - ideProps.put(key, path); - } - } - } - } - */ props = ideProps; } catch (IOException eIO) { System.err.println("Failed to parse .netbeans/ide.log"); - //JOptionPane.showMessageDialog(this, "There was a problem reading from the NetBeans ide.log file.", "Parse Error", JOptionPane.ERROR_MESSAGE); } catch (Exception e) { System.err.println("Exception thrown in initComponents"); @@ -101,7 +82,6 @@ public class IdeVersion extends javax.swing.JPanel implements ActionListener, Ta if (tableModel.getRowCount() == 0) { JOptionPane.showMessageDialog(this, "No compatible IDEs were found.", "Invalid versions", JOptionPane.ERROR_MESSAGE); - //wizard.exitForm(null); } tableModel.addTableModelListener(this); @@ -182,8 +162,6 @@ public class IdeVersion extends javax.swing.JPanel implements ActionListener, Ta if (((Boolean)list.get(0)).booleanValue() == true) InstallWizard.storeLocation((String)list.get(2)); } - - //System.out.println(wizard.getLocations()); } @@ -271,7 +249,6 @@ class MyTableModelIDE extends AbstractTableModel { MyTableModelIDE (Properties properties, String [] validVersions) { data = new ArrayList<ArrayList<Object>>(); - //System.out.println(properties); int len = validVersions.length; for (int i = 0; i < len; i++) { diff --git a/scripting/workben/installer/IdeWelcome.java b/scripting/workben/installer/IdeWelcome.java index 542b98e8353d..014daf54f75b 100644 --- a/scripting/workben/installer/IdeWelcome.java +++ b/scripting/workben/installer/IdeWelcome.java @@ -41,7 +41,6 @@ public class IdeWelcome extends javax.swing.JPanel implements ActionListener { setLayout(new java.awt.BorderLayout()); welcomePanel.setLayout(new java.awt.BorderLayout()); - //area.setHorizontalAlignment(javax.swing.JTextField.CENTER); area.setEditable(false); area.setLineWrap(true); area.setText("\n Click Next to include Scripting Framework support for IDEs."); @@ -49,9 +48,6 @@ public class IdeWelcome extends javax.swing.JPanel implements ActionListener { if( InstUtil.hasNetbeansInstallation() ) { area.append("\n \tA version of Netbeans has been detected. \n"); } - //if( InstUtil.hasJeditInstallation() ) { - // area.append("\n \tA version of jEdit has been detected."); - //} welcomePanel.add(area, java.awt.BorderLayout.CENTER); add(welcomePanel, java.awt.BorderLayout.CENTER); @@ -59,9 +55,6 @@ public class IdeWelcome extends javax.swing.JPanel implements ActionListener { nav.setNextListener(this); add(nav, java.awt.BorderLayout.SOUTH); - //Banner br = new Banner(); - //add(br, java.awt.BorderLayout.WEST); - }//GEN-END:initComponents public java.awt.Dimension getPreferredSize() { diff --git a/scripting/workben/installer/InstUtil.java b/scripting/workben/installer/InstUtil.java index 9d12e38d75ae..4e8563c722ea 100644 --- a/scripting/workben/installer/InstUtil.java +++ b/scripting/workben/installer/InstUtil.java @@ -176,11 +176,6 @@ public class InstUtil { public static Properties getJeditLocation() throws IOException { - /*if( !hasJeditInstallation() ) { - System.out.println( "No Jedit found (line195 InstUtil"); - return null; - }*/ - Properties results = new Properties(); StringBuffer str = new StringBuffer(); @@ -190,7 +185,6 @@ public class InstUtil { String os = System.getProperty("os.name"); thePath.append(".jedit"); - //System.out.println( ".jedit path " + thePath ); File jeditLogFile = new File( thePath.toString() + File.separator + "activity.log" ); if( jeditLogFile.exists() ) { @@ -220,17 +214,9 @@ public class InstUtil { s.trim(); if( s.indexOf( "IDE Install" ) != -1 ) { int pathStart = s.indexOf( "=" ) + 2; - //System.out.println( "pathStart " + pathStart ); installPath = s.substring( pathStart, s.length() ); - //System.out.println( "installPath 1" + installPath ); int pathEnd = installPath.indexOf( ";"); - //System.out.println( "pathEnd " + pathEnd ); installPath = installPath.substring( 0, pathEnd ) +File.separator; - //System.out.println( "pathStart " + pathStart ); - //int pathEnd = s.indexOf( ";"); - //System.out.println( "pathEnd " + pathEnd ); - //System.out.println( "s is " + s + " and " + s.length() + " long" ); - //installPath = s.substring( pathStart, pathEnd - 1 ); installPath.trim(); break; } @@ -240,9 +226,6 @@ public class InstUtil { catch( IOException ioe ) { System.out.println( "Error reading Netbeans location information" ); } - //catch( FileNotFoundException fnfe ) { - //System.out.println( "NetBeans ide.log FileNotFoundException" ); - //} return installPath; } @@ -259,20 +242,9 @@ public class InstUtil { s.trim(); if( s.indexOf( "jEdit home directory is" ) != -1 ) { int pathStart = new String( "[message] jEdit: jEdit home directory is " ).length(); - //System.out.println( "pathStart " + pathStart ); installPath = s.substring( pathStart, s.length() ) +File.separator; System.out.println( "installPath 1" + installPath ); - //int pathEnd = installPath.indexOf( ";"); - //System.out.println( "pathEnd " + pathEnd ); - //installPath = installPath.substring( 0, pathEnd ) +File.separator; - //System.out.println( "pathStart " + pathStart ); - //int pathEnd = s.indexOf( ";"); - //System.out.println( "pathEnd " + pathEnd ); - //System.out.println( "s is " + s + " and " + s.length() + " long" ); - //installPath = s.substring( pathStart, pathEnd - 1 ); installPath.trim(); - //System.out.println( "installPath 2 " + installPath ); - //break; jeditDetails[0] = installPath; } if( s.indexOf( "jEdit: jEdit version" ) != -1 ) { @@ -289,9 +261,6 @@ public class InstUtil { catch( IOException ioe ) { System.out.println( "Error reading Jedit location information" ); } - //catch( FileNotFoundException fnfe ) { - //System.out.println( "Jedit activity.log FileNotFoundException" ); - //} return jeditDetails; } @@ -335,12 +304,10 @@ public class InstUtil { for (String s = reader.readLine(); s != null; s = reader.readLine()) { s.trim(); - //System.out.println(s); if (s.length() == 0) continue; if (s.charAt(0) == '[') { sectionName = s.substring(1, s.length() - 1); - //System.out.println(sectionName); continue; } if ((sectionName != null) && sectionName.equalsIgnoreCase("Versions")) { @@ -351,14 +318,8 @@ public class InstUtil { String [] parts = new String[2]; parts[0] = officeName; parts[1] = instPath + File.separator; - //System.out.println( "InstUtil officeName " + officeName ); - //System.out.println( "InstUtil instPath " + instPath ); - //String [] parts = s.split("="); if (parts.length == 2) { - //ver.version = parts[0].trim(); - //File f = new File(parts[1].trim()); - //results.put(parts[0].trim(), f.getPath()); try { URL url = new URL("file://" + parts[1].trim()); String opSys =System.getProperty("os.name"); @@ -382,23 +343,11 @@ public class InstUtil { results.put( parts[0].trim(), windowsPath ); } else { - //System.err.println( " InstUtil URLDecoder " + URLDecoder.decode(url.getPath()) ); results.put(parts[0].trim(), URLDecoder.decode(url.getPath())); } - //File f = new File(url); - - //.sversion: OpenOffice.org 643=file:///scriptdev/neil/ScriptFrameOpenoffice1.0.1 - // parts = Installation name. f.getPath = Installation path - //results.put(parts[0].trim(), f.getPath()); - - //results.put(parts[0].trim(), URLDecoder.decode(url.getPath())); - //results.put( parts[0].trim(), windowsPath ); - } catch (MalformedURLException eSyntax) { - //throw new IOException("Error while reading version information"); results.put(parts[0].trim(), parts[1].trim()); - //System.out.println(parts[0].trim() + " : " + parts[1].trim()); System.err.println("GotHereException"); } } diff --git a/scripting/workben/installer/InstallWizard.java b/scripting/workben/installer/InstallWizard.java index 096b873b8c4f..1134fc4ad237 100644 --- a/scripting/workben/installer/InstallWizard.java +++ b/scripting/workben/installer/InstallWizard.java @@ -229,7 +229,6 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener public static void main(String args[]) { String officePath = null; String netbeansPath = null; - //String jeditPath = null; int i = 0; while (i < args.length) { @@ -245,12 +244,9 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener bNetworkInstall = true; if (args[i].equals("-bindings")) bBindingsInstall = true; - //if (args[i].equals("-jedit")) - // jeditPath = args[++i]; i++; } - //if (officePath == null && netbeansPath == null && jeditPath == null) if (officePath == null && netbeansPath == null) new InstallWizard().show(); @@ -281,11 +277,6 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener IdeUpdater ideup = new IdeUpdater(netbeansPath, label, progressbar); ideup.run(); } - - //if (jeditPath != null) { - // IdeUpdater ideup = new IdeUpdater(jeditPath, label, progressbar); - // ideup.run(); - //} } private static void printUsage() { @@ -296,7 +287,6 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener System.err.println("\t[-bindings]"); System.err.println("\n\n-net indicates that this is the network part of a network install."); System.err.println("-bindings will only install the menu & key bindings in user/config/soffice.cfg."); - //System.err.println("\t[-jedit <path_to_jedit_installation]"); } public static synchronized boolean isPatchedTypes() diff --git a/scripting/workben/installer/LogStream.java b/scripting/workben/installer/LogStream.java index 55cc00539860..e8cb77031a23 100644 --- a/scripting/workben/installer/LogStream.java +++ b/scripting/workben/installer/LogStream.java @@ -25,7 +25,6 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; -//import java.io.PrintWriter; public class LogStream extends PrintStream { static final private DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z: "); diff --git a/scripting/workben/installer/Register.java b/scripting/workben/installer/Register.java index e2d7ceabc9af..420ba61e177e 100644 --- a/scripting/workben/installer/Register.java +++ b/scripting/workben/installer/Register.java @@ -125,17 +125,6 @@ public class Register{ } } - // if ( !regSingletons( path, progpath, opSys, statusLabel ) ) - // { - // return false; - // } - // updating ProtocolHandler - /* statusLabel.setText("Updating ProtocolHandler..."); - if(!FileUpdater.updateProtocolHandler(path, statusLabel)) { - statusLabel.setText("Updating ProtocolHandler failed, please view SFrameworkInstall.log"); - return false; - } */ - // updating StarBasic libraries statusLabel.setText("Updating StarBasic libraries..."); if(!FileUpdater.updateScriptXLC(path, statusLabel)) { diff --git a/scripting/workben/installer/Version.java b/scripting/workben/installer/Version.java index 35823163148e..1f2a84644662 100644 --- a/scripting/workben/installer/Version.java +++ b/scripting/workben/installer/Version.java @@ -215,8 +215,6 @@ public class Version extends javax.swing.JPanel implements ActionListener, Table if (((Boolean)list.get(0)).booleanValue() == true) InstallWizard.storeLocation((String)list.get(2)); } - - //System.out.println(wizard.getLocations()); } @@ -233,9 +231,6 @@ public class Version extends javax.swing.JPanel implements ActionListener, Table private InstallWizard wizard; private MyTableModel tableModel; private NavPanel nav; - //private static final String [] versions = {"StarOffice 6.0", "OpenOffice.org 1.0","OpenOffice.org 1.0.1","OpenOffice.org 642","OpenOffice.org 643","StarOffice 6.1"}; - //private static final String [] versions = {"OpenOffice.org 643"}; - //private static final String [] versions = {"OpenOffice.org 643", "StarOffice 6.1"}; private static final String [] versions = {"StarOffice 6.1", "OpenOffice.org 1.1Beta", "OpenOffice.org 644", "OpenOffice.org 1.1"}; // End of variables declaration//GEN-END:variables diff --git a/scripting/workben/installer/Welcome.java b/scripting/workben/installer/Welcome.java index 9a5cf4790acd..b9f1bca1ab59 100644 --- a/scripting/workben/installer/Welcome.java +++ b/scripting/workben/installer/Welcome.java @@ -155,7 +155,6 @@ public class Welcome extends javax.swing.JPanel implements ActionListener { private javax.swing.JPanel welcomePanel; private javax.swing.JTextArea area; private InstallWizard wizard; - //private static final String [] versions = {"OpenOffice.org 643", "StarOffice 6.1"}; private static final String [] versions = { "StarOffice 6.1" }; private boolean nextButtonEnable = true; diff --git a/scripting/workben/installer/XmlUpdater.java b/scripting/workben/installer/XmlUpdater.java index 7dfe5eca37e1..384f90a088ad 100644 --- a/scripting/workben/installer/XmlUpdater.java +++ b/scripting/workben/installer/XmlUpdater.java @@ -152,30 +152,18 @@ public class XmlUpdater extends Thread { public void run() { - //InputSource isource; - //DocumentBuilderFactory builderFactory; - //DocumentBuilder builder = null; - internalThread = Thread.currentThread(); - //System.out.println("\n\n\n\nFileName: "+installPath); classesPath= installPath.concat(File.separator+"program"+File.separator+"classes"+File.separator); String progpath=installPath; progpath= progpath.concat(File.separator+"program"+File.separator); - //System.out.println("Office progpath" + progpath ); - //System.out.println("\nModifying Installation "+installPath); String starBasicPath=installPath; starBasicPath= starBasicPath.concat(File.separator+"share"+File.separator+"basic"+File.separator+"ScriptBindingLibrary"+File.separator); - //System.out.println( "Office StarBasic path: " + starBasicPath ); String regSchemaOfficePath=installPath; regSchemaOfficePath= regSchemaOfficePath.concat(File.separator+"share"+File.separator+"registry"+File.separator+"schema"+File.separator+"org"+File.separator+"openoffice"+File.separator+"Office"+File.separator); - //System.out.println( "Office schema path: " + regSchemaOfficePath ); - - // Get the NetBeans installation - //String netbeansPath= progressBar.setString("Unzipping Required Files"); ZipData zd = new ZipData("SFrameworkInstall.jar"); @@ -184,7 +172,6 @@ public class XmlUpdater extends Thread { if( (!netInstall) || bindingsInstall) { String configPath=installPath; configPath= configPath.concat(File.separator+"user"+File.separator+"config"+File.separator+"soffice.cfg"+File.separator); - //System.out.println( "Office configuration path: " + configPath ); String manifestPath=configPath + "META-INF" + File.separator; //Adding <Office>/user/config/soffice.cfg/ diff --git a/scripting/workben/mod/_scripting/Dispatch.java b/scripting/workben/mod/_scripting/Dispatch.java index 0da82a410b28..2985e3e0c3ff 100644 --- a/scripting/workben/mod/_scripting/Dispatch.java +++ b/scripting/workben/mod/_scripting/Dispatch.java @@ -41,7 +41,6 @@ import com.sun.star.util.XURLTransformer; public class Dispatch extends TestCase { - //private String scriptURL = "script://MemoryUtils.MemUsage"; private String scriptURL = "script://HighlightText.showForm"; public void initialize( TestParameters tParam, PrintWriter log ) { } diff --git a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java index 0a5c87188ea1..41887dfc60ab 100644 --- a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java +++ b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java @@ -18,7 +18,6 @@ package complex.sfx2; -// import complexlib.ComplexTestCase; import com.sun.star.beans.Pair; import com.sun.star.rdf.Literal; import com.sun.star.rdf.XLiteral; diff --git a/sfx2/qa/complex/sfx2/DocumentProperties.java b/sfx2/qa/complex/sfx2/DocumentProperties.java index dad1fc2bf6a6..b953d8bc19df 100644 --- a/sfx2/qa/complex/sfx2/DocumentProperties.java +++ b/sfx2/qa/complex/sfx2/DocumentProperties.java @@ -102,7 +102,6 @@ public class DocumentProperties mimetype.Name = "MediaType"; mimetype.Value = "application/vnd.oasis.opendocument.text"; PropertyValue[] mimeArgs = { mimetype }; -// new Any("application/vnd.oasis.opendocument.text")) }; PropertyValue cfile = new PropertyValue(); cfile.Name = "URL"; cfile.Value = temp + "EMPTY.odt"; @@ -111,8 +110,6 @@ public class DocumentProperties System.out.println("Creating service DocumentProperties..."); Object oDP = -// xMSF.createInstanceWithContext( -// "com.sun.star.document.DocumentProperties", xContext); xMSF.createInstance("com.sun.star.document.DocumentProperties"); XDocumentProperties xDP = UnoRuntime.queryInterface(XDocumentProperties.class, oDP); @@ -129,14 +126,12 @@ public class DocumentProperties System.out.println("Checking storing default-initialized meta data ..."); -// xDP2.storeToMedium(temp + "EMPTY.odt", mimeArgs); xDP2.storeToMedium("", mimeEmptyArgs); System.out.println("...done"); System.out.println("Checking loading default-initialized meta data ..."); -// xDP2.loadFromMedium(temp + "EMPTY.odt", noArgs); xDP2.loadFromMedium("", mimeEmptyArgs); assertEquals("Author", "", xDP2.getAuthor()); @@ -296,7 +291,6 @@ public class DocumentProperties assertEquals("setAutoloadURL", str, xDP.getAutoloadURL()); i = 3661; // this might not work (due to conversion via double...) xDP.setAutoloadSecs(i); -// System.out.println("set: " + i + " get: " + xDP.getAutoloadSecs()); assertEquals("setAutoloadSecs", i, xDP.getAutoloadSecs()); str = "_blank"; xDP.setDefaultTarget(str); diff --git a/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java b/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java index 51c957adb0c5..14a5c4a6b69e 100644 --- a/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java +++ b/smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java @@ -94,13 +94,6 @@ class InteractionImpl implements com.sun.star.task.XInteractionHandler boolean approve = true; boolean abort = false; -// Object install_Exception = -// AnyConverter.toObject( -// com.sun.star.deployment.InstallException.class, request); -// if (install_Exception != null) -// { -// approve = true; -// } com.sun.star.task.XInteractionContinuation[] conts = xRequest.getContinuations(); for (int i = 0; i < conts.length; i++) diff --git a/sot/qa/complex/olesimplestorage/OLESimpleStorageUnitTest.java b/sot/qa/complex/olesimplestorage/OLESimpleStorageUnitTest.java index 58ba5969088c..3e1a99e2b7a7 100644 --- a/sot/qa/complex/olesimplestorage/OLESimpleStorageUnitTest.java +++ b/sot/qa/complex/olesimplestorage/OLESimpleStorageUnitTest.java @@ -36,15 +36,6 @@ public class OLESimpleStorageUnitTest /* extends ComplexTestCase */ { private XMultiServiceFactory m_xMSF = null; -// public String[] getTestMethodNames() { -// return new String[] { -// "ExecuteTest01"}; -// } - -// public String getTestObjectName() { -// return "OLESimpleStorageUnitTest"; -// } - @Before public void before () { System.out.println("before()"); try { @@ -85,13 +76,6 @@ public class OLESimpleStorageUnitTest /* extends ComplexTestCase */ @AfterClass public static void tearDownConnection() throws InterruptedException, com.sun.star.uno.Exception { -// try -// { -// Thread.sleep(5000); -// } -// catch (java.lang.InterruptedException e) -// { -// } System.out.println("tearDownConnection()"); connection.tearDown(); } diff --git a/stoc/test/javavm/testcomponent/TestComponent.java b/stoc/test/javavm/testcomponent/TestComponent.java index 7406c1751019..81361b27d538 100644 --- a/stoc/test/javavm/testcomponent/TestComponent.java +++ b/stoc/test/javavm/testcomponent/TestComponent.java @@ -22,7 +22,6 @@ import com.sun.star.uno.*; import com.sun.star.registry.XRegistryKey; import java.io.*; import java.net.*; -//import com.sun.star.lib.sandbox.*; /** This component implements XTypeProvider for use with StarBasic. diff --git a/svl/qa/complex/ConfigItems/CheckConfigItems.java b/svl/qa/complex/ConfigItems/CheckConfigItems.java index 73ca7b7aef65..80b5465519a2 100644 --- a/svl/qa/complex/ConfigItems/CheckConfigItems.java +++ b/svl/qa/complex/ConfigItems/CheckConfigItems.java @@ -30,7 +30,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.openoffice.test.OfficeConnection; -// import static org.junit.Assert.*; /** @short todo document me @@ -54,26 +53,6 @@ public class CheckConfigItems // test environment - /** @short A function to tell the framework, - which test functions are available. - - @return All test methods. - @todo Think about selection of tests from outside ... - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkPicklist", -// "checkURLHistory", -// "checkHelpBookmarks", -// "checkPrintOptions", -// "checkAccessibilityOptions", -// "checkUserOptions" -// }; -// } - - /** @short Create the environment for following tests. * @throws java.lang.Exception @@ -144,17 +123,6 @@ public class CheckConfigItems * @throws java.lang.Exception * @todo document me */ -// @Test public void checkPrintOptions() -// throws java.lang.Exception -// { -// impl_triggerTest("checkPrintOptions"); -// } - - - /** - * @throws java.lang.Exception - * @todo document me - */ @Test public void checkAccessibilityOptions() throws java.lang.Exception { diff --git a/svl/qa/complex/passwordcontainer/PasswordContainerUnitTest.java b/svl/qa/complex/passwordcontainer/PasswordContainerUnitTest.java index b4ebe1694dcc..8d35956760aa 100644 --- a/svl/qa/complex/passwordcontainer/PasswordContainerUnitTest.java +++ b/svl/qa/complex/passwordcontainer/PasswordContainerUnitTest.java @@ -32,16 +32,6 @@ import static org.junit.Assert.*; public class PasswordContainerUnitTest { private XMultiServiceFactory m_xMSF = null; -//// public String[] getTestMethodNames() { -//// return new String[] { -//// "ExecuteTest01", -//// "ExecuteTest02", -//// "ExecuteTest03"}; -//// } -// public String getTestObjectName() { -// return "PasswordContainerUnitTest"; -// } - @Before public void before() { try { m_xMSF = getMSF(); diff --git a/svl/qa/complex/passwordcontainer/Test01.java b/svl/qa/complex/passwordcontainer/Test01.java index cb48fbcf9ba2..fb6b8537b020 100644 --- a/svl/qa/complex/passwordcontainer/Test01.java +++ b/svl/qa/complex/passwordcontainer/Test01.java @@ -25,7 +25,6 @@ import com.sun.star.task.UrlRecord; import com.sun.star.task.UserRecord; import com.sun.star.uno.UnoRuntime; -// import share.LogWriter; public class Test01 implements PasswordContainerTest { XMultiServiceFactory m_xMSF = null; diff --git a/svl/qa/complex/passwordcontainer/TestHelper.java b/svl/qa/complex/passwordcontainer/TestHelper.java index 500c22281c86..10574019ebcc 100644 --- a/svl/qa/complex/passwordcontainer/TestHelper.java +++ b/svl/qa/complex/passwordcontainer/TestHelper.java @@ -20,14 +20,11 @@ package complex.passwordcontainer; import com.sun.star.task.UserRecord; -// import share.LogWriter; public class TestHelper { - // LogWriter m_aLogWriter; String m_sTestPrefix; public TestHelper( String sTestPrefix ) { - // m_aLogWriter = aLogWriter; m_sTestPrefix = sTestPrefix; } diff --git a/sw/qa/complex/writer/LoadSaveTest.java b/sw/qa/complex/writer/LoadSaveTest.java index 8fd9fdfd5a4b..2bb1e90ae4f8 100644 --- a/sw/qa/complex/writer/LoadSaveTest.java +++ b/sw/qa/complex/writer/LoadSaveTest.java @@ -160,12 +160,10 @@ public class LoadSaveTest boolean IsLayoutFinished() { return m_isLayoutFinished; } public void documentEventOccured(DocumentEvent Event) { -// System.out.println("event: " + Event.EventName); if ("OnLayoutFinished".equals(Event.EventName)) { // we only have one doc at any time, so no need to check m_isLayoutFinished = true; -// System.out.println("received OnLayoutFinished"); } } public void disposing(EventObject Event) { } diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index 23440991b1e6..3cdb1587cadd 100644 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -552,7 +552,6 @@ class FuzzyTester } m_BufferActual.set(j, null); } else { -//System.out.println("testBuffer:"); printMissing(node); m_DiffMissing++; } @@ -562,7 +561,6 @@ class FuzzyTester TreeNode node = m_BufferActual.get(j); if (node != null) { -//System.out.println("testBuffer:"); printUnexpected(node); if ((node instanceof TextNode) && ((TextNode) node).getContent().length() == 0) { diff --git a/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java b/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java index 7500be6e9b7f..b06c0d7d97b5 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java +++ b/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java @@ -71,7 +71,6 @@ public class EditPageParser extends HTMLEditorKit.ParserCallback public void handleError( String errorMsg,int pos ) { - //System.out.println( errorMsg ); } public void handleSimpleTag( HTML.Tag t, MutableAttributeSet a,int pos ) diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java b/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java index 1495404cf92b..e7ca9a8061a1 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java @@ -63,12 +63,6 @@ public class WikiArticle m_aMainURI = new URI( sMainUrl ); -// viewURL = sMainUrl + "index.php?title=" + m_sTitle; -// editURL = sMainUrl + "index.php?title=" + m_sTitle + "&action=edit"; -// submitURL = sMainUrl + "index.php?title=" + m_sTitle + "&action=submit"; -// loginURL = sMainUrl + "index.php?title=Special:Userlogin"; -// loginSubmitURL = sMainUrl + "index.php?title=Special:Userlogin&action=submitlogin"; - if ( bLogin ) { WikiEditSettingDialog aDialog = new WikiEditSettingDialog(m_xContext, "vnd.sun.star.script:WikiEditor.EditSetting?location=application", wikiSettings, false ); diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java index 4cad2f69ecdd..f4bb361b8d09 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java @@ -115,7 +115,6 @@ public final class WikiEditorImpl extends WeakBase { if ( m_bInitialized ) { - //logger.log( Level.SEVERE, "Extension instance was initialized again" ); } if ( args.length > 0 ) { @@ -133,17 +132,8 @@ public final class WikiEditorImpl extends WeakBase com.sun.star.beans.PropertyValue[] propertyValue ) { final com.sun.star.util.URL myURL = aURL; - //logger.log( Level.INFO, "received dispatch request for: "+aURL.Complete ); if ( aURL.Protocol.equals(protocolName) ) { - /* - synchronized( this ) - { - if( m_bClosing ) return; - else m_bActive = true; - } - **/ - try { if ( myURL.Path.equals("send") ) @@ -152,31 +142,7 @@ public final class WikiEditorImpl extends WeakBase } } catch( java.lang.Throwable t ) { - //logger.log( Level.WARNING, "exception while handeling dispatch", t ); - } - - /* - synchronized( this ) - { - m_bActive = false; - // if we became owner while we were active - // we are responsible for closing the m_xFrame now - if ( m_bOwner && m_xFrame != null ) - { - try - { - XCloseable xclose = ( XCloseable )UnoRuntime.queryInterface( - XCloseable.class, m_xFrame ); - xclose.close( true ); - } catch ( CloseVetoException cve ) - { - logger.log( Level.SEVERE, "cannot close owned frame" ); - } - // relase reference to the m_xFrame; - m_xFrame = null; - } } - */ } } diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java b/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java index c184fcf478d5..2f4d7e887f3c 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java @@ -136,9 +136,6 @@ public class WikiPropDialog extends WikiDialog{ { XPropertySet xPS = GetPropSet("WikiList"); xPS.setPropertyValue("StringItemList", WikiList); - // short [] nSel = new short[1]; - // nSel[0] = (short) m_aSettings.getLastUsedWikiServer(); - // xPS.setPropertyValue("SelectedItems", sel); } catch (Exception ex) { diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java b/testtools/com/sun/star/comp/bridge/TestComponent.java index bfc41cfaad76..65a10c008d11 100644 --- a/testtools/com/sun/star/comp/bridge/TestComponent.java +++ b/testtools/com/sun/star/comp/bridge/TestComponent.java @@ -717,8 +717,6 @@ public class TestComponent { } public void call(int nCallId , int nWaitMUSEC) throws com.sun.star.uno.RuntimeException { -// TimeValue value = { nWaitMUSEC / 1000000 , nWaitMUSEC * 1000 }; -// osl_waitThread( &value ); try { Thread.sleep(nWaitMUSEC / 10000); } @@ -736,8 +734,6 @@ public class TestComponent { } public void callOneway( int nCallId , int nWaitMUSEC ) throws com.sun.star.uno.RuntimeException { -// TimeValue value = { nWaitMUSEC / 1000000 , nWaitMUSEC * 1000 }; -// osl_waitThread( &value ); try { Thread.sleep(nWaitMUSEC / 10000); } diff --git a/testtools/qa/cli/CLITest.java b/testtools/qa/cli/CLITest.java index 4bfafe15750c..9567e1ac408f 100644 --- a/testtools/qa/cli/CLITest.java +++ b/testtools/qa/cli/CLITest.java @@ -62,9 +62,7 @@ public class CLITest extends ComplexTestCase System.out.println("\n ###" + e.getMessage() + "\n"); } -// System.out.println("### waiting for " + testProgram); proc.waitFor(); -// System.out.println("### " + testProgram + " finished"); int retVal = proc.exitValue(); if (retVal != 0) failed("CLI test failed."); diff --git a/testtools/qa/cliversioning/VersionTestCase.java b/testtools/qa/cliversioning/VersionTestCase.java index 6b6fdc375939..93b464fcc069 100644 --- a/testtools/qa/cliversioning/VersionTestCase.java +++ b/testtools/qa/cliversioning/VersionTestCase.java @@ -46,7 +46,6 @@ public class VersionTestCase extends ComplexTestCase if (sSystemRoot == null || sSystemRoot.length() == 0) failed("Check the make file. Java must be called with -DSystemRoot=%SystemRoot%."); -// System.out.println("UNO_PATH="+unoPath); //We need to set the PATH because otherwise it appears that runtests inherits the PATH //from build environment. Then the bootstrapping fails because the libraries //are not used from the office. diff --git a/toolkit/qa/complex/toolkit/UnitConversion.java b/toolkit/qa/complex/toolkit/UnitConversion.java index 06e3a35375e6..430bd7ef556a 100644 --- a/toolkit/qa/complex/toolkit/UnitConversion.java +++ b/toolkit/qa/complex/toolkit/UnitConversion.java @@ -187,13 +187,8 @@ public class UnitConversion checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_100TH, "1/100inch"); checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_10TH, "1/10inch"); checkSize(aSize, com.sun.star.util.MeasureUnit.INCH, "inch"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.M, "m"); checkSize(aSize, com.sun.star.util.MeasureUnit.POINT, "point"); checkSize(aSize, com.sun.star.util.MeasureUnit.TWIP, "twip"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.KM, "km"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.PICA, "pica"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.FOOT, "foot"); - // checkSize(aSize, com.sun.star.util.MeasureUnit.MILE, "mile"); } catch (com.sun.star.lang.IllegalArgumentException e) { diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java index b981886ce332..ee13d01092ed 100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java @@ -47,8 +47,6 @@ import com.sun.star.uno.XInterface; */ public class _XAccessibleComponent { - // private LogWriter log; - public XAccessibleComponent oObj = null; private Rectangle bounds = null ; @@ -60,7 +58,6 @@ public class _XAccessibleComponent { public _XAccessibleComponent(XInterface object/*, LogWriter log*/) { oObj = UnoRuntime.queryInterface( XAccessibleComponent.class, object); - // this.log = log; } /** @@ -83,11 +80,9 @@ public class _XAccessibleComponent { boolean result = true ; int curX = 0; - //while (!oObj.containsPoint(new Point(curX, bounds.Y)) && curX < bounds.Width+bounds.X) { while (!oObj.containsPoint(new Point(curX, 0)) && curX < bounds.Width) { curX++; } - //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { if (curX < bounds.Width) { System.out.println("Upper bound of box contains point (" + curX + ",0) - OK"); @@ -98,14 +93,12 @@ public class _XAccessibleComponent { } curX = 0; - //while (!oObj.containsPoint(new Point(curX, bounds.Y+bounds.Height - 1)) while (!oObj.containsPoint(new Point(curX, bounds.Height - 1)) && curX < bounds.Width) { System.out.println("Contains returns false for ("+curX+","+bounds.Height+")"); curX++; } - //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { if (curX < bounds.Width) { System.out.println("Lower bound of box contains point (" + curX + "," + (bounds.Height - 1) + ") - OK"); @@ -116,11 +109,9 @@ public class _XAccessibleComponent { } int curY = 0; - //while (!oObj.containsPoint(new Point(bounds.X, curY)) && curY < bounds.Height+bounds.Y) { while (!oObj.containsPoint(new Point(0, curY)) && curY < bounds.Height) { curY++; } - //if ((bounds.Y <= curY) && (curY < bounds.Height+bounds.Y)) { if (curY < bounds.Height) { System.out.println("Left bound of box contains point (0," + curY + ") - OK"); @@ -131,12 +122,9 @@ public class _XAccessibleComponent { } curY = 0; - //while (!oObj.containsPoint(new Point(bounds.X+bounds.Width - 1, curY)) - // && curY < bounds.Height+bounds.Y) { while (!oObj.containsPoint(new Point(bounds.Width - 1, curY)) && curY < bounds.Height) { curY++; } - //if ((bounds.Y <= curY) && (curY < bounds.Height + bounds.Y)) { if (curY < bounds.Height) { System.out.println("Right bound of box contains point (" + (bounds.Width - 1) + "," + curY + ") - OK"); diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java index 71f746f94e82..42c23dd5194c 100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java @@ -26,9 +26,7 @@ import com.sun.star.accessibility.XAccessible; import com.sun.star.accessibility.XAccessibleContext; import com.sun.star.accessibility.XAccessibleRelationSet; import com.sun.star.accessibility.XAccessibleStateSet; -// import com.sun.star.accessibility.AccessibleRelationType; import util.AccessibilityTools; -// import share.LogWriter; /** * Testing <code>com.sun.star.accessibility.XAccessibleContext</code> @@ -50,8 +48,6 @@ import util.AccessibilityTools; */ public class _XAccessibleContext { - // private LogWriter log; - public XAccessibleContext oObj = null; private int childCount = 0; @@ -59,7 +55,6 @@ public class _XAccessibleContext { public _XAccessibleContext(XInterface object) { oObj = UnoRuntime.queryInterface(XAccessibleContext.class, object); - // this.log = log; } /** diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java index 3199f8171512..aab89b01e0cb 100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java @@ -18,14 +18,10 @@ package complex.toolkit.accessibility; -// import lib.MultiMethodTest; import com.sun.star.accessibility.XAccessibleExtendedComponent; -// import com.sun.star.accessibility.XAccessibleStateSet; -// import com.sun.star.accessibility.AccessibleStateType; import com.sun.star.awt.XFont; import com.sun.star.uno.XInterface; import com.sun.star.uno.UnoRuntime; -// import share.LogWriter; /** * Testing <code>com.sun.star.accessibility.XAccessibleExtendedComponent</code> @@ -42,7 +38,6 @@ import com.sun.star.uno.UnoRuntime; */ public class _XAccessibleExtendedComponent { - // private LogWriter log; private static final String className = "com.sun.star.accessibility.XAccessibleExtendedComponent" ; @@ -55,7 +50,6 @@ public class _XAccessibleExtendedComponent { public _XAccessibleExtendedComponent(XInterface object/*, LogWriter log*/) { oObj = UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, object); - // this.log = log; } /** diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java index 6de3a08485ec..33a4f7904a18 100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java @@ -19,9 +19,6 @@ package complex.toolkit.accessibility; import com.sun.star.accessibility.XAccessibleText; -// import lib.MultiMethodTest; -//import lib.StatusException; -//import lib.Status; import com.sun.star.beans.PropertyValue; import com.sun.star.awt.Rectangle; import com.sun.star.awt.Point; @@ -30,7 +27,6 @@ import com.sun.star.accessibility.AccessibleTextType; import com.sun.star.accessibility.TextSegment; import com.sun.star.uno.XInterface; import com.sun.star.uno.UnoRuntime; -// import share.LogWriter; /** * Testing <code>com.sun.star.accessibility.XAccessibleText</code> @@ -67,8 +63,6 @@ import com.sun.star.uno.UnoRuntime; */ public class _XAccessibleText { - // private LogWriter log; - public XAccessibleText oObj = null; private XMultiServiceFactory xMSF; @@ -82,7 +76,6 @@ public class _XAccessibleText { public _XAccessibleText(XInterface object, XMultiServiceFactory xMSF, String editOnly) { oObj = UnoRuntime.queryInterface(XAccessibleText.class, object); this.xMSF = xMSF; - // this.log = log; this.editOnly = editOnly; } diff --git a/toolkit/test/accessibility/AccTreeNode.java b/toolkit/test/accessibility/AccTreeNode.java index 50fc1b55cf2d..af1c333cf05b 100644 --- a/toolkit/test/accessibility/AccTreeNode.java +++ b/toolkit/test/accessibility/AccTreeNode.java @@ -274,7 +274,7 @@ class AccTreeNode handlers show no children */ public boolean isLeaf() { - return (maHandlers.size() == 0);// || (getChildCount() == 0); + return (maHandlers.size() == 0); } public boolean equals (Object aOther) diff --git a/toolkit/test/accessibility/AccessibilityTree.java b/toolkit/test/accessibility/AccessibilityTree.java index 36f24bff2ae0..67c2db5a3cb9 100644 --- a/toolkit/test/accessibility/AccessibilityTree.java +++ b/toolkit/test/accessibility/AccessibilityTree.java @@ -151,8 +151,6 @@ public class AccessibilityTree // return first expanded object TreePath aFirst = null; - // System.out.print ("e"); - try { // get 'our' object diff --git a/toolkit/test/accessibility/CanvasShape.java b/toolkit/test/accessibility/CanvasShape.java index 69e3dfba5bc1..cf0f49220203 100644 --- a/toolkit/test/accessibility/CanvasShape.java +++ b/toolkit/test/accessibility/CanvasShape.java @@ -32,7 +32,6 @@ class CanvasShape public final Color maSelectionColor = Color.green; public final Color maFocusColor = Color.blue; - // public AccessibleObject (XAccessibleContext xContext, TreePath aPath) public CanvasShape (AccTreeNode aNode) { maNode = aNode; diff --git a/toolkit/test/accessibility/NodeHandler.java b/toolkit/test/accessibility/NodeHandler.java index cad4952df567..e6da882ac075 100644 --- a/toolkit/test/accessibility/NodeHandler.java +++ b/toolkit/test/accessibility/NodeHandler.java @@ -47,11 +47,6 @@ abstract class NodeHandler } } - /** This factory method creates an individual handler for the specified - object that may hold information to accelerate the access to its children. - */ - // public abstract NodeHandler createHandler (Object aObject); - /** return the number of children this object has */ public int getChildCount(Object aObject) { @@ -135,10 +130,6 @@ abstract class NodeHandler return false; } - /** change this child's value */ - // public void setChild(Object aObject, int nIndex) { } - - /** get names of supported actions */ public String[] getActions (AccessibleTreeNode aNode) { diff --git a/toolkit/test/accessibility/TextUpdateListener.java b/toolkit/test/accessibility/TextUpdateListener.java index 4364d5598884..cd851140cbec 100644 --- a/toolkit/test/accessibility/TextUpdateListener.java +++ b/toolkit/test/accessibility/TextUpdateListener.java @@ -52,28 +52,6 @@ class TextUpdateListener implements TreeModelListener // first child! Then we call updateText updateText( xText, aNode.toString() ); } - else - { - // JDK 1.4: - // // check for pattern "Selection:" - // Matcher m = Pattern.compile( - // "selection: \\[(-?[0-9]+),(-?[0-9]+)\\] \".*" ). - // matcher( aNode.toString() ); - // if( m.matches() ) - // { - // try - // { - // // aha! Selection: - // setSelection( xText, - // Integer.parseInt(m.group(1)), - // Integer.parseInt(m.group(2)) ); - // } - // catch( NumberFormatException f ) - // { - // // ignore - // } - // } - } } } } @@ -165,22 +143,4 @@ class TextUpdateListener implements TreeModelListener } } - // /** replace the given node with a new xText node */ - // void updateNode( XAccessibleText xText, - // DefaultMutableTreeNode aNode ) - // { - // // create a new node - // DefaultMutableTreeNode aNew = newTextTreeNode( xText ); - - // // get parent (must be DefaultMutableTreeNode) - // DefaultMutableTreeNode aParent = - // (DefaultMutableTreeNode)aNode.getParent(); - // if( aParent != null ) - // { - // // remove old sub-tree, and insert new one - // int nIndex = aParent.getIndex( aNode ); - // aParent.remove( nIndex ); - // aParent.insert( aNew, nIndex ); - // } - // } } diff --git a/toolkit/test/accessibility/tools/NameProvider.java b/toolkit/test/accessibility/tools/NameProvider.java index ccd735610001..09ae5ea3e420 100644 --- a/toolkit/test/accessibility/tools/NameProvider.java +++ b/toolkit/test/accessibility/tools/NameProvider.java @@ -100,7 +100,6 @@ public class NameProvider maStateMap.put (new Integer (AccessibleStateType.ARMED), "ARMED"); maStateMap.put (new Integer (AccessibleStateType.BUSY), "BUSY"); maStateMap.put (new Integer (AccessibleStateType.CHECKED), "CHECKED"); - // maStateMap.put (new Integer (AccessibleStateType.COLLAPSED), "COLLAPSED"); maStateMap.put (new Integer (AccessibleStateType.DEFUNC), "DEFUNC"); maStateMap.put (new Integer (AccessibleStateType.EDITABLE), "EDITABLE"); maStateMap.put (new Integer (AccessibleStateType.ENABLED), "ENABLED"); @@ -127,7 +126,6 @@ public class NameProvider maStateMap.put (new Integer (AccessibleStateType.VISIBLE), "VISIBLE"); maStateMap.put (new Integer (AccessibleStateType.MANAGES_DESCENDANTS), "MANAGES_DESCENDANTS"); - // maStateMap.put (new Integer (AccessibleStateType.INCONSISTENT),"INCONSISTENT"); maEventMap.put (new Integer (0), diff --git a/ucb/qa/complex/tdoc/CheckContentProvider.java b/ucb/qa/complex/tdoc/CheckContentProvider.java index 45ead7e4c276..51bd13b80b39 100644 --- a/ucb/qa/complex/tdoc/CheckContentProvider.java +++ b/ucb/qa/complex/tdoc/CheckContentProvider.java @@ -59,33 +59,6 @@ public class CheckContentProvider { private XTextDocument[] xTextDoc = null; private XContent xContent = null; - /** - * The test methods: the test methods have to be executed in a specified - * order. This order is: - * <ol> - * <li>"checkTDOCRoot"</li> - * <li>"checkTDOCRootInterfaces"</li> - * <li>"checkTDOCDocument"</li> - * <li>"checkTDOCDocumentInterfaces"</li> - * <li>"checkTDOCFolder"</li> - * <li>"checkTDOCFolderInterfaces"</li> - * <li>"checkTDOCStream"</li> - * <li>"checkTDOCStreamInterfaces"</li> - * </ol> - * Important is, that the test of the element comes first, then the test of - * its interfaces. - **/ -// public String[] getTestMethodNames() { -// return new String[]{"checkTDOCRoot", -// "checkTDOCRootInterfaces", -// "checkTDOCDocument", -// "checkTDOCDocumentInterfaces", -// "checkTDOCFolder", -// "checkTDOCFolderInterfaces", -// "checkTDOCStream", -// "checkTDOCStreamInterfaces", -// }; -// } /** * Open some documents before the test @@ -327,7 +300,6 @@ public class CheckContentProvider { // check the XChild interface _XChild xChild = new _XChild(); xChild.oObj = UnoRuntime.queryInterface(XChild.class, xContent); - // xChild.log = log; // hasParent dermines, if this content has a parent assertNotNull("getParent()", xChild._getParent(hasParent)); // parameter does dermine, if this funczion is supported: generally not supported with tdcp content @@ -336,7 +308,6 @@ public class CheckContentProvider { // check the XPropertyChangeNotifier interface _XPropertiesChangeNotifier xPropChange = new _XPropertiesChangeNotifier(); xPropChange.oObj = UnoRuntime.queryInterface(XPropertiesChangeNotifier.class, xContent); - // xPropChange.log = log; assertNotNull("addPropertiesChangeListener()", xPropChange._addPropertiesChangeListener()); assertNotNull("removePropertiesChangeListener()", xPropChange._removePropertiesChangeListener()); @@ -376,7 +347,6 @@ public class CheckContentProvider { // xComponent.log = log; assertNotNull("addEventListener()", xComponent._addEventListener()); assertNotNull("removeEventListener()", xComponent._removeEventListener()); -// assure("dispose()", xComponent._dispose()); } diff --git a/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java b/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java index 6697709180c2..92ffa18a2569 100644 --- a/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java +++ b/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java @@ -32,7 +32,6 @@ import com.sun.star.ucb.XContentIdentifierFactory; import com.sun.star.ucb.XContentProvider; import com.sun.star.ucb.XDynamicResultSet; import com.sun.star.uno.UnoRuntime; -// import complexlib.ComplexTestCase; import util.WriterTools; import org.junit.After; diff --git a/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java b/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java index c250b37617b7..ae82a7b63f82 100644 --- a/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java +++ b/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java @@ -56,10 +56,6 @@ public class CheckTransientDocumentsDocumentContent { private XMultiServiceFactory xMSF = null; private XTextDocument xTextDoc = null; -// public String[] getTestMethodNames() { -// return new String[]{"checkTransientDocumentsDocumentContent"}; -// } - @Before public void before() { xMSF = getMSF(); System.out.println("Open a document."); diff --git a/ucb/qa/complex/tdoc/_XChild.java b/ucb/qa/complex/tdoc/_XChild.java index ab59933117e0..067afd8a0fcd 100644 --- a/ucb/qa/complex/tdoc/_XChild.java +++ b/ucb/qa/complex/tdoc/_XChild.java @@ -65,8 +65,6 @@ public class _XChild { * </ul> */ public boolean _setParent(boolean supported) { -// requiredMethod("getParent()") ; - String parentComment = null;//String) tEnv.getObjRelation("cannotSwitchParent"); if (parentComment != null) { diff --git a/ucb/qa/complex/tdoc/_XComponent.java b/ucb/qa/complex/tdoc/_XComponent.java index 5f617008485e..430dc17be707 100644 --- a/ucb/qa/complex/tdoc/_XComponent.java +++ b/ucb/qa/complex/tdoc/_XComponent.java @@ -104,7 +104,6 @@ public class _XComponent { * <code>dispose</code> method call. */ public boolean _removeEventListener() { -// executeMethod("addEventListener()"); if (disposed) return true; // the second listener should not be called oObj.removeEventListener( listener2 ); @@ -127,7 +126,6 @@ public class _XComponent { */ public boolean _dispose() { disposed = false; -// executeMethod("removeEventListener()"); log.println( "begin dispose" + Thread.currentThread()); oObj.dispose(); @@ -149,7 +147,6 @@ public class _XComponent { * Forces object recreation. */ protected void after() { -// disposeEnvironment(); } } // finished class _XComponent diff --git a/unotools/qa/complex/tempfile/TempFileUnitTest.java b/unotools/qa/complex/tempfile/TempFileUnitTest.java index 592211fab7e0..3b002a00299e 100644 --- a/unotools/qa/complex/tempfile/TempFileUnitTest.java +++ b/unotools/qa/complex/tempfile/TempFileUnitTest.java @@ -17,7 +17,6 @@ */ package complex.tempfile; -// import complexlib.ComplexTestCase; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.ucb.XSimpleFileAccess; import com.sun.star.uno.UnoRuntime; diff --git a/unotools/qa/complex/tempfile/Test01.java b/unotools/qa/complex/tempfile/Test01.java index 808dded2b6bc..6f52100f23fe 100644 --- a/unotools/qa/complex/tempfile/Test01.java +++ b/unotools/qa/complex/tempfile/Test01.java @@ -17,8 +17,6 @@ */ package complex.tempfile; -// import complexlib.ComplexTestCase; - import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.ucb.XSimpleFileAccess; import com.sun.star.io.*; diff --git a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java index 6c4d2ea0febb..1fe8372d625a 100644 --- a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java +++ b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java @@ -79,11 +79,6 @@ public class RDFRepositoryTest */ private static TestParameters param = null; -// public String[] getTestMethodNames () -// { -// return new String[] { "check", "checkSPARQL", "checkRDFa" }; -// } - @Before public void before() { try { @@ -359,7 +354,6 @@ public class RDFRepositoryTest System.out.println("Checking SPARQL queries..."); XInputStream xIn = new StreamSimulator(TestDocument.getUrl("example.rdf"), true, param); - // util.utils.getFullTestDocName("example.rdf"), true, param); xRep.importGraph(FileFormat.RDF_XML, xIn, manifest, base); String query; @@ -409,18 +403,14 @@ public class RDFRepositoryTest //FIXME redland BUG String uri = "uri:example-element-2"; query = "SELECT ?path ?idref FROM <" + toS(manifest) + "> WHERE { " -// + "<" + toS(uuid) + "> rdf:type pkg:Package ; " -// + " pkg:hasPart ?part . " + "<" + toS(uuid) + "> pkg:hasPart ?part . " + "?part pkg:path ?path ; " + " rdf:type ?type ; " + " pkg:hasPart <" + uri + "> . " -// + "<" + uri + "> rdf:type odf:Element ; " + "<" + uri + "> " + " pkg:idref ?idref . " + " FILTER (?type = odf:ContentFile || ?type = odf:StylesFile)" + " }"; -//System.out.println(query); result = xRep.querySelect(mkNss() + query); assertTrue("query: example-element-2\n" + query, eq(result, new String[] { "path", "idref" }, @@ -598,36 +588,11 @@ public class RDFRepositoryTest return blank != null; } -/* - static class Statement implements XStatement - { - XResource m_Subject; - XResource m_Predicate; - XNode m_Object; - XURI m_Graph; - - Statement(XResource i_Subject, XResource i_Predicate, XNode i_Object, - XURI i_Graph) - { - m_Subject = i_Subject; - m_Predicate = i_Predicate; - m_Object = i_Object; - m_Graph = i_Graph; - } - - public XResource getSubject() { return m_Subject; } - public XResource getPredicate() { return m_Predicate; } - public XNode getObject() { return m_Object; } - public XURI getGraph() { return m_Graph; } - } -*/ - static Statement[] toSeq(XEnumeration i_Enum) throws Exception { java.util.Collection<Statement> c = new java.util.ArrayList<Statement>(); while (i_Enum.hasMoreElements()) { Statement s = (Statement) i_Enum.nextElement(); -//System.out.println("toSeq: " + s.getSubject().getStringValue() + " " + s.getPredicate().getStringValue() + " " + s.getObject().getStringValue() + "."); c.add(s); } return c.toArray(new Statement[c.size()]); diff --git a/vcl/qa/complex/memCheck/CheckMemoryUsage.java b/vcl/qa/complex/memCheck/CheckMemoryUsage.java index 3b5bc61338ec..24ebf5f41c82 100644 --- a/vcl/qa/complex/memCheck/CheckMemoryUsage.java +++ b/vcl/qa/complex/memCheck/CheckMemoryUsage.java @@ -96,12 +96,7 @@ public class CheckMemoryUsage /* extends ComplexTestCase */ private final String sWriterDoc = "sxw,writer_pdf_Export"; private final String sCalcDoc = "sxc,calc_pdf_Export"; private final String sImpressDoc = "sxi,impress_pdf_Export"; - // private String sProcessIdCommand = null; TempDir m_aTempDir; - // private String sFS = null; - // private String sMemoryMap1 = null; - // private String sMemoryMap2 = null; - // private String sDocumentPath = ""; private String[][] sDocTypeExportFilter; private String[][] sDocuments; private int iAllowMemoryIncrease = 10; @@ -112,13 +107,6 @@ public class CheckMemoryUsage /* extends ComplexTestCase */ private static TestParameters param = null; /** - * Get all test methods - * @return The test methods. - // */ -// public String[] getTestMethodNames() { -// return new String[] {"loadAndSaveDocuments"}; -// } - /** * Collect all documents to load and all filters used for export. */ @Before @@ -186,11 +174,8 @@ public class CheckMemoryUsage /* extends ComplexTestCase */ } // get files to load and export -// sDocumentPath = (String) param.get("TestDocumentPath"); String sDocumentPath = TestDocument.getUrl(); File f = new File(FileHelper.getJavaCompatibleFilename(sDocumentPath)); - // sDocumentPath = f.getAbsolutePath(); - // String sFS = System.getProperty("file.separator"); sDocuments = new String[sDocTypeExportFilter.length][]; for (int j = 0; j < sDocTypeExportFilter.length; j++) { @@ -199,8 +184,6 @@ public class CheckMemoryUsage /* extends ComplexTestCase */ sDocuments[j] = new String[doc.length]; for (int i = 0; i < doc.length; i++) { - // final String sDocument = FileHelper.appendPath(sDocumentPath, doc[i]); - // sDocuments[j][i] = utils.getFullURL(sDocuments[j][i]); sDocuments[j][i] = TestDocument.getUrl(doc[i]); } } @@ -212,19 +195,6 @@ public class CheckMemoryUsage /* extends ComplexTestCase */ @After public void after() { - // delete the constructed files. -// we don't need to delete anything, all is stored in $USER_TREE -// for (int i = 0; i < iExportDocCount; i++) -// { -// final String sDocumentName = "DocExport" + i + ".pdf"; -// final String sFilename = FileHelper.appendPath(m_sTempDir, sDocumentName); -// File f = new File(FileHelper.getJavaCompatibleFilename(sFilename)); -// f.delete(); -// } - // File f = new File(sProcessIdCommand); - // f.delete(); - // f = new File(sOfficeMemoryCommand); - // f.delete(); } /** @@ -252,15 +222,8 @@ public class CheckMemoryUsage /* extends ComplexTestCase */ final String sDocument = sDocuments[k][i]; final String sExtension = sDocTypeExportFilter[k][1]; -// OfficeMemchecker aChecker = new OfficeMemchecker(); -// aChecker.setDocumentName(FileHelper.getBasename(sDocument)); -// aChecker.setExtension(sExtension); -// aChecker.start(); - loadAndSaveNTimesDocument(sDocument, 1, sExtension); -// nOk += checkMemory(aChecker); -// nRunThrough ++; } System.out.println(); System.out.println(); @@ -335,7 +298,6 @@ public class CheckMemoryUsage /* extends ComplexTestCase */ { final String sDocumentName = FileHelper.getBasename(_sDocument) + "_" + j + ".pdf"; final String sFilename = FileHelper.appendPath(m_aTempDir.getOfficeTempDir(), sDocumentName); - // String url = utils.getFullURL(sFilename); String url = sFilename; // graphical.FileHelper.getFileURLFromSystemPath(sFilename); try { diff --git a/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java b/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java index 3f0c52485000..b35bd6b7c14d 100644 --- a/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java +++ b/vcl/qa/complex/persistent_window_states/PersistentWindowTest.java @@ -31,9 +31,7 @@ import helper.ConfigurationRead; -// import org.junit.After; import org.junit.AfterClass; -// import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.openoffice.test.OfficeConnection; @@ -48,26 +46,6 @@ import static org.junit.Assert.*; public class PersistentWindowTest { - // private XMultiServiceFactory xMSF; -// private OfficeProvider oProvider; - - /** - * A frunction to tell the framework, which test functions are available. - * Right now, it's only 'checkPersistentWindowState'. - * @return All test methods. - */ -// public String[] getTestMethodNames() -// { -// return new String[] -// { -// "checkPersistentWindowState" -// }; -// } - - /** - * The test parameters - */ - // private static TestParameters param = null; /** * Test if all available document types change the @@ -92,33 +70,14 @@ public class PersistentWindowTest */ @Test public void checkPersistentWindowState() { - // final XMultiServiceFactory xMsf = getMSF(); - - // some Tests need the qadevOOo TestParameters, it is like a Hashmap for Properties. -// param = new TestParameters(); -// param.put("ServiceFactory", xMsf); // some qadevOOo functions need the ServiceFactory - try { - // At first we are already connected - // if (!connect()) - // { - // return; - // } - - // fetch the multi service factory for setup - // XMultiServiceFactory xCP = getMSF(); - - // create the configuration reader - // ConfigurationRead cfgRead = new ConfigurationRead(xCP); - // just test the wrong ones, not all. String[] els = new String[] { "Office/Factories/com.sun.star.drawing.DrawingDocument", "Office/Factories/com.sun.star.formula.FormulaProperties", - //"Office/Factories/com.sun.star.presentation.PresentationDocument", "Office/Factories/com.sun.star.sheet.SpreadsheetDocument", "Office/Factories/com.sun.star.text.GlobalDocument", "Office/Factories/com.sun.star.text.TextDocument", diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java index 091aef9e637a..afcab2a472a1 100644 --- a/wizards/com/sun/star/wizards/common/NumericalHelper.java +++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java @@ -1038,18 +1038,6 @@ public class NumericalHelper } /** - * Get the roman equivalent to an arabic number, e.g. 17 -> XVII. - * The allowed range for numbers goes from 1 to 3999. These can be - * converted using ASCII letters (3999 -> MMMCMXCIX). - * @param n the arabic number - * @return the roman equivalent as string - * @throws BasicErrorException if the number cannot be converted. - */ -// public static String getRomanEquivalent(int n) -// throws com.sun.star.script.BasicErrorException { -// return RomanNumbering.getRomanEquivalent(n); -// } - /** * get the type object from the given object * @param aValue an object representing a (numerical) value; can also be an 'any' * @return a type object: the object together with the its type information diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.java b/wizards/com/sun/star/wizards/common/PropertySetHelper.java index e0c5a119cb1b..8cf933d3bea2 100644 --- a/wizards/com/sun/star/wizards/common/PropertySetHelper.java +++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.java @@ -24,7 +24,6 @@ import com.sun.star.beans.XPropertySetInfo; import com.sun.star.uno.AnyConverter; import com.sun.star.lang.XServiceInfo; -// import com.sun.star.container.XNameAccess; import java.util.HashMap; public class PropertySetHelper @@ -101,7 +100,6 @@ public class PropertySetHelper } else { - // DebugHelper.writeInfo("PropertySetHelper.setProperty() can't get XPropertySet"); getHashMap().put(_sName, _aValue); } } diff --git a/wizards/com/sun/star/wizards/common/TerminateWizardException.java b/wizards/com/sun/star/wizards/common/TerminateWizardException.java index 6da8fd47dccd..507836caa250 100644 --- a/wizards/com/sun/star/wizards/common/TerminateWizardException.java +++ b/wizards/com/sun/star/wizards/common/TerminateWizardException.java @@ -17,7 +17,6 @@ */ package com.sun.star.wizards.common; -// import com.sun.star.wizards.common.Resource; import com.sun.star.lang.XMultiServiceFactory; public class TerminateWizardException extends Exception diff --git a/wizards/com/sun/star/wizards/common/UCB.java b/wizards/com/sun/star/wizards/common/UCB.java index 9406fe7a34cb..46e1cd2a69b5 100644 --- a/wizards/com/sun/star/wizards/common/UCB.java +++ b/wizards/com/sun/star/wizards/common/UCB.java @@ -74,7 +74,6 @@ public class UCB public void delete(String filename) throws Exception { - //System.out.println("UCB.delete(" + filename); executeCommand( getContent(filename),"delete",Boolean.TRUE); } diff --git a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java index bc0be014b77b..03465a57b61a 100644 --- a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java +++ b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java @@ -23,7 +23,6 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.sdbc.DataType; import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.common.PropertyNames; -// import com.sun.star.wizards.db.TypeInspector; public class ColumnPropertySet { diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 1e376ce8efb8..a4fe38852e9c 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -89,10 +89,6 @@ public class CommandMetaData extends DBMetaData for (int i = 0; i < _FieldNames.length; i++) { FieldColumns[i] = new FieldColumn(this, _FieldNames[i], this.getCommandName(), false); -// if (_bgetDefaultValue) -// { -// FieldColumns[i].getDefaultValue(); -// } } } @@ -279,7 +275,6 @@ public class CommandMetaData extends DBMetaData { try { - // Object oField; java.util.ArrayList<String> ResultFieldNames = new java.util.ArrayList<String>(10); String[] FieldNames; CommandObject oCommand = this.getCommandByName(_commandname, _commandtype); @@ -294,9 +289,6 @@ public class CommandMetaData extends DBMetaData // BinaryFieldTypes are not included in the WidthList if (JavaTools.FieldInIntTable(WidthList, iType) >= 0) { -// if (_bAppendMode) -// ResultFieldNames.addElement(_commandname + "." + FieldNames[n]); -// else ResultFieldNames.add(sFieldName); } else if (JavaTools.FieldInIntTable(BinaryTypes, iType) >= 0) @@ -304,8 +296,6 @@ public class CommandMetaData extends DBMetaData ResultFieldNames.add(sFieldName); } } - // FieldNames = new String[FieldNames.length]; - // FieldTypes = new int[FieldNames.length]; m_aAllFieldNames = new String[ResultFieldNames.size()]; m_aAllFieldNames = ResultFieldNames.toArray(m_aAllFieldNames); return true; @@ -550,7 +540,6 @@ public class CommandMetaData extends DBMetaData String CurFieldName; int GroupFieldCount; int TotFieldCount = FieldColumns.length; - // int SortFieldCount = SortFieldNames[0].length; GroupFieldCount = JavaTools.getArraylength(GroupFieldNames); RecordFieldNames = new String[TotFieldCount - GroupFieldCount]; @@ -561,7 +550,6 @@ public class CommandMetaData extends DBMetaData if (JavaTools.FieldInList(GroupFieldNames, CurFieldName) < 0) { RecordFieldNames[a] = CurFieldName; - // a += 1; ++a; } } @@ -607,7 +595,6 @@ public class CommandMetaData extends DBMetaData int curtype = AnyConverter.toInt(xPropertySet.getPropertyValue("Type")); if (curtype == KeyType.FOREIGN) { - // getImportedKeys (RelationController.cxx /source/ui/relationdesign) /Zeile 475 String sreftablename = AnyConverter.toString(xPropertySet.getPropertyValue("ReferencedTable")); if (getTableNamesAsNameAccess().hasByName(sreftablename)) { diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index cda9ee32e00e..fdc0e6fb7e05 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -296,10 +296,6 @@ public class DBMetaData Object oCommand; this.Name = _CommandName; this.CommandType = _CommandType; - // if (getTableNamesAsNameAccess() == null) - // { - // initCommandNames(); - // } if (CommandType == com.sun.star.sdb.CommandType.TABLE) { oCommand = getTableNamesAsNameAccess().getByName(Name); diff --git a/wizards/com/sun/star/wizards/db/FieldColumn.java b/wizards/com/sun/star/wizards/db/FieldColumn.java index 7f8cc70d88a3..409af6e15002 100644 --- a/wizards/com/sun/star/wizards/db/FieldColumn.java +++ b/wizards/com/sun/star/wizards/db/FieldColumn.java @@ -19,7 +19,6 @@ package com.sun.star.wizards.db; import com.sun.star.beans.XPropertySet; import com.sun.star.container.XNameAccess; -// import com.sun.star.lang.IllegalArgumentException; import com.sun.star.sdbc.DataType; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; diff --git a/wizards/com/sun/star/wizards/db/QueryMetaData.java b/wizards/com/sun/star/wizards/db/QueryMetaData.java index ac94dea871fc..4b994ac667d9 100644 --- a/wizards/com/sun/star/wizards/db/QueryMetaData.java +++ b/wizards/com/sun/star/wizards/db/QueryMetaData.java @@ -83,15 +83,6 @@ public class QueryMetaData extends CommandMetaData { return this.GroupByFilterConditions; } -// public void addFieldColumn(String _FieldName, String _sCommandName){ -// FieldColumn oFieldColumn = getFieldColumn(_FieldName, _sCommandName); -// if (oFieldColumn == null){ -// FieldColumn[] LocFieldColumns = new FieldColumn[FieldColumns.length + 1]; -// System.arraycopy(FieldColumns, 0, LocFieldColumns, 0, FieldColumns.length); -// LocFieldColumns[FieldColumns.length] = new FieldColumn(this, _FieldName, _sCommandName); -// FieldColumns = LocFieldColumns; -// } -// } public void addSeveralFieldColumns(String[] _FieldNames, String _sCommandName) { @@ -164,9 +155,7 @@ public class QueryMetaData extends CommandMetaData public String[] getIncludedCommandNames() { - // FieldColumn CurQueryField; ArrayList<String> CommandNamesV = new ArrayList<String>(1); - // String CurCommandName; for (int i = 0; i < FieldColumns.length; i++) { final FieldColumn CurQueryField = FieldColumns[i]; @@ -215,7 +204,6 @@ public class QueryMetaData extends CommandMetaData { try { - // this.getIncludedCommandNames(); // fills the var CommandNamesV indirectly :-( if (FieldTitleSet == null) { FieldTitleSet = new HashMap<String, String>(); diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index caeb1461597a..bbe917b59094 100644 --- a/wizards/com/sun/star/wizards/db/RecordParser.java +++ b/wizards/com/sun/star/wizards/db/RecordParser.java @@ -199,7 +199,6 @@ public class RecordParser extends QueryMetaData } // Is the index OK; increment? - // String sValue = xResultSetRow.getString(ColIndex); return oAny; } diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 5dd833764e12..46239f8380e8 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -18,15 +18,11 @@ package com.sun.star.wizards.db; -// import com.sun.star.lang.IllegalArgumentException; -// import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.beans.*; -// import com.sun.star.container.NoSuchElementException; import com.sun.star.container.XIndexAccess; import com.sun.star.container.XNameAccess; import com.sun.star.sdbcx.XColumnsSupplier; -// import com.sun.star.sdb.XColumn; import com.sun.star.sdb.XSingleSelectQueryComposer; import com.sun.star.sdb.XSingleSelectQueryAnalyzer; import com.sun.star.ui.dialogs.XExecutableDialog; @@ -45,10 +41,7 @@ public class SQLQueryComposer { public XColumnsSupplier xColSuppl; - // XSQLQueryComposer xSQLQueryComposer; QueryMetaData CurDBMetaData; - // String m_sSelectClause; - // String m_sFromClause; public XSingleSelectQueryAnalyzer m_xQueryAnalyzer; ArrayList<CommandName> composedCommandNames = new ArrayList<CommandName>(1); private XSingleSelectQueryComposer m_queryComposer; diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index 3801ee176b72..2d34c4fe504c 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -73,7 +73,6 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen private boolean bIDFieldisInserted = false; private String IDFieldName = PropertyNames.EMPTY_STRING; private String sColumnAlreadyExistsMessage = PropertyNames.EMPTY_STRING; -// private WizardDialog oUnoDialog; private XWindow xWindow; /** @@ -105,8 +104,6 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { if (super.getConnection(_curPropertyValue)) { - // XTablesSupplier xDBTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class, DBConnection); - // xTableNames = xDBTables.getTables(); xTableAppend = UnoRuntime.queryInterface( XAppend.class, getTableNamesAsNameAccess() ); xTableDrop = UnoRuntime.queryInterface( XDrop.class, getTableNamesAsNameAccess() ); xTableDataDescriptorFactory = UnoRuntime.queryInterface( XDataDescriptorFactory.class, getTableNamesAsNameAccess() ); diff --git a/wizards/com/sun/star/wizards/db/TypeInspector.java b/wizards/com/sun/star/wizards/db/TypeInspector.java index a5ae2925b1dc..d0fde032d4a5 100644 --- a/wizards/com/sun/star/wizards/db/TypeInspector.java +++ b/wizards/com/sun/star/wizards/db/TypeInspector.java @@ -77,8 +77,6 @@ public class TypeInspector ArrayList<Integer> aMinScaleVector = new ArrayList<Integer>(); ArrayList<Integer> aMaxScaleVector = new ArrayList<Integer>(); ArrayList<Integer> aSearchableVector = new ArrayList<Integer>(); - // Integer[] aIntegerDataTypes = null; -// XResultSet xResultSet = xDBMetaDagetTypeInfo(); XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet); while (xResultSet.next()) { @@ -274,8 +272,6 @@ public class TypeInspector { if (nDataTypeInfos[i] == _curDataType) { -// System.out.println( "Desired prec " + precision + ",nPrecisionInfos[i]="+nPrecisionInfos[i] + ",sDataTypeNames[i]="+sDataTypeNames[i] ); - if (precision == null || nPrecisionInfos[i] >= precision.intValue()) { ret = sDataTypeNames[i]; // this fits best ! @@ -289,7 +285,6 @@ public class TypeInspector } } } -// System.out.println( "_curDataType="+_curDataType+",precision="+precision+",ret="+ return ret; } diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java index 065c28b0150f..8cd448917141 100644 --- a/wizards/com/sun/star/wizards/document/FormHandler.java +++ b/wizards/com/sun/star/wizards/document/FormHandler.java @@ -139,7 +139,6 @@ public class FormHandler oControlData[14] = createControlData(DataType.DATE, SODATECONTROL, DATEFIELD, DATEFIELD, false); oControlData[15] = createControlData(DataType.TIME, SOTIMECONTROL, TIMEFIELD, TIMEFIELD, false); oControlData[16] = createControlData(DataType.TIMESTAMP, SODATECONTROL, DATEFIELD, TEXTFIELD, false); - // oImageControlData = new ControlData[4]; oControlData[17] = createControlData(DataType.BINARY, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); oControlData[18] = createControlData(DataType.VARBINARY, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); oControlData[19] = createControlData(DataType.LONGVARBINARY, SOIMAGECONTROL, IMAGECONTROL, TEXTFIELD, false); diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.java b/wizards/com/sun/star/wizards/document/OfficeDocument.java index 6fbf0da777fd..b2ca63020948 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.java +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.java @@ -256,10 +256,8 @@ public class OfficeDocument public static Object load(XInterface xInterface, String sURL, String sFrame, PropertyValue[] xValues) { - // XComponent xComponent = null; Object oDocument = null; com.sun.star.frame.XComponentLoader xComponentLoader = null; - //XInterface xInterface = null; try { xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, xInterface); @@ -422,9 +420,6 @@ public class OfficeDocument public static int showMessageBox(XMultiServiceFactory xMSF, String windowServiceName, int windowAttribute, String MessageText) { -// if (getWindowPeer() != null) - // return SystemDialog.showMessageBox(xMSF, xWindowPeer, windowServiceName, windowAttribute, MessageText); -// else return SystemDialog.showMessageBox(xMSF, windowServiceName, windowAttribute, MessageText); } diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java index 2d7f45bbef5f..476c6bfdfd3d 100644 --- a/wizards/com/sun/star/wizards/document/TimeStampControl.java +++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java @@ -141,9 +141,6 @@ public class TimeStampControl extends DatabaseControl // --> TESTING Point aBeforePt = xShapeGroup.getPosition(); xShapeGroup.setPosition(_aPoint); -// oDateControl.xShape.setPosition(_aPoint); -// Point atimepoint = new Point(oDateControl.xShape.getPosition().X + oDateControl.xShape.getSize().Width, oDateControl.xShape.getPosition().Y ); -// oTimeControl.xShape.setPosition(atimepoint); // --> TESTING Point aAfterPt = xShapeGroup.getPosition(); } diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index fa2a89e3200a..7ebf56607fcb 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -156,7 +156,6 @@ public class FieldLinker extends DBLimitedFieldSelection protected void enableNextControlRow(int curindex) { - // setMaxSelIndex(); boolean bSlaveField = lstSlaveFields[curindex].getSelectedItemPos() > 0; boolean bMasterField = lstMasterFields[curindex].getSelectedItemPos() > 0; boolean bDoEnable = (bSlaveField && bMasterField); @@ -217,8 +216,6 @@ public class FieldLinker extends DBLimitedFieldSelection public void initialize(String[] _AllMasterFieldNames, String[] _AllSlaveFieldNames, String[][] _LinkFieldNames) { - // short[] MasterSelList = null; - // short[] SlaveSelList = null; int SOMASTERINDEX = 1; String[] MasterLinkNames = JavaTools.ArrayOutOfMultiDimArray(_LinkFieldNames, SOMASTERINDEX); int SOSLAVEINDEX = 0; @@ -252,7 +249,6 @@ public class FieldLinker extends DBLimitedFieldSelection */ public String[][] getLinkFieldNames() { - // setMaxSelIndex(); int nSelectedIndex = getMaxSelIndex(); String[][] LinkFieldNames = new String[2][nSelectedIndex + 1]; for (int i = 0; i <= nSelectedIndex; i++) diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java index 8c4a63b19c02..6a4cf5902b84 100644 --- a/wizards/com/sun/star/wizards/form/Finalizer.java +++ b/wizards/com/sun/star/wizards/form/Finalizer.java @@ -123,8 +123,6 @@ public class Finalizer public boolean finish() { -// if (!oFormDocument.oMainFormDBMetaData.hasFormDocumentByName(sFormName)){ return oFormDocument.oMainFormDBMetaData.storeDatabaseDocumentToTempPath(this.oFormDocument.xComponent, getName()); -// } } } diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index bc372e2e7913..230ca59bf6b5 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -45,7 +45,6 @@ public class FormConfiguration XFixedText lblRelations; XListBox lstRelations; String[] sreferencedTables; - // Integer ISubFormStep; CommandFieldSelection CurSubFormFieldSelection; String SSUBFORMMODE = "toggleSubFormMode"; String STOGGLESTEPS = "toggleSteps"; diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index 48230befde13..f8b919c7e626 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -455,7 +455,6 @@ public class FormControlArranger { ++iReduceWidth; } - //if (m_maxPostionX > (nFormWidth-cXOffset-cXOffset)) // cXOffset + nFormWidth if (m_maxPostionX > cXOffset + nFormWidth) { checkJustifiedPosition(a); @@ -587,9 +586,6 @@ public class FormControlArranger { curLabelControl.setSize(new Size(m_LabelWidth, m_LabelHeight)); } -// if (CurHelpText != PropertyNames.EMPTY_STRING){ -// oModel.HelpText = CurHelptext; -// } } catch (Exception e) { diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java index bea2cc54a69c..eb2a997ef6bf 100644 --- a/wizards/com/sun/star/wizards/form/FormDocument.java +++ b/wizards/com/sun/star/wizards/form/FormDocument.java @@ -176,14 +176,12 @@ public class FormDocument extends TextDocument else { ControlForm aMainForm = oControlForms.get(0); - // boolean bHasSubForm = aMainForm.xFormContainer.hasByName(SOSUBFORM); // WRONG if (oFormHandler.hasFormByName(SOSUBFORM)) if (aMainForm.xFormContainer != null && aMainForm.xFormContainer.hasByName(SOSUBFORM)) { oFormHandler.removeControlsofForm(SOSUBFORM); oFormHandler.removeElement( aMainForm.xFormContainer, SOSUBFORM ); oControlForms.get(1).oFormController = null; - // aMainForm.xFormContainer = null; // .removeFormByName(SOSUBFORM); oControlForms.remove(1); adjustMainFormSize(_NBorderType); } @@ -219,9 +217,6 @@ public class FormDocument extends TextDocument private Size getSubFormSize() { -// int nSubFormHeight = (int) ((double)nFormHeight/2) - SOFORMGAP; -// int nSubFormFieldCount = this.oSubFormDBMetaData.FieldNames.length; -// int totfieldcount = oMainFormDBMetaData.FieldNames.length + nSubFormFieldCount; int nMainFormHeight = oControlForms.get(0).getActualFormHeight(); return new Size(nFormWidth, nFormHeight - nMainFormHeight - SOFORMGAP); } diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index ff3a16859564..e1f2b86ea2d1 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -28,7 +28,6 @@ import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.NoValidPathException; import com.sun.star.wizards.document.Control; -// import com.sun.star.wizards.ui.ImageList; import com.sun.star.wizards.ui.ButtonList; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; @@ -48,8 +47,6 @@ public class UIControlArranger private XRadioButton optAlignRight; private XControl flnLabelPlacement; private String[] HelpTexts = new String[4]; - // private String[] sArrangementHeader = new String[2]; - // private ArrangeImageList[] m_aArrangeList = new ArrangeImageList[2]; private ArrangeButtonList[] m_aArrangeList = new ArrangeButtonList[2]; private Integer IControlStep; private final int SOBASEIMAGEYPOSITION = 66; @@ -131,8 +128,6 @@ public class UIControlArranger { new Integer(ResId), new Integer(ResId + 1) }; -// String s = CurUnoDialog.getWizardImageUrl(ResId, ResId + 1); //((Integer)listitem).intValue(), )sBitmapPath + "/Arrange_" + (((Integer)listitem).intValue() + 1) + ".gif"; -// return s; } public String render(Object listItem) @@ -188,127 +183,6 @@ public class UIControlArranger Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnableAlignControlGroup)); } -// private class ArrangeImageList implements XItemListener -// { - -// private int formindex; -// private ImageList m_aButtonList = null; // new ImageList(); - -// public ArrangeImageList(int _formindex, ListModel model, String _sArrangementHeader) -// { -// formindex = _formindex; -// Integer YPos = new Integer(SOBASEIMAGEYPOSITION + _formindex * SOIMAGELISTHEIGHT); -// // Label ArrangementHeader ---------------------- -// CurUnoDialog.insertFixedLine("lnLabelPlacment_" + (_formindex + 1), -// new String[] -// { -// PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH -// }, -// new Object[] -// { -// UIConsts.INTEGERS[8], _sArrangementHeader, 97, YPos, IControlStep, new Short(curtabindex++), 207 -// }); - -// int nypos = SOBASEIMAGEYPOSITION + 12 + _formindex * SOIMAGELISTHEIGHT; -// m_aButtonList = new ImageList(); -// m_aButtonList.setPos(new Size(107, nypos)); -// m_aButtonList.setImageSize(new Size(26, 26)); -// m_aButtonList.setCols(4); -// m_aButtonList.setRows(1); -// m_aButtonList.m_aControlName = "ImageList_" + formindex; -// m_aButtonList.setStep(new Short((short) FormWizard.SOCONTROL_PAGE)); -// m_aButtonList.setShowButtons(false); -// m_aButtonList.setRenderer(new LayoutRenderer()); -// m_aButtonList.setSelectionGap(new Size(2, 2)); -// m_aButtonList.setGap(new Size(3, 3)); -// m_aButtonList.scaleImages = Boolean.FALSE; -// m_aButtonList.tabIndex = (int) curtabindex++; -// m_aButtonList.helpURL = 34453 + (formindex * 4); - -// m_aButtonList.setListModel(model); -// m_aButtonList.create(CurUnoDialog); -// m_aButtonList.setSelected(FormWizard.SOGRID - 1); -// m_aButtonList.addItemListener(this); -// } - -// public void setToLeftAlign() -// { -// Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_STATE, new Short((short) 1)); -// } - -// /* (non-Javadoc) -// * @see javax.swing.ListModel#addListDataListener(javax.swing.event.ListDataListener) -// */ -// public void addListDataListener(ListDataListener arg0) -// { -// // TODO Auto-generated method stub -// } - -// public void itemStateChanged(ItemEvent arg0) -// { -// try -// { -// if (m_aArrangeList[formindex].m_aButtonList.isenabled()) -// { -// boolean bEnableAlignControlGroup; -// if (curFormDocument.oControlForms.size() == 2) -// { -// final int nSelected0 = (m_aArrangeList[0].m_aButtonList.getSelected() + 1); -// final int nSelected1 = (m_aArrangeList[1].m_aButtonList.getSelected() + 1); - -// bEnableAlignControlGroup = ((nSelected0 == FormWizard.SOCOLUMNARLEFT) || -// (nSelected1 == FormWizard.SOCOLUMNARLEFT)); -// } -// else -// { -// final int nSelected0 = (m_aArrangeList[0].m_aButtonList.getSelected() + 1); -// bEnableAlignControlGroup = (nSelected0 == FormWizard.SOCOLUMNARLEFT); -// } -// enableAlignControlGroup(bEnableAlignControlGroup); -// final Short nBorderType = CurUnoDialog.getBorderType(); -// final int nSelected = m_aButtonList.getSelected() + 1; -// ((FormDocument.ControlForm) curFormDocument.oControlForms.get(formindex)).initialize(nSelected, nBorderType); -// } -// } -// catch (RuntimeException e) -// { -// e.printStackTrace(); -// } -// } - -// /* (non-Javadoc) -// * @see javax.swing.event.ListDataListener#contentsChanged(javax.swing.event.ListDataEvent) -// */ -// public void contentsChanged(ListDataEvent arg0) -// { -// // TODO Auto-generated method stub -// } - -// /* (non-Javadoc) -// * @see javax.swing.event.ListDataListener#intervalAdded(javax.swing.event.ListDataEvent) -// */ -// public void intervalAdded(ListDataEvent arg0) -// { -// // TODO Auto-generated method stub -// } - -// /* (non-Javadoc) -// * @see javax.swing.event.ListDataListener#intervalRemoved(javax.swing.event.ListDataEvent) -// */ -// public void intervalRemoved(ListDataEvent arg0) -// { -// // TODO Auto-generated method stub -// } - -// /* (non-Javadoc) -// * @see com.sun.star.lang.XEventListener#disposing(com.sun.star.lang.EventObject) -// */ -// public void disposing(EventObject arg0) -// { -// // TODO Auto-generated method stub -// } -// } - private class ArrangeButtonList implements XItemListener { diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java index 4b915a80d35e..47dc89fa2432 100644 --- a/wizards/com/sun/star/wizards/query/QuerySummary.java +++ b/wizards/com/sun/star/wizards/query/QuerySummary.java @@ -33,7 +33,6 @@ public class QuerySummary extends QueryMetaData final protected int RID_REPORT = 2400; String sSummary; Resource oResource; - // XMultiServiceFactory xMSF; private String sSeparator; private String sReturnChar; private String sAnd; @@ -43,7 +42,6 @@ public class QuerySummary extends QueryMetaData { super(_xMSF); this.oResource = _oResource; - // this.xMSF = _xMSF; sAnd = oResource.getResText(RID_QUERY + 38); sOr = oResource.getResText(RID_QUERY + 39); sSeparator = oResource.getResText(RID_QUERY + 91); @@ -66,8 +64,6 @@ public class QuerySummary extends QueryMetaData "<FIELDNAME>", "<SORTMODE>" }) + sReturnChar; sFilterFraction = combineFilterNameFraction(this.getFilterConditions(), RID_QUERY + 53, RID_QUERY + 54) + sReturnChar; - // if (xDBMetaData.getNumericFunctions().length() > 0) - // sAggregateFraction = combinePartString(RID_QUERY + 55, AggregateFieldNames, RID_QUERY + 56, RID_QUERY + 95, new String[]{ "<CALCULATEDFUNCTION>", "<FIELDNAME>"}) + sReturnChar; if (xDBMetaData.supportsGroupBy()) { sGroupByFraction = combinePartString(RID_QUERY + 57, GroupFieldNames, RID_QUERY + 58) + sReturnChar; diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index efa0df4fb981..5001dd04fb64 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -209,7 +209,6 @@ public class QueryWizard extends DatabaseObjectWizard i = insertRoadmapItem(i, false, SOGROUPSELECTION_PAGE - 1, SOGROUPSELECTION_PAGE); i = insertRoadmapItem(i, false, SOGROUPFILTER_PAGE - 1, SOGROUPFILTER_PAGE); } - // if (CurDBMetaData.xDBMetaData.supportsColumnAliasing()) don't use -> too dangerous!!! i = insertRoadmapItem(i, false, SOTITLES_PAGE - 1, SOTITLES_PAGE); i = insertRoadmapItem(i, false, SOSUMMARY_PAGE - 1, SOSUMMARY_PAGE); setRoadmapInteractive(true); diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 78064756c425..095ff23d9c52 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -22,7 +22,6 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.beans.XPropertyState; import com.sun.star.container.XNameAccess; import com.sun.star.container.XNamed; -// import com.sun.star.lang.IndexOutOfBoundsException; import com.sun.star.style.ParagraphAdjust; import com.sun.star.table.XCell; import com.sun.star.table.XCellRange; @@ -464,8 +463,6 @@ public class DBColumn // Todo: Insert a resource; Exception should be thrown to the calling routine catch (Exception exception) { -// sMsgInvalidTextField = oResource.getResText(UIConsts.RID_REPORT + 73); -// SystemDialog.showMessageBox(oTextTableHandler.xMSFDoc, "ErrorBox", VclWindowPeerAttribute.OK, sMsgInvalidTextField); exception.printStackTrace(System.err); return true; //most probably this is really the Namecell!!!! } diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index 690d52f1bfd4..acf3cc63c73f 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -29,12 +29,11 @@ import java.util.logging.Level; import java.util.logging.Logger; public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionListener -{ // extends ReportWizard +{ // ReportTextDocument CurReportDocument; IReportDocument CurReportDocument; -// PropertyValue[] CurProperties; static boolean bStopProcess; static String sProgressDBConnection; static String sProgressDataImport; @@ -43,14 +42,6 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi static String sProgressTitle; static String sStop; -// public static final String TBLRECORDSECTION = ReportTextDocument.TBLRECORDSECTION; -// public static final String TBLGROUPSECTION = ReportTextDocument.TBLGROUPSECTION; -// public static final String RECORDSECTION = ReportTextDocument.RECORDSECTION; -// public static final String GROUPSECTION = ReportTextDocument.GROUPSECTION; -// public static final String COPYOFTBLRECORDSECTION = ReportTextDocument.COPYOFTBLRECORDSECTION; -// public static final String COPYOFTBLGROUPSECTION = ReportTextDocument.COPYOFTBLGROUPSECTION; -// public static final String COPYOFRECORDSECTION = ReportTextDocument.COPYOFRECORDSECTION; -// public static final String COPYOFGROUPSECTION = ReportTextDocument.COPYOFGROUPSECTION; public Dataimport(XMultiServiceFactory _xMSF) { super(_xMSF); @@ -158,7 +149,6 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi } } - // public void importReportData(final XMultiServiceFactory xMSF, final Dataimport CurDataimport, final ReportTextDocument CurReportDocument.getDoc()) { public void importReportData(final XMultiServiceFactory _xMSF, final Dataimport _CurDataimport, IReportDocument _CurReportDocument, PropertyValue[] _properties) { if (CurReportDocument.reconnectToDatabase(_xMSF, _properties)) diff --git a/wizards/com/sun/star/wizards/report/IReportDocument.java b/wizards/com/sun/star/wizards/report/IReportDocument.java index 6c05418d18c5..f071a2e480be 100644 --- a/wizards/com/sun/star/wizards/report/IReportDocument.java +++ b/wizards/com/sun/star/wizards/report/IReportDocument.java @@ -166,8 +166,6 @@ public interface IReportDocument */ public void liveupdate_changeContentTemplate(String ContentTemplatePath); - // public String[] getLayoutTemplates(); - // public String[] getContentTemplates(); public void layout_selectFirstPage(); public void layout_setupRecordSection(String TemplateName); @@ -217,13 +215,11 @@ public interface IReportDocument /* DataImport */ // ??? - // public void addTextSectionCopies(); // ??? public boolean reconnectToDatabase(XMultiServiceFactory xMSF, PropertyValue[] Properties); // ??? public void insertDatabaseDatatoReportDocument(XMultiServiceFactory xMSF); // ??? - // public com.sun.star.lang.XMultiServiceFactory getDocumentServiceFactory(); /** * set a internal variable to stop a maybe longer DB access. */ diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 73a82c2d86e7..dbd01df3cc05 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -16,7 +16,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ package com.sun.star.wizards.report; -//import com.sun.star.ucb.CommandAbortedException; import com.sun.star.ucb.XSimpleFileAccess; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; @@ -26,13 +25,8 @@ import com.sun.star.wizards.common.*; import com.sun.star.wizards.ui.*; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextComponent; -//import com.sun.star.container.XHierarchicalNameAccess; -//import com.sun.star.container.XNameAccess; -//import com.sun.star.lang.EventObject; -//import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.db.RecordParser; -//import com.sun.star.wizards.document.OfficeDocument; public class ReportFinalizer { @@ -42,23 +36,16 @@ public class ReportFinalizer Object chkTemplate; String CHANGEREPORTTITLE_FUNCNAME = "changeReportTitle"; String TOGGLESUBTEMPLATECONTROLS_FUNCNAME = "toggleSubTemplateControls"; -// String slblHowProceed; -// String slblChooseReportKind; String TemplatePath; String StoreName; boolean bfinalaskbeforeOverwrite; String DefaultName; String OldDefaultName; - // ReportTextDocument CurReportDocument; IReportDocument CurReportDocument; - // Desktop.OfficePathRetriever curofficepath; -// short curtabindex; -// String sMsgReportDocumentNameDuplicate; public static final int SOCREATEDOCUMENT = 1; public static final int SOCREATETEMPLATE = 2; public static final int SOUSETEMPLATE = 3; private XMultiServiceFactory m_xMSF; - // public Finalizer(ReportTextDocument _CurReportDocument, WizardDialog _CurUnoDialog) { public ReportFinalizer(XMultiServiceFactory _xMSF, IReportDocument _CurReportDocument, WizardDialog _CurUnoDialog) { m_xMSF = _xMSF; @@ -67,13 +54,11 @@ public class ReportFinalizer this.CurReportDocument = _CurReportDocument; short curtabindex = (short) (ReportWizard.SOSTOREPAGE * 100); Desktop odesktop = new Desktop(); - // curofficepath = odesktop.new OfficePathRetriever(m_xMSF); String sSaveAsTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 40); String sUseTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 41); String sEditTemplate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 42); String sSaveAsDocument = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 43); -// String sSaveAs = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 44); String sReportTitle = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 33); String slblHowProceed = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 78); String slblChooseReportKind = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 79); @@ -178,15 +163,6 @@ public class ReportFinalizer boolean bDoEnable = sTitle.equals(PropertyNames.EMPTY_STRING); CurUnoDialog.enableFinishButton(!bDoEnable); } -// private boolean fileexists(XMultiServiceFactory _xMSF, String _spath){ -// try { -// XInterface xUcbInterface = (XInterface) _xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); -// XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); -// return xSimpleFileAccess.exists(_spath); -// } catch (Exception exception) { -// exception.printStackTrace(System.err); -// return false; -// }} public void initialize(RecordParser _CurDBMetaData) { String FirstCommandName = (_CurDBMetaData.getIncludedCommandNames())[0]; diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index e48e3d7a5167..598b74a8d0dd 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -18,7 +18,6 @@ package com.sun.star.wizards.report; import com.sun.star.awt.XListBox; -// import com.sun.star.awt.XTextComponent; import com.sun.star.lang.EventObject; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.*; @@ -38,29 +37,19 @@ public class ReportLayouter { UnoDialog CurUnoDialog; -// static String sOrientationHeader; -// static String sOrientVertical; -// static String sOrientHorizontal; final int SOTXTTITLE = 28; final int SOCONTENTLST = 29; final static public int SOOPTLANDSCAPE = 30; final static public int SOOPTPORTRAIT = 31; final int SOLAYOUTLST = 32; -// static String sReportTitle; -// static String slblDataStructure; -// static String slblPageLayout; -// static String sOrganizeFields; XListBox xContentListBox; XListBox xLayoutListBox; int iOldContentPos; int iOldLayoutPos; - // ReportTextDocument CurReportDocument; IReportDocument CurReportDocument; public String[][] LayoutFiles; public String[][] ContentFiles; - // private Desktop.OfficePathRetriever curofficepath; Object aOrientationImage; - // boolean m_bLandscape = true; private XMultiServiceFactory m_xMSF; private XTextRange trTitleconst, trAuthorconst, trDateconst, trPageconst; private TextElement teTitleconst, teAuthorconst, teDateconst, tePageconst; @@ -77,24 +66,13 @@ public class ReportLayouter this.CurUnoDialog = _CurUnoDialog; this.CurReportDocument = _CurReportDocument; //TODO the constructor for the OfficePathRetriever is redundant and should be instantiated elsewhere - // Desktop odesktop = new Desktop(); - // curofficepath = odesktop.new OfficePathRetriever(m_xMSF); String slblDataStructure = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 15); String slblPageLayout = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 16); -// String sOrganizeFields = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 19); String sOrientationHeader = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 22); String sOrientVertical = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 23); String sOrientHorizontal = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 24); - // XInterface xUcbInterface = (XInterface) m_xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"); - // XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) com.sun.star.uno.UnoRuntime.queryInterface(XSimpleFileAccess.class, xUcbInterface); - // boolean bcntexists = xSimpleFileAccess.exists(CurReportDocument.getReportPath() + "/cnt-default.ott"); - // boolean bstlexists = xSimpleFileAccess.exists(CurReportDocument.getReportPath() + "/stl-default.ott"); - // if ((bcntexists == false) || (bstlexists == false)) - // throw new NoValidPathException(CurReportDocument.xMSF); - - CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblContent", new String[] { @@ -106,7 +84,6 @@ public class ReportLayouter }); short iSelPos = 0; -// ContentFiles = FileAccess.getFolderTitles(m_xMSF, "cnt", CurReportDocument.getReportPath()); ContentFiles = CurReportDocument.getDataLayout(); iSelPos = (short) JavaTools.FieldInList(ContentFiles[1], CurReportDocument.getContentPath()); if (iSelPos < 0) @@ -138,7 +115,6 @@ public class ReportLayouter }); short iSelLayoutPos = 0; -// LayoutFiles = FileAccess.getFolderTitles(m_xMSF, "stl", CurReportDocument.getReportPath()); LayoutFiles = CurReportDocument.getHeaderLayout(); iSelLayoutPos = (short) JavaTools.FieldInList(LayoutFiles[1], CurReportDocument.getLayoutPath()); if (iSelLayoutPos < 0) @@ -231,17 +207,14 @@ public class ReportLayouter public void initialize(String _defaultTemplatePath) { -// CurReportDocument.getDoc().xTextDocument.lockControllers(); CurReportDocument.layout_setupRecordSection(_defaultTemplatePath); if (CurUnoDialog.getControlProperty("txtTitle", "Text").equals(PropertyNames.EMPTY_STRING)) { String[] sCommandNames = CurReportDocument.getRecordParser().getIncludedCommandNames(); CurUnoDialog.setControlProperty("txtTitle", "Text", sCommandNames[0]); } - // CurReportDocument.getDoc().oViewHandler.selectFirstPage(CurReportDocument.getDoc().oTextTableHandler); CurReportDocument.layout_selectFirstPage(); CurUnoDialog.setFocus("lblContent"); -// CurReportDocument.getDoc().unlockallControllers(); } class ItemListenerImpl implements com.sun.star.awt.XItemListener @@ -321,7 +294,6 @@ public class ReportLayouter { e.printStackTrace(); } - // CurReportDocument.getDoc().unlockallControllers(); Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } @@ -342,7 +314,6 @@ public class ReportLayouter try { Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); -// CurReportDocument.getDoc().xTextDocument.lockControllers(); boolean blandscape = (((Short) CurUnoDialog.getControlProperty("optLandscape", PropertyNames.PROPERTY_STATE)).shortValue() == 1); CurReportDocument.setPageOrientation((blandscape) ? SOOPTLANDSCAPE : SOOPTPORTRAIT); } @@ -350,7 +321,6 @@ public class ReportLayouter { exception.printStackTrace(System.err); } -// CurReportDocument.getDoc().unlockallControllers(); Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index 2c3963b81177..7db1ff85e56f 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -22,7 +22,6 @@ import com.sun.star.text.XRelativeTextContentRemove; import com.sun.star.text.XTextContent; import java.util.ArrayList; import java.util.Comparator; -import com.sun.star.awt.Rectangle; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.container.XNameAccess; import com.sun.star.lang.XMultiServiceFactory; @@ -33,7 +32,6 @@ import com.sun.star.wizards.db.*; import com.sun.star.wizards.common.*; import com.sun.star.wizards.ui.*; import com.sun.star.sdb.CommandType; -// import com.sun.star.table.XCell; import com.sun.star.text.XTextDocument; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.text.TextTableHandler; @@ -52,18 +50,14 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen private static final String ISVISIBLE = "IsVisible"; private static final String QUERYNAME = "QueryName"; private static final String SIZE = "Size"; - // private XMultiServiceFactory xMSF; - // private XMultiServiceFactory xMSFDoc; private Object ReportPageStyle; private Object FirstPageStyle; - // private String ReportFolderName; public ArrayList<DBColumn> DBColumnsVector; private RecordTable CurRecordTable; private String sMsgTableNotExisting; private String sMsgCommonReportError; private String ContentTemplatePath; private String LayoutTemplatePath; - // private String sMsgInvalidTextField; private String sMsgEndAutopilot; public boolean bIsCurLandscape; public TextTableHandler oTextTableHandler; @@ -152,35 +146,25 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen public void swapContentTemplate(String ContentTemplatePath) { -// unlockallControllers(); - //xProgressBar.start("", 10); this.ContentTemplatePath = ContentTemplatePath; loadSectionsfromTemplate(ContentTemplatePath); - // xProgressBar.setValue(40); oTextStyleHandler.loadStyleTemplates(ContentTemplatePath, "LoadTextStyles"); - // xProgressBar.setValue(70); if (CurRecordTable != null) { CurRecordTable.adjustOptimalTableWidths(xMSF, oViewHandler); } - // xProgressBar.setValue(100); oViewHandler.selectFirstPage(oTextTableHandler); - // xProgressBar.end(); } public void swapLayoutTemplate(String LayoutTemplatePath/*, String BitmapPath*/) { try { - // xProgressBar.start("", 10); this.LayoutTemplatePath = LayoutTemplatePath; boolean bOldIsCurLandscape = AnyConverter.toBoolean(Helper.getUnoPropertyValue(ReportPageStyle, ISLANDSCAPE)); oTextStyleHandler.loadStyleTemplates(LayoutTemplatePath, "LoadPageStyles"); - // xProgressBar.setValue(60); changePageOrientation(bOldIsCurLandscape); - // xProgressBar.setValue(100); oViewHandler.selectFirstPage(oTextTableHandler); - // xProgressBar.end(); } catch (IllegalArgumentException e) { @@ -353,10 +337,6 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } } - //public boolean isGroupField(String _FieldName) - // { - // return (JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, _FieldName) != -1); - // } public void replaceFieldValueInRecordSection(int RecordCount) { @@ -714,7 +694,6 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { try { -// xRelativeTextContentRemove.removeTextContentBefore(xTextContent); xRelativeTextContentRemove.removeTextContentAfter(xTextContent); // IllegalArgumentException may be thrown when no paragraphbreak is there } diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 9e57fdc696c7..89d757107142 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -17,7 +17,6 @@ */ package com.sun.star.wizards.report; -// import java.util.Vector; import com.sun.star.awt.TextEvent; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextListener; @@ -124,8 +123,6 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener { if ((nOldStep >= SOTEMPLATEPAGE) && (nNewStep < SOTEMPLATEPAGE)) { - // CurReportDocument.getDoc().oTextSectionHandler.removeTextSectionbyName("RecordSection"); - // CurReportDocument.getDoc().oTextTableHandler.removeTextTablebyName("Tbl_RecordSection"); m_reportDocument.removeTextTableAndTextSection(); } switch (nNewStep) @@ -279,7 +276,6 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener String sCommand = (String) oCommand.getPropertySet().getPropertyValue(PropertyNames.COMMAND); if (bHasEscapeProcessing) { - // String sCommand = (String) oCommand.xPropertySet.getPropertyValue(PropertyNames.COMMAND); bQueryCreated = (!sCommand.equals(PropertyNames.EMPTY_STRING)); if (m_reportDocument instanceof ReportTextImplementation) { @@ -325,20 +321,13 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener 16, sShowBinaryFields, 95, 162, 1, 210 }); } - // CurReportDocument.getDoc().xProgressBar.setValue(40); CurTitlesComponent = new TitlesComponent(this, SOTITLEPAGE, 97, 37, 210, 7, slblColumnNames, slblColumnTitles, 34381); CurTitlesComponent.addTextListener(this); - // CurReportDocument.getDoc().xProgressBar.setValue(50); CurGroupFieldHandler = new GroupFieldHandler(m_reportDocument, this); - // CurReportDocument.getDoc().xProgressBar.setValue(60); CurSortingComponent = new SortingComponent(this, SOSORTPAGE, 95, 30, 210, 34346); - // CurReportDocument.getDoc().xProgressBar.setValue(70); CurReportLayouter = new ReportLayouter(xMSF, m_reportDocument, this, isReportBuilderInstalled()); - // CurReportDocument.getDoc().xProgressBar.setValue(80); CurReportFinalizer = new ReportFinalizer(xMSF, m_reportDocument, this); - // CurReportDocument.getDoc().xProgressBar.setValue(100); bCloseDocument = true; - // CurReportDocument.getDoc().xProgressBar.end(); enableNavigationButtons(false, false, false); } diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java index 3797eb16a82e..5a1c0e24790e 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java @@ -26,9 +26,6 @@ public class SectionLabel extends SectionObject protected SectionLabel(XFixedText _aFixedText) { m_aParentObject = _aFixedText; - // We would like to know, what properties are in this object. -// PropertySetHelper aHelper = new PropertySetHelper(_aFixedText); -// aHelper.showProperties(); } public static SectionObject create(XFixedText _aFixedText) diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java index a1b655b777b2..b122b40ecb5c 100644 --- a/wizards/com/sun/star/wizards/table/FieldDescription.java +++ b/wizards/com/sun/star/wizards/table/FieldDescription.java @@ -32,12 +32,10 @@ import com.sun.star.wizards.common.PropertyNames; public class FieldDescription { private String tablename = PropertyNames.EMPTY_STRING; -// String fieldname; private String keyname; private XNameAccess xNameAccessTableNode; private XPropertySet xPropertySet; private ArrayList<PropertyValue> aPropertyValues; -// PropertyValue[] aPropertyValues; private Integer Type; private String Name; private XMultiServiceFactory xMSF; @@ -121,7 +119,6 @@ public class FieldDescription try { xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _xNameAccessFieldNode); -// Integer Index = (Integer) xPropertySet.getPropertyValue("Index"); if (propertyexists(PropertyNames.PROPERTY_NAME)) { aPropertyValues.add(Properties.createProperty(PropertyNames.PROPERTY_NAME, Name)); @@ -133,12 +130,10 @@ public class FieldDescription if (propertyexists("Scale")) { aPropertyValues.add(Properties.createProperty("Scale", xPropertySet.getPropertyValue("Scale"))); -// Scale = } if (propertyexists("Precision")) { aPropertyValues.add(Properties.createProperty("Precision", xPropertySet.getPropertyValue("Precision"))); -// Precision = (Integer) xPropertySet.getPropertyValue("Precision"); } if (propertyexists("DefaultValue")) { diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index f7a808812105..64823324e029 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -270,8 +270,6 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X public void fillupTables() { -// if (optBusiness.getState()) -// else } public void fillupFieldsListbox() diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java index 4daf2ed62ba6..0ecc84da19ec 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java @@ -106,18 +106,6 @@ public class TextFieldHandler xDepField.attachTextFieldMaster(xPSet); xTextCursor.getText().insertTextContent(xTextCursor, xFieldContent, false); -// try -// { -// XPropertySet xTestProp = xDepField.getTextFieldMaster(); -// String UserFieldName = (String) xTestProp.getPropertyValue(PropertyNames.PROPERTY_NAME); -// // UserFieldName == FieldName? -// int dummy = 0; -// } -// catch (com.sun.star.uno.Exception e) -// { -// int dummy2 = 0; -// } - } catch (com.sun.star.uno.Exception exception) { @@ -132,9 +120,6 @@ public class TextFieldHandler xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, FieldName); xPSet.setPropertyValue("Content", FieldTitle); - // DEBUG - // String sFieldName = (String)xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME); - return xPSet; } diff --git a/wizards/com/sun/star/wizards/text/TextTableHandler.java b/wizards/com/sun/star/wizards/text/TextTableHandler.java index c992946f163b..b61a080319fb 100644 --- a/wizards/com/sun/star/wizards/text/TextTableHandler.java +++ b/wizards/com/sun/star/wizards/text/TextTableHandler.java @@ -213,15 +213,12 @@ public class TextTableHandler { BreakType CorrBreakValue = null; BreakType BreakValue = (BreakType) com.sun.star.wizards.common.Helper.getUnoStructValue(oTextTable, "BreakType"); - // if (BreakValue.equals(BreakType.NONE) == false){ - // CorrBreakValue = BreakValue; Helper.setUnoPropertyValue(oTextTable, "BreakType", BreakType.NONE); - // } return BreakType.NONE; } public void adjustOptimalTableWidths(XMultiServiceFactory _xMSF, XTextTable xTextTable) - { // setTableColumnSeparators(){ + { try { XFrame xFrame = this.xTextDocument.getCurrentController().getFrame(); diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.java b/wizards/com/sun/star/wizards/text/ViewHandler.java index 1d333bcccd40..c0a92184b63f 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.java +++ b/wizards/com/sun/star/wizards/text/ViewHandler.java @@ -67,11 +67,6 @@ public class ViewHandler XTextContent xTextTable = UnoRuntime.queryInterface(XTextContent.class, xAllTextTables.getByIndex(0)); XTextRange xRange = UnoRuntime.queryInterface(XTextRange.class, xTextTable.getAnchor().getText()); xViewTextCursor.gotoRange(xRange, false); -// if (xPageCursor.getPage() == (short) 1) { -// Helper.setUnoPropertyValue(xTextTable, "PageDescName", "First Page"); -// TextTableHandler.resetBreakTypeofTextTable(xTextTable); -// } - // } XTextRange xHeaderRange = (XTextRange) Helper.getUnoPropertyValue(oPageStyle, "HeaderText", XTextRange.class); if (!com.sun.star.uno.AnyConverter.isVoid(xHeaderRange)) { diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index 0f1010bc4012..97844cca8967 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -351,9 +351,6 @@ public class AggregateComponent extends ControlScroller for (int i = _index; i < ControlRowVector.size(); i++) { ControlRow oControlRow = ControlRowVector.get(i); -// if (i == _index) -// oControlRow.settovoid(); -// else oControlRow.setVisible(false); } } diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index db20bff27904..80b5b9c3ae03 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -19,12 +19,9 @@ package com.sun.star.wizards.ui; import com.sun.star.wizards.common.*; import com.sun.star.wizards.db.*; -// import com.sun.star.awt.XWindow; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.sdb.CommandType; -// import com.sun.star.sdbc.SQLException; import com.sun.star.uno.AnyConverter; -// import com.sun.star.uno.UnoRuntime; import com.sun.star.awt.*; import com.sun.star.beans.PropertyValue; import java.text.Collator; @@ -36,7 +33,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< private CommandMetaData CurDBMetaData; private XListBox xTableListBox; private XFixedText xlblTable; - // private String SFILLUPFIELDSLISTBOX = "fillUpFieldsListbox"; private String sTableListBoxName; private String sTableLabelName; private String sQueryPrefix; @@ -45,7 +41,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< private short iOldSelPos = -1; private boolean bpreselectCommand = true; private boolean bgetQueries; - // boolean AppendMode; private WizardDialog oWizardDialog; private Collator aCollator = null; @@ -145,7 +140,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< { Boolean.TRUE, Boolean.FALSE, 12, HelpIds.getHelpIdString(super.FirstHelpIndex - 1), new Short(UnoDialog.getListBoxLineCount()), 95, 37, IStep, new Short((short) 4), getListboxWidth() }); - // XWindow xTableListBoxWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xTableListBox); fillupCommandListBox(); } catch (Exception exception) @@ -223,7 +217,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< String curCommandName = PropertyNames.EMPTY_STRING; //As the peer of the control might not yet exist we have to query the model for the SelectedItems short iSelPos = getselectedItemPos(); - // String[] sLocList = (String[]) CurUnoDialog.getControlProperty(sTableListBoxName, PropertyNames.STRING_ITEM_LIST); final String sSelectedTableName = xTableListBox.getItem(iSelPos); if (!bgetQueries) { @@ -278,7 +271,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< short[] iSelArray = new short[0]; boolean bgetFields = false; String[] ContentList = new String[0]; - // CurDBMetaData.initCommandNames(); if (bgetQueries) { ContentList = new String[CurDBMetaData.getTableNames().length + CurDBMetaData.getQueryNames().length]; diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 546c21530304..7bc43dd540db 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -17,7 +17,6 @@ */ package com.sun.star.wizards.ui; -// import java.util.Vector; import com.sun.star.awt.TextEvent; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XControl; @@ -200,7 +199,6 @@ public class FilterComponent */ private void togglefollowingControlRow(String _scurName) { - // String sNameSuffix = sIncSuffix + "_" + _scurName.substring(_scurName.length() - 1, _scurName.length()); int Index = Integer.valueOf(getIndexNumber(_scurName)).intValue(); if (Index < oControlRows.length) { @@ -226,8 +224,6 @@ public class FilterComponent public PropertyValue[][] getFilterConditions() { - // ControlRow CurControlRow; - // getfilterstate(); int nFilterCount = getFilterCount(); if (nFilterCount > 0) { diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java index 048ff0d6d390..7998a8fd3224 100644 --- a/wizards/com/sun/star/wizards/ui/ImageList.java +++ b/wizards/com/sun/star/wizards/ui/ImageList.java @@ -504,14 +504,6 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener public void contentsChanged(ListDataEvent event) { - /*//if the content that was changed is in the displayed range, refresh... - if ( (event.getIndex1() < getIndexFor(0)) // range is before... - || event.getIndex0() > getIndexFor( cols*rows - 1)) ; //do nothing - else - refreshImages(); - */ //selected = 0; - //pageStart = 0; - //if (event.refreshImages(); } public void intervalAdded(ListDataEvent event) diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index a5c0790c4e94..9b0ff2e8649f 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -242,7 +242,6 @@ public class SortingComponent short iCurState; String CurFieldName; setMaxSortIndex(); - // String[][] SortFieldNames = new String[MaxSortIndex + 1][2]; ArrayList<String[]> SortFieldNames = new ArrayList<String[]>(); ArrayList<String> SortDescriptions = new ArrayList<String>(); for (int i = 0; i <= MaxSortIndex; i++) diff --git a/wizards/com/sun/star/wizards/ui/TitlesComponent.java b/wizards/com/sun/star/wizards/ui/TitlesComponent.java index 8aa15c29b3d5..6a0d9573aea4 100644 --- a/wizards/com/sun/star/wizards/ui/TitlesComponent.java +++ b/wizards/com/sun/star/wizards/ui/TitlesComponent.java @@ -170,7 +170,6 @@ public class TitlesComponent extends ControlScroller initializeScrollFields(); super.initialize(fieldnames.length); adjustPosSizes(); -// setComponentMouseTransparent(); } private void setFieldTitles() diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 56974cfb6723..094b58844cf5 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -192,9 +192,9 @@ public class UnoDialog implements EventNames return xPSet.getPropertyValue(PropertyName); } catch (com.sun.star.uno.Exception exception) - { // com.sun.star.container.NoSuchElementException, com.sun.star.beans.UnknownPropertyException, - exception.printStackTrace(System.err); // com.sun.star.lang.WrappedTargetException, com.sun.star.beans.PropertyVetoException - return null; // com.sun.star.lang.IllegalArgumentException + { + exception.printStackTrace(System.err); + return null; } } diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index 3a93236db6dd..c068cd114ef1 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -323,15 +323,12 @@ public class UnoDialog2 extends UnoDialog { try { - //System.out.println("Inserting : " + componentName); XInterface xControlModel = insertControlModel(serviceName, componentName, new String[] { }, new Object[] { }); Helper.setUnoPropertyValues(xControlModel, sPropNames, oPropValues); - //setControlPropertiesDebug(xControlModel, sPropNames, oPropValues); - //System.out.println(" Setting props successful !"); Helper.setUnoPropertyValue(xControlModel, PropertyNames.PROPERTY_NAME, componentName); } catch (Exception ex) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 63f20366866b..6ed54d9f2e4c 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -250,8 +250,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL xSSFRoadmap = UnoRuntime.queryInterface(XSingleServiceFactory.class, oRoadmap); xIndexContRoadmap = UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap); - // XPropertySet xPropRoadmapModel = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmap); - // xPropRoadmapModel.addPropertyChangeListener("CurrentItemID", new WizardDialog.RoadmapItemListener(this.xDialogModel)); MethodInvocation mi = new MethodInvocation("itemStateChanged", this, com.sun.star.awt.ItemEvent.class); getGuiEventListener().add("rdmNavi", EventNames.EVENT_ITEM_CHANGED, mi); @@ -259,8 +257,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL xRoadmapBroadcaster = UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl); xRoadmapBroadcaster.addItemListener((XItemListener) getGuiEventListener()); - // xRoadmapControl = this.xDlgContainer.getControl("rdmNavi"); - // xRoadmapBroadcaster.addItemListener(new RoadmapItemListener()); Helper.setUnoPropertyValue(oRoadmap, "Text", oWizardResource.getResText(UIConsts.RID_COMMON + 16)); } catch (NoSuchMethodException ex) |