Commit Graph
4869 Commits
Author SHA1 Message Date
Noel Grandin d7cd65577d use more OInterfaceContainerHelper3 in ModifiableHelper
Change-Id: I8d959e365f995d48a6105fac3ed0f84c7cc1d86b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125920
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-27 08:09:11 +01:00
Noel Grandin 11599f6f00 use more OInterfaceContainerHelper3 in NameContainer
Change-Id: I75cb302156ea93fe0b545b22ca85a0c537cce760
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125919
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-27 06:48:07 +01:00
Noel Grandin ec1c4c4930 O[U]String::replaceAt overloads that take string_view
which results in lots of nice string_view improvements picked up by the
plugins

Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23 14:00:08 +01:00
Mike Kaganski 37429f2690 Use M_PI* instead of F_PI*
Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-19 09:59:43 +01:00
Mike Kaganski fffc6b40b9 Drop unused argument names, and (void) noise
Change-Id: I75f313924db7d6a0658f9d7cc1d571767cec3144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125364
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-18 13:05:44 +01:00
Julien Nabet ccfeef1a48 tdf#145725: document about VBASupport+RGB (no bug here)
Change-Id: I1a90509b7e5481bcf811f19889688c767c32e46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125430
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-18 10:01:11 +01:00
Eike Rathke 07a2afa490 Resolves: tdf#110003 tdf#143128 handle lowercase ß vs uppercase ẞ folding
Change lowercase ß U+00DF LATIN SMALL LETTER SHARP S from
LowerToUpper, ToUpper: SS
ToTitle: Ss
FullFolding: ss
to
LowerToUpper, ToUpper: ẞ  U+1E9E
ToTitle: ẞ  U+1E9E
FullFolding: ss

Add uppercase ẞ U+1E9E LATIN CAPITAL LETTER SHARP S
UpperToLower, ToLower: ß  U+00DF
FullFolding: ss

Adjust BASIC Collection test to new reality.

Change-Id: I198e06985b81a71e5de94bf7fab7a0dbaf10baef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124988
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2021-11-11 01:27:47 +01:00
Noel Grandin b3c6b3a274 rtl::Static to thread-safe static
Change-Id: I35e2a252708228bdbeaee557ef35763c64608653
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124884
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-09 08:28:56 +01:00
Noel Grandin a0e0575dcf forward decls go after #include
Change-Id: I54c33508639044092356eed5144720261b4f65db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124816
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-07 19:20:17 +01:00
Noel Grandin 6299c8cae9 loplugin:constparams
Change-Id: Iebeb531fad5cc819b536788925cf8508737198b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124599
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-03 07:54:12 +01:00
Andreas Heinisch 27d96bfaea tdf#145371 - Delete array variable only before ReDim
Otherwise, global array variables don't maintain their state.

Change-Id: I10dafd9e2946630c5476c9858f765d67ef2f6d6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124368
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-10-30 18:28:17 +02:00
Mike Kaganski 81a7d46d9f Prepare for removal of non-const operator[] from Sequence in basic
Change-Id: If048bc301c38ac5ac5412a7d8f69231705088a50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124343
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-29 06:50:32 +02:00
Andreas Heinisch 7d27e4b025 tdf#57308 - Basic IDE: Watching of a variable does not work
Watching a variable which returns a value from a function always shows
"out of scope" in the watch window of the Basic IDE. In order to resolve
this issue, the name of the variable being watched will be searched also
in the current method instance.

Change-Id: I5ff6ce22067e11d74275eeb82da814da1eebe3db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124239
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-10-27 09:29:34 +02:00
Andreas Heinisch 514e83a0a5 Revert "tdf#57308 - Basic IDE: Watching of a variable does not work"
This reverts commit f9ce4b2d04.

Reason for revert: Cast to SbxVsriable instead of SbxMethod causes the code to start over

Change-Id: I8f00f8f13faef8cb8c6db4e8c2a096a921f8714b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124187
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-10-26 08:05:27 +02:00
Andreas Heinisch f9ce4b2d04 tdf#57308 - Basic IDE: Watching of a variable does not work
Watching a variable which returns a value from a function always shows
"out of scope" in the watch window of the Basic IDE. In order to resolve
this issue, the name of the variable being watched will be searched also
in the current method instance.

Change-Id: Id383e03925956056931d199fe86d1b352cf8e4eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124075
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-10-25 13:22:09 +02:00
Andreas Heinisch 67c1591060 tdf#125637 - Correctly hand names ending with an underscore
If a name is ending with an underscore at the end of the line, it won't
be recognized correctly and it will be wrongly interpreted as the
respective name without the underscore at the end. Instead of changing
the macro source, use a flag in order to correclty identify the line end.

