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

Markus Mohrhard markus.mohrhard at googlemail.com
Mon May 30 16:38:26 PDT 2011


Hello Albert,

just two quick comments.

We are trying to get away from using sal_Int16 for sheet numbers and use
SCTAB instead, so it would be nice if you could change this.
And I think we can't/shouldn't create a document without a sheet (but Kohei
may prove me wrong). And did you check that no negative numbers/characters
are inserted?

But all in all some good work. I think Kohei will take a closer look and
give you some better advice.

Regards,
Markus

P.S. I prefer static_cast over c style casts, but don't know Kohei's opinion
on this

2011/5/31 Albert Thuswaldner <albert.thuswaldner at gmail.com>

> Hi all,
> Submitting a patch for  Bug 33293 for review. Please let me know if
> you want me to improve some parts of it.
>
> Once you are happy with it you can commit the patch under the terms of
> MPL 1.1 / GPLv3+ / LGPLv3+
> triple license.
>
> To implement this feature request I have:
> 1.) created a new config tab page called "Initialize",were the user
> can set the desired number of sheets to start with.
> 2.) created a new handler class  :ScTpInitOptions (tpinit.cxx/hxx) to
> deal with this config item.
> 3.) modded the class (docoptio.cxx/hxx) to include this option
> 4.) modded ScTabViewShell class (tabvwsh4.cxx) where the number of
> sheets actually are set
>
> Regards,
>
> /Albert
>
>
>
> On Wed, May 18, 2011 at 08:39, Albert Thuswaldner
> <albert.thuswaldner at gmail.com> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110531/dd39dbf8/attachment.html>


More information about the LibreOffice mailing list