(as discussed in the commit message of ce1d8e20a708ed031f2336770a41fbe501fe8225
"Adapt to '[ADT] Make StringRef's std::string conversion operator explicit'";
there are more of those that cannot easily be dropped, though).
Change-Id: Ib2e223f7de96ad8859eab165daa759b480326c7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88582
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
We generally sort sources for each target in LO, so make this
consistent/nicer :).
Change-Id: I4c8bc0d9e3f0b2d8b966bd90215c960c30ea2f86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88361
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
...(vcl/win/app/salinst.cxx) in case the
#if HAVE_FEATURE_SKIA
#if SKIA_USE_BITMAP32
...
block it contains is excluded (when building with clang-cl on Windows)
Change-Id: I60910106bbd6a4c2cb3f393945a5417eb02407c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87898
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
...as seen at
> In file included from desktop/win32/source/QuickStart/QuickStart.cxx:29:
> In file included from include\systools/win32/uwinapi.h:25:
> include\prewin.h(38,9): error: duplicate defines [loplugin:duplicatedefines]
> #define WIN32_LEAN_AND_MEAN
> ^
> desktop/win32/source/QuickStart/QuickStart.cxx(24,9): note: previous define [loplugin:duplicatedefines]
> #define WIN32_LEAN_AND_MEAN
> ^
(An alternative fix could be to replace all those defines of WIN32_LEAN_AND_MEAN
prior to including windows.h with includes of prewin.h and postwin.h?)
Change-Id: I0271b5629af8f4ecfb3c90f1455bad399174f6ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87880
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
tweak plugin with the name of another clone method
Change-Id: I47193d31f53f48297c9e773da375c7255ddde282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87852
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
In the sharedvisitor.cxx mode all plugins need just one shared
RecursiveASTVisitor template instance, but as long as they use another
instance each as the base class, Clang still instantiates those templates
and then spends a lot of time optimizing each of them, even though they
should never get used.
So when compiling using sharedvisitor.cxx simply use dummy base classes
that do not do anything. As an additional check they abort() if any
of the functions get called, this needed removing vclwidgets and
unusedmember from shared plugins, because they call TraverseStmt(),
maybe this can get handled somehow later.
Change-Id: Ic5a350da2c3ba31521f71077b1776b1ee8f06dea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87561
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
which resulted in only a couple of real finds, mostly false+
Change-Id: I26058a29c27bff50e9526bedd54fb04589c2934d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87765
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
check indentation of braces in namespace decls,
and the comments that often appear with them.
This is my penance for messing up the indentation with
clang-tidy-modernize-namespaces.
As such I have limited it to new-style namespaces for now,
and the check is off by default.
Change-Id: I4db7f10a81c79bc0eece8f8e3ee564da8bc7f168
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87723
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
and CUSTOM DataLabelPlacement to support custom data label positions,
and its initial implementation: only UI support with OOXML import
(tdf#130030), yet.
Change-Id: I01d986071d78ae3e2a5f43d5711e9f60b8410c21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86859
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
which I wrote to check if there were any other cases where assigning to
a ref local var looks dodgy, after my fixes in
0b113d6ebbaf923e11ba576bed2691bb68e95ae6, but I didn't find anything, so
just leave this one in store
Change-Id: Ib820924c5e8aa85206730afeb06972ef48231ec5
...<https://github.com/llvm/llvm-project/commit/
777180a32b61070a10dd330b4f038bf24e916af1>. This is just a quick fix to get
copmilerplugins buiding again with latest LLVM/Clang trunk. Ideally, we should
get rid of as many of those (potentially expensive) conversions from
llvm::StringRef to std::string as possible.
Change-Id: I18e185e0022a06fd8e3b983a3c4f80e1f3b96746
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87682
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
The simplifyconstruct test can return false from a Visit*() function
(thus ending the whole traversal) because anyPluginActive() would
return false just because a plugin would be temporarily disabled
in Traverse*() because of its PreTraverse*() returning false. Keep
a count of temporarily disabled plugins to prevent this.
Change-Id: I413d88749257acff2220182d13e8fcd0f7289540
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87636
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
"Find explicit casts from signed to unsigned integer in comparison against
unsigned integer, where the cast is presumably used to avoid warnings about
signed vs. unsigned comparisons, and could thus be replaced with
o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx)
o3tl::make_unsigned requires its argument to be non-negative, and there is a
chance that some original code like
static_cast<sal_uInt32>(n) >= c
used the explicit cast to actually force a (potentially negative) value of
sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the
cast to avoid a false "signed vs. unsigned comparison" warning in a case where
n is known to be non-negative. It appears that restricting this plugin to non-
equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=)
is a useful heuristic to avoid such false positives. The only remainging false
positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast
from sal_Int32 to sal_uInt32".
But which of course does not mean that there were no further false positivies
that I missed. So this commit may accidentally introduce some false hits of the
assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan
--enable-dbgutil) `make check && make screenshot`.
It is by design that o3tl::make_unsigned only accepts signed integer parameter
types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses
which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in
include/oox/helper/helper.hxx is used with both signed and unsigned types, so
needs a little oox::detail::make_unsigned helper function for now. (The
ultimate fix being to get rid of the macro in the first place.)
Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
...in <https://github.com/llvm/llvm-project/commit/
8a81daaa8b58aeaa192a47c4ce7f94b4d59ce082> "[AST] Split parent map traversal
logic into ParentMapContext.h", causing failures like
> compilerplugins/clang/constmethod.cxx: In member function ‘bool {anonymous}::ConstMethod::checkIfCanBeConst(const clang::Stmt*, const clang::CXXMethodDecl*)’:
> compilerplugins/clang/constmethod.cxx:191:70: error: invalid use of incomplete type ‘class clang::DynTypedNodeList’
> 191 | auto parentsRange = compiler.getASTContext().getParents(*stmt);
> | ^
> In file included from compilerplugins/clang/plugin.hxx:15,
> from compilerplugins/clang/constmethod.cxx:16:
> include/clang/AST/ASTContext.h:97:7: note: forward declaration of ‘class clang::DynTypedNodeList’
> 97 | class DynTypedNodeList;
> | ^~~~~~~~~~~~~~~~
Change-Id: Ib82d04608fa306a715af481422017c24053a01c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87533
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
The code is just not ready for 32bpp bitmaps that actually include
alpha directly in the data instead of the stupid VCL way of using
a separate bitmap for that. And it seems the performance difference
is not that large, so revert and maybe somewhen later.
Change-Id: Icb61663665c843fb426206967d0fe7667ed88477
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87466
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Thank you Terrence Enger for having spotted this!
Change-Id: I234ded85edf837e398675427fdf3e9cd3a3969a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87417
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
involves converting SvxLineStyleToolBoxControl to a PopupWindowController
because chart is doing interesting things in its panel there needs to be
a non-standard way to report/detect the selected line style, which is
then reused to disable/enable the arrows when none is selected/deselected
in non-chart sidebars
SvxLineBox becomes a toolbar dropdown instead of a combobox itemwindow
linectrl.cxx split into linewidthctrl.cxx and linewidthctrl because
SvxLineBox is now needed in svxcore
Change-Id: Icf0ef5e612b894a43d389af8a2908138c2e9c580
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87164
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
> compilerplugins/clang/finalclasses.cxx:56:57: error: loop variable 's' has type 'const std::pair<std::string, std::string> &' (aka 'const pair<basic_string<char>, basic_string<char> > &') but is initialized with type 'std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >' resulting in a copy [-Werror,-Wrange-loop-analysis]
> for (const std::pair<std::string,std::string> & s : definitionMap)
> ^
> compilerplugins/clang/finalclasses.cxx:56:14: note: use non-reference type 'std::pair<std::string, std::string>' (aka 'pair<basic_string<char>, basic_string<char> >') to keep the copy or type 'const std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > &' to prevent copying
> for (const std::pair<std::string,std::string> & s : definitionMap)
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
etc.
Change-Id: If3f0599ef79d49e4bb4bbd245ca7456c09d13975
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86893
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>