java: convert fields to local variables where possible

found by PMD

Change-Id: I05b45382b8fb1b734657ce9421a20e6ef6fbe542
Reviewed-on: https://gerrit.libreoffice.org/12376
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin 2014-11-12 09:55:57 +02:00 committed by Noel Grandin
parent 84f7f412bf
commit bb437029c1
71 changed files with 226 additions and 387 deletions

View File

@ -57,8 +57,9 @@ public final class JNI_proxy implements java.lang.reflect.InvocationHandler
private long m_bridge_handle; private long m_bridge_handle;
private IEnvironment m_java_env; private IEnvironment m_java_env;
private long m_receiver_handle; /** these 2 fields are accessed directly from C++ */
private long m_td_handle; private long m_receiver_handle; // on the C++ side, this is a "UNO_Interface *"
private long m_td_handle; // on the C++ side, this is a "typelib_TypeDescription *"
private Type m_type; private Type m_type;
private String m_oid; private String m_oid;
private Class m_class; private Class m_class;

View File

@ -27,14 +27,9 @@ package com.sun.star.sdbcx.comp.hsqldb;
public class StorageNativeOutputStream { public class StorageNativeOutputStream {
static { NativeLibraries.load(); } static { NativeLibraries.load(); }
private String name;
private Object key;
/** Creates a new instance of StorageNativeOutputStream */ /** Creates a new instance of StorageNativeOutputStream */
public StorageNativeOutputStream(String _name,Object _key) { public StorageNativeOutputStream(String _name, Object key) {
name = _name; openStream(_name, (String)key, NativeStorageAccess.WRITE | NativeStorageAccess.TRUNCATE);
key = _key;
openStream(name, (String)key, NativeStorageAccess.WRITE | NativeStorageAccess.TRUNCATE);
} }
private native void openStream(String name,String key, int mode); private native void openStream(String name,String key, int mode);

View File

@ -42,19 +42,18 @@ public class RowSet implements XRowSet, XRow
{ {
private XRowSet m_rowSet; private XRowSet m_rowSet;
private XRow m_row; private XRow m_row;
private XPropertySet m_rowSetProps;
public RowSet( XMultiServiceFactory _orb, String _dataSource, int _commandType, String _command ) public RowSet( XMultiServiceFactory _orb, String _dataSource, int _commandType, String _command )
{ {
try try
{ {
m_rowSetProps = UnoRuntime.queryInterface( XPropertySet.class, _orb.createInstance( "com.sun.star.sdb.RowSet" ) ); XPropertySet rowSetProps = UnoRuntime.queryInterface( XPropertySet.class, _orb.createInstance( "com.sun.star.sdb.RowSet" ) );
m_rowSetProps.setPropertyValue( "DataSourceName", _dataSource ); rowSetProps.setPropertyValue( "DataSourceName", _dataSource );
m_rowSetProps.setPropertyValue( "CommandType", Integer.valueOf( _commandType ) ); rowSetProps.setPropertyValue( "CommandType", Integer.valueOf( _commandType ) );
m_rowSetProps.setPropertyValue( "Command", _command ); rowSetProps.setPropertyValue( "Command", _command );
m_rowSet = UnoRuntime.queryInterface( XRowSet.class, m_rowSetProps ); m_rowSet = UnoRuntime.queryInterface( XRowSet.class, rowSetProps );
m_row = UnoRuntime.queryInterface( XRow.class, m_rowSetProps ); m_row = UnoRuntime.queryInterface( XRow.class, rowSetProps );
} }
catch ( Exception e ) catch ( Exception e )
{ {

View File

@ -25,22 +25,19 @@ import com.sun.star.inspection.*;
public class MethodHandler implements XPropertyHandler public class MethodHandler implements XPropertyHandler
{ {
private XComponentContext m_context;
private XIntrospection m_introspection; private XIntrospection m_introspection;
private XIntrospectionAccess m_introspectionAccess;
private XIdlMethod[] m_methods; private XIdlMethod[] m_methods;
private java.util.HashMap<String,XIdlMethod> m_methodsHash; private java.util.HashMap<String,XIdlMethod> m_methodsHash;
/** Creates a new instance of MethodHandler */ /** Creates a new instance of MethodHandler */
public MethodHandler( XComponentContext _context ) public MethodHandler( XComponentContext _context )
{ {
m_context = _context;
m_methodsHash = new java.util.HashMap<String,XIdlMethod>(); m_methodsHash = new java.util.HashMap<String,XIdlMethod>();
try try
{ {
m_introspection = UnoRuntime.queryInterface( XIntrospection.class, m_introspection = UnoRuntime.queryInterface( XIntrospection.class,
m_context.getServiceManager().createInstanceWithContext( "com.sun.star.beans.Introspection", m_context ) _context.getServiceManager().createInstanceWithContext( "com.sun.star.beans.Introspection", _context )
); );
} }
catch( com.sun.star.uno.Exception e ) catch( com.sun.star.uno.Exception e )
@ -162,15 +159,14 @@ public class MethodHandler implements XPropertyHandler
if ( m_introspection == null ) if ( m_introspection == null )
return; return;
m_introspectionAccess = null;
m_methods = null; m_methods = null;
m_methodsHash = new java.util.HashMap<String,XIdlMethod>(); m_methodsHash = new java.util.HashMap<String,XIdlMethod>();
m_introspectionAccess = m_introspection.inspect( _component ); XIntrospectionAccess introspectionAccess = m_introspection.inspect( _component );
if ( m_introspectionAccess == null ) if ( introspectionAccess == null )
return; return;
m_methods = m_introspectionAccess.getMethods( MethodConcept.ALL ); m_methods = introspectionAccess.getMethods( MethodConcept.ALL );
} }
public boolean isComposable(String _propertyName) throws com.sun.star.beans.UnknownPropertyException public boolean isComposable(String _propertyName) throws com.sun.star.beans.UnknownPropertyException

View File

@ -43,8 +43,6 @@ public class CellBinding extends complexlib.ComplexTestCase
private SpreadsheetDocument m_document; private SpreadsheetDocument m_document;
/** our form layer */ /** our form layer */
private FormLayer m_formLayer; private FormLayer m_formLayer;
/** our service factory */
private XMultiServiceFactory m_orb;
@Override @Override
public String[] getTestMethodNames() public String[] getTestMethodNames()
@ -89,8 +87,9 @@ public class CellBinding extends complexlib.ComplexTestCase
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void before() throws com.sun.star.uno.Exception, java.lang.Exception public void before() throws com.sun.star.uno.Exception, java.lang.Exception
{ {
m_orb = param.getMSF(); /* our service factory */
m_document = new SpreadsheetDocument( m_orb ); XMultiServiceFactory orb = param.getMSF();
m_document = new SpreadsheetDocument( orb );
m_formLayer = new FormLayer( m_document ); m_formLayer = new FormLayer( m_document );
} }

View File

@ -54,7 +54,6 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
private DocumentHelper m_document; private DocumentHelper m_document;
private FormLayer m_formLayer; private FormLayer m_formLayer;
private XPropertySet m_masterForm; private XPropertySet m_masterForm;
private XFormController m_masterFormController;
private String m_sImageURL; private String m_sImageURL;
private SQLErrorEvent m_mostRecentErrorEvent; private SQLErrorEvent m_mostRecentErrorEvent;
@ -548,9 +547,9 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
// switch the forms into data entry mode // switch the forms into data entry mode
m_document.getCurrentView( ).toggleFormDesignMode( ); m_document.getCurrentView( ).toggleFormDesignMode( );
m_masterFormController = m_document.getCurrentView().getFormController( m_masterForm ); XFormController masterFormController = m_document.getCurrentView().getFormController( m_masterForm );
XSQLErrorBroadcaster errorBroadcaster = UnoRuntime.queryInterface( XSQLErrorBroadcaster.class, XSQLErrorBroadcaster errorBroadcaster = UnoRuntime.queryInterface( XSQLErrorBroadcaster.class,
m_masterFormController ); masterFormController );
errorBroadcaster.addSQLErrorListener( this ); errorBroadcaster.addSQLErrorListener( this );
// set the focus to the ID control // set the focus to the ID control

View File

@ -38,7 +38,6 @@ import org.openoffice.xforms.XMLDocument;
public class XMLFormSettings extends complexlib.ComplexTestCase public class XMLFormSettings extends complexlib.ComplexTestCase
{ {
private XMultiServiceFactory m_orb;
private XMLDocument m_document; private XMLDocument m_document;
private Model m_defaultModel; private Model m_defaultModel;
private FormLayer m_formLayer; private FormLayer m_formLayer;
@ -66,8 +65,8 @@ public class XMLFormSettings extends complexlib.ComplexTestCase
public void before() throws java.lang.Exception public void before() throws java.lang.Exception
{ {
// create the document and assign related members // create the document and assign related members
m_orb = param.getMSF(); XMultiServiceFactory orb = param.getMSF();
m_document = new XMLDocument( m_orb ); m_document = new XMLDocument( orb );
m_formLayer = new FormLayer( m_document ); m_formLayer = new FormLayer( m_document );
// create a simple structure in the DOM tree: an element with two attributes // create a simple structure in the DOM tree: an element with two attributes

View File

@ -32,7 +32,6 @@ import integration.forms.DocumentType;
public class XMLDocument extends integration.forms.DocumentHelper public class XMLDocument extends integration.forms.DocumentHelper
{ {
private XFormsSupplier m_formsSupplier;
private XNameContainer m_forms; private XNameContainer m_forms;
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
@ -52,13 +51,13 @@ public class XMLDocument extends integration.forms.DocumentHelper
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
private void impl_initialize( XComponent _document ) private void impl_initialize( XComponent _document )
{ {
m_formsSupplier = UnoRuntime.queryInterface( XFormsSupplier.class, XFormsSupplier formsSupplier = UnoRuntime.queryInterface( XFormsSupplier.class,
_document ); _document );
if ( m_formsSupplier == null ) if ( formsSupplier == null )
throw new IllegalArgumentException(); throw new IllegalArgumentException();
m_forms = m_formsSupplier.getXForms(); m_forms = formsSupplier.getXForms();
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */

View File

@ -148,7 +148,6 @@ public class Protocol extends JComponent
private long m_nWarnings ; private long m_nWarnings ;
private long m_nTestMarks; private long m_nTestMarks;
private Timestamp m_aStartTime; private Timestamp m_aStartTime;
private Timestamp m_aEndTime ;
/** /**
@ -631,8 +630,8 @@ public class Protocol extends JComponent
*/ */
public synchronized void logStatistics() public synchronized void logStatistics()
{ {
m_aEndTime = new Timestamp(System.currentTimeMillis()); Timestamp aEndTime = new Timestamp(System.currentTimeMillis());
Timestamp aDiff = new Timestamp(m_aEndTime.getTime()-m_aStartTime.getTime()); Timestamp aDiff = new Timestamp(aEndTime.getTime()-m_aStartTime.getTime());
int nLogType = TYPE_STATISTIC; int nLogType = TYPE_STATISTIC;
if (m_nErrors > 0) if (m_nErrors > 0)

View File

@ -87,12 +87,6 @@ public class CheckXComponentLoader
// member // member
/** points to the global uno service manager. */
private XMultiServiceFactory m_xMSF = null;
/** provides XComponentLoader interface. */
private XFrame m_xDesktop = null;
/** provides XComponentLoader interface too. */ /** provides XComponentLoader interface too. */
private XFrame m_xFrame = null; private XFrame m_xFrame = null;
@ -123,12 +117,13 @@ public class CheckXComponentLoader
@Before public void before() @Before public void before()
{ {
// get uno service manager from global test environment // get uno service manager from global test environment
m_xMSF = getMSF(); /* points to the global uno service manager. */
XMultiServiceFactory xMSF = getMSF();
// create stream provider // create stream provider
try try
{ {
m_xStreamProvider = UnoRuntime.queryInterface(XSimpleFileAccess.class, m_xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess")); m_xStreamProvider = UnoRuntime.queryInterface(XSimpleFileAccess.class, xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess"));
} }
catch(java.lang.Throwable ex) catch(java.lang.Throwable ex)
{ {
@ -136,9 +131,11 @@ public class CheckXComponentLoader
} }
// create desktop instance // create desktop instance
/* provides XComponentLoader interface. */
XFrame xDesktop = null;
try try
{ {
m_xDesktop = UnoRuntime.queryInterface(XFrame.class, m_xMSF.createInstance("com.sun.star.frame.Desktop")); xDesktop = UnoRuntime.queryInterface(XFrame.class, xMSF.createInstance("com.sun.star.frame.Desktop"));
} }
catch(java.lang.Throwable ex) catch(java.lang.Throwable ex)
{ {
@ -146,13 +143,13 @@ public class CheckXComponentLoader
} }
// create frame instance // create frame instance
m_xFrame = m_xDesktop.findFrame("testFrame_componentLoader", m_xFrame = xDesktop.findFrame("testFrame_componentLoader",
FrameSearchFlag.TASKS | FrameSearchFlag.CREATE); FrameSearchFlag.TASKS | FrameSearchFlag.CREATE);
assertNotNull("Couldn't create test frame.", m_xFrame); assertNotNull("Couldn't create test frame.", m_xFrame);
// define default loader for testing // define default loader for testing
// TODO think about using of bot loader instances! // TODO think about using of bot loader instances!
m_xLoader = UnoRuntime.queryInterface(XComponentLoader.class, m_xDesktop); m_xLoader = UnoRuntime.queryInterface(XComponentLoader.class, xDesktop);
assertNotNull("Desktop service doesn't support needed component loader interface.", m_xLoader); assertNotNull("Desktop service doesn't support needed component loader interface.", m_xLoader);
// get temp path for this environment // get temp path for this environment

View File

@ -33,21 +33,24 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
{ {
/** /**
* @member m_sFileName name of the corrsponding file on disk * the internal input stream for reading
* @member m_xInStream the internal input stream for reading
* @member m_xOutStream the internal input stream for writing
* @member m_xSeek points at runtime to m_xInStream or m_xOutStream and make it seekable
*
* @member m_bInWasUsed indicates, that the input stream interface was used
* @member m_bOutWasUsed indicates, that the output stream interface was used
*/ */
private String m_sFileName ;
private com.sun.star.io.XInputStream m_xInStream ; private com.sun.star.io.XInputStream m_xInStream ;
/**
* the internal input stream for writing
*/
private com.sun.star.io.XOutputStream m_xOutStream ; private com.sun.star.io.XOutputStream m_xOutStream ;
/**
* points at runtime to m_xInStream or m_xOutStream and make it seekable
*/
private com.sun.star.io.XSeekable m_xSeek ; private com.sun.star.io.XSeekable m_xSeek ;
/**
* indicates, that the input stream interface was used
*/
public boolean m_bInWasUsed ; public boolean m_bInWasUsed ;
/**
* indicates, that the output stream interface was used
*/
public boolean m_bOutWasUsed ; public boolean m_bOutWasUsed ;
/** /**
@ -77,7 +80,6 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
String sFileName, boolean bInput) String sFileName, boolean bInput)
throws com.sun.star.io.NotConnectedException throws com.sun.star.io.NotConnectedException
{ {
m_sFileName = sFileName ;
m_bInWasUsed = false ; m_bInWasUsed = false ;
m_bOutWasUsed = false ; m_bOutWasUsed = false ;
@ -92,14 +94,14 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
if (bInput) if (bInput)
{ {
m_xInStream = xHelper.openFileRead(m_sFileName); m_xInStream = xHelper.openFileRead(sFileName);
m_xSeek = UnoRuntime.queryInterface( m_xSeek = UnoRuntime.queryInterface(
com.sun.star.io.XSeekable.class, com.sun.star.io.XSeekable.class,
m_xInStream); m_xInStream);
} }
else else
{ {
m_xOutStream = xHelper.openFileWrite(m_sFileName); m_xOutStream = xHelper.openFileWrite(sFileName);
m_xSeek = UnoRuntime.queryInterface( m_xSeek = UnoRuntime.queryInterface(
com.sun.star.io.XSeekable.class, com.sun.star.io.XSeekable.class,
m_xOutStream); m_xOutStream);

View File

@ -51,8 +51,6 @@ public class DEPSAgent implements ILibEngine {
//temp variable //temp variable
private AbsGTBehavior selectGTBehavior; private AbsGTBehavior selectGTBehavior;
//The referred library
private Library socialLib;
//the own memory: store the point that generated in old learning cycle //the own memory: store the point that generated in old learning cycle
private BasicPoint pold_t; private BasicPoint pold_t;
//the own memory: store the point that generated in last learning cycle //the own memory: store the point that generated in last learning cycle
@ -66,9 +64,8 @@ public class DEPSAgent implements ILibEngine {
public double switchP = 0.5; public double switchP = 0.5;
public void setLibrary(Library lib) { public void setLibrary(Library lib) {
socialLib = lib; deGTBehavior.setLibrary(lib);
deGTBehavior.setLibrary(socialLib); psGTBehavior.setLibrary(lib);
psGTBehavior.setLibrary(socialLib);
} }
public void setProblemEncoder(ProblemEncoder encoder) { public void setProblemEncoder(ProblemEncoder encoder) {

View File

@ -82,9 +82,9 @@ public abstract class BaseNLPSolver extends WeakBase
m_xContext = xContext; m_xContext = xContext;
m_name = name; m_name = name;
m_componentFactory = xContext.getServiceManager(); XMultiComponentFactory componentFactory = xContext.getServiceManager();
try { try {
Object toolkit = m_componentFactory.createInstanceWithContext("com.sun.star.awt.Toolkit", xContext); Object toolkit = componentFactory.createInstanceWithContext("com.sun.star.awt.Toolkit", xContext);
m_xReschedule = UnoRuntime.queryInterface(XReschedule.class, toolkit); m_xReschedule = UnoRuntime.queryInterface(XReschedule.class, toolkit);
} catch (Exception ex) { } catch (Exception ex) {
Logger.getLogger(BaseNLPSolver.class.getName()).log(Level.SEVERE, null, ex); Logger.getLogger(BaseNLPSolver.class.getName()).log(Level.SEVERE, null, ex);
@ -115,7 +115,6 @@ public abstract class BaseNLPSolver extends WeakBase
// com.sun.star.sheet.XSolver: // com.sun.star.sheet.XSolver:
private XSpreadsheetDocument m_document; private XSpreadsheetDocument m_document;
private XMultiComponentFactory m_componentFactory;
private XModel m_xModel; private XModel m_xModel;
protected XReschedule m_xReschedule; protected XReschedule m_xReschedule;
private CellAddress m_objective; private CellAddress m_objective;
@ -129,7 +128,6 @@ public abstract class BaseNLPSolver extends WeakBase
protected int m_cellRangeCount; protected int m_cellRangeCount;
protected XCell m_objectiveCell; protected XCell m_objectiveCell;
protected XCell[] m_variableCells; protected XCell[] m_variableCells;
private CellRangeAddress[] m_cellRanges;
protected XChartDataArray[] m_cellRangeData; protected XChartDataArray[] m_cellRangeData;
protected CellMap[] m_variableMap; protected CellMap[] m_variableMap;
protected double[][][] m_variableData; protected double[][][] m_variableData;
@ -280,21 +278,19 @@ public abstract class BaseNLPSolver extends WeakBase
} }
m_cellRangeCount = cellRangeAddresses.size(); m_cellRangeCount = cellRangeAddresses.size();
m_cellRanges = new CellRangeAddress[m_cellRangeCount];
m_cellRanges = cellRangeAddresses.toArray(m_cellRanges);
m_cellRangeData = new XChartDataArray[m_cellRangeCount]; m_cellRangeData = new XChartDataArray[m_cellRangeCount];
int varID = 0; int varID = 0;
//get cell range data and map the variables to their new location //get cell range data and map the variables to their new location
for (int i = 0; i < m_cellRangeCount; i++) { for (int i = 0; i < m_cellRangeCount; i++) {
for (int y = 0; y <= m_cellRanges[i].EndRow - m_cellRanges[i].StartRow; y++) for (int y = 0; y <= cellRangeAddresses.get(i).EndRow - cellRangeAddresses.get(i).StartRow; y++)
for (int x = 0; x <= m_cellRanges[i].EndColumn - m_cellRanges[i].StartColumn; x++) { for (int x = 0; x <= cellRangeAddresses.get(i).EndColumn - cellRangeAddresses.get(i).StartColumn; x++) {
CellMap map = new CellMap(); CellMap map = new CellMap();
m_variableMap[varID++] = map; m_variableMap[varID++] = map;
map.Range = i; map.Range = i;
map.Col = x; map.Col = x;
map.Row = y; map.Row = y;
} }
m_cellRangeData[i] = getChartDataArray(m_cellRanges[i]); m_cellRangeData[i] = getChartDataArray(cellRangeAddresses.get(i));
m_variableData[i] = m_cellRangeData[i].getData(); m_variableData[i] = m_cellRangeData[i].getData();
} }
} }

View File

@ -100,9 +100,6 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver
return m_serviceNames; return m_serviceNames;
} }
// com.sun.star.sheet.XSolver:
private DEPSAgent[] m_agents;
private PropertyInfo<Double> m_agentSwitchRate = new PropertyInfo<Double>("AgentSwitchRate", 0.5, "Agent Switch Rate (DE Probability)"); private PropertyInfo<Double> m_agentSwitchRate = new PropertyInfo<Double>("AgentSwitchRate", 0.5, "Agent Switch Rate (DE Probability)");
// --DE // --DE
private PropertyInfo<Double> m_factor = new PropertyInfo<Double>("DEFactor", 0.5, "DE: Scaling Factor (0-1.2)"); private PropertyInfo<Double> m_factor = new PropertyInfo<Double>("DEFactor", 0.5, "DE: Scaling Factor (0-1.2)");
@ -122,11 +119,11 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver
initializeSolve(); initializeSolve();
//Init: //Init:
m_agents = new DEPSAgent[m_swarmSize.getValue()]; DEPSAgent[] agents = new DEPSAgent[m_swarmSize.getValue()];
for (int i = 0; i < m_swarmSize.getValue(); i++) { for (int i = 0; i < m_swarmSize.getValue(); i++) {
m_agents[i] = new DEPSAgent(); agents[i] = new DEPSAgent();
m_agents[i].setProblemEncoder(m_problemEncoder); agents[i].setProblemEncoder(m_problemEncoder);
m_agents[i].setPbest(m_library.getSelectedPoint(i)); agents[i].setPbest(m_library.getSelectedPoint(i));
DEGTBehavior deGTBehavior = new DEGTBehavior(); DEGTBehavior deGTBehavior = new DEGTBehavior();
deGTBehavior.FACTOR = m_factor.getValue(); deGTBehavior.FACTOR = m_factor.getValue();
@ -138,12 +135,12 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver
psGTBehavior.CL = m_CL.getValue(); psGTBehavior.CL = m_CL.getValue();
psGTBehavior.weight = m_weight.getValue(); psGTBehavior.weight = m_weight.getValue();
m_agents[i].switchP = m_agentSwitchRate.getValue(); agents[i].switchP = m_agentSwitchRate.getValue();
m_agents[i].setGTBehavior(deGTBehavior); agents[i].setGTBehavior(deGTBehavior);
m_agents[i].setGTBehavior(psGTBehavior); agents[i].setGTBehavior(psGTBehavior);
m_agents[i].setSpecComparator(m_specCompareEngine); agents[i].setSpecComparator(m_specCompareEngine);
m_agents[i].setLibrary(m_library); agents[i].setLibrary(m_library);
} }
//Learn: //Learn:
@ -170,13 +167,13 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver
m_library.refreshGbest(m_specCompareEngine); m_library.refreshGbest(m_specCompareEngine);
for (int i = 0; i < m_swarmSize.getValue(); i++) for (int i = 0; i < m_swarmSize.getValue(); i++)
m_agents[i].generatePoint(); agents[i].generatePoint();
for (int i = 0; i < m_swarmSize.getValue(); i++) for (int i = 0; i < m_swarmSize.getValue(); i++)
m_agents[i].learn(); agents[i].learn();
for (int i = 0; i < m_swarmSize.getValue(); i++) { for (int i = 0; i < m_swarmSize.getValue(); i++) {
SearchPoint agentPoint = m_agents[i].getMGState(); SearchPoint agentPoint = agents[i].getMGState();
boolean inRange = (agentPoint.getObjectiveValue() >= m_toleratedMin && agentPoint.getObjectiveValue() <= m_toleratedMax); boolean inRange = (agentPoint.getObjectiveValue() >= m_toleratedMin && agentPoint.getObjectiveValue() <= m_toleratedMax);
if (Library.replace(m_envCompareEngine, agentPoint, m_totalBestPoint)) { if (Library.replace(m_envCompareEngine, agentPoint, m_totalBestPoint)) {
m_solverStatusDialog.setBestSolution(m_totalBestPoint.getObjectiveValue(), m_totalBestPoint.isFeasible()); m_solverStatusDialog.setBestSolution(m_totalBestPoint.getObjectiveValue(), m_totalBestPoint.isFeasible());

View File

@ -45,35 +45,30 @@ import com.sun.star.uno.XComponentContext;
public class ResourceManager { public class ResourceManager {
private final XComponentContext m_context;
private final String m_oxtRoot;
private final String m_resourceBaseUrl;
private final String m_resourceBasename; private final String m_resourceBasename;
private XStringResourceWithLocation m_xStrResource; private XStringResourceWithLocation m_xStrResource;
private Locale m_locale;
public ResourceManager(XComponentContext xContext, String oxtId, String relativeResourceBaseUrl, String resourceBasename) { public ResourceManager(XComponentContext xContext, String oxtId, String relativeResourceBaseUrl, String resourceBasename) {
m_context = xContext;
m_resourceBasename = resourceBasename; m_resourceBasename = resourceBasename;
XPackageInformationProvider xPkgInfo = PackageInformationProvider.get(m_context); XPackageInformationProvider xPkgInfo = PackageInformationProvider.get(xContext);
m_oxtRoot = xPkgInfo.getPackageLocation(oxtId); final String oxtRoot = xPkgInfo.getPackageLocation(oxtId);
m_resourceBaseUrl = m_oxtRoot + relativeResourceBaseUrl; final String resourceBaseUrl = oxtRoot + relativeResourceBaseUrl;
try { try {
XMultiServiceFactory xConfig = theDefaultProvider.get(m_context); XMultiServiceFactory xConfig = theDefaultProvider.get(xContext);
Object[] args = new Object[1]; Object[] args = new Object[1];
args[0] = new PropertyValue("nodepath", 0, "/org.openoffice.Setup/L10N", PropertyState.DIRECT_VALUE); args[0] = new PropertyValue("nodepath", 0, "/org.openoffice.Setup/L10N", PropertyState.DIRECT_VALUE);
XPropertySet xConfigProps = UnoRuntime.queryInterface(XPropertySet.class, XPropertySet xConfigProps = UnoRuntime.queryInterface(XPropertySet.class,
xConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", args)); xConfig.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", args));
String[] locale = AnyConverter.toString(xConfigProps.getPropertyValue("ooLocale")).split("-"); String[] localeProp = AnyConverter.toString(xConfigProps.getPropertyValue("ooLocale")).split("-");
String lang = locale[0]; String lang = localeProp[0];
String country = (locale.length >= 2 ? locale[1] : ""); String country = (localeProp.length >= 2 ? localeProp[1] : "");
String variant = (locale.length >= 3 ? locale[2] : ""); String variant = (localeProp.length >= 3 ? localeProp[2] : "");
m_locale = new Locale(lang, country, variant); Locale locale = new Locale(lang, country, variant);
m_xStrResource = StringResourceWithLocation.create(m_context, m_resourceBaseUrl, true, m_locale, m_resourceBasename, "", null); m_xStrResource = StringResourceWithLocation.create(xContext, resourceBaseUrl, true, locale, m_resourceBasename, "", null);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
} }

View File

@ -87,21 +87,17 @@ public final class SCOSolverImpl extends BaseEvolutionarySolver
return m_serviceNames; return m_serviceNames;
} }
// com.sun.star.sheet.XSolver:
private SCAgent[] m_agents;
public void solve() { public void solve() {
initializeSolve(); initializeSolve();
//Init: //Init:
int swarmSize = m_swarmSize.getValue(); int swarmSize = m_swarmSize.getValue();
m_agents = new SCAgent[swarmSize]; SCAgent[] agents = new SCAgent[swarmSize];
for (int i = 0; i < swarmSize; i++) { for (int i = 0; i < swarmSize; i++) {
m_agents[i] = new SCAgent(); agents[i] = new SCAgent();
m_agents[i].setProblemEncoder(m_problemEncoder); agents[i].setProblemEncoder(m_problemEncoder);
m_agents[i].setSpecComparator(m_specCompareEngine); agents[i].setSpecComparator(m_specCompareEngine);
m_agents[i].setExternalLib(m_library); agents[i].setExternalLib(m_library);
} }
//Learn: //Learn:
@ -127,7 +123,7 @@ public final class SCOSolverImpl extends BaseEvolutionarySolver
m_toleratedCount < m_required.getValue() && m_toleratedCount < m_required.getValue() &&
m_solverStatusDialog.getUserState() != IEvolutionarySolverStatusDialog.CANCEL; learningCycle++) { m_solverStatusDialog.getUserState() != IEvolutionarySolverStatusDialog.CANCEL; learningCycle++) {
for (int i = 0; i < swarmSize; i++) { for (int i = 0; i < swarmSize; i++) {
SearchPoint point = m_agents[i].generatePoint(); SearchPoint point = agents[i].generatePoint();
boolean inRange = (point.getObjectiveValue() >= m_toleratedMin && point.getObjectiveValue() <= m_toleratedMax); boolean inRange = (point.getObjectiveValue() >= m_toleratedMin && point.getObjectiveValue() <= m_toleratedMax);
if (Library.replace(m_envCompareEngine, point, m_totalBestPoint)) { if (Library.replace(m_envCompareEngine, point, m_totalBestPoint)) {
m_solverStatusDialog.setBestSolution(m_totalBestPoint.getObjectiveValue(), m_totalBestPoint.isFeasible()); m_solverStatusDialog.setBestSolution(m_totalBestPoint.getObjectiveValue(), m_totalBestPoint.isFeasible());
@ -140,7 +136,7 @@ public final class SCOSolverImpl extends BaseEvolutionarySolver
} }
for (int i = 0; i < swarmSize; i++) for (int i = 0; i < swarmSize; i++)
m_agents[i].updateInfo(); agents[i].updateInfo();
if (m_specCompareEngine instanceof IUpdateCycleEngine) if (m_specCompareEngine instanceof IUpdateCycleEngine)
((IUpdateCycleEngine)m_specCompareEngine).updateCycle(learningCycle); ((IUpdateCycleEngine)m_specCompareEngine).updateCycle(learningCycle);

View File

@ -57,12 +57,10 @@ import java.util.logging.Logger;
public abstract class BaseDialog extends BaseControl { public abstract class BaseDialog extends BaseControl {
private XMultiComponentFactory xMCF; private XMultiComponentFactory xMCF;
private Object toolkit;
private XMultiServiceFactory xMSF; private XMultiServiceFactory xMSF;
protected XWindow xWindow; protected XWindow xWindow;
protected XDialog xDialog; protected XDialog xDialog;
private XWindowPeer xWindowPeer; private XWindowPeer xWindowPeer;
private ModalState modalState;
@Override @Override
public String getName() { public String getName() {
@ -92,7 +90,7 @@ public abstract class BaseDialog extends BaseControl {
public BaseDialog(XComponentContext context, String title, int x, int y, int width, int height) { public BaseDialog(XComponentContext context, String title, int x, int y, int width, int height) {
super(context); super(context);
modalState = ModalState.Exit; ModalState modalState = ModalState.Exit;
try { try {
xMCF = context.getServiceManager(); xMCF = context.getServiceManager();
setUnoModel(xMCF.createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", context)); setUnoModel(xMCF.createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", context));
@ -107,7 +105,7 @@ public abstract class BaseDialog extends BaseControl {
XControlModel xControlModel = UnoRuntime.queryInterface(XControlModel.class, getUnoModel()); XControlModel xControlModel = UnoRuntime.queryInterface(XControlModel.class, getUnoModel());
xControl.setModel(xControlModel); xControl.setModel(xControlModel);
toolkit = xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", context); Object toolkit = xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", context);
XToolkit xToolkit = UnoRuntime.queryInterface(XToolkit.class, toolkit); XToolkit xToolkit = UnoRuntime.queryInterface(XToolkit.class, toolkit);
xWindow = UnoRuntime.queryInterface(XWindow.class, unoControl); xWindow = UnoRuntime.queryInterface(XWindow.class, unoControl);
xWindow.setVisible(false); xWindow.setVisible(false);

View File

@ -45,9 +45,6 @@ public class EvolutionarySolverStatusUno extends BaseDialog
XActionListener { XActionListener {
private int userState; private int userState;
// <editor-fold defaultstate="collapsed" desc="UNO Controls">
private Label lblSolution;
private Label lblSolutionValue; private Label lblSolutionValue;
private Label lblIteration; private Label lblIteration;
private ProgressBar pbIteration; private ProgressBar pbIteration;
@ -55,12 +52,10 @@ public class EvolutionarySolverStatusUno extends BaseDialog
private Label lblStagnation; private Label lblStagnation;
private ProgressBar pbStagnation; private ProgressBar pbStagnation;
private Label lblStagnationValue; private Label lblStagnationValue;
private Label lblRuntime;
private Label lblRuntimeValue; private Label lblRuntimeValue;
private Button btnStop; private Button btnStop;
private Button btnOK; private Button btnOK;
private Button btnContinue; private Button btnContinue;
// </editor-fold>
private int defaultTextColor; private int defaultTextColor;
private int maxIterations; private int maxIterations;
private int maxStagnation; private int maxStagnation;
@ -81,9 +76,8 @@ public class EvolutionarySolverStatusUno extends BaseDialog
setProperty("Title", resourceManager.getLocalizedString("Dialog.Caption")); setProperty("Title", resourceManager.getLocalizedString("Dialog.Caption"));
} catch (com.sun.star.resource.MissingResourceException ex) {} //leave the title as it is } catch (com.sun.star.resource.MissingResourceException ex) {} //leave the title as it is
// <editor-fold defaultstate="collapsed" desc="Create UNO Controls">
int y = 5; int y = 5;
lblSolution = new Label(this, "lblSolution"); Label lblSolution = new Label(this, "lblSolution");
lblSolution.setPosition(5, y); lblSolution.setPosition(5, y);
lblSolution.setSize(60, 10); lblSolution.setSize(60, 10);
lblSolution.setLabel(resourceManager.getLocalizedString("Controls.lblSolution", "Current Solution:")); lblSolution.setLabel(resourceManager.getLocalizedString("Controls.lblSolution", "Current Solution:"));
@ -138,7 +132,7 @@ public class EvolutionarySolverStatusUno extends BaseDialog
lblStagnationValue.setVisible(false); lblStagnationValue.setVisible(false);
y+= 20; y+= 20;
lblRuntime = new Label(this, "lblRuntime"); Label lblRuntime = new Label(this, "lblRuntime");
lblRuntime.setPosition(5, y); lblRuntime.setPosition(5, y);
lblRuntime.setSize(60, 10); lblRuntime.setSize(60, 10);
lblRuntime.setLabel(resourceManager.getLocalizedString("Controls.lblRuntime", "Runtime:")); lblRuntime.setLabel(resourceManager.getLocalizedString("Controls.lblRuntime", "Runtime:"));
@ -176,7 +170,6 @@ public class EvolutionarySolverStatusUno extends BaseDialog
btnContinue.setActionCommand("btnContinueClick"); btnContinue.setActionCommand("btnContinueClick");
btnContinue.setEnabled(false); btnContinue.setEnabled(false);
y += 15; y += 15;
// </editor-fold>
} }
public int getUserState() { public int getUserState() {

View File

@ -73,9 +73,9 @@ public class ListenAtCalcRangeInDraw implements XChartDataChangeEventListener
Helper aHelper = new Helper( args ); Helper aHelper = new Helper( args );
maSheetDoc = aHelper.createSpreadsheetDocument(); maSheetDoc = aHelper.createSpreadsheetDocument();
maDrawDoc = aHelper.createDrawingDocument(); XModel aDrawDoc = aHelper.createDrawingDocument();
CalcHelper aCalcHelper = new CalcHelper( maSheetDoc ); CalcHelper aCalcHelper = new CalcHelper( maSheetDoc );
ChartHelper aChartHelper = new ChartHelper( maDrawDoc ); ChartHelper aChartHelper = new ChartHelper( aDrawDoc );
XCellRange aRange = aCalcHelper.insertFormulaRange( 3, 30 ); XCellRange aRange = aCalcHelper.insertFormulaRange( 3, 30 );
@ -185,7 +185,6 @@ public class ListenAtCalcRangeInDraw implements XChartDataChangeEventListener
// __________ private __________ // __________ private __________
private XSpreadsheetDocument maSheetDoc; private XSpreadsheetDocument maSheetDoc;
private XModel maDrawDoc;
private XChartDocument maChartDocument; private XChartDocument maChartDocument;
private XChartData maChartData; private XChartData maChartData;
} }

View File

@ -47,9 +47,6 @@ import com.sun.star.beans.XPropertySet;
public class OpenQuery { public class OpenQuery {
private XComponentContext xContext = null;
private XMultiComponentFactory xMCF = null;
/** /**
* @param args the command line arguments * @param args the command line arguments
*/ */
@ -67,6 +64,8 @@ public class OpenQuery {
} }
protected void openQuery() throws com.sun.star.uno.Exception, java.lang.Exception { protected void openQuery() throws com.sun.star.uno.Exception, java.lang.Exception {
XComponentContext xContext = null;
XMultiComponentFactory xMCF = null;
try { try {
// get the remote office component context // get the remote office component context
xContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();

View File

@ -101,10 +101,8 @@ public class DocumentView extends JFrame
private String msName ; private String msName ;
private JButton mbtOpen ;
private JButton mbtSave ; private JButton mbtSave ;
private JButton mbtExport ; private JButton mbtExport ;
private JButton mbtExit ;
private boolean mbDead ; private boolean mbDead ;
@ -122,10 +120,10 @@ public class DocumentView extends JFrame
// create and add command buttons to a panel // create and add command buttons to a panel
// it will be a sub panel of later layouted UI // it will be a sub panel of later layouted UI
mbtOpen = new JButton("Open ..." ); JButton mbtOpen = new JButton("Open ..." );
mbtSave = new JButton("Save" ); mbtSave = new JButton("Save" );
mbtExport = new JButton("Save as HTML ..."); mbtExport = new JButton("Save as HTML ...");
mbtExit = new JButton("Exit" ); JButton mbtExit = new JButton("Exit" );
mbtOpen.setEnabled (true ); mbtOpen.setEnabled (true );
mbtSave.setEnabled (false); mbtSave.setEnabled (false);

View File

@ -184,14 +184,14 @@ public class Number_Formats
{ {
// get the remote office context. If necessary a new office // get the remote office context. If necessary a new office
// process is started // process is started
maOfficeContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); XComponentContext aOfficeContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
System.out.println("Connected to a running office ..."); System.out.println("Connected to a running office ...");
maServiceManager = maOfficeContext.getServiceManager(); XMultiComponentFactory aServiceManager = aOfficeContext.getServiceManager();
// create a new spreadsheet document // create a new spreadsheet document
XComponentLoader aLoader = UnoRuntime.queryInterface( XComponentLoader aLoader = UnoRuntime.queryInterface(
XComponentLoader.class, maServiceManager.createInstanceWithContext( XComponentLoader.class, aServiceManager.createInstanceWithContext(
"com.sun.star.frame.Desktop", maOfficeContext) ); "com.sun.star.frame.Desktop", aOfficeContext) );
maSpreadsheetDoc = UnoRuntime.queryInterface( maSpreadsheetDoc = UnoRuntime.queryInterface(
XSpreadsheetDocument.class, XSpreadsheetDocument.class,
@ -207,8 +207,6 @@ public class Number_Formats
// __________ private members and methods __________ // __________ private members and methods __________
private XComponentContext maOfficeContext;
private XMultiComponentFactory maServiceManager;
private XSpreadsheetDocument maSpreadsheetDoc; private XSpreadsheetDocument maSpreadsheetDoc;
private XSpreadsheet maSheet; // the first sheet private XSpreadsheet maSheet; // the first sheet

View File

@ -53,7 +53,7 @@ import com.sun.star.bridge.XBridge;
public class ConnectionAwareClient extends java.awt.Frame public class ConnectionAwareClient extends java.awt.Frame
implements ActionListener , com.sun.star.lang.XEventListener implements ActionListener , com.sun.star.lang.XEventListener
{ {
private Button _btnWriter,_btnCalc; private Button _btnWriter;
private Label _txtLabel; private Label _txtLabel;
private String _url; private String _url;
@ -68,7 +68,7 @@ public class ConnectionAwareClient extends java.awt.Frame
Panel p1 = new Panel(); Panel p1 = new Panel();
_btnWriter = new Button("New writer"); _btnWriter = new Button("New writer");
_btnCalc = new Button("New calc"); Button _btnCalc = new Button("New calc");
_txtLabel = new Label( "disconnected" ); _txtLabel = new Label( "disconnected" );
_btnWriter.addActionListener(this); _btnWriter.addActionListener(this);

View File

@ -199,7 +199,6 @@ class ScriptSelectorPanel extends JPanel {
private XBrowseNode myrootnode = null; private XBrowseNode myrootnode = null;
public JTextField textField; public JTextField textField;
public JTree tree; public JTree tree;
private DefaultTreeModel treeModel;
public ScriptSelectorPanel(XBrowseNode root) public ScriptSelectorPanel(XBrowseNode root)
{ {
@ -229,7 +228,7 @@ class ScriptSelectorPanel extends JPanel {
} }
}; };
initNodes(myrootnode, top); initNodes(myrootnode, top);
treeModel = new DefaultTreeModel(top); DefaultTreeModel treeModel = new DefaultTreeModel(top);
tree = new JTree(treeModel); tree = new JTree(treeModel);
tree.setCellRenderer(new ScriptTreeRenderer()); tree.setCellRenderer(new ScriptTreeRenderer());

View File

@ -117,7 +117,6 @@ public class TextDocuments {
private XTextDocument mxDoc = null; private XTextDocument mxDoc = null;
private XMultiServiceFactory mxDocFactory = null; private XMultiServiceFactory mxDocFactory = null;
private XMultiServiceFactory mxFactory = null; private XMultiServiceFactory mxFactory = null;
private XPropertySet mxDocProps = null;
private XText mxDocText = null; private XText mxDocText = null;
private XTextCursor mxDocCursor = null; private XTextCursor mxDocCursor = null;
private XTextContent mxFishSection = null; private XTextContent mxFishSection = null;
@ -127,18 +126,16 @@ public class TextDocuments {
* @param args the command line arguments * @param args the command line arguments
*/ */
public static void main(String[] args) { public static void main(String[] args) {
TextDocuments textDocuments1 = new TextDocuments(); TextDocuments textDocuments1 = new TextDocuments();
try { try {
// output directory for store test; // output directory for store test;
sOutputDir = args[0]; sOutputDir = args[0];
textDocuments1.runDemo(); textDocuments1.runDemo();
} } catch (java.lang.Exception e) {
catch (java.lang.Exception e){
System.out.println(e.getMessage()); System.out.println(e.getMessage());
e.printStackTrace(); e.printStackTrace();
} } finally {
finally {
System.exit(0); System.exit(0);
} }
} }
@ -291,8 +288,7 @@ public class TextDocuments {
// Get a reference to the document's property set. This contains document // Get a reference to the document's property set. This contains document
// information like the current word count // information like the current word count
mxDocProps = UnoRuntime.queryInterface( UnoRuntime.queryInterface(XPropertySet.class, mxDoc );
XPropertySet.class, mxDoc );
// Simple text insertion example // Simple text insertion example
BodyTextExample (); BodyTextExample ();

View File

@ -39,12 +39,6 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
* The method name which will be written into f.e. the data base * The method name which will be written into f.e. the data base
**/ **/
private String mTestMethodName = null; private String mTestMethodName = null;
/** Maximal time one method is allowed to execute
* Can be set with parameter 'ThreadTimeOut'
**/
private int m_nThreadTimeOut = 0;
private boolean m_bBeforeCalled; private boolean m_bBeforeCalled;
@ -90,10 +84,13 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
private void test_method(DescEntry _entry) private void test_method(DescEntry _entry)
{ {
m_nThreadTimeOut = param.getInt("ThreadTimeOut"); /* Maximal time one method is allowed to execute
if (m_nThreadTimeOut == 0) * Can be set with parameter 'ThreadTimeOut'
**/
int nThreadTimeOut = param.getInt("ThreadTimeOut");
if (nThreadTimeOut == 0)
{ {
m_nThreadTimeOut = 300000; nThreadTimeOut = 300000;
} }
for (int i = 0; i < _entry.SubEntries.length; i++) for (int i = 0; i < _entry.SubEntries.length; i++)
@ -153,7 +150,7 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
int sleepingStep = 1000; int sleepingStep = 1000;
int factor = 0; int factor = 0;
while (th.isAlive() && (lastPing != newPing || factor * sleepingStep < m_nThreadTimeOut)) while (th.isAlive() && (lastPing != newPing || factor * sleepingStep < nThreadTimeOut))
{ {
Thread.sleep(sleepingStep); Thread.sleep(sleepingStep);
factor++; factor++;
@ -175,7 +172,7 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
{ {
log.println("Destroy " + mTestMethodName); log.println("Destroy " + mTestMethodName);
th.stopRunning(); th.stopRunning();
subEntry.State = "Test did sleep for " + (m_nThreadTimeOut / 1000) + " seconds and has been killed!"; subEntry.State = "Test did sleep for " + (nThreadTimeOut / 1000) + " seconds and has been killed!";
subEntry.hasErrorMsg = true; subEntry.hasErrorMsg = true;
subEntry.ErrorMsg = subEntry.State; subEntry.ErrorMsg = subEntry.State;
continue; continue;

View File

@ -46,8 +46,6 @@ class Rect
class BorderRemover class BorderRemover
{ {
private ImageHelper m_aImage;
// Helper values, filled after find Border // Helper values, filled after find Border
// --------------------------------- test mode --------------------------------- // --------------------------------- test mode ---------------------------------
@ -121,12 +119,12 @@ class BorderRemover
public boolean createNewImageWithoutBorder(String _sFilenameFrom, String _sFilenameTo) public boolean createNewImageWithoutBorder(String _sFilenameFrom, String _sFilenameTo)
throws java.io.IOException throws java.io.IOException
{ {
m_aImage = ImageHelper.createImageHelper(_sFilenameFrom); ImageHelper aImageHelper = ImageHelper.createImageHelper(_sFilenameFrom);
int nBorderColor = m_aImage.getPixel(0,0); int nBorderColor = aImageHelper.getPixel(0,0);
Rect aInnerRect = findBorder(m_aImage, nBorderColor); Rect aInnerRect = findBorder(aImageHelper, nBorderColor);
RenderedImage aImage = createImage(m_aImage, aInnerRect); RenderedImage aImage = createImage(aImageHelper, aInnerRect);
File aWriteFile = new File(_sFilenameTo); File aWriteFile = new File(_sFilenameTo);

View File

@ -29,7 +29,6 @@ class ImageHelper
private Image m_aImage; private Image m_aImage;
private int[] m_aPixels; private int[] m_aPixels;
private int m_w = 0; private int m_w = 0;
private int m_h = 0;
private ImageHelper(Image _aImage) private ImageHelper(Image _aImage)
@ -38,11 +37,11 @@ class ImageHelper
// grab all (consume much memory) // grab all (consume much memory)
m_w = getWidth(); m_w = getWidth();
m_h = getHeight(); int h = getHeight();
int x = 0; int x = 0;
int y = 0; int y = 0;
m_aPixels = new int[m_w * m_h]; m_aPixels = new int[m_w * h];
PixelGrabber pg = new PixelGrabber(m_aImage, x, y, m_w, m_h, m_aPixels, 0, m_w); PixelGrabber pg = new PixelGrabber(m_aImage, x, y, m_w, h, m_aPixels, 0, m_w);
try { try {
pg.grabPixels(); pg.grabPixels();
} catch (InterruptedException e) { } catch (InterruptedException e) {

View File

@ -29,7 +29,6 @@ class ImageHelper
private Image m_aImage; private Image m_aImage;
private int[] m_aPixels; private int[] m_aPixels;
private int m_w = 0; private int m_w = 0;
private int m_h = 0;
private ImageHelper(Image _aImage) private ImageHelper(Image _aImage)
@ -38,11 +37,11 @@ class ImageHelper
// grab all (consume much memory) // grab all (consume much memory)
m_w = getWidth(); m_w = getWidth();
m_h = getHeight(); int h = getHeight();
int x = 0; int x = 0;
int y = 0; int y = 0;
m_aPixels = new int[m_w * m_h]; m_aPixels = new int[m_w * h];
PixelGrabber pg = new PixelGrabber(m_aImage, x, y, m_w, m_h, m_aPixels, 0, m_w); PixelGrabber pg = new PixelGrabber(m_aImage, x, y, m_w, h, m_aPixels, 0, m_w);
try try
{ {
pg.grabPixels(); pg.grabPixels();

View File

@ -69,8 +69,6 @@ public class ParameterHelper
private int m_nResolutionInDPI = 180; private int m_nResolutionInDPI = 180;
private boolean m_bIncludeSubdirectories;
private String m_sInputPath = null; private String m_sInputPath = null;
private String m_sOutputPath = null; private String m_sOutputPath = null;
@ -126,7 +124,7 @@ public class ParameterHelper
public boolean isIncludeSubDirectories() public boolean isIncludeSubDirectories()
{ {
m_bIncludeSubdirectories = true; boolean bIncludeSubdirectories = true;
String sRECURSIVE = (String)getTestParameters().get( PropertyName.DOC_COMPARATOR_INCLUDE_SUBDIRS ); String sRECURSIVE = (String)getTestParameters().get( PropertyName.DOC_COMPARATOR_INCLUDE_SUBDIRS );
// TODO: I need to get the boolean value with get("name") because, if it is not given getBool() returns // TODO: I need to get the boolean value with get("name") because, if it is not given getBool() returns
// with a default of 'false' which is not very helpful if the default should be 'true' // with a default of 'false' which is not very helpful if the default should be 'true'
@ -138,9 +136,9 @@ public class ParameterHelper
if (sRECURSIVE.equalsIgnoreCase("no") || if (sRECURSIVE.equalsIgnoreCase("no") ||
sRECURSIVE.equalsIgnoreCase("false")) sRECURSIVE.equalsIgnoreCase("false"))
{ {
m_bIncludeSubdirectories = false; bIncludeSubdirectories = false;
} }
return m_bIncludeSubdirectories; return bIncludeSubdirectories;
} }
public String getReferenceType() public String getReferenceType()

View File

@ -85,7 +85,6 @@ import com.sun.star.util.*;
*/ */
public class ConfigHelper public class ConfigHelper
{ {
private XMultiServiceFactory m_xSMGR = null;
private XHierarchicalNameAccess m_xConfig = null; private XHierarchicalNameAccess m_xConfig = null;
@ -94,12 +93,9 @@ public class ConfigHelper
boolean bReadOnly ) boolean bReadOnly )
throws com.sun.star.uno.Exception throws com.sun.star.uno.Exception
{ {
m_xSMGR = xSMGR;
XMultiServiceFactory xConfigRoot = UnoRuntime.queryInterface( XMultiServiceFactory xConfigRoot = UnoRuntime.queryInterface(
XMultiServiceFactory.class, XMultiServiceFactory.class,
m_xSMGR.createInstance( xSMGR.createInstance("com.sun.star.configuration.ConfigurationProvider"));
"com.sun.star.configuration.ConfigurationProvider"));
PropertyValue[] lParams = new PropertyValue[1]; PropertyValue[] lParams = new PropertyValue[1];
lParams[0] = new PropertyValue(); lParams[0] = new PropertyValue();

View File

@ -46,7 +46,6 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
* @member m_bOutWasUsed indicates, that the output stream interface was used * @member m_bOutWasUsed indicates, that the output stream interface was used
*/ */
private String m_sFileName ;
private com.sun.star.io.XInputStream m_xInStream ; private com.sun.star.io.XInputStream m_xInStream ;
private com.sun.star.io.XOutputStream m_xOutStream ; private com.sun.star.io.XOutputStream m_xOutStream ;
private com.sun.star.io.XSeekable m_xSeek ; private com.sun.star.io.XSeekable m_xSeek ;
@ -57,7 +56,7 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
/** /**
* construct a new instance of this class * construct a new instance of this class
* It set the name of the correspojnding file on disk, which * It set the name of the corresponding file on disk, which
* should be source or target for the following operations on * should be source or target for the following operations on
* this object. And it regulate if it should function as * this object. And it regulate if it should function as
* input or output stream. * input or output stream.
@ -74,13 +73,11 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
* *
* @throw com.sun.star.io.NotConnectedException * @throw com.sun.star.io.NotConnectedException
* in case the internal streams to the file on disk couldn't established. * in case the internal streams to the file on disk couldn't established.
* They are necessary. Otherwhise this simulator can't really work. * They are necessary. Otherwise this simulator can't really work.
*/ */
public StreamSimulator( String sFileName , boolean bInput , public StreamSimulator( String sFileName , boolean bInput ,
lib.TestParameters param ) throws com.sun.star.io.NotConnectedException lib.TestParameters param ) throws com.sun.star.io.NotConnectedException
{ {
m_sFileName = sFileName ;
try try
{ {
XSimpleFileAccess xHelper = UnoRuntime.queryInterface(XSimpleFileAccess.class, XSimpleFileAccess xHelper = UnoRuntime.queryInterface(XSimpleFileAccess.class,
@ -91,14 +88,14 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
if (bInput) if (bInput)
{ {
m_xInStream = xHelper.openFileRead(m_sFileName); m_xInStream = xHelper.openFileRead(sFileName);
m_xSeek = UnoRuntime.queryInterface( m_xSeek = UnoRuntime.queryInterface(
com.sun.star.io.XSeekable.class, com.sun.star.io.XSeekable.class,
m_xInStream); m_xInStream);
} }
else else
{ {
m_xOutStream = xHelper.openFileWrite(m_sFileName); m_xOutStream = xHelper.openFileWrite(sFileName);
m_xSeek = UnoRuntime.queryInterface( m_xSeek = UnoRuntime.queryInterface(
com.sun.star.io.XSeekable.class, com.sun.star.io.XSeekable.class,
m_xOutStream); m_xOutStream);

View File

@ -21,7 +21,6 @@ import helper.CfgParser;
import helper.ClParser; import helper.ClParser;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.StringTokenizer; import java.util.StringTokenizer;

View File

@ -30,7 +30,6 @@ import com.sun.star.beans.XPropertySet;
*/ */
public class FrameDsc extends InstDescr { public class FrameDsc extends InstDescr {
private Size size = null;
private int height = 2000; private int height = 2000;
private int width = 2000; private int width = 2000;
private String name = null; private String name = null;
@ -77,7 +76,7 @@ public class FrameDsc extends InstDescr {
public XInterface createInstance( XMultiServiceFactory docMSF ) { public XInterface createInstance( XMultiServiceFactory docMSF ) {
Object SrvObj = null; Object SrvObj = null;
size = new Size(); Size size = new Size();
size.Height = height; size.Height = height;
size.Width = width; size.Width = width;

View File

@ -55,7 +55,6 @@ import com.sun.star.util.XURLTransformer;
public class _XSynchronousFrameLoader extends MultiMethodTest { public class _XSynchronousFrameLoader extends MultiMethodTest {
public XSynchronousFrameLoader oObj = null; // oObj filled by MultiMethodTest public XSynchronousFrameLoader oObj = null; // oObj filled by MultiMethodTest
private String url = null ;
private XFrame frame = null ; private XFrame frame = null ;
private XComponent frameSup = null ; private XComponent frameSup = null ;
private PropertyValue[] descr = null; private PropertyValue[] descr = null;
@ -72,7 +71,7 @@ public class _XSynchronousFrameLoader extends MultiMethodTest {
*/ */
@Override @Override
public void before() { public void before() {
url = (String) tEnv.getObjRelation("FrameLoader.URL") ; String url = (String) tEnv.getObjRelation("FrameLoader.URL") ;
frame = (XFrame) tEnv.getObjRelation("FrameLoader.Frame") ; frame = (XFrame) tEnv.getObjRelation("FrameLoader.Frame") ;
if (url == null) { if (url == null) {

View File

@ -44,7 +44,6 @@ import com.sun.star.lang.Locale;
public class _XCollator extends MultiMethodTest { public class _XCollator extends MultiMethodTest {
public XCollator oObj = null; public XCollator oObj = null;
private String[] alg = null ; private String[] alg = null ;
private int[] opt = null ;
Locale loc = new Locale("en", "EN", ""); Locale loc = new Locale("en", "EN", "");
/** /**
@ -75,7 +74,7 @@ public class _XCollator extends MultiMethodTest {
*/ */
public void _listCollatorOptions() { public void _listCollatorOptions() {
requiredMethod("listCollatorAlgorithms()") ; requiredMethod("listCollatorAlgorithms()") ;
opt = oObj.listCollatorOptions(alg[0]) ; int[] opt = oObj.listCollatorOptions(alg[0]) ;
log.println("Collator '" + alg[0] + "' options :"); log.println("Collator '" + alg[0] + "' options :");
if (opt != null) { if (opt != null) {
for (int i = 0; i < opt.length; i++) { for (int i = 0; i < opt.length; i++) {

View File

@ -48,7 +48,6 @@ import com.sun.star.lang.Locale;
public class _XTransliteration extends MultiMethodTest { public class _XTransliteration extends MultiMethodTest {
public XTransliteration oObj = null; public XTransliteration oObj = null;
private String[] mod = null ;
private Locale loc = new Locale("en", "EN", "") ; private Locale loc = new Locale("en", "EN", "") ;
/** /**
@ -57,7 +56,7 @@ public class _XTransliteration extends MultiMethodTest {
* one module name. * one module name.
*/ */
public void _getAvailableModules() { public void _getAvailableModules() {
mod = oObj.getAvailableModules(loc, TransliterationType.ONE_TO_ONE); String[] mod = oObj.getAvailableModules(loc, TransliterationType.ONE_TO_ONE);
if (mod != null) { if (mod != null) {
log.println("Available modules :") ; log.println("Available modules :") ;

View File

@ -47,8 +47,6 @@ import com.sun.star.uno.UnoRuntime;
public class _XObjectInputStream extends MultiMethodTest { public class _XObjectInputStream extends MultiMethodTest {
public XObjectInputStream oObj = null; public XObjectInputStream oObj = null;
private Object objRead = null ;
private Object objWrite = null ;
/** /**
* Test reads perisist object from stream and compares properties * Test reads perisist object from stream and compares properties
@ -58,7 +56,7 @@ public class _XObjectInputStream extends MultiMethodTest {
* of objects properties are equal. <p> * of objects properties are equal. <p>
*/ */
public void _readObject() { public void _readObject() {
objWrite = tEnv.getObjRelation("PersistObject") ; Object objWrite = tEnv.getObjRelation("PersistObject") ;
if (objWrite == null) { if (objWrite == null) {
log.println("PersistObject not found in relations") ; log.println("PersistObject not found in relations") ;
tRes.tested("readObject()", false) ; tRes.tested("readObject()", false) ;
@ -77,6 +75,7 @@ public class _XObjectInputStream extends MultiMethodTest {
return; return;
} }
Object objRead = null ;
try { try {
objRead = oObj.readObject() ; objRead = oObj.readObject() ;
} catch(com.sun.star.io.IOException e) { } catch(com.sun.star.io.IOException e) {

View File

@ -52,7 +52,6 @@ public class _XCachedDynamicResultSetStubFactory extends MultiMethodTest {
*/ */
public XCachedDynamicResultSetStubFactory oObj; public XCachedDynamicResultSetStubFactory oObj;
private XDynamicResultSet resSet = null ; private XDynamicResultSet resSet = null ;
private XDynamicResultSet resSetStub = null ;
/** /**
* Retrieves object relation. * Retrieves object relation.
@ -77,7 +76,7 @@ public class _XCachedDynamicResultSetStubFactory extends MultiMethodTest {
public void _createCachedDynamicResultSetStub() { public void _createCachedDynamicResultSetStub() {
boolean result = true ; boolean result = true ;
resSetStub = oObj.createCachedDynamicResultSetStub(resSet) ; XDynamicResultSet resSetStub = oObj.createCachedDynamicResultSetStub(resSet) ;
if (resSetStub == null) { if (resSetStub == null) {
log.println("!!! Method returned null !!!") ; log.println("!!! Method returned null !!!") ;

View File

@ -44,7 +44,6 @@ import com.sun.star.uno.UnoRuntime;
public class _XControlAccess extends MultiMethodTest { public class _XControlAccess extends MultiMethodTest {
public XControlAccess oObj = null; public XControlAccess oObj = null;
private XControlInformation xCI = null ;
private String[] supControls = null ; private String[] supControls = null ;
private String[][] supProperties = null ; private String[][] supProperties = null ;
@ -58,7 +57,7 @@ public class _XControlAccess extends MultiMethodTest {
*/ */
@Override @Override
protected void before() { protected void before() {
xCI = UnoRuntime.queryInterface XControlInformation xCI = UnoRuntime.queryInterface
(XControlInformation.class, oObj); (XControlInformation.class, oObj);
if (xCI == null) throw new StatusException if (xCI == null) throw new StatusException

View File

@ -78,8 +78,6 @@ public class ODatabaseSource extends TestCase {
private static int uniqueSuffixStat = 0 ; private static int uniqueSuffixStat = 0 ;
private int uniqueSuffix = 0 ; private int uniqueSuffix = 0 ;
private XNamingService xDBContextNameServ = null ;
private String databaseName = null ;
private XOfficeDatabaseDocument xDBDoc = null; private XOfficeDatabaseDocument xDBDoc = null;
/** /**
@ -136,7 +134,7 @@ public class ODatabaseSource extends TestCase {
throw new StatusException("Service not available", e) ; throw new StatusException("Service not available", e) ;
} }
xDBContextNameServ = UnoRuntime.queryInterface(XNamingService.class, oInterface) ; XNamingService xDBContextNameServ = UnoRuntime.queryInterface(XNamingService.class, oInterface) ;
// retrieving temp directory for database // retrieving temp directory for database
String tmpDatabaseUrl = utils.getOfficeTempDir(Param.getMSF()); String tmpDatabaseUrl = utils.getOfficeTempDir(Param.getMSF());
@ -179,7 +177,7 @@ public class ODatabaseSource extends TestCase {
throw new StatusException("Could not set property 'URL' ", e) ; throw new StatusException("Could not set property 'URL' ", e) ;
} }
databaseName = "NewDatabaseSource" + uniqueSuffix ; String databaseName = "NewDatabaseSource" + uniqueSuffix ;
// make sure that the DatabaseContext isn't already registered // make sure that the DatabaseContext isn't already registered
try { try {

View File

@ -134,7 +134,6 @@ public class ORowSet extends TestCase {
private Object m_rowSet = null; private Object m_rowSet = null;
private DataSource m_dataSource; private DataSource m_dataSource;
private String m_tableFile; private String m_tableFile;
private XMultiServiceFactory m_orb = null;
/** /**
* Initializes some class fields. Then creates DataSource, which serves * Initializes some class fields. Then creates DataSource, which serves
@ -160,13 +159,13 @@ public class ORowSet extends TestCase {
protected void initialize ( TestParameters Param, PrintWriter _log) protected void initialize ( TestParameters Param, PrintWriter _log)
throws StatusException throws StatusException
{ {
m_orb = Param.getMSF(); XMultiServiceFactory orb = Param.getMSF();
String tmpDir = utils.getOfficeTemp( m_orb ); String tmpDir = utils.getOfficeTemp( orb );
origDB = util.utils.getFullTestDocName("TestDB/testDB.dbf"); origDB = util.utils.getFullTestDocName("TestDB/testDB.dbf");
dbTools = new DBTools( m_orb ); dbTools = new DBTools( orb );
// creating DataSource and registering it in DatabaseContext // creating DataSource and registering it in DatabaseContext
String dbURL = (String) Param.get("test.db.url"); String dbURL = (String) Param.get("test.db.url");
@ -174,7 +173,7 @@ public class ORowSet extends TestCase {
String dbPassword = (String) Param.get("test.db.password"); String dbPassword = (String) Param.get("test.db.password");
log.println("Creating and registering DataSource ..."); log.println("Creating and registering DataSource ...");
srcInf = new DataSourceDescriptor( m_orb ); srcInf = new DataSourceDescriptor( orb );
if (dbURL != null && dbUser != null && dbPassword != null) if (dbURL != null && dbUser != null && dbPassword != null)
{ {
isMySQLDB = true; isMySQLDB = true;

View File

@ -126,7 +126,6 @@ import util.utils;
public class GenericModelTest extends TestCase { public class GenericModelTest extends TestCase {
private XTextDocument m_xTextDoc; private XTextDocument m_xTextDoc;
private Object m_dbSrc = null; private Object m_dbSrc = null;
private DBTools.DataSourceInfo m_srcInf = null;
/** /**
* This is the name of the Data Base which the test uses: "APITestDatabase" * This is the name of the Data Base which the test uses: "APITestDatabase"
*/ */
@ -403,11 +402,11 @@ public class GenericModelTest extends TestCase {
m_dbTools = new DBTools( xMSF ); m_dbTools = new DBTools( xMSF );
String tmpDir = utils.getOfficeTemp((xMSF)); String tmpDir = utils.getOfficeTemp((xMSF));
m_srcInf = m_dbTools.newDataSourceInfo(); DBTools.DataSourceInfo srcInf = m_dbTools.newDataSourceInfo();
m_srcInf.URL = "sdbc:dbase:" + DBTools.dirToUrl(tmpDir); srcInf.URL = "sdbc:dbase:" + DBTools.dirToUrl(tmpDir);
log.println("data source: " + m_srcInf.URL); log.println("data source: " + srcInf.URL);
m_dbSrc = m_srcInf.getDataSourceService(); m_dbSrc = srcInf.getDataSourceService();
m_dbTools.reRegisterDB(m_dbSourceName, m_dbSrc); m_dbTools.reRegisterDB(m_dbSourceName, m_dbSrc);
m_XFormLoader = FormTools.bindForm(m_xTextDoc, m_dbSourceName, m_XFormLoader = FormTools.bindForm(m_xTextDoc, m_dbSourceName,

View File

@ -64,7 +64,6 @@ public final class SOFormulaParser extends ComponentBase
public static final int UNARY_OPERATORS = 2; public static final int UNARY_OPERATORS = 2;
public static final int BINARY_OPERATORS = 3; public static final int BINARY_OPERATORS = 3;
public static final int FUNCTIONS = 4; public static final int FUNCTIONS = 4;
private final XComponentContext m_xContext;
private final PropertySetMixin m_prophlp; private final PropertySetMixin m_prophlp;
private static final String __serviceName = "com.sun.star.report.meta.FormulaParser"; private static final String __serviceName = "com.sun.star.report.meta.FormulaParser";
private static final String OPERATORS = "org.pentaho.reporting.libraries.formula.operators."; private static final String OPERATORS = "org.pentaho.reporting.libraries.formula.operators.";
@ -82,14 +81,13 @@ public final class SOFormulaParser extends ComponentBase
public SOFormulaParser(final XComponentContext context) public SOFormulaParser(final XComponentContext context)
{ {
m_xContext = context;
final ClassLoader cl = java.lang.Thread.currentThread().getContextClassLoader(); final ClassLoader cl = java.lang.Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
parser = new FormulaParser(); parser = new FormulaParser();
try try
{ {
final XFormulaOpCodeMapper mapper = UnoRuntime.queryInterface(XFormulaOpCodeMapper.class, m_xContext.getServiceManager().createInstanceWithContext("simple.formula.FormulaOpCodeMapperObj", m_xContext)); final XFormulaOpCodeMapper mapper = UnoRuntime.queryInterface(XFormulaOpCodeMapper.class, context.getServiceManager().createInstanceWithContext("simple.formula.FormulaOpCodeMapperObj", context));
FormulaOpCodeMapEntry[] opCodes = mapper.getAvailableMappings(FormulaLanguage.ODFF, FormulaMapGroup.FUNCTIONS); FormulaOpCodeMapEntry[] opCodes = mapper.getAvailableMappings(FormulaLanguage.ODFF, FormulaMapGroup.FUNCTIONS);
final DefaultFormulaContext defaultContext = new DefaultFormulaContext(); final DefaultFormulaContext defaultContext = new DefaultFormulaContext();
final FunctionRegistry functionRegistry = defaultContext.getFunctionRegistry(); final FunctionRegistry functionRegistry = defaultContext.getFunctionRegistry();
@ -136,7 +134,7 @@ public final class SOFormulaParser extends ComponentBase
// for your optional attributes if necessary. See the documentation // for your optional attributes if necessary. See the documentation
// of the PropertySetMixin helper for further information. // of the PropertySetMixin helper for further information.
// Ensure that your attributes are initialized correctly! // Ensure that your attributes are initialized correctly!
m_prophlp = new PropertySetMixin(m_xContext, this, m_prophlp = new PropertySetMixin(context, this,
new Type(com.sun.star.report.meta.XFormulaParser.class), null); new Type(com.sun.star.report.meta.XFormulaParser.class), null);
} }

View File

@ -34,17 +34,13 @@ public final class StarFunctionDescription extends WeakBase
implements com.sun.star.report.meta.XFunctionDescription implements com.sun.star.report.meta.XFunctionDescription
{ {
private final XComponentContext m_xContext;
private final PropertySetMixin m_prophlp; private final PropertySetMixin m_prophlp;
// attributes
// final private com.sun.star.report.meta.XFunctionCategory m_Category;
private final FunctionDescription functionDescription; private final FunctionDescription functionDescription;
private final XFunctionCategory category; private final XFunctionCategory category;
private final Locale defaultLocale; private final Locale defaultLocale;
public StarFunctionDescription(final DefaultFormulaContext defaultContext, final XComponentContext context, final XFunctionCategory category, final FunctionDescription functionDescription) public StarFunctionDescription(final DefaultFormulaContext defaultContext, final XComponentContext context, final XFunctionCategory category, final FunctionDescription functionDescription)
{ {
m_xContext = context;
this.category = category; this.category = category;
Locale locale; Locale locale;
try try
@ -63,7 +59,7 @@ public final class StarFunctionDescription extends WeakBase
// for your optional attributes if necessary. See the documentation // for your optional attributes if necessary. See the documentation
// of the PropertySetMixin helper for further information. // of the PropertySetMixin helper for further information.
// Ensure that your attributes are initialized correctly! // Ensure that your attributes are initialized correctly!
m_prophlp = new PropertySetMixin(m_xContext, this, m_prophlp = new PropertySetMixin(context, this,
new Type(com.sun.star.report.meta.XFunctionDescription.class), null); new Type(com.sun.star.report.meta.XFunctionDescription.class), null);
} }

View File

@ -174,9 +174,6 @@ public class ReportDesignerTest
} }
private String m_sMailAddress = null;
private String m_sUPDMinor;
private static final int WRITER = 1; private static final int WRITER = 1;
private static final int CALC = 2; private static final int CALC = 2;
@ -189,11 +186,11 @@ public class ReportDesignerTest
String sVCSID = System.getProperty("VCSID"); String sVCSID = System.getProperty("VCSID");
System.out.println("VCSID='" + sVCSID + "'"); System.out.println("VCSID='" + sVCSID + "'");
m_sMailAddress = sVCSID + "@openoffice.org"; String sMailAddress = sVCSID + "@openoffice.org";
System.out.println("Assumed mail address: " + m_sMailAddress); System.out.println("Assumed mail address: " + sMailAddress);
m_sUPDMinor = System.getProperty("UPDMINOR"); String sUPDMinor = System.getProperty("UPDMINOR");
System.out.println("Current MWS: " + m_sUPDMinor); System.out.println("Current MWS: " + sUPDMinor);
// --------------------------- Start the given Office --------------------------- // --------------------------- Start the given Office ---------------------------

View File

@ -57,7 +57,6 @@ public class _XDataPilotDescriptor {
private String sTag = "XDataPilotDescriptor_Tag"; private String sTag = "XDataPilotDescriptor_Tag";
private String fieldsNames[]; private String fieldsNames[];
private int fieldsAmount = 0;
private int tEnvFieldsAmount = 0; private int tEnvFieldsAmount = 0;
/** /**
@ -179,7 +178,7 @@ public class _XDataPilotDescriptor {
return false; return false;
} else {System.out.println("getDataPilotFields returned not Null value -- OK");} } else {System.out.println("getDataPilotFields returned not Null value -- OK");}
fieldsAmount = IA.getCount(); int fieldsAmount = IA.getCount();
if (fieldsAmount < tEnvFieldsAmount) { if (fieldsAmount < tEnvFieldsAmount) {
System.out.println("Number of fields is less than number goten by relation."); System.out.println("Number of fields is less than number goten by relation.");
return false; return false;

View File

@ -52,7 +52,6 @@ public class ParcelDescriptor {
"<parcel xmlns:parcel=\"scripting.dtd\" language=\"Java\">\n" + "<parcel xmlns:parcel=\"scripting.dtd\" language=\"Java\">\n" +
"</parcel>").getBytes(); "</parcel>").getBytes();
private File file = null;
private Document document = null; private Document document = null;
private String language = null; private String language = null;
private Map<String, String> languagedepprops = new HashMap<String, String>(3); private Map<String, String> languagedepprops = new HashMap<String, String>(3);
@ -83,8 +82,6 @@ public class ParcelDescriptor {
} }
private ParcelDescriptor(File file, String language) throws IOException { private ParcelDescriptor(File file, String language) throws IOException {
this.file = file;
if (file.exists()) { if (file.exists()) {
FileInputStream fis = null; FileInputStream fis = null;

View File

@ -16,7 +16,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
import java.awt.Graphics;
import java.awt.Color; import java.awt.Color;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;

View File

@ -51,18 +51,16 @@ public class CheckTable
connection.tearDown(); connection.tearDown();
} }
private XMultiServiceFactory m_xMSF = null;
private XComponentContext m_xContext = null;
private XTextDocument m_xDoc = null; private XTextDocument m_xDoc = null;
@Before public void before() throws Exception @Before public void before() throws Exception
{ {
m_xMSF = UnoRuntime.queryInterface( XMultiServiceFactory xMSF = UnoRuntime.queryInterface(
XMultiServiceFactory.class, XMultiServiceFactory.class,
connection.getComponentContext().getServiceManager()); connection.getComponentContext().getServiceManager());
m_xContext = connection.getComponentContext(); XComponentContext xContext = connection.getComponentContext();
assertNotNull("could not get component context.", m_xContext); assertNotNull("could not get component context.", xContext);
m_xDoc = util.WriterTools.createTextDoc(m_xMSF); m_xDoc = util.WriterTools.createTextDoc(xMSF);
} }
@After public void after() @After public void after()

View File

@ -63,9 +63,7 @@ public class LoadSaveTest
} }
private XMultiServiceFactory m_xMSF = null; private XMultiServiceFactory m_xMSF = null;
private XComponentContext m_xContext = null;
private XGlobalEventBroadcaster m_xGEB = null; private XGlobalEventBroadcaster m_xGEB = null;
private String m_TmpDir = null;
private String m_fileURL = "file://"; private String m_fileURL = "file://";
// these should be parameters or something? // these should be parameters or something?
@ -74,13 +72,13 @@ public class LoadSaveTest
@Before public void before() throws Exception @Before public void before() throws Exception
{ {
m_xContext = connection.getComponentContext(); XComponentContext xContext = connection.getComponentContext();
assertNotNull("could not get component context.", m_xContext); assertNotNull("could not get component context.", xContext);
m_xMSF = UnoRuntime.queryInterface( m_xMSF = UnoRuntime.queryInterface(
XMultiServiceFactory.class, m_xContext.getServiceManager()); XMultiServiceFactory.class, xContext.getServiceManager());
m_xGEB = theGlobalEventBroadcaster.get(m_xContext); m_xGEB = theGlobalEventBroadcaster.get(xContext);
m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF); String sTmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
System.out.println("tempdir: " + m_TmpDir); System.out.println("tempdir: " + sTmpDir);
System.out.println("sourcedir: " + m_SourceDir); System.out.println("sourcedir: " + m_SourceDir);
System.out.println("targetdir: " + m_TargetDir); System.out.println("targetdir: " + m_TargetDir);
} }

View File

@ -107,8 +107,7 @@ public class AccessibilityTree
public void SetCanvas (Canvas aCanvas) public void SetCanvas (Canvas aCanvas)
{ {
maCanvas = aCanvas; ((AccessibilityTreeModel)maTree.getModel()).setCanvas(aCanvas);
((AccessibilityTreeModel)maTree.getModel()).setCanvas (maCanvas);
} }
/** Expand the nodes in the subtree rooted in aNode according to the the /** Expand the nodes in the subtree rooted in aNode according to the the
@ -383,14 +382,7 @@ public class AccessibilityTree
protected AccessibleTreeCellRenderer protected AccessibleTreeCellRenderer maCellRenderer;
maCellRenderer; private JTree maTree;
private int mnExpandLevel;
private JTree
maTree;
private Canvas
maCanvas;
private int
mnExpandLevel;
} }

View File

@ -39,8 +39,7 @@ public class AccessibilityTreeModel
maNodeMap = new NodeMap(); maNodeMap = new NodeMap();
maEventListener = new EventListener (this); mxListener = new QueuedListener(new EventListener (this));
mxListener = new QueuedListener (maEventListener);
} }
public void clear () public void clear ()
@ -501,6 +500,4 @@ public class AccessibilityTreeModel
private int mnLockCount; private int mnLockCount;
private Canvas maCanvas; private Canvas maCanvas;
private EventListener maEventListener;
} }

View File

@ -169,11 +169,11 @@ public class AccessibilityWorkBench
aViewSplitPane.setDividerLocation (400); aViewSplitPane.setDividerLocation (400);
// Text output area. // Text output area.
maMessageArea = MessageArea.Instance (); MessageArea aMessageArea = MessageArea.Instance ();
// Split pane for the two views and the message area. // Split pane for the two views and the message area.
JSplitPane aSplitPane = new JSplitPane (JSplitPane.VERTICAL_SPLIT, JSplitPane aSplitPane = new JSplitPane (JSplitPane.VERTICAL_SPLIT,
aViewSplitPane, maMessageArea); aViewSplitPane, aMessageArea);
aSplitPane.setOneTouchExpandable(true); aSplitPane.setOneTouchExpandable(true);
addGridElement (aViewSplitPane, 0,0, 2,1, 3,3, addGridElement (aViewSplitPane, 0,0, 2,1, 3,3,
GridBagConstraints.CENTER, GridBagConstraints.BOTH); GridBagConstraints.CENTER, GridBagConstraints.BOTH);
@ -253,11 +253,11 @@ public class AccessibilityWorkBench
JMenuBar CreateMenuBar () JMenuBar CreateMenuBar ()
{ {
// Menu bar. // Menu bar.
maMenuBar = new JMenuBar (); JMenuBar aMenuBar = new JMenuBar ();
// File menu. // File menu.
JMenu aFileMenu = new JMenu ("File"); JMenu aFileMenu = new JMenu ("File");
maMenuBar.add (aFileMenu); aMenuBar.add (aFileMenu);
JMenuItem aItem; JMenuItem aItem;
aItem = new JMenuItem ("Quit"); aItem = new JMenuItem ("Quit");
aFileMenu.add (aItem); aFileMenu.add (aItem);
@ -265,7 +265,7 @@ public class AccessibilityWorkBench
// View menu. // View menu.
JMenu aViewMenu = new JMenu ("View"); JMenu aViewMenu = new JMenu ("View");
maMenuBar.add (aViewMenu); aMenuBar.add (aViewMenu);
ButtonGroup aGroup = new ButtonGroup (); ButtonGroup aGroup = new ButtonGroup ();
JRadioButtonMenuItem aRadioButton = new JRadioButtonMenuItem ("Whole Screen"); JRadioButtonMenuItem aRadioButton = new JRadioButtonMenuItem ("Whole Screen");
aGroup.add (aRadioButton); aGroup.add (aRadioButton);
@ -294,7 +294,7 @@ public class AccessibilityWorkBench
// Options menu. // Options menu.
JMenu aOptionsMenu = new JMenu ("Options"); JMenu aOptionsMenu = new JMenu ("Options");
maMenuBar.add (aOptionsMenu); aMenuBar.add (aOptionsMenu);
JCheckBoxMenuItem aCBItem; JCheckBoxMenuItem aCBItem;
aCBItem = new JCheckBoxMenuItem ("Show Descriptions", maCanvas.getShowDescriptions()); aCBItem = new JCheckBoxMenuItem ("Show Descriptions", maCanvas.getShowDescriptions());
aOptionsMenu.add (aCBItem); aOptionsMenu.add (aCBItem);
@ -314,7 +314,7 @@ public class AccessibilityWorkBench
// Help menu. // Help menu.
JMenu aHelpMenu = new JMenu ("Help"); JMenu aHelpMenu = new JMenu ("Help");
maMenuBar.add (aHelpMenu); aMenuBar.add (aHelpMenu);
aItem = new JMenuItem ("Help"); aItem = new JMenuItem ("Help");
aHelpMenu.add (aItem); aHelpMenu.add (aItem);
@ -328,7 +328,7 @@ public class AccessibilityWorkBench
aHelpMenu.add (aItem); aHelpMenu.add (aItem);
aItem.addActionListener (this); aItem.addActionListener (this);
return maMenuBar; return aMenuBar;
} }
@ -579,16 +579,12 @@ public class AccessibilityWorkBench
maAccessibilityTree; maAccessibilityTree;
private ObjectViewContainer private ObjectViewContainer
maObjectViewContainer; maObjectViewContainer;
private MessageArea
maMessageArea;
private JButton private JButton
aConnectButton, aConnectButton,
aQuitButton, aQuitButton,
aUpdateButton, aUpdateButton,
aExpandButton, aExpandButton,
aShapesButton; aShapesButton;
private JMenuBar
maMenuBar;
private boolean private boolean
mbInitialized; mbInitialized;
private TopWindowListener private TopWindowListener

View File

@ -32,18 +32,16 @@ class EventLogger
{ {
try try
{ {
maFrame = new JFrame (); JFrame aFrame = new JFrame ();
maLogger = new TextLogger (); TextLogger aLogger = new TextLogger ();
maFrame.setContentPane (new JScrollPane (maLogger)); aFrame.setContentPane (new JScrollPane (aLogger));
maFrame.setSize (400,300); aFrame.setSize (400,300);
maFrame.setVisible (true); aFrame.setVisible (true);
} }
catch (Exception e) catch (Exception e)
{} {}
} }
private static EventLogger maInstance = null; private static EventLogger maInstance = null;
private JFrame maFrame;
private TextLogger maLogger;
} }

View File

@ -50,11 +50,11 @@ public class ContextView
public ContextView (ObjectViewContainer aContainer) public ContextView (ObjectViewContainer aContainer)
{ {
super (aContainer); super (aContainer);
maNameLabel = new JLabel ("Name: "); JLabel aNameLabel = new JLabel ("Name: ");
maName = new JLabel (""); maName = new JLabel ("");
maDescriptionLabel = new JLabel ("Description: "); JLabel aDescriptionLabel = new JLabel ("Description: ");
maDescription = new JLabel (""); maDescription = new JLabel ("");
maRoleLabel = new JLabel ("Role: "); JLabel maRoleLabel = new JLabel ("Role: ");
maRole = new JLabel (""); maRole = new JLabel ("");
// Make the background of name and description white and opaque so // Make the background of name and description white and opaque so
@ -77,9 +77,9 @@ public class ContextView
constraints.weighty = 1; constraints.weighty = 1;
constraints.anchor = GridBagConstraints.WEST; constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.NONE; constraints.fill = GridBagConstraints.NONE;
add (maNameLabel, constraints); add (aNameLabel, constraints);
constraints.gridy = 1; constraints.gridy = 1;
add (maDescriptionLabel, constraints); add (aDescriptionLabel, constraints);
constraints.gridy = 2; constraints.gridy = 2;
add (maRoleLabel, constraints); add (maRoleLabel, constraints);
constraints.gridy = 0; constraints.gridy = 0;
@ -134,10 +134,7 @@ public class ContextView
private JLabel private JLabel
maNameLabel,
maName, maName,
maDescriptionLabel,
maDescription, maDescription,
maRoleLabel,
maRole; maRole;
} }

View File

@ -65,7 +65,6 @@ public class FormHandler
public XMultiServiceFactory xMSFDoc; public XMultiServiceFactory xMSFDoc;
public XMultiServiceFactory xMSF; public XMultiServiceFactory xMSF;
public XDrawPage xDrawPage; public XDrawPage xDrawPage;
private XDrawPageSupplier xDrawPageSupplier;
public String[] sModelServices = new String[8]; public String[] sModelServices = new String[8];
public static ControlData[] oControlData; public static ControlData[] oControlData;
@ -106,7 +105,7 @@ public class FormHandler
public FormHandler(XMultiServiceFactory _xMSF, XTextDocument xTextDocument) public FormHandler(XMultiServiceFactory _xMSF, XTextDocument xTextDocument)
{ {
this.xMSF = _xMSF; this.xMSF = _xMSF;
xDrawPageSupplier = UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDocument); XDrawPageSupplier xDrawPageSupplier = UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDocument);
xDrawPage = xDrawPageSupplier.getDrawPage(); xDrawPage = xDrawPageSupplier.getDrawPage();
xFormsSupplier = UnoRuntime.queryInterface(XFormsSupplier.class, xDrawPage); xFormsSupplier = UnoRuntime.queryInterface(XFormsSupplier.class, xDrawPage);
xShapeGrouper = UnoRuntime.queryInterface(XShapeGrouper.class, xDrawPage); xShapeGrouper = UnoRuntime.queryInterface(XShapeGrouper.class, xDrawPage);

View File

@ -37,10 +37,7 @@ public class TimeStampControl extends DatabaseControl
DatabaseControl oDateControl; DatabaseControl oDateControl;
DatabaseControl oTimeControl; DatabaseControl oTimeControl;
// XShape xGroupShape;
Resource oResource; Resource oResource;
private String sDateAppendix; // = GetResText(RID_FORM + 4)
private String sTimeAppendix; // = GetResText(RID_FORM + 5)
XShapes xGroupShapes = null; XShapes xGroupShapes = null;
double nreldatewidth; double nreldatewidth;
double nreltimewidth; double nreltimewidth;
@ -53,7 +50,6 @@ public class TimeStampControl extends DatabaseControl
{ {
super(_oFormHandler, "com.sun.star.drawing.ShapeCollection", _aPoint); super(_oFormHandler, "com.sun.star.drawing.ShapeCollection", _aPoint);
oResource = _oResource; oResource = _oResource;
// xGroupShape = xShape;
oDateControl = new DatabaseControl(oFormHandler, _xFormName, _curFieldName, DataType.DATE, aPoint); oDateControl = new DatabaseControl(oFormHandler, _xFormName, _curFieldName, DataType.DATE, aPoint);
int nDBHeight = oDateControl.getControlHeight(); int nDBHeight = oDateControl.getControlHeight();
nDateWidth = oDateControl.getPreferredWidth(); nDateWidth = oDateControl.getPreferredWidth();
@ -93,8 +89,8 @@ public class TimeStampControl extends DatabaseControl
{ {
super(_oGridControl, _curfieldcolumn); super(_oGridControl, _curfieldcolumn);
oResource = _oResource; oResource = _oResource;
sDateAppendix = oResource.getResText(UIConsts.RID_FORM + 88); String sDateAppendix = oResource.getResText(UIConsts.RID_FORM + 88);
sTimeAppendix = oResource.getResText(UIConsts.RID_FORM + 89); String sTimeAppendix = oResource.getResText(UIConsts.RID_FORM + 89);
oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sDateAppendix); oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sDateAppendix);
oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sTimeAppendix); oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sTimeAppendix);
} }

View File

@ -30,18 +30,14 @@ import com.sun.star.wizards.common.PropertyNames;
public class DataEntrySetter public class DataEntrySetter
{ {
private WizardDialog CurUnoDialog;
private short curtabindex;
private XRadioButton optNewDataOnly;
private XRadioButton optDisplayAllData; private XRadioButton optDisplayAllData;
private XCheckBox chknomodification; private XCheckBox chknomodification;
private XCheckBox chknodeletion; private XCheckBox chknodeletion;
private XCheckBox chknoaddition; private XCheckBox chknoaddition;
public DataEntrySetter(WizardDialog _CurUnoDialog) public DataEntrySetter(WizardDialog CurUnoDialog)
{ {
this.CurUnoDialog = _CurUnoDialog; short curtabindex = (short) (FormWizard.SODATA_PAGE * 100);
curtabindex = (short) (FormWizard.SODATA_PAGE * 100);
Integer IDataStep = Integer.valueOf(FormWizard.SODATA_PAGE); Integer IDataStep = Integer.valueOf(FormWizard.SODATA_PAGE);
String sNewDataOnly = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 44); String sNewDataOnly = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 44);
String sDisplayAllData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 46); String sDisplayAllData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 46);
@ -50,7 +46,7 @@ public class DataEntrySetter
String sNoAddition = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 49); // AlowInserts String sNoAddition = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 49); // AlowInserts
String sdontdisplayExistingData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 45); String sdontdisplayExistingData = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 45);
optNewDataOnly = CurUnoDialog.insertRadioButton("optNewDataOnly", "toggleCheckBoxes", this, CurUnoDialog.insertRadioButton("optNewDataOnly", "toggleCheckBoxes", this,
new String[] new String[]
{ {
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH

View File

@ -47,7 +47,6 @@ public class FormDocument extends TextDocument
private FormHandler oFormHandler; private FormHandler oFormHandler;
private ViewHandler oViewHandler; private ViewHandler oViewHandler;
private TextStyleHandler oTextStyleHandler;
private XPropertySet xPropPageStyle; private XPropertySet xPropPageStyle;
private static final int SOFORMGAP = 2000; private static final int SOFORMGAP = 2000;
private boolean bhasSubForm; private boolean bhasSubForm;
@ -68,7 +67,7 @@ public class FormDocument extends TextDocument
{ {
oFormHandler = new FormHandler(xMSF, xTextDocument); oFormHandler = new FormHandler(xMSF, xTextDocument);
oFormHandler.setDrawObjectsCaptureMode(false); oFormHandler.setDrawObjectsCaptureMode(false);
oTextStyleHandler = new TextStyleHandler(xMSFDoc, xTextDocument); TextStyleHandler oTextStyleHandler = new TextStyleHandler(xMSFDoc, xTextDocument);
oViewHandler = new ViewHandler(xMSFDoc, xTextDocument); oViewHandler = new ViewHandler(xMSFDoc, xTextDocument);
oMainFormDBMetaData = new CommandMetaData(xMSF);// , CharLocale); oMainFormDBMetaData = new CommandMetaData(xMSF);// , CharLocale);
oSubFormDBMetaData = new CommandMetaData(xMSF);// , CharLocale); oSubFormDBMetaData = new CommandMetaData(xMSF);// , CharLocale);

View File

@ -43,20 +43,16 @@ import com.sun.star.wizards.ui.*;
public class StyleApplier public class StyleApplier
{ {
private WizardDialog CurUnoDialog;
private XPropertySet xPageStylePropertySet; private XPropertySet xPageStylePropertySet;
private XMultiServiceFactory xMSF; private XMultiServiceFactory xMSF;
private short curtabindex;
private XRadioButton optNoBorder; private XRadioButton optNoBorder;
private XRadioButton opt3DLook; private XRadioButton opt3DLook;
private XRadioButton optFlat;
private XListBox lstStyles; private XListBox lstStyles;
private FormDocument curFormDocument; private FormDocument curFormDocument;
private short iOldLayoutPos; private short iOldLayoutPos;
private static final String SCHANGELAYOUT = "changeLayout"; private static final String SCHANGELAYOUT = "changeLayout";
private static final String SCHANGEBORDERTYPE = "changeBorderLayouts"; private static final String SCHANGEBORDERTYPE = "changeBorderLayouts";
private String[] StyleNames; private String[] StyleNames;
private String[] StyleNodeNames;
private String[] FileNames; private String[] FileNames;
private final static int SOBACKGROUNDCOLOR = 0; private final static int SOBACKGROUNDCOLOR = 0;
private final static int SODBTEXTCOLOR = 1; private final static int SODBTEXTCOLOR = 1;
@ -64,15 +60,14 @@ public class StyleApplier
private final static int SOBORDERCOLOR = 5; private final static int SOBORDERCOLOR = 5;
private Short IBorderValue = Short.valueOf((short) 1); private Short IBorderValue = Short.valueOf((short) 1);
public StyleApplier(WizardDialog _CurUnoDialog, FormDocument _curFormDocument) public StyleApplier(WizardDialog CurUnoDialog, FormDocument _curFormDocument)
{ {
this.curFormDocument = _curFormDocument; this.curFormDocument = _curFormDocument;
xMSF = curFormDocument.xMSF; xMSF = curFormDocument.xMSF;
TextStyleHandler oTextStyleHandler = new TextStyleHandler(xMSF, curFormDocument.xTextDocument); TextStyleHandler oTextStyleHandler = new TextStyleHandler(xMSF, curFormDocument.xTextDocument);
xPageStylePropertySet = oTextStyleHandler.getStyleByName("PageStyles", "Standard"); xPageStylePropertySet = oTextStyleHandler.getStyleByName("PageStyles", "Standard");
this.CurUnoDialog = _CurUnoDialog; short curtabindex = (short) (FormWizard.SOSTYLE_PAGE * 100);
curtabindex = (short) (FormWizard.SOSTYLE_PAGE * 100);
Integer IStyleStep = Integer.valueOf(FormWizard.SOSTYLE_PAGE); Integer IStyleStep = Integer.valueOf(FormWizard.SOSTYLE_PAGE);
String sPageStyles = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 86); String sPageStyles = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 86);
String sNoBorder = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 29); String sNoBorder = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 29);
@ -126,7 +121,7 @@ public class StyleApplier
UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", s3DLook, 196, 53, Short.valueOf((short) 1), IStyleStep, Short.valueOf(curtabindex++), "1", 93 UIConsts.INTEGERS[10], "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", s3DLook, 196, 53, Short.valueOf((short) 1), IStyleStep, Short.valueOf(curtabindex++), "1", 93
}); });
optFlat = CurUnoDialog.insertRadioButton("otpFlat", SCHANGEBORDERTYPE, this, XRadioButton optFlat = CurUnoDialog.insertRadioButton("otpFlat", SCHANGEBORDERTYPE, this,
new String[] new String[]
{ {
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH
@ -153,7 +148,7 @@ public class StyleApplier
{ {
Object oRootNode = Configuration.getConfigurationRoot(xMSF, "org.openoffice.Office.FormWizard/FormWizard/Styles", false); Object oRootNode = Configuration.getConfigurationRoot(xMSF, "org.openoffice.Office.FormWizard/FormWizard/Styles", false);
XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oRootNode); XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oRootNode);
StyleNodeNames = xNameAccess.getElementNames(); String[] StyleNodeNames = xNameAccess.getElementNames();
StyleNames = new String[StyleNodeNames.length]; StyleNames = new String[StyleNodeNames.length];
FileNames = new String[StyleNodeNames.length]; FileNames = new String[StyleNodeNames.length];
for (int i = 0; i < StyleNodeNames.length; i++) for (int i = 0; i < StyleNodeNames.length; i++)

View File

@ -54,10 +54,8 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
private Object FirstPageStyle; private Object FirstPageStyle;
public ArrayList<DBColumn> DBColumnsVector; public ArrayList<DBColumn> DBColumnsVector;
private RecordTable CurRecordTable; private RecordTable CurRecordTable;
private String sMsgTableNotExisting;
private String sMsgCommonReportError; private String sMsgCommonReportError;
private String ContentTemplatePath; private String ContentTemplatePath;
private String sMsgEndAutopilot;
public boolean bIsCurLandscape; public boolean bIsCurLandscape;
public TextTableHandler oTextTableHandler; public TextTableHandler oTextTableHandler;
public TextSectionHandler oTextSectionHandler; public TextSectionHandler oTextSectionHandler;
@ -99,16 +97,14 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
oTextFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument); oTextFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument);
DBColumnsVector = new java.util.ArrayList<DBColumn>(); DBColumnsVector = new java.util.ArrayList<DBColumn>();
oNumberFormatter = oTextTableHandler.getNumberFormatter(); oNumberFormatter = oTextTableHandler.getNumberFormatter();
// CurDBMetaData = new RecordParser(xMSF); //, CharLocale, oNumberFormatter);
CurDBMetaData = _aRecordParser; CurDBMetaData = _aRecordParser;
long lDateCorrection = oNumberFormatter.getNullDateCorrection(); long lDateCorrection = oNumberFormatter.getNullDateCorrection();
oNumberFormatter.setBooleanReportDisplayNumberFormat(); oNumberFormatter.setBooleanReportDisplayNumberFormat();
oNumberFormatter.setNullDateCorrection(lDateCorrection); oNumberFormatter.setNullDateCorrection(lDateCorrection);
// sMsgInvalidTextField = oResource.getResText(UIConsts.RID_REPORT + 73); String sMsgTableNotExisting = oResource.getResText(UIConsts.RID_REPORT + 61);
sMsgTableNotExisting = oResource.getResText(UIConsts.RID_REPORT + 61);
sMsgCommonReportError = oResource.getResText(UIConsts.RID_REPORT + 72); sMsgCommonReportError = oResource.getResText(UIConsts.RID_REPORT + 72);
sMsgCommonReportError = JavaTools.replaceSubString(sMsgCommonReportError, String.valueOf((char) 13), "<BR>"); sMsgCommonReportError = JavaTools.replaceSubString(sMsgCommonReportError, String.valueOf((char) 13), "<BR>");
sMsgEndAutopilot = oResource.getResText(UIConsts.RID_DB_COMMON + 33); String sMsgEndAutopilot = oResource.getResText(UIConsts.RID_DB_COMMON + 33);
sMsgTableNotExisting = sMsgTableNotExisting + (char) 13 + sMsgEndAutopilot; sMsgTableNotExisting = sMsgTableNotExisting + (char) 13 + sMsgEndAutopilot;
bIsCurLandscape = true; bIsCurLandscape = true;
getReportPageStyles(); getReportPageStyles();

View File

@ -32,32 +32,24 @@ import com.sun.star.wizards.common.PropertyNames;
public class FieldDescription public class FieldDescription
{ {
private String tablename = PropertyNames.EMPTY_STRING; private String tablename = PropertyNames.EMPTY_STRING;
private String keyname;
private XNameAccess xNameAccessTableNode;
private XPropertySet xPropertySet; private XPropertySet xPropertySet;
private ArrayList<PropertyValue> aPropertyValues; private ArrayList<PropertyValue> aPropertyValues;
private Integer Type;
private String Name; private String Name;
private XMultiServiceFactory xMSF;
private Locale aLocale;
public FieldDescription(XMultiServiceFactory _xMSF, Locale _aLocale, ScenarioSelector _curscenarioselector, String _fieldname, String _keyname, int _nmaxcharCount) public FieldDescription(XMultiServiceFactory _xMSF, Locale _aLocale, ScenarioSelector _curscenarioselector, String _fieldname, String keyname, int _nmaxcharCount)
{ {
xMSF = _xMSF;
aLocale = _aLocale;
tablename = _curscenarioselector.getTableName(); tablename = _curscenarioselector.getTableName();
Name = _fieldname; Name = _fieldname;
keyname = _keyname;
aPropertyValues = new ArrayList<PropertyValue>(); aPropertyValues = new ArrayList<PropertyValue>();
xNameAccessTableNode = _curscenarioselector.oCGTable.xNameAccessFieldsNode; XNameAccess xNameAccessTableNode = _curscenarioselector.oCGTable.xNameAccessFieldsNode;
XNameAccess xNameAccessFieldNode; XNameAccess xNameAccessFieldNode;
if (_curscenarioselector.bcolumnnameislimited) if (_curscenarioselector.bcolumnnameislimited)
{ {
xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(xMSF, aLocale, xNameAccessTableNode, keyname, "ShortName", _nmaxcharCount); xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(_xMSF, _aLocale, xNameAccessTableNode, keyname, "ShortName", _nmaxcharCount);
} }
else else
{ {
xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(xMSF, aLocale, xNameAccessTableNode, keyname, PropertyNames.PROPERTY_NAME, _nmaxcharCount); xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(_xMSF, _aLocale, xNameAccessTableNode, keyname, PropertyNames.PROPERTY_NAME, _nmaxcharCount);
} }
setFieldProperties(xNameAccessFieldNode); setFieldProperties(xNameAccessFieldNode);
} }
@ -66,7 +58,7 @@ public class FieldDescription
{ {
Name = _fieldname; Name = _fieldname;
aPropertyValues = new ArrayList<PropertyValue>(); aPropertyValues = new ArrayList<PropertyValue>();
Type = Integer.valueOf(com.sun.star.sdbc.DataType.VARCHAR); Integer Type = Integer.valueOf(com.sun.star.sdbc.DataType.VARCHAR);
aPropertyValues.add(Properties.createProperty(PropertyNames.PROPERTY_NAME, _fieldname)); aPropertyValues.add(Properties.createProperty(PropertyNames.PROPERTY_NAME, _fieldname));
aPropertyValues.add(Properties.createProperty("Type", Type)); aPropertyValues.add(Properties.createProperty("Type", Type));
} }

View File

@ -38,7 +38,6 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
{ {
private TableWizard CurUnoDialog; private TableWizard CurUnoDialog;
private short curtabindex;
private final static String SPRIMEKEYMODE = "togglePrimeKeyFields"; private final static String SPRIMEKEYMODE = "togglePrimeKeyFields";
private XRadioButton optAddAutomatically; private XRadioButton optAddAutomatically;
private XRadioButton optUseExisting; private XRadioButton optUseExisting;
@ -59,7 +58,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
this.CurUnoDialog = _CurUnoDialog; this.CurUnoDialog = _CurUnoDialog;
curTableDescriptor = _curTableDescriptor; curTableDescriptor = _curTableDescriptor;
bAutoPrimaryKeysupportsAutoIncrmentation = isAutoPrimeKeyAutoIncrementationsupported(); bAutoPrimaryKeysupportsAutoIncrmentation = isAutoPrimeKeyAutoIncrementationsupported();
curtabindex = (short) ((TableWizard.SOPRIMARYKEYPAGE * 100) - 20); short curtabindex = (short) ((TableWizard.SOPRIMARYKEYPAGE * 100) - 20);
Integer IPRIMEKEYSTEP = Integer.valueOf(TableWizard.SOPRIMARYKEYPAGE); Integer IPRIMEKEYSTEP = Integer.valueOf(TableWizard.SOPRIMARYKEYPAGE);
final String sExplanations = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 26); final String sExplanations = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 26);
final String screatePrimaryKey = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 27); final String screatePrimaryKey = CurUnoDialog.m_oResource.getResText(UIConsts.RID_TABLE + 27);

View File

@ -48,10 +48,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
final static int PRIVATE = 0; final static int PRIVATE = 0;
final static int BUSINESS = 1; final static int BUSINESS = 1;
private XFixedText lblExplanation;
private XFixedText lblCategories;
private XRadioButton optBusiness; private XRadioButton optBusiness;
private XRadioButton optPrivate;
private XListBox xTableListBox; private XListBox xTableListBox;
private TableWizard CurTableWizardUnoDialog; private TableWizard CurTableWizardUnoDialog;
private TableDescriptor curtabledescriptor; private TableDescriptor curtabledescriptor;
@ -84,7 +81,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
Integer IMAINSTEP = Integer.valueOf(TableWizard.SOMAINPAGE); Integer IMAINSTEP = Integer.valueOf(TableWizard.SOMAINPAGE);
oCGCategory = new CGCategory(CurUnoDialog.xMSF); oCGCategory = new CGCategory(CurUnoDialog.xMSF);
oCGTable = new CGTable(CurUnoDialog.xMSF); oCGTable = new CGTable(CurUnoDialog.xMSF);
lblExplanation = CurUnoDialog.insertLabel("lblScenarioExplanation", CurUnoDialog.insertLabel("lblScenarioExplanation",
new String[] new String[]
{ {
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
@ -94,7 +91,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
32, sExplanation, Boolean.TRUE, 91, 27, IMAINSTEP, Short.valueOf(pretabindex++), 233 32, sExplanation, Boolean.TRUE, 91, 27, IMAINSTEP, Short.valueOf(pretabindex++), 233
}); });
lblCategories = CurUnoDialog.insertLabel("lblCategories", CurUnoDialog.insertLabel("lblCategories",
new String[] 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 PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
@ -114,7 +111,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", sBusiness, 98, 70, Short.valueOf((short) 1), IMAINSTEP, Short.valueOf(pretabindex++), 78 UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", sBusiness, 98, 70, Short.valueOf((short) 1), IMAINSTEP, Short.valueOf(pretabindex++), 78
}); });
optPrivate = CurTableWizardUnoDialog.insertRadioButton("optPrivate", SELECTCATEGORY, this, CurTableWizardUnoDialog.insertRadioButton("optPrivate", SELECTCATEGORY, this,
new String[] new String[]
{ {
PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH

View File

@ -48,7 +48,6 @@ public class TextTableHandler
public XTextDocument xTextDocument; public XTextDocument xTextDocument;
public XSimpleText xSimpleText; public XSimpleText xSimpleText;
private NumberFormatter oNumberFormatter; private NumberFormatter oNumberFormatter;
private Locale aCharLocale;
/** Creates a new instance of TextTableHandler */ /** Creates a new instance of TextTableHandler */
public TextTableHandler(XMultiServiceFactory xMSF, XTextDocument xTextDocument) public TextTableHandler(XMultiServiceFactory xMSF, XTextDocument xTextDocument)
@ -60,7 +59,7 @@ public class TextTableHandler
xTextTablesSupplier = UnoRuntime.queryInterface(XTextTablesSupplier.class, xTextDocument); xTextTablesSupplier = UnoRuntime.queryInterface(XTextTablesSupplier.class, xTextDocument);
xSimpleText = UnoRuntime.queryInterface(XSimpleText.class, xTextDocument.getText()); xSimpleText = UnoRuntime.queryInterface(XSimpleText.class, xTextDocument.getText());
XNumberFormatsSupplier xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument); XNumberFormatsSupplier xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
aCharLocale = (Locale) Helper.getUnoStructValue(xTextDocument, "CharLocale"); Locale aCharLocale = (Locale) Helper.getUnoStructValue(xTextDocument, "CharLocale");
oNumberFormatter = new NumberFormatter(xNumberFormatsSupplier, aCharLocale); oNumberFormatter = new NumberFormatter(xNumberFormatsSupplier, aCharLocale);
} }
catch (java.lang.Exception e) catch (java.lang.Exception e)

View File

@ -35,7 +35,6 @@ public class CommandFieldSelection extends FieldSelection implements Comparator<
private XListBox xTableListBox; private XListBox xTableListBox;
private XFixedText xlblTable; private XFixedText xlblTable;
private String sTableListBoxName; private String sTableListBoxName;
private String sTableLabelName;
private String sQueryPrefix; private String sQueryPrefix;
private String sTablePrefix; private String sTablePrefix;
private short m_iSelPos = -1; private short m_iSelPos = -1;
@ -99,7 +98,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator<
this.bgetQueries = _bgetQueries; this.bgetQueries = _bgetQueries;
this.CurDBMetaData = _CurDBMetaData; this.CurDBMetaData = _CurDBMetaData;
toggleListboxControls(Boolean.FALSE); toggleListboxControls(Boolean.FALSE);
sTableLabelName = "lblTables_" + super.sIncSuffix; String sTableLabelName = "lblTables_" + super.sIncSuffix;
sTableListBoxName = "lstTables_" + super.sIncSuffix; sTableListBoxName = "lstTables_" + super.sIncSuffix;
sTablePrefix = getTablePrefix(); sTablePrefix = getTablePrefix();
sQueryPrefix = getQueryPrefix(); sQueryPrefix = getQueryPrefix();

View File

@ -33,10 +33,6 @@ import com.sun.star.wizards.common.PropertyNames;
public class DocumentPreview public class DocumentPreview
{ {
/**
* The window in which the preview is showed.
*/
private XWindow xWindow;
/** /**
* The frame service which is used to show the preview * The frame service which is used to show the preview
*/ */
@ -144,7 +140,10 @@ public class DocumentPreview
aDescriptor.WindowAttributes = VclWindowPeerAttribute.CLIPCHILDREN | WindowAttribute.SHOW; aDescriptor.WindowAttributes = VclWindowPeerAttribute.CLIPCHILDREN | WindowAttribute.SHOW;
XWindowPeer xPeer = xToolkit.createWindow(aDescriptor); XWindowPeer xPeer = xToolkit.createWindow(aDescriptor);
xWindow = UnoRuntime.queryInterface(XWindow.class, xPeer); /*
* The window in which the preview is showed.
*/
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, xPeer);
Object frame = xmsf.createInstance("com.sun.star.frame.Frame"); Object frame = xmsf.createInstance("com.sun.star.frame.Frame");
xFrame = UnoRuntime.queryInterface(XFrame.class, frame); xFrame = UnoRuntime.queryInterface(XFrame.class, frame);
xFrame.initialize(xWindow); xFrame.initialize(xWindow);

View File

@ -44,8 +44,6 @@ public class FieldSelection
private String[] AllFieldNames; private String[] AllFieldNames;
private Integer ListBoxWidth; private Integer ListBoxWidth;
private Integer SelListBoxPosX;
private boolean bisModified = false; private boolean bisModified = false;
private final static int SOCMDMOVESEL = 1; private final static int SOCMDMOVESEL = 1;
@ -180,7 +178,7 @@ public class FieldSelection
Integer cmdShiftButtonPosX = Integer.valueOf((CompPosX + ListBoxWidth.intValue() + cmdButtonHoriDist)); Integer cmdShiftButtonPosX = Integer.valueOf((CompPosX + ListBoxWidth.intValue() + cmdButtonHoriDist));
Integer ListBoxPosY = Integer.valueOf(CompPosY + lblVertiDist + lblHeight); Integer ListBoxPosY = Integer.valueOf(CompPosY + lblVertiDist + lblHeight);
Integer ListBoxHeight = Integer.valueOf(CompHeight - 8 - 2); Integer ListBoxHeight = Integer.valueOf(CompHeight - 8 - 2);
SelListBoxPosX = Integer.valueOf(cmdShiftButtonPosX.intValue() + cmdButtonWidth + cmdButtonHoriDist); Integer SelListBoxPosX = Integer.valueOf(cmdShiftButtonPosX.intValue() + cmdButtonWidth + cmdButtonHoriDist);
IStep = Integer.valueOf(_iStep); IStep = Integer.valueOf(_iStep);
if (bshowFourButtons) if (bshowFourButtons)

View File

@ -49,7 +49,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
private static final String CANCEL_ACTION_PERFORMED = "cancelWizard_1"; private static final String CANCEL_ACTION_PERFORMED = "cancelWizard_1";
private static final String HELP_ACTION_PERFORMED = "callHelp"; private static final String HELP_ACTION_PERFORMED = "callHelp";
public VetoableChangeSupport vetos = new VetoableChangeSupport(this); public VetoableChangeSupport vetos = new VetoableChangeSupport(this);
private String[] sRightPaneHeaders;
private int iButtonWidth = 50; private int iButtonWidth = 50;
private int nNewStep = 1; private int nNewStep = 1;
private int nOldStep = 1; private int nOldStep = 1;
@ -81,8 +80,6 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
hid = hid_; hid = hid_;
oWizardResource = new Resource(xMSF, "Common", "dbw"); oWizardResource = new Resource(xMSF, "Common", "dbw");
sMsgEndAutopilot = oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33); sMsgEndAutopilot = oWizardResource.getResText(UIConsts.RID_DB_COMMON + 33);
//new Resource(xMSF,"Common","com");
} }
public Resource getResource() public Resource getResource()
@ -694,11 +691,10 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
public void setRightPaneHeaders(String[] _sRightPaneHeaders) public void setRightPaneHeaders(String[] _sRightPaneHeaders)
{ {
this.nMaxStep = _sRightPaneHeaders.length; this.nMaxStep = _sRightPaneHeaders.length;
this.sRightPaneHeaders = _sRightPaneHeaders;
FontDescriptor oFontDesc = new FontDescriptor(); FontDescriptor oFontDesc = new FontDescriptor();
oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD; oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD;
for (int i = 0; i < sRightPaneHeaders.length; i++) for (int i = 0; i < _sRightPaneHeaders.length; i++)
{ {
insertLabel("lblQueryTitle" + i, insertLabel("lblQueryTitle" + i,
new String[] new String[]
@ -707,7 +703,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL
}, },
new Object[] new Object[]
{ {
oFontDesc, 16, sRightPaneHeaders[i], Boolean.TRUE, 91, 8, Integer.valueOf(i + 1), Short.valueOf((short) 12), 212 oFontDesc, 16, _sRightPaneHeaders[i], Boolean.TRUE, 91, 8, Integer.valueOf(i + 1), Short.valueOf((short) 12), 212
}); });
} }
} }

View File

@ -33,7 +33,6 @@ public class ConverterInfoList {
private static String defaultPropsFile = "ConverterInfoList.properties"; private static String defaultPropsFile = "ConverterInfoList.properties";
private ArrayList<String> jars; private ArrayList<String> jars;
private Properties props = null;
/** /**
* This constructor loads and reads the default properties file. * This constructor loads and reads the default properties file.
@ -59,7 +58,7 @@ public class ConverterInfoList {
Class<? extends ConverterInfoList> c = this.getClass(); Class<? extends ConverterInfoList> c = this.getClass();
InputStream is = c.getResourceAsStream(propsFile); InputStream is = c.getResourceAsStream(propsFile);
BufferedInputStream bis = new BufferedInputStream(is); BufferedInputStream bis = new BufferedInputStream(is);
props = new Properties(); Properties props = new Properties();
props.load(bis); props.load(bis);
bis.close(); bis.close();