[libreoffice-dev] - questions about calc extension
Rai, Neeraj
neeraj.rai at citi.com
Wed Jan 9 15:18:30 PST 2013
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
To: 'libreoffice at lists.freedesktop.org'
Subject: RE: [libreoffice-dev] - questions about calc extension
Hi Kohei,
I figured out my bug. I was storing the context in a const Reference <> & const and it was going out of scope and being reclaimed after the constructor.
After changing it to normal Reference <>, everything is fine.
Thanks again for your time and patience. Hope you didn't have to waste any 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-MKTS]
Sent: Wednesday, January 09, 2013 4:28 PM
To: 'libreoffice at lists.freedesktop.org'
Subject: Re: [libreoffice-dev] - questions about calc extension
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 program.
Interestingly,
when the create_XXX is called, I try a fake xContext->getServiceManager() and it works.
when I store it in my object , in the ctor, I try another fake xContext->getServiceManager() and it works.
its only when I choose my custom function from menu and invoke this again, that the app terminates.
Is there anything special about functions calls from menu.
====
Also, if the above commentary is misleading, you could look at the code
create_CalcAddinCpp_impl is parallel to your create_SolverImpl (line 520: success)
CalcAddinCpp_impl is parallel to your CalcInterface (line 88: success)
methodTwo (line 159: calc terminates)
Is xcalc.cxx a working extension code that I can download and use ?
If not, do you know of other working samples ?
I would greatly appreciate any sample LO calc extension code to get my env working.
2. Your sample code answered my 2nd question .
If I can get a context and spreadsheet, I can access different cells. I was trying to update different cells from single menu based function call.
appreciate your time.
The sample I based on was on wiki.openoffice.org which seems to be down
Thanks
Neeraj
More information about the LibreOffice
mailing list