Commit Graph

1300 Commits

Author SHA1 Message Date
af16aa6256 Improve loplugin:stringview
Issue the "instead of O[U]String, pass [u16]string_view" diagnostic also for
operator call arguments.  (The "rather than copy, pass subView()" diagnostic is
already part of handleSubExprThatCouldBeView, so no need to repeat it explicitly
for operator call arguments.)

(And many call sites don't even require an explicit [u16]string_view, esp. with
the recent ad48b2b02f83eed41fb1eb8d16de7e804156fcf1 "Optimized OString operator
+= overloads".  Just some test code in sal/qa/ that explicitly tests the
O[U]String functionality had to be excluded.)

Change-Id: I8d55ba5a7fa16a563f5ffe43d245125c88c793bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115589
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-14 13:11:50 +02:00
698e27d29c tdf#132389 - Case-insensitive operation for non-ASCII characters
The replace function should depend on the application locale, instead of the UI language.

Change-Id: I1582db07a1560da9ea87c0b127cf92611c8544bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115540
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-05-13 20:03:07 +02:00
7a578c0635 tdf#139840 - Case-insensitive operation for non-ASCII characters
Support case-insensitive operation for non-ASCII characters in the
InStr function in Basic.

Change-Id: Idb2b8e128adf3596fa49e3e86365d5724ea3e11c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115538
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-05-13 18:36:20 +02:00
0afb2b63b3 fix some leaks in basic
Change-Id: I52c10cdbe9661974c908ee052336c779a40de402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115323
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-10 15:14:48 +02:00
6fecdeac5d tdf#124184 Fixing StrConv VBA Function
* vbUnicode/vbFromUnicode considers optional third LCID argument.
* LCID is also used for other conversions.
* The encoding is decided based on the language defined in LCID,
  or on program locale when LCID is omitted, using MS default
  ACP mapping for languages.
* Unit testis for vbWide / vbNarrow are changed and enabled.
* Unit tests for vbKatakana / vbHiragana are changed and enabled.
* Unit test for vbFromUnicode / vbUnicode is changed to rely on
  en-US locale used in testing, and is enabled.

Change-Id: Iabd4153db311cd02c3f3e7247f9fc71ad9f5f682
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112539
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-01 13:12:22 +02:00
c7c6f0af6c loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat

Also fix a crash in stringview plugin which
started happening while I working on this.

Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27 14:07:56 +02:00
86d298f87f Simplify some static variable initializations
Change-Id: I6cdd44aa66b9597ccc51fc3fd69b57485ccb3230
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113515
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-02 17:22:21 +02:00
b80069e133 tdf#88442 SBasic: Don't double-initialize a Global ... As New ...
"As New" variables use lazy instantiation, but that should not re-apply each
time one re-enters the module. If the object is still there, don't replace it.

Change-Id: Ic568a56b93db9bc9139d434d97a4a4deb05840df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112018
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-21 21:54:11 +01:00
ac0b6fb384 tdf#141045 - fixed copy paste error in the replace function
Change-Id: Id68670fed89e4cc700c5eea395139914bebdb657
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112509
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-03-15 15:16:57 +01:00
c880d3e304 check for quit when calling Yield in loop
so we don't get stuck threads when the main application
quits

Change-Id: Id36e99267ceb4154873b6ef8ef494622fff6c19a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112409
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2021-03-14 08:20:53 +01:00
fbaf865ffc Drop "32" from names of SbxArray methods taking 32-bit indices
... a leftover from times when there were methods for 16-bit
as well as for 32-bit indices. 16-bit indices were removed in
commit 62f3f3d92aa204eaaa063b30d7ade44df501b997.

Change-Id: Idf8b1160e68e8b303cf75ea79dd7dbb3bd00275d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112187
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-09 13:22:18 +01:00
08cb09c092 BASIC : use standard mutex from std.
Change-Id: Ie9abb32124b8718bbfde076f090180794c64f90e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108629
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-07 13:37:19 +01:00
0ce7c84cc7 Revert "Fix typo in code"
This reverts commit 3ed9bba283a6a67864c0928186e277240be0d9ba.  osl_Pos_Absolut
(include/osl/file.h) is part of the stable URE interface; it must not be changed.

Change-Id: I1f49923a9351e4be5aee39b10720d38b424feb9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110435
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-05 15:01:48 +01:00
3ed9bba283 Fix typo in code
Change-Id: Ib8b306a27d25a34e784aeeb72708b0d5d1511f3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110394
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-02-04 22:56:54 +01:00
9430608363 simplify code, use more subView()
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28 17:32:18 +01:00
ac396f2f6b fix coverity parse errors
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-09 13:01:49 +01:00
c34e8bd713 loplugin:stringviewparam: operator +=
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-04 15:29:54 +01:00
3482f59030 vcl: remove {Read,Write}ImpGraphic and ImplExportNative from Graphic
ReadImpGraphic and WriteImpGraphic have been reimplemented in the
TypeSerializer some time ago, but the code has not yet been moved
to use that class. This commits does that and changes all the code
using those 2 methods and removes them. With this implemented in
the TypeSerializer, it is easier to handle

In addition it also removes ImplExportNative (and the method on
the Graphic interface). This was really used only in one method,
and it could be implemented in the mthod itself.

