Age | Commit message (Collapse) | Author |
|
Change-Id: If8c221a2bfb249a6625df4b466fe5247b7a8ae72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108355
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3a1cca2f6ea3b6d3fef2e10e2ae4d0674cfe205a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108324
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic491f69e7bb098a03f9cdbd8913c4b4be4a570b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108326
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
|
|
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for
details.
(Turned some affected variables in included files into inline variables, to
avoid GCC warnings about unused variables.)
Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This removes the need to calculate hashes for the table at runtime.
Also this introduces a static assertion to make sure that the table
has correct structure, and fixes some methods that had wrong argument
counts:
CreateUnoListener: 1 -> 2
MIRR: 2 -> 3
SLN: 2 -> 3
SYD: 2 -> 4
Changes in basic/source/classes/sb.cxx are related to the change of
SbxVariable::MakeHashCode into constexpr function taking string view.
Change-Id: I2fec4994e976f36c4b647c30b51a9e879a815775
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108220
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
which only purpose is to make "git grep SbRtl_Foo" a kind of IQ test.
Change-Id: I47cfc2ecd1cc4a5ecf2e348465554fa2caeaccf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108218
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Shorten the tools module name; use TestUtil.AssertEqual where applicable;
remove unnecessary variables that only made noise and masked what was
actually asserted; add missing licence headers.
Change-Id: If891ed8ceb38fed18335aad061b2b09d341264f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108118
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
...after 46c5de832868d2812448b2caace3eeaa9237b9f6 "make *String(string_view)
constructors explicit"
Change-Id: I85138de39d7d7f9fa4ce3c14acf60b770c2f1d4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108059
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...after 46c5de832868d2812448b2caace3eeaa9237b9f6 "make *String(string_view)
constructors explicit"
Change-Id: I6a1d54e8dbcd98027122d33e6b6544ce00b09624
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108052
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
|
|
Move repeated code into _test_asserts.vb
Change-Id: Idfe124a8dbab4925309fa5f1322e0cce5f097b7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107860
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
to make it more obvious when we are constructing heap OUStrings
code and potentially inadvertently throwing away performance.
And fix a handful of places so revealed.
Change-Id: I0cf390f78026f8a670aaab53424cd31510633051
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107923
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...for LIBO_INTERNAL_ONLY. These had been missed by
1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).
This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).
The improvement to loplugin:stringadd became necessary to fix
> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
> File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
> File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.
Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
In StepPARAM convert parameters to the requested type, otherwise it
loses possible references which leads to an error where the results of a
macro has no effect on the caller.
Change-Id: I8347eab658e037a29cd04be9c00edd6a4d1b31c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107249
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I3e22c2000da03f6f3345353846213203993aa865
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107192
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I2e6cab798309a1bc2ade00661bc95dd5ae20f748
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107045
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I33bc73ff0d7f94bce5c93f9c9c1b6db8f36f34df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106983
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I036f21c8196530973d2cdc366da7654ccd930892
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106556
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
(The "%ld" format specifier had now caused -Werror,-Wformat with clang-cl for a
Windows 64-bit build.)
Change-Id: I741a3e3526a63162dbd75c018dfe7157f06819f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106575
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This removes memory management from the class; unifies the types
used throughout the code using it; and simplifies it all greatly.
Also this changes errors handling. Prevoiusly setting errors to
parser didn't handle case when no parser was passed to SbiBuffer
ctor, as BufferTransformer did, and could dereference nullptr.
Change-Id: I068eb1b3e9a616a5744fc8233781c4dd4403c84d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106452
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ic90d8ee858d25bed36c89f95d5de94440cb48f1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106399
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I651a16be0a80210504267a743b2c50474fb1cc50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106357
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
(at least not in general)
Change-Id: I71337b53dc9735e90a37ee532d0a8a08797b518c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106043
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
not just functions
Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I87736d6f1a1d069c990b4e7b9ca291634ab4fb44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105646
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
|
|
Add new methods "subView" to O(U)String to return substring views
of the underlying data.
Add a clang plugin to warn when replacing existing calls to copy()
would be better to use subView().
Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic907f4711685539b6a89411e704845617cc5f04d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105375
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ib0008b9bb095f27e5e436d6b507dc709ab7bf01a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105313
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
... since VarDecFromI4 WinAPI uses LONG [1].
Reverts commit 6436302f40252bc6619e304e2051115fee902e20 (partially) and commit
6436302f40252bc6619e304e2051115fee902e20.
[1] https://docs.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-vardecfromi4
Change-Id: I5b0805b5b22bea0017b4b2f40400445ab587f2c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105226
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
move IsShowOutlineContentVisibilityButton out of header to
avoid having to add extra include paths to all the unit
test makefiles.
Change-Id: I2763390e07cd85b8f09b6f2ad7702039daecb22f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105100
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
During the creation of the parameter list of a method, explicitly grant
write access to the method which will used as a variable. Otherwise, the
name of the method can't be used in certain statements, i.e., index in a
for loop or as a dimension in ReDim.
Change-Id: I3e4c49c21fd3345d5ddd69bc31a5823b5de5b8e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104696
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Seems 6436302f40252bc6619e304e2051115fee902e20 broke Windows ARM
Change-Id: I5c453ce39c81ef34e3cd55e519a7752881fd72a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104991
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
grepping for stuff in template params this time
Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
And use SbxValues ctor taking SbxDataType for simplicity
Change-Id: I25622bae33597a8782d9451f88eadce1cf07388d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104860
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ibb227a0f9e7178ea388e720874ec31a178c2aab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104859
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ide4014348d51f0b5f59e1e91b8d41c7748853254
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104608
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The Split function sets the datatype of the array to SbxVARIANT instead
of SbxSTRING preventing any subsequent assignments to the array and to
the elements itself.
Change-Id: Ib099eee7bfd222c97520ac8970352bcf2b44bc3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104039
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I487b5dc148f5a3d0d45f198c00179002841242ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104213
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I44eb44107a24207764da24b4e01b407570342013
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103956
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I32595921bf5ed26699bced3637302692c407d624
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103760
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
It passed "make check" on Linux
Change-Id: Idd33e9f70c9552c341b4d312bc33135f758715b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103449
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
It passed "make check" on Linux
Change-Id: Iae7db8b7627c5e4715860eafda8df98d2cb8f781
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103308
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I41a204fbc5e2c9b819fb948c5288f8d7b4195489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103117
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
This will need a real implementation to do system calls, but for
the initial compilation the dummy is sufficient.
Change-Id: Ia16e47fdb8fbf4855f7c5abb0d36d9c922cd1de7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102860
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
...from which an OUString can cheaply be instantiated. This is the OUString
equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into
a consteval'ed, static-refcound rtl_String". Most remarks about that commit
apply here too (this commit is just substantially bigger and a bit more
complicated because there were so much more uses of OUStringLiteral than of
OStringLiteral):
The one downside is that OUStringLiteral now needs to be a template abstracting
over the string length. But any uses for which that is a problem (e.g., as the
element type of a container that would no longer be homogeneous, or in the
signature of a function that shall not be turned into a template for one reason
or another) can be replaced with std::u16string_view, without loss of efficiency
compared to the original OUStringLiteral, and without loss of expressivity.
The new OUStringLiteral ctor code would probably not be very efficient if it
were ever executed at runtime, but it is intended to be only executed at compile
time. Where available, C++20 "consteval" is used to statically ensure that.
The intended use of the new OUStringLiteral is in all cases where an
object that shall itself not be an OUString (e.g., because it shall be a
global static variable for which the OUString ctor/dtor would be detrimental at
library load/unload) must be converted to an OUString instance in at least one
place. Other string literal abstractions could use std::u16string_view (or just
plain char16_t const[N]), but interestingly OUStringLiteral might be more
efficient than constexpr std::u16string_view even for such cases, as it should
not need any relocations at library load time. For now, no existing uses of
OUStringLiteral have been changed to some other abstraction (unless technically
necessary as discussed above), and no additional places that would benefit from
OUStringLiteral have been changed to use it.
Global constexpr OUStringLiteral variables defined in an included file would be
somewhat suboptimal, as each translation unit that uses them would create its
own, unshared instance. The envisioned solution is to turn them into static
data members of some class (and there may be a loplugin coming to find and fix
affected places). Another approach that has been taken here in a few cases
where such variables were only used in one .cxx anyway is to move their
definitions from the .hxx into that one .cxx (in turn causing some files to
become empty and get removed completely)---which also silenced some GCC
-Werror=unused-variable if a variable from a .hxx was not used in some .cxx
including it.
To keep individual commits reasonably manageable, some consumers of
OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat
odd state for now, where they don't take advantage of OUStringLiteral's
equivalence to rtl_uString, but just keep extracting its contents and copy it
elsewhere. In follow-up commits, those consumers should be changed
appropriately, making them treat OUStringLiteral like an rtl_uString or
dropping the OUStringLiteral overload in favor of an existing (and cheap to use
now) OUString overload, etc.
In a similar vein, comparison operators between OUString and std::u16string_view
have been added to the existing plethora of comparison operator overloads. It
would be nice to eventually consolidate them, esp. with the overloads taking
OUStringLiteral and/or char16_t const[N] string literals, but that appears
tricky to get right without introducing new ambiguities. Also, a handful of
places across the code base use comparisons between OUString and OUStringNumber,
which are now ambiguous (converting the OUStringNumber to either OUString or
std::u16string_view). For simplicity, those few places have manually been fixed
for now by adding explicit conversion to std::u16string_view.
Also some compilerplugins code needed to be adapted, and some of the
compilerplugins/test cases have become irrelevant (and have been removed), as
the tested code would no longer compile in the first place.
sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878> "Failed class template
argument deduction in unevaluated, parenthesized context". That place, as well
as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and
i18npool/source/localedata/localedata.cxx, which have been replaced with
OUString::Concat (and which is arguably a better choice, anyway), also caused
failures with at least Clang 5.0.2 (but would not have caused failures with at
least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile
been fixed).
Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102222
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Id6660627e766c6dcd107c3ee483bacb046cae7bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102123
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I76e86bf4d82b33771ea2900517712be57ae7f03d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102232
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
...and in turn add OUString::operator = and OUString::operator +=
overloads that take a std::u16string_view. Without making the ctors explicit,
the operator overloads would have caused ambiguities when called with raw
sal_Unicode pointers/non-const arrays, as those can convert to both OUString and
to std::u16string_view.
But the std::u16string_view operator overloads will generally be useful when
changing OUStringLiteral similarly to 4b9e440c51be3e40326bc90c33ae69885bfb51e4
"Turn OStringLiteral into a consteval'ed, static-refcound rtl_String", at which
point many existing uses of OUStringLiteral will be replaced with uses of
std::u16string_view.
Implementing this change turned up a need for an operator = overload for
OUStringNumber, which has thus been added. No such need turned up for a
corresponding operator += overload, but which can easily be added when the need
arises.
It also revealed that the operator == overloads between an OUString and a raw
sal_Unicode pointer/non-const array were implemented rather inefficiently,
creating a temporary OUString from the raw argument. Those have been improved.
Preceding commits have already taken care of many dubious or simply unnecessary
implicit uses of the now-explicit OUString ctors. This commit makes explicit
the few remaining reasonable uses. (And in some cases needed to change variable
initialization syntax from using parentheses to using curly braces, to avoid the
most vexing parse issue. And needed to explicitly add OUString ctors from
char16 const[2] string literal lvalues in a conditional expression in
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx that are only necessary
because MSVC apparently still insists on doing array-to-pointer decay there.)
All of this only affects LIBO_INTERNAL_ONLY.
Change-Id: I7ce31162e9be1c3ff3c0bd184a34b535ec56be9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102098
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I4bee1ec99b69b42b7eea540b04511cbafe5fbd0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102106
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I841cbb2bad3af5f6f6212962d7f15436d5e7bead
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102105
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
|