Change-Id: I6f933d7382b510bffed3e2692d32c232b7084624
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123833
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-10-20 20:27:59 +02:00
Noel Grandin 283a9790bf loplugin:indentation check for indent inside block
look for places where the statements inside a block are
not indented

Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-20 15:39:38 +02:00
Stephan Bergmann af2d15a494 Fix Windows build
...after cf3971a941 "Simplify Sequence in b*"

Change-Id: If8650faa7a45258729e54b3df37e9084221babfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123792
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-19 09:14:47 +02:00
Arnaud Versini 0f98bcdf4d basic: simplifiy class initialization
Change-Id: I87fa2f606011aab8e34d9445d9e9299786f05747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123324
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2021-10-17 21:25:44 +02:00
Julien Nabet cf3971a941 Simplify Sequence in b*
Change-Id: I0817d9a35a9c3fc43badb6cc60727de69849b063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123720
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-17 14:13:10 +02:00
Andreas Heinisch 5c502a1004 tdf#130307 - Support for each loop for objects exposing XIndexAccess
Change-Id: Ib94c642e6d2a52ac7c60a8f7ae3c79d611b41614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123072
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-10-12 21:11:10 +02:00
Stephan Bergmann 4f5b3e4bd5 In O[U]StringBuffer, make string_view params replacements for OUString ones
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads.  That
way, loplugin:bufferadd and loplugin:stringviewparam found many further
opportunities for simplification (all addressed here).  Some notes:

* There is no longer an implicit conversion from O[U]String to O[U]StringBuffer
(as that goes via user-defined conversions through string_view now), which was
most noticeable in copy initializations like

  OStringBuffer buf = someStr;

that had to be changed to direct initialization,

  OStringBuffer buf(someStr);

But then again, it wasn't too many places that were affected and I think we can
live with that.

* I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to
get them in line with their counterparts taking O[U]String.

* I added an OUStringBuffer::lastIndexOf string_view overload that was missing
(relative to OUStringBuffer::indexOf).

* loplugin:stringconstant needed some addition to keep the
compilerplugins/clang/test/stringconstant.cxx checks related to
OStringBuffer::append and OStringBuffer::insert working.

* loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related
code that had been introduced in 1250aecd71
"loplugin:stringviewparam extend to new.."

Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-11 14:22:22 +02:00
Andreas Heinisch e090afc29b tdf#144924 - Change return type of array elements of the split function
If VBA is not enabled, allow the assignment of variables with different
data types to the individual array elements created by the split
function.

Change-Id: I7bdd432cdebbfded5f7fb3acc0216474eb6b6821
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123122
Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-10-07 08:21:58 +02:00
Noel Grandin 581efdec36 loplugin:constmethod
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-01 20:58:11 +02:00
Andreas Heinisch 8294268307 tdf#143575, tdf#143974 - Remove custom precision format in BASIC
Change-Id: Iefe046fa223f85204b27ebabe81523aa1a97f92f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122856
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-09-30 11:33:55 +02:00
Andreas Heinisch ed16602512 tdf#143575, tdf#143974 - Use rtl::math::doubleToUString to convert numbers to strings
Change-Id: I1427dbd49af680a1bf386410977c9cb2b0a3961e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122831
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-09-30 09:26:54 +02:00
Noel Grandin d72511eda9 gives names to all the Idles and Tasks
enforce it by making the constructor parameter non-default.

Change-Id: I321543e4dcf15ea0a43ad8cce91d2f8dc22df6ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122766
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28 19:35:13 +02:00
Chris Sherlock 4dd6af856d vcl: rename OutDevState to Stack
I have moved the header file to include/vcl/rendercontext as this will
eventually be part of the RenderContext split from OutputDevice.

State and associated enums have also been moved to the vcl namespace. I
have also moved ComplexTextLayoutFlags into the vcl::text namespace.

Change-Id: I0abbf560e75b45a272854b267e948c240cd69091
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-28 08:20:32 +02:00
Andreas Heinisch d6063f416c tdf#131563 - Add vba color constants
Change-Id: I59bcd11b5da1450fced77671c2cf6ed44e299a06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122607
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-09-27 15:31:54 +02:00
Andrea Gelmini e7c83595d7 Fix typos
Change-Id: Icd2f83bddcb993a6430d328d0bc51f38d70374ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122412
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-09-22 06:24:49 +02:00
Andreas Heinisch adb38e36e3 tdf#123144 - Always translate an error number to a vba error message
In addition, create a meaningful error message and don't create and
artificial error message if there exists a custom one.

