RE: [libreoffice-dev] -calling a service function from BASIC macro

2013-02-15 Thread Rai, Neeraj
I was able to fix the macro to use the same service with startThr and stopThr buttons. Thanks for your help Stephan and Michael. Neeraj -Original Message- From: Rai, Neeraj [ICG-MKTS] Sent: Wednesday, February 13, 2013 1:03 PM To: 'Michael Stahl' Cc: 'Stephan Bergmann'; 'libreoffice

RE: [libreoffice-dev] -calling a service function from BASIC macro

2013-02-13 Thread Rai, Neeraj
Hi Michael, The links clear up some doubts in my mind. I am still having trouble with having 2 buttons to act on the same service (this is a new problem report). I created 2 buttons which calls startThr() and stopThr() on my service. The start works as expected. However, the stop call seems to

RE: [libreoffice-dev] -calling a service function from BASIC macro

2013-02-12 Thread Rai, Neeraj
Hi Stephan, Is there any example of using uno calls from the forms bundled with LO ? I am not very familiar with the Reference and googling uno::Reference is not helping me either. I also couldn't find usage in sdk dir and examples dir. Would it be possible to point out a dir/file or a web

RE: [libreoffice-dev] -calling a service function from BASIC macro

2013-02-12 Thread Rai, Neeraj
Actually, never mind! I think I have a work around even without Reference. I made my CalcAddinThr a pointer, so it is independent of lifetime of CalcAddimThr_impl . Seems to work through button as well. I think you might have been refereeing to the object created in Basic macro that goes out

RE: [libreoffice-dev] -calling a service function from BASIC macro

2013-02-11 Thread Rai, Neeraj
Hi Stephan, The function is getting called now, however, I get a crash a bit later when sheet_ is being accessed. I also added a button and attached the macro to it for conveninece of calling. There seems to be some difference between the direct call and call via button/macro. You need to

RE: [libreoffice-dev] -calling a service function from BASIC macro

2013-02-08 Thread Rai, Neeraj
Hi Stephan, Appreciate you taking time to debug this. 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

[libreoffice-dev] -calling a service function from BASIC macro

2013-02-07 Thread Rai, Neeraj
Hi, I am having trouble trying to wrap UNO function call in BASIC macro. I got the macro from the following SimpleCalcAddin example. http://wiki.openoffice.org/wiki/SimpleCalcAddIn#Building_.26_Testing 1. mgr = getProcessServiceManager() 2. o =

RE: [libreoffice-dev] - libreoffice 4.0 - waiting on multiple sockets

2013-01-29 Thread Rai, Neeraj
Hi Stephan, Thanks for the tip - that solved it. The symbol __dso_handle__ was undefined. I was using ld to link the shared lib. Switching to g++ for linking solved the undefined symbol issue. I think I understand the thread issue as well. The UNO IPC slow is probably my

RE: [libreoffice-dev] - libreoffice 4.0 - waiting on multiple sockets

2013-01-28 Thread Rai, Neeraj
thread per connection because read/write are blocking calls ? Thanks Neeraj -Original Message- From: Stephan Bergmann [mailto:sberg...@redhat.com] Sent: Monday, January 28, 2013 7:07 AM To: Rai, Neeraj [ICG-MKTS] Cc: 'libreoffice@lists.freedesktop.org' Subject: Re: [libreoffice-dev

RE: [libreoffice-dev] - libreoffice 4.0 - waiting on multiple sockets

2013-01-28 Thread Rai, Neeraj
Thanks Neeraj -Original Message- From: Stephan Bergmann [mailto:sberg...@redhat.com] Sent: Monday, January 28, 2013 11:43 AM To: Rai, Neeraj [ICG-MKTS] Cc: 'libreoffice@lists.freedesktop.org' Subject: Re: [libreoffice-dev] - libreoffice 4.0 - waiting on multiple sockets On 01/28/2013 04

[libreoffice-dev] - libreoffice 4.0 - waiting on multiple sockets

2013-01-25 Thread Rai, Neeraj
Hi , I have an extension that is communicating with a a standalone shared lib running via uno exe. I start a background thread in scalc and use osl::socket (client/server) to pass data. Q1. I need multiple scalc instances to connect to this uno exe. Is there a way to achieve select or epoll

RE: [libreoffice-dev] - trouble with building libreoffice 4.0 from source

2013-01-18 Thread Rai, Neeraj
...@redhat.com] Sent: Friday, January 18, 2013 6:05 AM To: Rai, Neeraj [ICG-MKTS] Cc: 'libreoffice@lists.freedesktop.org' Subject: Re: [libreoffice-dev] - trouble with building libreoffice 4.0 from source On Thu, 2013-01-17 at 21:58 +, Rai, Neeraj wrote: Hi , I am trying to build libreoffice

