On 02/08/2013 04:08 PM, Rai, Neeraj wrote:
So the org.openoffice.sheet.addin.CalcAddinSock service you specified
implements a new UNO interface that you added (and which has a method
startThr), right?
Yes.

Did you bundle in your extension a types.rdb that
contains the information about that new interface?
No. But tried to change fundamentalrc SERVICE/TYPES rows to add 
$ORIGIN/CalcAddinThr.rdb.  scalc complained about duplicate entry.
I assumed that installing the extension informs scalc about my rdb. Maybe not?
         I know about CORBA at conceptual level and how UNO works almost like 
CORBA just better.
         I don't understand how the unopkg and .rdb achieve that theory. 
Specifically, where types.rdb fits.
         I thought maybe unopkg add is similar to adding in types.rdb ?

Helping you would probably be easiest if you gave the full source code of your 
extension,
along with short instructions how to build it (e.g., "call make from
within a configured LO SDK environment").

attaching the code, makefile, and readme with instructions. to extract :
tar -zxvf CalcAddinThr.tgz

Attached CalcAddinThr.patch solves the problem. You inadvertently registered the libCalcAddinThr.so UNO component both the old, active way (by calling regcomp, which calls your component_writeInfo) and the new, passive way (by providing a *.component file). You may want to also remove the obsolete component_writeInfo implementation from your CalcAddinThr_impl.cxx. (In order to test your code, I also needed an explicit include of unistd.h for read(2), and drop some apparently dead copy/paste stuff that caused additional compilation errors; I simply included those changes in the attached patch.)

Stephan
diff -rNup CalcAddinThr-ORIG/CalcAddinSpread.cxx CalcAddinThr/CalcAddinSpread.cxx
--- CalcAddinThr-ORIG/CalcAddinSpread.cxx	2013-01-28 21:06:03.000000000 +0100
+++ CalcAddinThr/CalcAddinSpread.cxx	2013-02-11 13:44:07.084994239 +0100
@@ -2,6 +2,7 @@
 #include <stdio.h>
 #include <sys/time.h>
 #include <cerrno>
+#include <unistd.h>
 
 #include <osl/thread.h>
 
diff -rNup CalcAddinThr-ORIG/Makefile CalcAddinThr/Makefile
--- CalcAddinThr-ORIG/Makefile	2013-01-29 16:05:08.000000000 +0100
+++ CalcAddinThr/Makefile	2013-02-11 13:48:19.809852794 +0100
@@ -26,20 +26,7 @@ libCalcAddinThr.so: CalcAddinThr_impl.o
 	g++ -o libCalcAddinThr.so -shared \
 		-L$(OO_SDK_HOME)/lib -lpthread -luno_cppuhelpergcc3 CalcAddinThr_impl.o CalcAddinSpread.o
 
-## calc.uno.so is listed in calcuno.rdb. use make run to execute
-calc.uno.so : calcuno.cxx calcCommon.h
-	gcc -c -fpic -fvisibility=hidden -O -I. -I $(OO_SDK_OUT)/LINUXexample.out/inc -I $(OO_SDK_OUT)/LINUXexample.out/inc/examples -I$(OO_SDK_HOME)/include -DUNX -DGCC -DLINUX -DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6 -DHAVE_GCC_VISIBILITY_FEATURE -o calcuno.o calcuno.cxx
-	g++ -shared '-Wl,-rpath,$ORIGIN'  -L$(OO_SDK_HOME)/lib -L$(OO_SDK_URE_HOME)/lib -o calc.uno.so calcuno.o \
-	-luno_cppuhelpergcc3 -luno_cppu -luno_sal  
-
-regcomp.flag: libCalcAddinThr.so
-	$(OO_SDK_URE_HOME)/bin/regcomp -register -r CalcAddinThr.rdb -c libCalcAddinThr.so
-	touch regcomp.flag
-
-calccli : calccli.cpp
-	g++ -I /work/loc1/include/ calccli.cpp -g -o calccli -L /work/loc1/lib -lev -Wl,-rpath,/work/loc1/lib
-
-all: regcomp.flag calc.uno.so calccli
+all: libCalcAddinThr.so
 
 install : all
 	/usr/bin/install -p libCalcAddinThr.so CalcAddinThr.rdb ${OFFICE_PROGRAM_PATH}/
@@ -51,5 +38,5 @@ run  :
 	uno -env:URE_MORE_SERVICES=file://$(shell pwd)/calcuno.rdb  -s com.sun.star.bridge.example.RemoteClientSample  -- "1"
 
 clean:
-	rm -rf com org *.o *.urd *.so *.flag *.oxt CalcAddinThr.rdb calccli
+	rm -rf com org *.o *.urd *.so *.flag *.oxt CalcAddinThr.rdb
 
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to