Age | Commit message (Collapse) | Author |
|
...to only use functions that are also available for std::optional (in
preparation for changing from boost::optional to std::optional):
* uses of get are replaced with operator * or operator ->
* uses of is_initialized are replaced with operator bool
* uses of reset with an argument are replace with operator =
(All of the replacements are also available for boost::optional "since forever",
so this change should not break builds against old --with-system-boost. An
alternative replacement for is_initialized would have been has_value, but that
is only available since Boost 1.68.)
Change-Id: I532687b6a5ee37dab28befb8e0eb05c22cbecf0f
Reviewed-on: https://gerrit.libreoffice.org/84124
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend
loplugin:external to warn about enums".
Cases where free functions were moved into an unnamed namespace along with a
class, to not break ADL, are in:
filter/source/svg/svgexport.cxx
sc/source/filter/excel/xelink.cxx
sc/source/filter/excel/xilink.cxx
svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
All other free functions mentioning moved classes appear to be harmless and not
give rise to (silent, even) ADL breakage. (One remaining TODO in
compilerplugins/clang/external.cxx is that derived classes are not covered by
computeAffectedTypes, even though they could also be affected by ADL-breakage---
but don't seem to be in any acutal case across the code base.)
For friend declarations using elaborate type specifiers, like
class C1 {};
class C2 { friend class C1; };
* If C2 (but not C1) is moved into an unnamed namespace, the friend declaration
must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see
C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither
qualified nor a template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity has been
previously declared shall not consider any scopes outside the innermost
enclosing namespace.")
* If C1 (but not C2) is moved into an unnamed namespace, the friend declaration
must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882>
"elaborated-type-specifier friend not looked up in unnamed namespace".
Apart from that, to keep changes simple and mostly mechanical (which should help
avoid regressions), out-of-line definitions of class members have been left in
the enclosing (named) namespace. But explicit specializations of class
templates had to be moved into the unnamed namespace to appease
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of
template from unnamed namespace using unqualified-id in enclosing namespace".
Also, accompanying declarations (of e.g. typedefs or static variables) that
could arguably be moved into the unnamed namespace too have been left alone.
And in some cases, mention of affected types in blacklists in other loplugins
needed to be adapted.
And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which
is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is
not moved into an unnamed namespace (because it is declared in
sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about
such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler
doesn’t give this warning for types defined in the main .C file, as those are
unlikely to have multiple definitions."
(<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The
warned-about classes also don't have multiple definitions in the given test, so
disable the warning when including the .cxx.
Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4
Reviewed-on: https://gerrit.libreoffice.org/83239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I5e28a4253b755fc3f5ed7c02c99c2611513e5bd8
Reviewed-on: https://gerrit.libreoffice.org/83282
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
add annotation
Change-Id: I9e0f67fc14bc15a011faeb75264f64930a0c3065
Reviewed-on: https://gerrit.libreoffice.org/83063
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
To mitigate the dangers of silently breaking ADL when moving enums into unnamed
namespaces (see the commit message of 206b5b2661be37efdff3c6aedb6f248c4636be79
"New loplugin:external"), note all functions that are affected. (The plan is to
extend loplugin:external further to also warn about classes and class templates,
and the code to identify affected functions already takes that into account, so
some parts of that code are not actually relevant for enums.)
But it appears that none of the functions that are actually affected by the
changes in this commit relied on being found through ADL, so no adaptions were
necessary for them.
(clang::DeclContext::collectAllContexts is non-const, which recursively means
that External's Visit... functions must take non-const Decl*. Which required
compilerplugins/clang/sharedvisitor/analyzer.cxx to be generalized to support
such Visit... functions with non-const Decl* parameters.)
Change-Id: Ia215291402bf850d43defdab3cff4db5b270d1bd
Reviewed-on: https://gerrit.libreoffice.org/83001
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
After 8d69ca60f3c8f53699986f924291a2acda5694a1 macros were always disabled
as ScriptDocument::allowMacros always returned false when called from
non-document context.
Change-Id: Ibef4c7d561f4ee01cd44f5327e4ab948282bb07d
Reviewed-on: https://gerrit.libreoffice.org/82444
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
This reinstates the fix by Pierre Lepage, which was reverted in
351dead74b4c213b13102f81b5ae9bb47ad8ca39, and makes sure it only
has effect when the compilation is started from IDE.
The idea is that the IDE is used primarily for development, and
that's a good opportunity to detect any error in the code. When
the code is compiled from outside of the IDE (like running an
extension), the error is tolerated to allow users run the legacy
code having this error. Hopefully this is enough for tdf#106529.
This re-uses comphelper's NoEnableJavaInteractionContext class,
which is converted into general-purpose SetFlagContext class to
avoid code duplication.
Change-Id: Ie290019cb190b8d1d590699ec13bd63eac478d09
Reviewed-on: https://gerrit.libreoffice.org/81616
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
No only when this executing from a document.
Setting 'DisableMacrosExecution' had no effect on the macro editor,
macros could still be executed there.
Change-Id: I400ed25050173d2ce1fb612aebd2dbcb73720a73
Reviewed-on: https://gerrit.libreoffice.org/82229
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Change-Id: Ic25d6b61750df9ccf5271df1b4d314ae9cb07550
Reviewed-on: https://gerrit.libreoffice.org/81758
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Idb1f6700c5012303e45587db653b62a90e331c17
Reviewed-on: https://gerrit.libreoffice.org/81710
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ice5891e39b0fe4e8d2e5d0f26f0e06069494a785
Reviewed-on: https://gerrit.libreoffice.org/81680
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ia4a622b34ff3f71963cff7a1aa8658a4df12f04f
Reviewed-on: https://gerrit.libreoffice.org/81676
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I6566263809ff0032388a0b56571f0cf7428058d7
Reviewed-on: https://gerrit.libreoffice.org/81334
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
and since I notice that the two call sites also don't care about
pShortTypeName, remove that too
Change-Id: I4649fc4c134c1113555b9dedb53499ce39d17132
Reviewed-on: https://gerrit.libreoffice.org/81213
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds
with our PCHs.
Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5
Reviewed-on: https://gerrit.libreoffice.org/80961
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I9bd29b7377fdf0e1ba36cc021e7e78f83bb1c12c
Reviewed-on: https://gerrit.libreoffice.org/80960
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Grab focus of the TreeView when the macro chooser is created
Change-Id: Idfe3d2435840103eb2fa0ec5d17efce0931cfabd
Reviewed-on: https://gerrit.libreoffice.org/80095
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Change-Id: I114a6b028eb59a1ae38c31bc20439a35643fe972
Reviewed-on: https://gerrit.libreoffice.org/80159
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Change-Id: I2bbfb1445b8d2e748f642cdf4723d41b7f072e2b
Reviewed-on: https://gerrit.libreoffice.org/80305
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
(*) make them all call the superclass operator==
(*) make the base class check which and typeid to ensure
we are only comparing the safe subclasses together
(*) remove a couple of operator== that were not doing
anything useful
Change-Id: Ia6234aed42df04157a5d6a323dc951916a9cb316
Reviewed-on: https://gerrit.libreoffice.org/80308
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic74b400f0b929b4c57ad70d0b0936983a3d46360
Reviewed-on: https://gerrit.libreoffice.org/80154
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia8adfaf9e4dfb31e44d401a411960abde7f28044
Reviewed-on: https://gerrit.libreoffice.org/80079
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
activates-default of True means pressing return activates the default
button of the action area, which is typically what vcl Edit did by
default.
Change-Id: I60bc1634b04a486af86526d887d0ada961b08076
Reviewed-on: https://gerrit.libreoffice.org/79860
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I2fdeb7eb3ead3512ad6d3fe793305038ab3aa7ae
Reviewed-on: https://gerrit.libreoffice.org/79886
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I2ea014aab7463d7127df73a6efba0e06270bd756
Reviewed-on: https://gerrit.libreoffice.org/79755
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I6a3f74a3c52f3fb97b26de69b20ffd7502968d5e
Reviewed-on: https://gerrit.libreoffice.org/79646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id7fa7d5b95c32fdc738a18208eb95eaec102d937
Reviewed-on: https://gerrit.libreoffice.org/79523
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c
Reviewed-on: https://gerrit.libreoffice.org/79360
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
* UNO command TipOfTheDay and slot SID_TIPOFTHEDAY
introduced and added to help menus
* Tip ID introduced to keep the current tip over the day
* Tip ID updates after 24h
* Randomization of tips replaced by sequential order
* Tip ID added to the dialog title
Change-Id: I69b72b80d6d6afa25a1c4f01fa05bc60b5741db8
Reviewed-on: https://gerrit.libreoffice.org/78693
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
|
|
Change-Id: Iaf9b5107cf88390f62d5ca94bf985c77bcb8b7ad
Reviewed-on: https://gerrit.libreoffice.org/79048
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Icf2a34500acc18b28f113c85366bf24edc6d20b9
Reviewed-on: https://gerrit.libreoffice.org/78695
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I904f1f13bb4958e3457476e6e682ec7d7b97c670
Reviewed-on: https://gerrit.libreoffice.org/78660
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Only set the widget as sorted in the ctor, it remains sorted
Change-Id: I96897cf5512e91192c69874ca857a967b09a1490
Reviewed-on: https://gerrit.libreoffice.org/76866
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae
Reviewed-on: https://gerrit.libreoffice.org/78191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I30e17a69ecfa4e1cbaf958f9864b8e2bc9ee99d8
Reviewed-on: https://gerrit.libreoffice.org/78069
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ib4d7a6690aea4e6f009162cd5b6407906deaaa75
Reviewed-on: https://gerrit.libreoffice.org/77925
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id6a0b48c3440be394419e87bd7a4f63bd0a1e758
Reviewed-on: https://gerrit.libreoffice.org/77721
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86
Reviewed-on: https://gerrit.libreoffice.org/77569
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Apply the Liskov substitution principle to OutputDevice::GetBackgroundColor().
This helps in SmTmpDevice::Impl_GetColor() because it no longer needs to know
about what type of OutputDevice it is calling to get the background color.
This forced a rename of basctl::ModulWindowLayout::GetBackgroundColor() to be
GetSyntaxBackgroundColor(), but this is a happy coincidence as it makes the
function intent clearer anyway.
Change-Id: I11298a63cb01c187f3a8a4a2c9e90eacda6c3e6b
Reviewed-on: https://gerrit.libreoffice.org/75521
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Improved GetMergedLibraryNames: Create only one list and sort it at the
end
Change-Id: Id02aa994fe3b8fcaad115c0e3fcaca56601ee8bf
Reviewed-on: https://gerrit.libreoffice.org/76911
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If47f2960372668b1d34ac28df09b6efe7b11eada
Reviewed-on: https://gerrit.libreoffice.org/76907
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
|
|
Moved sorting to inline functions, so the sorter is created only once
Change-Id: I5f06e8d94d2b93f8856cacfd42257f62b84d6e73
Reviewed-on: https://gerrit.libreoffice.org/76867
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
seeing as we want alphabetical sort now, there's no point in
calling GetLineRange and using a map
and only need to set the widget as sorted in the ctor, it remains
always sorted
Change-Id: Ieb5e5c8d9e36375a723376b0009062d6313c8779
Reviewed-on: https://gerrit.libreoffice.org/76810
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ibb6b404d32e38c72fb1ff4be73f3a5f116d55692
Reviewed-on: https://gerrit.libreoffice.org/76809
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ie79c27596ed7960ac9cc09dc8ab341c0ccdfad7d
Reviewed-on: https://gerrit.libreoffice.org/76762
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ibb488b2252a2eea001f1f00aacc4060e365e0df0
Reviewed-on: https://gerrit.libreoffice.org/76739
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ide954bc4ebffef93c71a3ca5fbde51ea38b6cb28
Reviewed-on: https://gerrit.libreoffice.org/76697
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I3698fc4d8e556f75641cf951da87a9acbf81af78
Reviewed-on: https://gerrit.libreoffice.org/76363
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
This might lead to confusion as if there were different macro types depending on the current downstream package name. E.g. "LibreOffice Basic macros" might become "LibreOffice Vendor XY basic macros".
Remove that confusion by using just "Basic macro" in the UI.
Change-Id: Ifc2543bb151e94fc6c6e47d878720dd99294f596
Reviewed-on: https://gerrit.libreoffice.org/76216
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014
Reviewed-on: https://gerrit.libreoffice.org/75934
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|