[Libreoffice] [PATCH] [WIP] Bug 33293 - [EasyHack] Make starting count of worksheets configurable

Albert Thuswaldner albert.thuswaldner at gmail.com
Sat May 28 12:46:10 PDT 2011


Hi Rob,

On Sat, May 28, 2011 at 01:01, Rob Snelders <programming at ertai.nl> wrote:
> Hi Albert,
>
> I have worked on this bug before I heard that you had already worked on it.
> Did you work any further on it? Maybe we can callaborate on it?

Oh, how far did you come? I think I basically have done most of it by now.

> I have found the place where the number of sheets is set. This is in
> http://opengrok.libreoffice.org/xref/calc/sc/source/core/tool/appoptio.cxx#88

No I don't think that is where you set it. The methods:

SetTabCountInNewSpreadsheet
GetTabCountInNewSpreadsheet

are used by the vba scripting api to set/get the number of sheets. But
using these methods will not save the the number of sheets to the
configuration file. I did a failled implementation of that, see the
attached files:

tpinit.cxx.appoptio
tpinit.hxx.appoptio

That's at least what I have managed to figure out. So instead I have
basically implemented the same methods in docoptio.cxx/hxx though I
have some bugs to straighten out. Attached the diff on what I have
done so far.

/Albert


> Please let me know.
>
> Greetings,
> Rob Snelders
>
> On 18-05-11 08:39, Albert Thuswaldner wrote:
>>
>> Hi Kohei,
>> Thanks for your help.
>>
>> On Mon, May 9, 2011 at 21:19, Kohei Yoshida<kyoshida at novell.com>  wrote:
>>>
>>> On Sun, 2011-05-08 at 17:09 +0200, Albert Thuswaldner wrote:
>>>>
>>>> Dear List,
>>>> As a first attempt to contribute some code to LO, I've started hacking
>>>> on his:
>>>>
>>>> https://bugs.freedesktop.org/show_bug.cgi?id=33293
>>>>
>>>> I think I have come quite far with implementing the changes to the
>>>> configuration dialog (see the patch). Here there is still some things
>>>> to do, like figuring out why the contents of the tab page isn't
>>>> showing up. Any hints?
>>>
>>> So, when you say the contents of the tag page isn't showing up, do you
>>> mean the page entry is not in the tree on the left at all, or the entry
>>> is there but the page shows up empty?
>>
>> The page entry was in the tree but the tab page itself showed up
>> empty. However, I have solved this part now! :)
>> There was an additional place in the code that needed to be modified.
>>
>>>> Also why are many of the same resource id's defined both in
>>>> libs-core/svx/source/src/app.hrc and
>>>> libs-core/svx/inc/svx/dialogs.hrc?
>>>
>>> I have no clue about this.  Maybe it's a remnant of one of those code
>>> relocation efforts that took place awhile ago in the OOo code?
>>>
>>>> For the other part of problem i.e, how to actually set the number of
>>>> sheets for a new spreadsheet, I am completely lost. I haven't found
>>>> where in the code this should be done, (using opengrok.+ guessing).
>>>> Could someone please give me a hint on how to go about finding this?
>>>> How is a new spreadsheet generated? xml template? through using the
>>>> internal api?
>>>
>>> Check around the ScTable class.  That's the class that implements each
>>> sheet instance.  Especially pay close attention to its constructor, and
>>> assuming that it gets called three times during the startup of Calc, you
>>> can perhaps set a break point in there to see who instaniates it 3
>>> times, and trace back from there.
>>
>> I've mostly focused on the configuration part as of yet, now I will
>> focus on this part.
>> Thanks for the hint.
>>
>>> Great to see you working on this, BTW.
>>>
>>> Kohei
>>>
>>> --
>>> Kohei Yoshida, LibreOffice hacker, Calc
>>> <kyoshida at novell.com>
>>>
>>
>> /Albert
>> _______________________________________________
>> LibreOffice mailing list
>> LibreOffice at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tpinit.cxx.appoptio
Type: application/octet-stream
Size: 2986 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110528/cd52f177/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tpinit.hxx.appoptio
Type: application/octet-stream
Size: 1971 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110528/cd52f177/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: start-count-worksheets3.diff
Type: text/x-patch
Size: 22744 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110528/cd52f177/attachment-0001.bin>


More information about the LibreOffice mailing list