[libreoffice-dev] - trouble with building libreoffice 4.0 from source

2013-01-17 Thread Rai, Neeraj
Hi , I am trying to build libreoffice preview release 4.0.0 RC1 from source but having some trouble with make fetch and need some advice. It fails on cmd : git config --local --get submodule.dictionaries.url Complaining that local is not a valid option I cloned the git repo based on building

[libreoffice-dev] - Scalc extension ported to accept data over socket

2013-01-11 Thread Rai, Neeraj
Hi All, I was able to extend the earlier simple extension using Scalc.java ported to C++ , with a lot of help from all of you. It now accepts data over socket from a standalone uno client (based on examples/cpp/remoteclient.cxx) I have used the osl::socket for communication. There is a macro

RE: [libreoffice-dev] - questions about calc extension

2013-01-10 Thread Rai, Neeraj
] - questions about calc extension On 01/09/2013 07:41 PM, Kohei Yoshida wrote: On 01/09/2013 01:12 PM, Rai, Neeraj wrote: What is the correct way to get a handle to spreadsheet in extension code. I don't want you to look too close to this (since I no longer maintain this), bug this code of mine http

RE: [libreoffice-dev] - questions about calc extension

2013-01-10 Thread Rai, Neeraj
for catching it. You guys are great. Neeraj -Original Message- From: Michael Meeks [mailto:michael.me...@suse.com] Sent: Thursday, January 10, 2013 11:34 AM To: Rai, Neeraj [ICG-MKTS] Cc: 'libreoffice@lists.freedesktop.org'; Kohei Yoshida Subject: Re: [libreoffice-dev] - questions about calc

RE: [libreoffice-dev] - questions about calc extension

2013-01-10 Thread Rai, Neeraj
- From: Michael Stahl [mailto:mst...@redhat.com] Sent: Thursday, January 10, 2013 11:59 AM To: Rai, Neeraj [ICG-MKTS] Cc: 'libreoffice@lists.freedesktop.org' Subject: Re: [libreoffice-dev] - questions about calc extension On 10/01/13 16:42, Rai, Neeraj wrote: Hi Stephan, I am unable to find

RE: [libreoffice-dev] - building difficulties with C++ extension,addIn

2013-01-09 Thread Rai, Neeraj
[mailto:sberg...@redhat.com] Sent: Wednesday, January 09, 2013 5:28 AM To: 'libreoffice@lists.freedesktop.org' Cc: Rai, Neeraj [ICG-MKTS] Subject: Re: [libreoffice-dev] - building difficulties with C++ extension,addIn Hi Neeraj, Thank you for taking the trouble of making your Calc addin example work

[libreoffice-dev] - questions about calc extension

2013-01-09 Thread Rai, Neeraj
Q1. When I try to use the xContext = cppu::bootstrap() in a calc extension, app terminate with throwing an exception : cppu::BootstrapException It works well in standalone exec. What is the correct way to get a handle to spreadsheet in extension code. Q2. I came across an example

Re: [libreoffice-dev] - questions about calc extension

2013-01-09 Thread Rai, Neeraj
Hi Kohei, 1. I think I see what you are doing, but having trouble making it work. --- my understanding of your code and the issue I face below - The create_XXX is passed the ComponentContext and you store it for future. I tried the same but the calls to xContext-getServiceManager() aborts my

RE: [libreoffice-dev] - questions about calc extension

