[ooo-build-commit] .: 2 commits - patches/mono
Noel Power
noelp at kemper.freedesktop.org
Wed Jun 16 04:57:29 PDT 2010
patches/mono/component-support/examples/CalcAddin/CalcAddins.cs | 11 +-
patches/mono/component-support/examples/CalcAddin/MonoCalcAddins.oxt |binary
patches/mono/component-support/examples/CalcAddin/readme.txt | 47 ++++++++++
3 files changed, 53 insertions(+), 5 deletions(-)
New commits:
commit 203b5c4700c03ca42f66a2529f5bc763d9f1475c
Author: Noel Power <noel.power at novell.com>
Date: Wed Jun 16 12:57:00 2010 +0100
fix version of the source ( also updated the source stored in the oxt
* patches/mono/component-support/examples/CalcAddin/CalcAddins.cs:
* patches/mono/component-support/examples/CalcAddin/MonoCalcAddins.oxt:
diff --git a/patches/mono/component-support/examples/CalcAddin/CalcAddins.cs b/patches/mono/component-support/examples/CalcAddin/CalcAddins.cs
index 806ebe9..a06410d 100644
--- a/patches/mono/component-support/examples/CalcAddin/CalcAddins.cs
+++ b/patches/mono/component-support/examples/CalcAddin/CalcAddins.cs
@@ -19,7 +19,7 @@ static class ServiceInfoHelper
}
-public class CalcAddins : uno.util.WeakBase, unoidl.com.sun.star.lang.XServiceInfo, unoidl.com.sun.star.lang.XServiceName
+public class CalcAddins : uno.util.WeakBase, unoidl.org.openoffice.sheet.addin.XCalcAddins, unoidl.com.sun.star.sheet.XAddIn, unoidl.com.sun.star.lang.XServiceInfo, unoidl.com.sun.star.lang.XServiceName
{
@@ -129,10 +129,10 @@ unoidl.com.sun.star.beans.XPropertySet xOptions
* Enter a description for each of your methods that office users will understand.
*/
case shortGETMYFIRSTVALUE:
- stringReturn = "This is your first method.";
+ stringReturn = "(message from mono) This is your first method.";
break;
case shortGETMYSECONDVALUE:
- stringReturn = "This is your second method.";
+ stringReturn = "(message from mono) This is your second method.";
break;
}
@@ -219,7 +219,8 @@ unoidl.com.sun.star.beans.XPropertySet xOptions
public static unoidl.com.sun.star.lang.XSingleComponentFactory __getComponentFactory(String implName )
{
unoidl.com.sun.star.lang.XSingleComponentFactory xFactory = null;
- if ( implName == ServiceInfoHelper.getImplementationName() )
+ //if ( implName == ServiceInfoHelper.getImplementationName() )
+ if ( implName == ServiceInfoHelper.getServiceName() )
{
xFactory = uno.util.Factory.createComponentFactory( typeof ( CalcAddins ),
@@ -229,7 +230,7 @@ unoidl.com.sun.star.beans.XPropertySet xOptions
}
public static bool __writeRegistryServiceInfo(unoidl.com.sun.star.registry.XRegistryKey regKey)
{
- return uno.util.Factory.writeRegistryServiceInfo( ServiceInfoHelper.getImplementationName(),
+ return uno.util.Factory.writeRegistryServiceInfo( ServiceInfoHelper.getServiceName(),
ServiceInfoHelper.getSupportedServiceNames(),
regKey);
}
diff --git a/patches/mono/component-support/examples/CalcAddin/MonoCalcAddins.oxt b/patches/mono/component-support/examples/CalcAddin/MonoCalcAddins.oxt
index baf470b..c0bb6de 100644
Binary files a/patches/mono/component-support/examples/CalcAddin/MonoCalcAddins.oxt and b/patches/mono/component-support/examples/CalcAddin/MonoCalcAddins.oxt differ
commit 48167ae6c168513c460982f3ff8105cf71a858d8
Author: Noel Power <noel.power at novell.com>
Date: Wed Jun 16 09:39:25 2010 +0100
add forgotten readme for the Mono CalcAddin example
* patches/mono/component-support/examples/CalcAddin/readme.txt:
diff --git a/patches/mono/component-support/examples/CalcAddin/readme.txt b/patches/mono/component-support/examples/CalcAddin/readme.txt
new file mode 100644
index 0000000..44aa615
--- /dev/null
+++ b/patches/mono/component-support/examples/CalcAddin/readme.txt
@@ -0,0 +1,47 @@
+unfortunately no time to create some proper makefiles etc. However you can easily build the simple component manually as follows
+
+prequisites:
+ o a mono enabled openoffice build
+ o a build with the the mono component/extension loader support ;-) ( see ../../mono-component-support.diff )
+
+to test
+
+1. set up path to needed assemblies
+
+ export CLI_URE=$(office_install_path)/ure/lib
+
+2. compile the example component
+ a) best to build the java version from the odk first ( or you can extract the provided one from the prepared oxt file here ) in order to get the rdb file
+ e.g. unzip MonoCalcAddins.oxt CalcAddins.uno.rdb
+ b) use climaker on the rdb to create cli_CalcAddins.dll.
+ e.g in a new shell, in your build tree
+ cd cli_ure
+ export MONO_PATH=./unxlngx6.pro/bin/
+ export LD_LIBRARY_PATH=../solver/320/unxlngx6.pro/lib/
+ ./unxlngx6.pro/bin/climaker --out cli_CalcAddins.dll --reference ./unxlngx6.pro/bin/cli_uretypes.dll --extra ../solver/320/unxlngx6.pro/bin/types.rdb CalcAddins.uno.rdb
+ c) mcs -target:library CalcAddins.cs -r:$CLI_URE/cli_basetypes.dll -r:$CLI_URE/cli_uretypes.dll -r:$CLI_URE/cli_cppuhelper.dll -r:$CLI_URE/cli_ure.dll -r:$CLI_URE/cli_uno_bridge.dll -r:$CLI_URE/../../basis-link/program/cli_oootypes.dll -r:cli_CalcAddins.dll
+
+3. insert into prepared extension bundle ( will overwrite existing content )
+
+ zip MonoCalcAddins.oxt CalcAddins.dll cli_CalcAddins.dll CalcAddins.uno.rdb
+
+4. to deploy:
+
+ you need to prepare ( as of OOO3.2 ( OOO300_m19 ) ) your installation
+
+ a). in the $(office_install_path)/ure/lib
+ link libsal.so -> libuno_sal.so.3
+ link libuno_cppu.so -> libuno_cppu.so.3
+
+ e.g. ln -s libuno_sal.so.3 libsal.so
+ ln -s libuno_cppu.so.3 libuno_cppu.so
+
+ b) set up your LD_LIBRARY_PATH ( this sucks )
+ export LD_LIBRARY_PATH=$(office_install_path)/ure/lib:$ LD_LIBRARY_PATH
+ c) set up your MONO_PATH
+ export MONO_PATH=$(office_install_path)/ure/lib:$(office_install_path)/basis-link/program
+
+ d) launch the office ( from the shell with env variables as above )
+ e) use the extension manager to install the extension ( e.g Tools | ExtensionManager )
+ f) restart office
+ g) open CalcAddins.ods ( from odk/examples/java/Spreadsheet ) and read the text, you should be able to see the addin functions returning numbers ( if it worked )
More information about the ooo-build-commit
mailing list