[PATCH] Object Catalog in Dialog Editor

Noel Power nopower at suse.com
Fri Aug 17 01:49:59 PDT 2012


Hi János

you have official become my personal hero
On 17/08/12 06:59, János Uray wrote:
> Now in Basic IDE, the Object Catalog window is not only visible in the 
> basic editor, but also in the dialog editor. The same window can be 
> docked in both.
perfect
> There was a ModulWindowLayout class that handled the the three 
> BasicDockingWindow's in basic editor: ObjectCatalog, StackWindow and 
> WatchWindow. A new class, Layout has been created, which handles the 
> docking windows in a bit more general way. Now ModulWindowLayout and a 
> new class, DialogWindowLayout are derived from Layout. The former has 
> been rewritten and simplified. The derived Layout classes tell Layout 
> what docking windows they want and where to put them.
> BasicIDEShell has two Layout instances: a ModulWindowLayout and a 
> DialogWindowLayout. They are created on first use, and only one of 
> them is visible at a time. A generic pointer, pLayout points to the 
> currently active Layout.
sounds sensible
> BasicIDEShell has an ObjectCatalog instance, which is shared between 
> the two Layout's. It is reparented each time when the Layout changes.
fine although does that approach allow the object catalog to be docked 
in one layout and not in the other?
> As "code conventions" says, new classes are in namepace 'basctl'. I'm 
> planning to put all names into 'basctl', unless someone tells me not 
> to do this.
I doubt anyone would object
> Some minor simplification was also done related to these changes. Some 
> dynamic_cast's that targeted ModulWindow or DialogWindow (related to 
> ModulWindowLayout) now use virtual functions. Some code has been 
> transferred from BasicIDEShell to more appropriate place, into 
> (virtual) functions of Layout and ModulWindow/DialogWindow, enhancing 
> encapsulation.
again all sound perfect
>
> I'll continue working in Basic IDE. My plans are:
> 1.
> Continuing this with the dockable property browser in Dialog Editor.
> 2.
> Improving Object Catalog (e.g. able to select modules and dialogs, not 
> only macros).
yes, and hopefully you plan to fix my pet peeves and add context menus 
and improve the object catalog layout too ( although you already 
improved things so much :-))) )

The patch is a little large and initially just looking at the diff is a 
bit intimidating for me, smaller patches would maybe be easier to review 
( saying that I am not sure that is really possible to create neat small 
isolated patches with such a refactor as this )
Anyway I think if this runs ok ( I will try it later ) I  would be 
inclined to just check it in, the benefits from this change far outweigh 
any new minor bugs that might be introduced. I will attempt to review or 
at least scan the resulting new code rather than trying to read the 
diff, my ui code knowledge is poor anyway :-) so I am not even convinced 
about how effective my review will be. In any case from the last changes 
you made I am more than confident that this patch is a great one, thanks 
again for this super change

Noel


More information about the LibreOffice mailing list