2013-01-09 Thread Rai, Neeraj
time based on last reply. I tested updating 60K cells using this extension. It takes 90s. Is that acceptable performance ? Seems slow. Anyway, that is a separate discussion and not critical. The main part was solved by your code. Thanks Neeraj -Original Message- From: Rai, Neeraj [ICG

RE: [libreoffice-dev] - questions about calc extension

2013-01-09 Thread Rai, Neeraj
Hi Kohei, I looked a little more into your code and copied the getactiveSheet function. Now it takes 12s. I am happy. Sorry for the spam - you have good code sitting there. Thanks Neeraj -Original Message- From: Rai, Neeraj [ICG-MKTS] Sent: Wednesday, January 09, 2013 6:03 PM

RE: [libreoffice-dev] - building difficulties with C++ extension,addIn

2013-01-09 Thread Rai, Neeraj
Hi Stephan, I was able to get a complete addin working with help from sample code from Kohei. Please find the example attached. It is just a dummy update to 60K entries (12sec). Much faster than DocumentLoader and SimpleBootsrap mechanism that I tried earlier. Thanks all for help. Neeraj

RE: [libreoffice-dev] - building difficulties with C++ extension,addIn

2013-01-08 Thread Rai, Neeraj
: Rai, Neeraj [ICG-MKTS] Sent: Monday, January 07, 2013 7:30 PM To: Michael Stahl Cc: 'libreoffice@lists.freedesktop.org' Subject: [libreoffice-dev] - building difficulties with C++ extension,addIn Hi Michael, I tried your extension suggestion to convert examples/java/SpreadSheet/CalcAddins.java

[libreoffice-dev] - building difficulties with C++ extension,addIn

2013-01-07 Thread Rai, Neeraj
Neeraj -Original Message- From: Michael Stahl [mailto:mst...@redhat.com] Sent: Thursday, January 03, 2013 3:44 PM To: Rai, Neeraj [ICG-MKTS] Cc: 'libreoffice@lists.freedesktop.org' Subject: Re: [libreoffice-dev] - architecture question about interproces,extension,addIn hi Neeraj, On 03/01/13

RE: [libreoffice-dev] - architecture question about interproces,extension,addIn

2013-01-04 Thread Rai, Neeraj
. Is that the preferred way to go ? I would like to hear other opinions on this. Thanks Neeraj -Original Message- From: Michael Stahl [mailto:mst...@redhat.com] Sent: Thursday, January 03, 2013 3:44 PM To: Rai, Neeraj [ICG-MKTS] Cc: 'libreoffice@lists.freedesktop.org' Subject: Re

[PATCH] - Scalc.java ported to C++ , uses DocumentLoader

2013-01-03 Thread Rai, Neeraj
Hi, I am attaching the 3 files. this is a port of Scalc.java to C++. The code is based on http://wiki.openoffice.org/wiki/Calc/API/Programming and borrows from examples/cpp/DocumentLoader and examples/java/Scalc.java. It can be dropped into the dir examples/cpp/Scalcpp and build similar to

[PATCH] - Scalc.java ported to C++ , uses SimpleBootstrap_cpp.cxx

2013-01-03 Thread Rai, Neeraj
Hi, I am attaching the 2 files. this is a port of Scalc.java to C++ using new bootstrap. The code is using UNO bootstrap mentioned in examples/DevelopersGuide/Components/CppComponents. It borrows from profUNO/SimpleBootstrap_cpp and examples/java/Scalc.java. It can be dropped into the dir

[libreoffice-dev] - architecture question about interproces,extension,addIn

2013-01-03 Thread Rai, Neeraj
Hi , I need some advise on which libreoffice technology to use. I need to update data from some of our processes to scalc. I would like to use sockets to transfer data. Preference is for running my own code in scalc that can parse the data sent by my other processes. Speed is important to me.

RE: [libreoffice-dev] - architecture question about interproces,extension,addIn

2013-01-03 Thread Rai, Neeraj
examples (c++ service and BASIC macros). Let me give it a shot. Thanks Neeraj -Original Message- From: Michael Stahl [mailto:mst...@redhat.com] Sent: Thursday, January 03, 2013 3:44 PM To: Rai, Neeraj [ICG-MKTS] Cc: 'libreoffice@lists.freedesktop.org' Subject: Re: [libreoffice-dev

[libreoffice-dev] - ScalcBT.cxx C++ using new uno bootsrap is slow

2013-01-02 Thread Rai, Neeraj
Hi , Hope this is the right forum for the question below. If not, please point me in the right direction. I have written a new version of Scalc.java in C++, this time using UNO bootstrap mentioned in examples/DevelopersGuide/Components/CppComponents. The last version I wrote used

RE: [libreoffice-dev] - ScalcBT.cxx C++ using new uno bootsrap is slow

2013-01-02 Thread Rai, Neeraj
\n, ii); xCellRangeData-setDataArray(arr1); printf([%d] set data array\n, ii); } //*** } -Original Message- From: Rai, Neeraj [ICG-MKTS] Sent: Friday, December 28, 2012 3:56 PM

[libreoffice-dev] - Scalc.java ported to C++ , uses DocumentLoader

2012-11-19 Thread Rai, Neeraj
Hi Enrico and Julien, Thanks for the feedback. I am attaching the 3 files. As mentioned before, this is a port of Scalc.java to C++. The code is mostly cut+paste from examples/cpp/DocumentLoader and examples/java/Scalc.java. I am expecting it'll belong in examples/cpp/Scalcpp. I'd appreciate if

[libreoffice-users] - Scalc.java ported to C++ , uses DocumentLoader

2012-11-16 Thread Rai, Neeraj
Hi , I have been able to merge Scalc.java and DocumentLoader.cxx. The example expects soffice running just like in examples/cpp/DocumentLoader. Running Scalc would connect to soffice, load scalc.ods and populate data in cells, just like Scalc.java Is there any secure place to put this code for

[libreoffice-dev] - novice question about scalc and C++ uno objects

2012-11-15 Thread Rai, Neeraj
Hi , I posted this to users list but now I think this is more of a developers questions. Please correct me if this is not the right forum. I am trying to convert scalc.java to c++. Scalc.java comes with libreoffice and I am able to build and run it using the makefile provided. I am also able