Change-Id: I682e497ee3fdfe4da80fb17ab41c1b4cf90eb2cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122206
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-09-19 18:46:35 +02:00
Caolán McNamara 010e99c701 cid#1486004 silence Uncaught exception
Change-Id: Id545530140c0f2ceeeaecfb0c03c94f296bdbb4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122297
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-18 15:27:53 +02:00
Noel Grandin 270bb6ef00 loplugin:finalclasses in basic
Change-Id: I3ec4ccb58dc3823eee8b6ab8bda31b128ee24569
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122146
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-15 18:57:42 +02:00
4k5h1t 5f4a84ce5b tdf#42982: improve UNO API error reporting
Change-Id: I1252c89f23e70eb88744585bb2abd4fe3794e1d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121918
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-14 11:16:07 +02:00
Andrea Gelmini c42eb3d3f6 Fix typos
Change-Id: Icb9acdf67be84e3bedab53188246890b6aa82a7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120286
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-10 19:27:24 +02:00
Andreas Heinisch e32d864dbe tdf#144353 - Handling of missing optional parameters
Don't assign a missing optional variable to a property and don't allow
the computation/comparision including missing optional attributes.

In the previous cases a ERRCODE_BASIC_NOT_OPTIONAL is raised.

Change-Id: Iab391286fcace16c271ae511304075e2a0c5c651
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121794
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-09-10 13:28:33 +02:00
Noel Grandin 3afb514362 simplify static_cast after dynamic_cast
Change-Id: I53ae7f18519fdd878730d1d0316ebc408271c66d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121811
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-08 14:38:15 +02:00
Andreas Heinisch 975c73fe13 Fixed typos in the description of the default case for optionals
Change-Id: Ib80faf454fe4ef22b3ebb0b633769d4479cd84a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121793
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-09-07 23:00:32 +02:00
Andreas Heinisch 409abb1fca Fixed a copy paste error in the test cases
Change-Id: Ib11b6cfe385542664b28de35897caee67099d22c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121792
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-09-07 22:25:13 +02:00
Andreas Heinisch 092740eddd tdf#144245 - Added test file to automatic test
Change-Id: I92b71b7e7ac8c2262d36875e4b04ed91e17bc495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121791
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-09-07 20:52:00 +02:00
Andreas Heinisch ef32c3b4f9 tdf#144245 - Case-insensitive operation for non-ASCII characters
Support case-insensitive operation for non-ASCII characters in the
Collection object (VBA).

Change-Id: Ie17560cb9aac5bfb32aa041744445dd4839681d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121534
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-09-07 09:51:26 +02:00
Noel Grandin 0d56337387 clang-tidy:clang-analyzer-optin.performance.Padding
noting that XMLTokenEnum was already being treated as being limited to
32-bits, we bitmask it together with namespaces

Change-Id: Ic48f2a662452d1b8e022078d31a723d2ac65aef0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121707
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-06 11:58:09 +02:00
Arnaud Versini 34cba9eefa basic : remove BasicManagerImpl
Change-Id: Ia2b2c5fdf7d61e0853f181a38840c5ae263f5c9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105141
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-29 08:52:48 +02:00
Noel Grandin 8024118d5c clang-tidy:readability-redundant-member-init
Change-Id: Ibeff6e5cbc20ab86b1e9cb96292acb340849ede3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121149
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-27 21:24:20 +02:00
Stephan Bergmann 2d64e7c4de Avoid OUString::createFromAscii on input containing NUL characters
...as it triggers the "rtl_uString_newFromLiteral - Found embedded \0 character"
SAL_WARN in rtl::str::newFromLiteral (called from OUString::createFromAscii via
rtl_uString_newFromLiteral)

Change-Id: I6013062b961657561d67d8dbbf5b2a45816eed4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121086
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-26 16:01:01 +02:00
Stephan Bergmann 2bc1a0431b New loplugin:unusedcapturedefault
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the
lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building
without --with-latest-c++) requires ROW_RANGE (a local const int variable from
the enclosing TestFormula::testTdf97369) to be captured, even though all uses of
that variable within the lambda body are constant expressions.  That is still
true at least for the latest Visual Studio 2019 version 16.11.1.  (This is not
an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down,
as they, in addition to using that ROW_RANGE, also use the local const double
variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so
they are implicitly captured and loplugin:unusedcapturedefault does not suggest
dropping those lambdas' capture-defaults in the first place.)

Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-20 14:25:38 +02:00
Noel Grandin 4dc4065904 rtl::Static -> thread-safe static local
Change-Id: I9f8fe250813f4f376dc46c6f3d7e25e90fdbb50e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120566
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-17 22:40:40 +02:00
Noel Grandin ef38b9af0a split SvNumberFormatter into it's own header
so I can make changes without running into cyclic dependencies
between header files

Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13 11:46:13 +02:00
Eike Rathke e89404f00b There is no LANGUAGE_ENGLISH {en} locale but LANGUAGE_ENGLISH_US {en-US}
The known fallback locale is en-US so this worked by chance..

Change-Id: I81ee2aff0cc35b4c8d501dfb6846f0709f1417ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120301
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2021-08-11 02:34:36 +02:00
Mike Kaganski 736ef4ab06 No need in this function
Change-Id: I391183753e4fad800b7c69aef2e76a3780ce52a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120244
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-10 22:48:48 +02:00