How to make unokywds.hxx from module sd usable for svdlayer.cxx in module svx?
sbergman at redhat.com
Wed Sep 19 06:33:43 UTC 2018
On 18/09/2018 17:21, Tor Lillqvist wrote:
> 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.
I guess there's no golden rule here. Things like
OUString const empty;
constexpr int one = 1;
are apparently bad, but something like
constexpr sal_uInt16 magic = 0xCAFE;
can be good.
(While we're not completely there yet, the /type/ of the literal should
not drive the decision whether to name it with a variable or spell it
out as a literal each time it is used.)
More information about the LibreOffice