diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-19 12:12:01 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-19 13:44:01 +0100 |
commit | 56ceb5db4eb3243d02c56c8cf21522d0373c28a9 (patch) | |
tree | dd895b1a8ba61e3d7d2f279a506ff8bf44f9624c /cppu/qa | |
parent | c4e5b1b934fc3c59fb35ae6c02a0ddf8501a6d28 (diff) |
cppumaker: Work around problematic constant named "auto"
...which had been added all the way back in 2002 with
6cd0bbd8ce6ae2774fc61dacc0f81725ba038d79 "adding new file to HEAD" to constants
group css.drawing.CaptionEscapeDirection, which has meanwhile been published, so
no chance of cleaning that up.
But cppumaker already has a mechanism to work around problematic UNOIDL
identifiers, but which was only used for "new-style" entities when they got
introduced, mainly to avoid compatibility issues when retroactively changing the
code generated for existing entities.
But for C++ keywords, the generated code was always broken, so no harm in fixing
it, so introduce an additional IdentifierTranslateMode::KeywordsOnly and use
that at least for constants, to address the immediate issue.
(And with that, a hack can be removed from gb_UnoApiEmbindTarget__add_embind.)
Change-Id: I5cf62fd8b3b298dff2ec28452fb97b424a4ba473
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162305
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'cppu/qa')
-rw-r--r-- | cppu/qa/cppumaker/test_cppumaker.cxx | 1 | ||||
-rw-r--r-- | cppu/qa/cppumaker/types.idl | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx index a6d3e4942f06..22e0b81e19b6 100644 --- a/cppu/qa/cppumaker/test_cppumaker.cxx +++ b/cppu/qa/cppumaker/test_cppumaker.cxx @@ -352,6 +352,7 @@ #include <test/codemaker/cppumaker/TestException1.hpp> #include <test/codemaker/cppumaker/TestException2.hpp> #include <test/codemaker/cppumaker/Constants.hpp> +#include <test/codemaker/cppumaker/ProblematicConstantNames.hpp> #include <memory> #include <com/sun/star/uno/Any.hxx> diff --git a/cppu/qa/cppumaker/types.idl b/cppu/qa/cppumaker/types.idl index 25bac18ff920..27455d51700d 100644 --- a/cppu/qa/cppumaker/types.idl +++ b/cppu/qa/cppumaker/types.idl @@ -751,6 +751,10 @@ constants UnsignedHyperBits { const unsigned hyper ALL = 18446744073709551615; }; +constants ProblematicConstantNames { + const long auto = 0; +}; + }; }; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |