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


Hi Caolán,

On 2012-08-20 at 17:03 +0100, Caolán McNamara wrote:

Full Conversion: Here's what a "full conversion" of a dialog away from
the binary res format to the xml .ui format would look like
http://cgit.freedesktop.org/libreoffice/core/commit/?h=feature/cmclayouttrans&id=064c21aec9245148e90290afd00c46b0999d19c4
i.e. 
a) remove the .src and .hrc
b) remove from the .hxx and .cxx any controls which only exist in the
code in order to get them loaded from the .res file
c) adapt the code to use "get_by_name" to find a widget if code needs to
get an explicit handle to one to set callbacks or whatever[*]
[...]
[*] maybe the cast-happy syntax looks a bit vile. Perhaps a bit family
of get_foos_by_name, or a get_by_name<T> template instead ?

This is great, I hope I'm not going to start some bikeshedding fest :-)

The thing that hit my eyes is the use of string identifiers to address
the UI elements.  Could we (for the compilation purposes) generate .hxx
files out of the .ui files that would allow to do something like:

m_pBodyContent = modules::swriter::ui::linenumbering::content::get(m_pUIBuilder);

[or whatever syntax equivalent that would avoid the use of string
literal]

Of course, that has nothing to do with the runtime, internally it would
be still indexed by name etc., so if somebody edits his/her .ui file not
carefully after the build, they'd be in trouble, but at least, during
the build we'd be fine.

Another extremely minor question - why the "modules/" prefix?  Is that
needed? - seems to just repeat on many places (mainly in help), so maybe
we could avoid that?

Thanks a lot,
Kendy


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.