Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On 01/09/2013 01:12 PM, Rai, Neeraj wrote:
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.

Yes, that's only for "standalone exec" (or whatever we are supposed to call it), not for extensions.

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://code.google.com/p/scsolver/source/browse/source/ui/xcalc.cxx

may give you some hint, especially the top 3 methods, getCurrentComponent(), updateCurrentComponent(), and getServiceManager() should give you how to get the current component object from the current context object. As an extension, you are given access to the current context object, and you can reach the current component from that one way or another.

Q2. I came across an example extension code that registers 4 methods.
One of the methods takes sequence of sequence
         and returns a sequence of sequence after adding 4 to it.
       When I call this example by hitting <F2> (insert function) and
choosing that funcname, and giving it a range of cell, the cell is
populated with the value of 1st  cell + 4
      How can I update multiple cells using a custom written function.

Not sure if I understand this fully. Can you post the URL to the example extension code that you are referring to?

Kohei

--
Kohei Yoshida, LibreOffice hacker, Calc

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.