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


Hallo Tor,

Tor Lillqvist schrieb am 18-Sep-18 um 17:21:
On the other hand, do we really consider what
sd/source/ui/inc/unokywds.hxx exhibits to be good style?

My personal impression has been that we want to eventually get rid of
stuff like this and just use literal strings as such in the code, and I
have occasionally committed changes like that.

But of course, I have to admit that exactly the kind of error that
Regina is fixing here would not have happened if that svdlayer.cxx file
had consistently only used variables containing those strings.

And you can use opengrok to search for it. You cannot search for "controls" including the quotation marks, at least I do not know how to do it in opengrok.


Still... I can't stand how unokywds.hxx completely arbitrarily sometimes
spells the variable exactly using the same case of characters as the
contents (for example sUNO_Service_FillProperties[] =
"com.sun.star.drawing.FillProperties"), sometimes differently (for
example sUNO_PseudoSheet_SubTitle[] = "subtitle" and sUNO_shape_zorder[]
= "ZOrder"). No consistency at all. Infuriating.

it is also annoying if some string is *both* present as literals here
and there, and *also* as the contents of some const variable in other
places. And maybe as another const variable in still other places. And a
#define in even more places....

I agree it is confusing. Do you have a better idea for my case of layer names?

Those from unokywds.hxx have the advantage, that the purpose is in the identifier. So you can distinguish between "Background" as property for filling, "background" as layer name and "background" as style sheet name, for example.

Kind regards
Regina

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.