summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2009-12-10 17:46:18 +0100
committersb <sb@openoffice.org>2009-12-10 17:46:18 +0100
commit963e7043fd5ee96747d9950c81177892d190d5bf (patch)
treef4bd5c8ccc587379c5e20849a725cc97b06556a0 /wizards
parent55d7592433bf4b70bdd4bcbe957eabf9052de44e (diff)
parentd95c37cdac36e96c22fa38b519817cc0466f1f96 (diff)
sb111: merged in DEV300_m67
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java4
-rw-r--r--wizards/com/sun/star/wizards/common/Desktop.java20
-rw-r--r--wizards/com/sun/star/wizards/db/DBMetaData.java6
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java2
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java2
-rw-r--r--wizards/com/sun/star/wizards/query/QueryWizard.java3
-rw-r--r--wizards/com/sun/star/wizards/report/CallReportWizard.java23
-rw-r--r--wizards/com/sun/star/wizards/web/CallWizard.java7
-rw-r--r--wizards/com/sun/star/wizards/web/FTPDialog.java2
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizard.java7
10 files changed, 38 insertions, 38 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
index 36ac2a2da127..23dec6a80191 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
@@ -287,9 +287,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
/** used in developement to start the wizard */
public static void main(String args[])
{
- String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService"; //localhost
- // ;Lo-1.Germany.sun.com;
- // 10.16.65.155
+ String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.ServiceManager";
try {
XMultiServiceFactory xLocMSF = Desktop.connect(ConnectStr);
AgendaWizardDialogImpl wizard = new AgendaWizardDialogImpl(xLocMSF);
diff --git a/wizards/com/sun/star/wizards/common/Desktop.java b/wizards/com/sun/star/wizards/common/Desktop.java
index 064033585ac1..2c4c81368fc4 100644
--- a/wizards/com/sun/star/wizards/common/Desktop.java
+++ b/wizards/com/sun/star/wizards/common/Desktop.java
@@ -182,21 +182,11 @@ public class Desktop
public static XMultiServiceFactory connect(String connectStr) throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException, Exception
{
- XComponentContext xcomponentcontext = null;
- XMultiComponentFactory xMultiComponentFactory = getMultiComponentFactory();
- // create a connector, so that it can contact the office
- Object xUrlResolver = xMultiComponentFactory.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", xcomponentcontext);
- XUnoUrlResolver urlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(XUnoUrlResolver.class, xUrlResolver);
- Object rInitialObject = urlResolver.resolve(connectStr);
- XNamingService rName = (XNamingService) UnoRuntime.queryInterface(XNamingService.class, rInitialObject);
- XMultiServiceFactory xMSF = null;
- if (rName != null)
- {
- System.err.println("got the remote naming service !");
- Object rXsmgr = rName.getRegisteredObject("StarOffice.ServiceManager");
- xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, rXsmgr);
- }
- return (xMSF);
+ XMultiComponentFactory componentFactory = getMultiComponentFactory();
+ Object xUrlResolver = componentFactory.createInstanceWithContext( "com.sun.star.bridge.UnoUrlResolver", null );
+ XUnoUrlResolver urlResolver = UnoRuntime.queryInterface(XUnoUrlResolver.class, xUrlResolver);
+ XMultiServiceFactory orb = UnoRuntime.queryInterface(XMultiServiceFactory.class, urlResolver.resolve( connectStr ) );
+ return orb;
}
public static String getIncrementSuffix(XNameAccess xElementContainer, String ElementName)
diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java
index be8721a8febe..2a7151cd1135 100644
--- a/wizards/com/sun/star/wizards/db/DBMetaData.java
+++ b/wizards/com/sun/star/wizards/db/DBMetaData.java
@@ -599,8 +599,8 @@ public class DBMetaData
public void getDataSourceInterfaces() throws Exception
{
- xCompleted = (XCompletedConnection) UnoRuntime.queryInterface(XCompletedConnection.class, xDataSource);
- xDataSourcePropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xDataSource);
+ xCompleted = (XCompletedConnection) UnoRuntime.queryInterface(XCompletedConnection.class, getDataSource());
+ xDataSourcePropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, getDataSource());
bPasswordIsRequired = ((Boolean) xDataSourcePropertySet.getPropertyValue("IsPasswordRequired")).booleanValue();
}
@@ -684,7 +684,7 @@ public class DBMetaData
private boolean getConnection(String _DataSourceName)
{
setDataSourceByName(_DataSourceName, true);
- return getConnection(xDataSource);
+ return getConnection( getDataSource() );
}
private boolean getConnection(com.sun.star.sdbc.XConnection _DBConnection)
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
index 311a97f362ed..a8dbe94e5db0 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
@@ -107,7 +107,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
try
{
- String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService";
+ String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.ServiceManager";
XMultiServiceFactory xLocMSF = Desktop.connect(ConnectStr);
FaxWizardDialogImpl lw = new FaxWizardDialogImpl(xLocMSF);
lw.startWizard(xLocMSF, null);
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
index 4a58311751ef..1a47712ca213 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
@@ -121,7 +121,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
public static void main(String args[])
{
//only being called when starting wizard remotely
- String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService";
+ String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.ServiceManager";
XMultiServiceFactory xLocMSF = null;
try
{
diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java
index 181c83d9134a..dcbb920e4b0d 100644
--- a/wizards/com/sun/star/wizards/query/QueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/QueryWizard.java
@@ -89,7 +89,7 @@ public class QueryWizard extends WizardDialog
CurDBMetaData = new QuerySummary(xMSF, m_oResource);
}
-/* public static void main(String args[])
+ public static void main(String args[])
{
String ConnectStr = "uno:pipe,name=fs93730;urp;StarOffice.ServiceManager";
try
@@ -110,7 +110,6 @@ public class QueryWizard extends WizardDialog
jexception.printStackTrace(System.out);
}
}
- */
public XComponent[] startQueryWizard(XMultiServiceFactory xMSF, PropertyValue[] CurPropertyValues)
{
diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java b/wizards/com/sun/star/wizards/report/CallReportWizard.java
index 914ef13f0c75..82c405747ad8 100644
--- a/wizards/com/sun/star/wizards/report/CallReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java
@@ -36,6 +36,8 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.text.XTextDocument;
import com.sun.star.wizards.common.Properties;
import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.wizards.common.Desktop;
/** This class capsulates the class, that implements the minimal component, a
* factory for creating the service (<CODE>__getServiceFactory</CODE>) and a
@@ -48,6 +50,27 @@ public class CallReportWizard
static boolean bWizardstartedalready;
+ public static void main(String args[])
+ {
+ String ConnectStr = "uno:pipe,name=fs93730;urp;StarOffice.ServiceManager";
+ try
+ {
+ XMultiServiceFactory orb = Desktop.connect(ConnectStr);
+ if ( orb != null )
+ {
+ PropertyValue[] curproperties = new PropertyValue[1];
+ curproperties[0] = Properties.createProperty("DataSourceName", "countries");
+
+ ReportWizard wizard = new ReportWizard(orb);
+ wizard.startReportWizard(orb, curproperties);
+ }
+ }
+ catch (java.lang.Exception jexception)
+ {
+ jexception.printStackTrace(System.out);
+ }
+ }
+
/** Gives a factory for creating the service.
* This method is called by the <code>JavaLoader</code>
* <p>
diff --git a/wizards/com/sun/star/wizards/web/CallWizard.java b/wizards/com/sun/star/wizards/web/CallWizard.java
index 4d417afc986d..7019e00f5d5c 100644
--- a/wizards/com/sun/star/wizards/web/CallWizard.java
+++ b/wizards/com/sun/star/wizards/web/CallWizard.java
@@ -299,15 +299,10 @@ public class CallWizard
{
String ConnectStr =
- "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService";
- //localhost ;Lo-1.Germany.sun.com; 10.16.65.155
+ "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.ServiceManager";
try
{
XMultiServiceFactory xmsf = Desktop.connect(ConnectStr);
- //File dir = new File("D:\\CWS\\extras6");//("C:\\Documents and Settings\\rpiterman\\My Documents");
- //getFiles(dir,xLocMSF);
-
- //read Configuration
CallWizard.WizardImplementation ww = new CallWizard.WizardImplementation(xmsf);
ww.trigger("start");
diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.java b/wizards/com/sun/star/wizards/web/FTPDialog.java
index 3352b1dff07f..0d9b083489e5 100644
--- a/wizards/com/sun/star/wizards/web/FTPDialog.java
+++ b/wizards/com/sun/star/wizards/web/FTPDialog.java
@@ -636,7 +636,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
*/
public static void main(String args[])
{
- String ConnectStr = "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService"; //localhost ;Lo-1.Germany.sun.com; 10.16.65.155
+ String ConnectStr = "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.ServiceManager";
try
{
XMultiServiceFactory xLocMSF = Desktop.connect(ConnectStr);
diff --git a/wizards/com/sun/star/wizards/web/WebWizard.java b/wizards/com/sun/star/wizards/web/WebWizard.java
index 6913369991b4..41de8c8e5293 100644
--- a/wizards/com/sun/star/wizards/web/WebWizard.java
+++ b/wizards/com/sun/star/wizards/web/WebWizard.java
@@ -59,15 +59,10 @@ public class WebWizard extends WWD_Events
{
String ConnectStr =
- "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService";
- //localhost ;Lo-1.Germany.sun.com; 10.16.65.155
+ "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.ServiceManager";
try
{
XMultiServiceFactory xmsf = Desktop.connect(ConnectStr);
- //File dir = new File("D:\\CWS\\extras6");//("C:\\Documents and Settings\\rpiterman\\My Documents");
- //getFiles(dir,xLocMSF);
-
- //read Configuration
WebWizard ww = new WebWizard(xmsf);
ww.show();
ww.cleanup();