summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-17 17:00:48 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-17 17:00:48 +0100
commit53a8b94d19bde151402a9096dc3eda0756b76302 (patch)
tree9577e43832d0dd1a51c8e3d56d280c9cddb09fe0
parentf35cf85512e9cc07996fe8e3b708bcd70d255514 (diff)
parent19571f723dd63fb433e30c138098bc479b7bc46f (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
-rw-r--r--odk/examples/DevelopersGuide/Config/ConfigExamples.java117
-rw-r--r--odk/examples/DevelopersGuide/Database/CodeSamples.java42
-rw-r--r--odk/pack/copying/idl_chapter_refs.txt35
-rw-r--r--[-rwxr-xr-x]odk/setsdkenv_unix0
-rw-r--r--odk/util/check.pl12
-rw-r--r--odk/util/makefile.pmk1
6 files changed, 33 insertions, 174 deletions
diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
index d978cf19..6e88494d 100644
--- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java
+++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
@@ -78,7 +78,7 @@ import com.sun.star.util.ChangesEvent;
/* These examples show how to use the following features of the Config API:
o Accessing data
- o Updating data synchronously and asynchronously
+ o Updating data
o Updating properties in groups
o Adding and removing items in sets
o Resetting data to their defaults
@@ -144,20 +144,6 @@ public class ConfigExamples
mxProvider = null;
}
- /** Run the examples with an AdministrationProvider
- */
- public void runForAdmin(Object [] aAdminArgs)
- throws com.sun.star.uno.Exception
- {
- mxProvider = createAdminProvider(aAdminArgs);
-
- runExamples( );
-
- // this is not the default ConfigurationProvider, so we can dispose it
- ((XComponent)UnoRuntime.queryInterface( XComponent.class, mxProvider )).dispose();
- mxProvider = null;
- }
-
/** Run the examples with a given ConfigurationProvider
*/
public void runExamples( )
@@ -170,11 +156,11 @@ public class ConfigExamples
browseDataExample();
- updateGroupSyncExample();
+ updateGroupExample();
resetGroupExample();
- updateSetAsyncExample();
+ updateSetExample();
System.out.println("\nAll Examples completed.");
}
@@ -245,25 +231,6 @@ public class ConfigExamples
return xProvider;
}
- /** Create an administration provider
-
- @param aAdminArguments
- An array of extra arguments to be used to create the provider
- */
- public XMultiServiceFactory createAdminProvider(Object[] aAdminArguments)
- throws com.sun.star.uno.Exception
- {
- final String sAdminService = "com.sun.star.configuration.AdministrationProvider";
-
- // create the provider and remember it as a XMultiServiceFactory
- XMultiServiceFactory xAdminProvider = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class,
- mxServiceManager.createInstanceWithArgumentsAndContext(
- sAdminService, aAdminArguments, mxContext));
-
- return xAdminProvider;
- }
-
/** Create a specified read-only configuration view
*/
public Object createConfigurationView( String sPath )
@@ -288,7 +255,7 @@ public class ConfigExamples
return xViewRoot;
}
- /** Create a specified updatable configuration view using default synchronicity
+ /** Create a specified updatable configuration view
*/
Object createUpdatableView( String sPath )
throws com.sun.star.uno.Exception
@@ -312,36 +279,6 @@ public class ConfigExamples
return xViewRoot;
}
- /** Create a specified updatable configuration view
- */
- Object createUpdatableView( String sPath, boolean bAsync )
- throws com.sun.star.uno.Exception
- {
- XMultiServiceFactory xProvider = getProvider();
-
- // The service name: Need update access:
- final String cUpdatableView = "com.sun.star.configuration.ConfigurationUpdateAccess";
-
- // creation arguments: nodepath
- com.sun.star.beans.PropertyValue aPathArgument = new com.sun.star.beans.PropertyValue();
- aPathArgument.Name = "nodepath";
- aPathArgument.Value = sPath;
-
- // creation arguments: commit mode - write-through or write-back
- com.sun.star.beans.PropertyValue aModeArgument = new com.sun.star.beans.PropertyValue();
- aModeArgument.Name = "lazywrite";
- aModeArgument.Value = new Boolean(bAsync);
-
- Object[] aArguments = new Object[2];
- aArguments[0] = aPathArgument;
- aArguments[1] = aModeArgument;
-
- // create the view
- Object xViewRoot = xProvider.createInstanceWithArguments(cUpdatableView, aArguments);
-
- return xViewRoot;
- }
-
/** This method demonstrates read access to data
*/
protected void readDataExample ()
@@ -374,13 +311,13 @@ public class ConfigExamples
}
}
- /** This method demonstrates synchronous update access to group data
+ /** This method demonstrates update access to group data
*/
- protected void updateGroupSyncExample ()
+ protected void updateGroupExample ()
{
try
{
- System.out.println("\n--- starting example: update group data synchronously --------------");
+ System.out.println("\n--- starting example: update group data --------------");
editGridOptions( );
}
catch ( Exception e )
@@ -408,13 +345,13 @@ public class ConfigExamples
}
}
- /** This method demonstrates asynchronous update access to set data
+ /** This method demonstrates update access to set data
*/
- protected void updateSetAsyncExample ()
+ protected void updateSetExample ()
{
try
{
- System.out.println("\n--- starting example: update set data asynchronously ---------------");
+ System.out.println("\n--- starting example: update set data ---------------");
storeSampleDataSource( );
}
catch ( Exception e )
@@ -639,8 +576,8 @@ public class ConfigExamples
// The path to the root element
final String cGridOptionsPath = "/org.openoffice.Office.Calc/Grid";
- // create the SYNCHRONOUS view for better error handling
- Object xViewRoot = createUpdatableView( cGridOptionsPath, false);
+ // create the view
+ Object xViewRoot = createUpdatableView( cGridOptionsPath );
// the 'editor'
GridOptionsEditor dialog = new GridOptionsEditor();
@@ -816,7 +753,7 @@ public class ConfigExamples
{
try
{
- Object xOtherViewRoot = createUpdatableView(xKey, false);
+ Object xOtherViewRoot = createUpdatableView(xKey);
XNameReplace aReplace = (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, xOtherViewRoot);
@@ -1002,9 +939,6 @@ public class ConfigExamples
/** This method gets the DataSourceDescription for a data source.
It either gets the existing entry or creates a new instance.
-
- The method attempts to keep the view used as small as possible. In particular there
- is no view created, that contains data for all data source that are registered.
*/
Object createDataSourceDescription(XMultiServiceFactory xProvider, String sDataSourceName )
throws com.sun.star.uno.Exception
@@ -1020,22 +954,10 @@ public class ConfigExamples
aPathArgument.Name = "nodepath";
aPathArgument.Value = cDataSourcesPath ;
- // creation arguments: commit mode
- com.sun.star.beans.PropertyValue aModeArgument = new com.sun.star.beans.PropertyValue();
- aModeArgument.Name = "lazywrite";
- aModeArgument.Value = new Boolean( true );
-
- // creation arguments: depth
- com.sun.star.beans.PropertyValue aDepthArgument = new com.sun.star.beans.PropertyValue();
- aDepthArgument.Name = "depth";
- aDepthArgument.Value = new Integer( 1 );
-
- Object[] aArguments = new Object[3];
+ Object[] aArguments = new Object[1];
aArguments[0] = aPathArgument;
- aArguments[1] = aModeArgument;
- aArguments[2] = aDepthArgument;
- // create the view: asynchronously updatable, with depth 1
+ // create the view
Object xViewRoot =
xProvider.createInstanceWithArguments(cUpdatableView, aArguments);
@@ -1045,7 +967,7 @@ public class ConfigExamples
Object xDataSourceDescriptor = null; // the result
if ( xSetOfDataSources .hasByName( sDataSourceName ))
{
- // the element is there, but it is loaded only with depth zero !
+ // the element is there
try
{
// the view should point to the element directly, so we need to extend the path
@@ -1057,12 +979,11 @@ public class ConfigExamples
// use the name of the element now
aPathArgument.Value = sElementPath;
- // create another view now (without depth limit)
- Object[] aDeepArguments = new Object[2];
+ // create another view now
+ Object[] aDeepArguments = new Object[1];
aDeepArguments[0] = aPathArgument;
- aDeepArguments[1] = aModeArgument;
- // create the view: asynchronously updatable, with unlimited depth
+ // create the view
xDataSourceDescriptor =
xProvider.createInstanceWithArguments(cUpdatableView, aDeepArguments);
diff --git a/odk/examples/DevelopersGuide/Database/CodeSamples.java b/odk/examples/DevelopersGuide/Database/CodeSamples.java
index 0980055a..855b816b 100644
--- a/odk/examples/DevelopersGuide/Database/CodeSamples.java
+++ b/odk/examples/DevelopersGuide/Database/CodeSamples.java
@@ -151,33 +151,6 @@ public class CodeSamples
if(xDriverManager != null)
{
// first create the needed url
- String adabasURL = "sdbc:adabas::MYDB0";
- // second create the necessary properties
- com.sun.star.beans.PropertyValue [] adabasProps = new com.sun.star.beans.PropertyValue[]
- {
- new com.sun.star.beans.PropertyValue("user",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
- new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE)
- };
- // now create a connection to adabas
- con = xDriverManager.getConnectionWithInfo(adabasURL,adabasProps);
- }
- return con;
- }
-
- // uses the driver manager to create a new connection and dispose it.
- public static XConnection openToJDBC() throws com.sun.star.uno.Exception
- {
- XConnection con = null;
- // create the DriverManager
- Object driverManager =
- xMCF.createInstanceWithContext("com.sun.star.sdbc.DriverManager",
- xContext);
- // query for the interface
- com.sun.star.sdbc.XDriverManager xDriverManager;
- xDriverManager = (XDriverManager)UnoRuntime.queryInterface(XDriverManager.class,driverManager);
- if(xDriverManager != null)
- {
- // first create the needed url
String url = "jdbc:mysql://localhost:3306/TestTables";
// second create the necessary properties
com.sun.star.beans.PropertyValue [] props = new com.sun.star.beans.PropertyValue[]
@@ -186,7 +159,7 @@ public class CodeSamples
new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
new com.sun.star.beans.PropertyValue("JavaDriverClass",0,"org.gjt.mm.mysql.Driver",com.sun.star.beans.PropertyState.DIRECT_VALUE)
};
- // now create a connection to adabas
+ // now create a connection to mysql
con = xDriverManager.getConnectionWithInfo(url,props);
}
return con;
@@ -198,7 +171,7 @@ public class CodeSamples
XConnection con = null;
// create the Driver with the implementation name
Object aDriver =
- xMCF.createInstanceWithContext("com.sun.star.comp.sdbcx.adabas.ODriver",
+ xMCF.createInstanceWithContext("org.openoffice.comp.drivers.MySQL.Driver",
xContext);
// query for the interface
com.sun.star.sdbc.XDriver xDriver;
@@ -206,15 +179,16 @@ public class CodeSamples
if(xDriver != null)
{
// first create the needed url
- String adabasURL = "sdbc:adabas::MYDB0";
+ String url = "jdbc:mysql://localhost:3306/TestTables";
// second create the necessary properties
- com.sun.star.beans.PropertyValue [] adabasProps = new com.sun.star.beans.PropertyValue[]
+ com.sun.star.beans.PropertyValue [] props = new com.sun.star.beans.PropertyValue[]
{
new com.sun.star.beans.PropertyValue("user",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
- new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE)
+ new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
+ new com.sun.star.beans.PropertyValue("JavaDriverClass",0,"org.gjt.mm.mysql.Driver",com.sun.star.beans.PropertyState.DIRECT_VALUE)
};
- // now create a connection to adabas
- con = xDriver.connect(adabasURL,adabasProps);
+ // now create a connection to mysql
+ con = xDriver.connect(url,props);
}
return con;
}
diff --git a/odk/pack/copying/idl_chapter_refs.txt b/odk/pack/copying/idl_chapter_refs.txt
index e1a15de0..58d93cce 100644
--- a/odk/pack/copying/idl_chapter_refs.txt
+++ b/odk/pack/copying/idl_chapter_refs.txt
@@ -2462,7 +2462,6 @@ LINK:Documentation/DevGuide/Config/Using_a_Data_Source
DESCR:Config - Using a Data Source
REF:
com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationAccess
TOPIC:
@@ -2504,17 +2503,10 @@ com.sun.star.frame.XFrame
LINK:Documentation/DevGuide/Config/Connecting_to_a_Data_Source
DESCR:Config - Connecting to a Data Source
REF:
-com.sun.star.configuration.backend.LocalSingleBackend
-com.sun.star.configuration.AdministrationProvider
com.sun.star.lang.XMultiServiceFactory
-com.sun.star.configuration.backend.SingleBackendAdapter
-com.sun.star.configuration.backend.Backend
-com.sun.star.configuration.backend.BackendAdapter
com.sun.star.configuration.ConfigurationProvider
-com.sun.star.configuration.backend.SingleBackend
com.sun.star.lang.ServiceManager
TOPIC:
-com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationProvider
LINK:Documentation/DevGuide/Spreadsheets/Creating_a_New_DataPilot_Table
@@ -2924,7 +2916,6 @@ LINK:Documentation/DevGuide/Config/Configuration_Data_Sources
DESCR:Config - Configuration Data Sources
REF:
com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationAccess
TOPIC:
@@ -5128,18 +5119,6 @@ com.sun.star.document.XExporter
TOPIC:
com.sun.star.drawing.GraphicExportFilter
-LINK:Documentation/DevGuide/Config/Installing_a_Custom_Configuration_Schema
-DESCR:Config - Installing a Custom Configuration Schema
-REF:
-com.sun.star.configuration.backend.MergeImporter
-com.sun.star.configuration.backend.LocalDataImporter
-com.sun.star.configuration.backend.CopyImporter
-com.sun.star.configuration.ConfigurationProvider
-TOPIC:
-com.sun.star.configuration.backend.MergeImporter
-com.sun.star.configuration.backend.LocalDataImporter
-com.sun.star.configuration.backend.CopyImporter
-
LINK:Documentation/DevGuide/OfficeDev/Component/Getting_Frames%2C_Controllers_and_Models_from_Each_Other
DESCR:OfficeDev - Component - Getting Frames, Controllers and Models from Each Other
REF:
@@ -5571,12 +5550,10 @@ LINK:Documentation/DevGuide/Config/Object_Model
DESCR:Config - Object Model
REF:
com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationAccess
TOPIC:
com.sun.star.configuration.ConfigurationUpdateAccess
-com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationAccess
@@ -7178,18 +7155,6 @@ com.sun.star.util.XModifiable
com.sun.star.util.XCloseable
TOPIC:
-LINK:Documentation/DevGuide/Config/Adding_a_Backend_Data_Store
-DESCR:Config - Adding a Backend Data Store
-REF:
-com.sun.star.configuration.backend.SingleBackendAdapter
-com.sun.star.configuration.backend.Backend
-com.sun.star.configuration.ConfigurationProvider
-com.sun.star.configuration.backend.BackendAdapter
-com.sun.star.configuration.backend.SingleBackend
-TOPIC:
-com.sun.star.configuration.backend.Backend
-com.sun.star.configuration.backend.SingleBackend
-
LINK:Documentation/DevGuide/Charts/Chart_Document_Controller
DESCR:Charts - Chart Document Controller
REF:
diff --git a/odk/setsdkenv_unix b/odk/setsdkenv_unix
index 6b0dd7c1..6b0dd7c1 100755..100644
--- a/odk/setsdkenv_unix
+++ b/odk/setsdkenv_unix
diff --git a/odk/util/check.pl b/odk/util/check.pl
index 23d2fbaa..77ab1a6b 100644
--- a/odk/util/check.pl
+++ b/odk/util/check.pl
@@ -265,17 +265,17 @@ if (-d "$StartDir") {
"_typelib_InterfaceMethodTypeDescription","store","RegistryKey",
"_typelib_Union_Init","_sal_Sequence","_typelib_Parameter_Init",
"_typelib_TypeDescription","_uno_Environment",
- "_typelib_InterfaceAttributeTypeDescription","uno_Context",
+ "_typelib_InterfaceAttributeTypeDescription",
"_rtl_ModuleCount","_uno_ExtEnvironment",
- "_typelib_IndirectTypeDescription","remote_DisposingListener",
- "remote_Interface","Registry_Api","_oslFileStatus",
+ "_typelib_IndirectTypeDescription",
+ "Registry_Api","_oslFileStatus",
"_typelib_InterfaceMemberTypeDescription","RegistryValueList",
"RegistryTypeWriter_Api","_rtl_TextEncodingInfo",
- "namespace_anonymous_1","remote_Connection",
+ "namespace_anonymous_1",
"_oslVolumeInfo","_uno_Interface",
"_typelib_InterfaceTypeDescription","_uno_Mapping","Registry",
- "RegistryTypeReader_Api","remote_Context","_typelib_Uik",
- "remote_InstanceProvider","_typelib_ArrayTypeDescription",
+ "RegistryTypeReader_Api","_typelib_Uik",
+ "_typelib_ArrayTypeDescription",
"RegistryKeyArray","RegistryTypeReader","RegistryKeyNames",
"RTConstValueUnion","_typelib_UnionTypeDescription","_uno_Any",
"RegistryTypeWriter","_rtl_Locale","_typelib_CompoundMember_Init",
diff --git a/odk/util/makefile.pmk b/odk/util/makefile.pmk
index db4a85f9..d198d31e 100644
--- a/odk/util/makefile.pmk
+++ b/odk/util/makefile.pmk
@@ -160,7 +160,6 @@ INCLUDETOPDIRLIST= \
$(INCOUT)/uno \
$(INCOUT)/cppu \
$(INCOUT)/cppuhelper \
- $(INCOUT)/bridges \
$(INCOUT)/registry
.IF "$(GUI)"=="WNT"