Change-Id: I0982429d1c1d5ed7ef07627d87ed9a08df43f040
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108256
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-30 08:25:11 +01:00
4be5308c05 BASIC : SbiRuntime static data should be const
Change-Id: If8c221a2bfb249a6625df4b466fe5247b7a8ae72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108355
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-27 07:52:20 +01:00
a3d0091d18 New loplugin:stringliteralvar
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>
2020-12-26 14:51:15 +01:00
f7de7de118 Initialize method mapping table at compile time
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>
2020-12-23 15:42:46 +01:00
8f0a57d076 Drop RTLNAME obfuscating macro
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>
2020-12-23 05:31:30 +01:00
803cef388d fix for Windows x86-64 build
...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>
2020-12-21 07:29:49 +01:00
21cd30ddaa Blind fix for Windows x86-64 build
...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
2020-12-20 20:46:28 +01:00
46c5de8328 make *String(string_view) constructors explicit
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>
2020-12-19 17:53:06 +01:00
35e471bb4d Adapt the remaining OUString functions to std string_view
...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>
2020-12-11 21:25:10 +01:00
2538188ee8 tdf#43003 - convert parameter to the requested type
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>
2020-12-07 16:10:09 +01:00
8332d6d820 loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30 12:32:14 +01:00
d84deb9536 Use std::vector in SbiBuffer
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>
2020-11-24 17:11:53 +01:00
16389aae36 tdf#123936 Formatting files in module basic with clang-format
Change-Id: I87736d6f1a1d069c990b4e7b9ca291634ab4fb44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105646
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-13 14:31:50 +01:00
93c64a61f2 loplugin:stringview
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>
2020-11-11 11:58:37 +01:00
8ad514c665 BASIC : use std::make_unique instead of std::unique_ptr ( new ... )
Change-Id: Ic907f4711685539b6a89411e704845617cc5f04d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105375
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-05 20:39:26 +01:00
0505a00a9b tdf#42949 Fix new IWYU warnings in directories [ab]*
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>
2020-11-05 14:57:25 +01:00
48d46bcc90 tdf#85371 - grant write access to the method used as a variable
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>
2020-10-30 05:12:25 +01:00
387a88fa25 use tools::Long in basegfx..chart2
Change-Id: Ide4014348d51f0b5f59e1e91b8d41c7748853254
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104608
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21 15:34:16 +02:00
d6b7cc3f7c tdf#123025 - ReDim Preserve fails if array is filled by Split
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>
2020-10-16 12:31:02 +02:00
f9ac067da9 static_cast after dynamic_cast
Change-Id: I487b5dc148f5a3d0d45f198c00179002841242ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104213
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-13 09:30:12 +02:00
38786f1df9 loplugin:reducevarscope in basctl,basic
Change-Id: I32595921bf5ed26699bced3637302692c407d624
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103760
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-01 16:12:20 +02:00
e0ce9ec1a5 Fix typo in code
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>
2020-09-27 09:48:22 +02:00
b25aa1cd81 basic: use dummy DLL mgr for Windows Arm64 build
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>
2020-09-17 09:24:32 +02:00
50761e3c3d tdf#134477 add VclMessageType::Other to indicate image-less generic InfoBox
Change-Id: I76e86bf4d82b33771ea2900517712be57ae7f03d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102232
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-08 15:16:41 +02:00
c927aab29e Make the OUString ctors taking raw sal_Unicode pointer/non-const array explicit
...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>
2020-09-07 19:19:14 +02:00
85232a2e57 BASIC : no need for a DLL manager impl on non windows systems
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>
2020-09-07 15:27:51 +02:00
fb4ddf2fc9 tdf#124176 Use #pragma once in basic
This commit was carried out by a Python script, source of which
is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97.

Change-Id: Ief7f29d8efaa3d6ac417080f3147a087844621a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100128
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-04 08:57:06 +02:00
f12050bfb1 Make ImpSvNumberformatScan::GetColor const
Change-Id: Idbcce18029944ab884cdde03e21190cbb574a00f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102005
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2020-09-03 19:32:28 +02:00
40031dd453 tdf#54912 - with option base arrays should start at index 1
Using option base, every array should start at index 1. Previously, it
needed option VBASupport too. Without option compatible, the upper bound
of an array is increased as well in order to preserve the specified
size.

Change-Id: I52885f14914a4636b98258aa428c2123f62482a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101269
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-09-01 09:28:46 +02:00
781b6ac998 tdf#136143 - reset SbxFlagBits::Fixed SbiRuntime::StepPARAM
In order to prevent type conversion errors, reset a variable of type
SbxERROR to not fixed. Variable will be of type SbxERROR, but can be
converted to any requested type.

Change-Id: Ic856376e3f8232577a5e894a2adb2545c8723033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101419
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-08-27 15:49:16 +02:00
5159967666 remove constructor with plain Bitmap from Graphic, use BitmapEx
Change-Id: Ie429a10a8f54c6779d437ee4bc75a5ea0c427848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100727
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-08-15 17:13:55 +02:00
e67657d521 loplugin:simplifybool more
look for expressions like
    !(a && !b)
which can be expanded out

Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14 18:03:06 +02:00
e67ffd5a62 tdf#135470: Fix checks
The check should prevent error in case when the variable has
wrong type. IsObject returns false e.g. for arrays, which are
valid iterables. So proper check is using GetFullType, which
will give SbxOBJECT for any variable for which GetObject does
not set error.

"Next" should also generate an error for uninitialized loops.

Regression after 5760c94b8847164f9a7a181f031c7c86643944af

Change-Id: Ib58e1cc76ef63aa1ff8a86c9d5dc956e4780fb49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100258
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-08-07 09:43:44 +02:00