831 Commits
Author SHA1 Message Date
Caolán McNamara 362360f3fe check the class of a loaded SbxArray and its elements
like the other SBX loaders already do

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id7989d2b4023c17a29a0fc92b03b574968484b78
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13617
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 1ccef9f52d3132b6917a76f64a697ad0795e5f9f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211531
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-29 08:46:08 +02:00
Caolán McNamara 2399c6b9e5 clear the old value before loading an old format SbxVariable
as the newer format already does

The old format path set the new type without clearing an existing value
first, so the new type bogusly redefined whatever the union still held.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I70d02026d24443ab353be37c0a57685b4e7ac969
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13600
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 27d9427be60d57d3054c01c8806c81b89bd3872d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211530
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-29 08:46:04 +02:00
Andrea Gelmini 6a1480506d Fix typos
Change-Id: I9d99aba8500ea31628e4b883974bb60181407647
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210562
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 22:08:01 +02:00
Andrea Gelmini 335726898d Fix typos
Change-Id: Idab619de99649c2fb0a1920844cb07e5ede9691c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209474
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-22 10:25:17 +02:00
Andrea Gelmini 12051c954c Fix typos
Change-Id: I73c907ed17d513e9d07859bbb6bf1f149a0d7828
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209377
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-20 18:54:20 +02:00
Mike Kaganski e59e33f064 tdf#171370: a char must stringify to itself
Regression after commit 2143c0a694
(Simplify getter/setter implementations, 2025-06-03): sal_Unicode is
std::integral, and took the generic numeric path.

Co-authored-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I0c12590c06536f4d2efefcbe09657fff454ed2a4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8798
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit e725c25d6cb8c9cd1af08f70f6fea541df121b1d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209264
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-19 08:36:23 +02:00
Andreas Heinisch 76aafa18b7 tdf#162711 - VBASupport requires banker’s rounding for integer conversions
Change-Id: Ife3f7aae3ba094fe83a5eda6b3d50d9358cc1184
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194286
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2025-11-24 20:42:41 +01:00
kelvin c6c9d9e393 tdf#145538 Convert iterator loop to range-based for loop
Replace traditional SbxParams::const_iterator loop with modern range-based
for loop in SbxVariable::GetName() for better readability and modern C++
style while preserving the comma-separation logic between parameters.

Change-Id: Ib978b29b70bf6a0a85bf94be1a3dd67fea45529d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193379
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-11-05 18:04:20 +01:00
Mike Kaganski d65f9ebab1 Simplify date handling a bit
GetNumberIntl already has the required logic for that.

Change-Id: I2dcc26294a6aaa970412498653c36c48266c9694
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191572
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-09-27 21:34:33 +02:00
Mike Kaganski 92878d3216 tdf#168561: fix Str function implementation
1. If a string is passed as argument, it is returned without any changes.
For that, SbRtl_Str checks argument type, skipping processing for string.

2. Non-negative numbers are preceded by a blank space.
That already was implemented.

3. Negative numbers are preceded by a minus sign.
That was done incorrectly - a space was added for any number.

4. Dates are converted into locale-dependent strings.
That wasn't done at all - dates were converted to strings representing
the serial date. A check is implemented SbxValue::Format, to handle this.

Additionally, Format function was improved to handle such input without
format string (taking into account that it handles strings that can be
converted to numbers differently).

Change-Id: I5ac0429950e4ea8bf69b0091502b4e6dc1f4957d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191549
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-09-26 20:09:44 +02:00
Mike Kaganski a3597edb52 tdf#143182: fix string handling in SbxValue::Format
When a value is convertible to number, check if the format string
is for numbers of text (in SbxValue::Format). If the value is not
convertible to number, handle it according to the format string in
printfmtstr.

Change-Id: I6e11aeffd8dd8581ebc868762944e9d6d9393514
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190348
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-29 18:33:37 +02:00
Gabor Kelemen c309a5785d tdf#146619 Run IWYU on basic/
Change-Id: I58883f0223a28f3ea887c37e2a86a3c31ff88546
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188749
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-08-18 20:19:07 +02:00
Caolán McNamara d3fcc9a5b6 drop apparently no longer needed coverity markup
Change-Id: Ia8b3b271bb5cc67131b50d563bed58400da5b317
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189662
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-15 11:25:12 +02:00
Caolán McNamara b80cd12449 const up some more pieces
Change-Id: Ib85b8b4b3a2d00e7ef0ecb354fba0b862d60abdd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187749
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-12 01:16:21 +02:00
Mike Kaganski 2143c0a694 Simplify getter/setter implementations
For numeric types, they are made unified templates. In many cases,
gotos were dropped, and the code was streamlined. Hopefully, this
would make it at least a bit manageable.

Change-Id: I63154d61fa6629d1431157ac382ec758f4f50074
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186234
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-06-07 12:30:17 +02:00
Mike Kaganski 33434f1620 tdf#166342: refactor SbxValue::Format again, to handle date/time strings
Commit 81e1e0a2a6 changed string-to-number
procedure from SvNumberFormatter to only use SbxValue::ScanNumIntnl. But
the latter can only handle strings with simple numbers, not with dates,
times and the like.

This change restores use of SvNumberFormatter to convert input strings
to number, when SbxValue::ScanNumIntnl fails. The code is re-structured
for performance, to avoid creating SvNumberFormatter twice, and repeated
calls to GetOUString.

Change-Id: I89a4fc041fe24fe00b099ab4fbee371d1f6b5567
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185047
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-05-08 17:42:21 +02:00
Mike Kaganski b76d703382 tdf#164600: Return true from IsNumeric for booleans in VBASupport mode
Change-Id: Ib68f237001389c8f7b9d2771d5162a583b544b83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179866
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-01-08 06:02:48 +01:00
Mike Kaganski f8ac9d3311 tdf#164599: Allow space between sign and number in VBASupport mode
Change-Id: Ib9e8c8770f8c2d1b348ff032502467915829c4f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179865
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-01-08 06:02:43 +01:00
Mike Kaganski 20db60030e Use sal_Int32 for string length
Change-Id: Ie069c20b7d91631cb3b5d39e1a52f09cc13e8a22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179864
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-01-08 06:02:37 +01:00
Mike Kaganski bb86627216 tdf#154284: check if ImpScan found a number at all
Change-Id: Iddc87bd0d04f9b0212b03d63f3177b17bb07d278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179863
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-01-08 06:02:30 +01:00
Mike Kaganski b01e697b53 tdf#164446: fix internationalized FP input in Basic IDE Watch
Now that tdf#97983 fix made the default conversion internationalized,
the special handling of the Watch window input needs to do it in the
other direction. Additionally, move ImpConvStringExt to the single
place that uses it.

Change-Id: I18a4043511f4a1b32f79410447e96c7679329886
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179302
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-24 12:03:02 +01:00
Mike Kaganski a3b43e95ba Simplify ImpScan
Change-Id: I8928d3c7f0fc6884a75c05e77908df7f482c9e44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179246
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-12-23 20:36:11 +01:00
Mike Kaganski a3a7927408 Simplify a bit
The previous code made sure that cNonIntntlDecSep is always equal to
IntntlDecSep (in the code handling bOnlyIntntl). Frop the redundancy,
and make the variable names simpler.

Change-Id: I31c994cd49bdbf007e110f593297acf112cc420b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179198
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-12-23 11:22:11 +01:00
Mike Kaganski e40b541d7a Fix a copypasta
From commit 9e9f39d171 (resolved
rhbz#919020 Basic CDbl() and CSng() scan localized number, 2013-03-19)

Change-Id: I871d7fb06ccb5d15723f7acfb57701890607055f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179197
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-23 11:21:56 +01:00
Stephan Bergmann 16e3b84d2e Improve loplugin:dyncastvisibility to check for non-inline key functions
This would have caught the issue discussed in
709b1f3ddb "Make sure VCLXPopupMenu has unique
RTTI".  (The commit message talks about RTTI there, while what Clang actually
compared for an optimized implementation of a dynamic_cast to a final class is
vtable pointers, but the overall picture remains the same.  Both RTTI and
vtables are emitted along the key function, and if that is missing or inline,
they are emitted for each dynamic library individually, and as internal symbols
on macOS.)

This commit also addresses all the issues found by the improved
loplugin:dyncastvisibility on Linux.  See the newly added TODO in
compilerplugins/clang/dyncastvisibility.cxx and
86b86ac87e "Give DocumentEventHolder (aka
EventHolder<DocumentEvent>) a key function" for an issue with key functions for
class template instantiations.

Change-Id: Ia19155efb1d23692c92b9c97ff17f18ae7a1f3ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176576
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-11-14 12:49:22 +01:00
Bogdan Buzea 354dc28282 tdf#163486: PVS: Identical branches
Change-Id: Ic54a8e009f68ab992831ba849ae1349a6235bedd
V1037: Two or more case-branches perform the same actions. Check lines: 1276 and 1408, 1434 and 1510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175149
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-11-12 01:35:14 +01:00
Noel Grandin cc9b55e8a8 loplugin:reftotemp in basic
Change-Id: I41385d279cc81de9b5b2e9ff55b0b5c2f40aba66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176244
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-08 08:41:06 +01:00
Noel Grandin d5b55513cd loplugin:passstuffbyref in basic
Change-Id: I1aee08f0ff2a3dabcedc49a31e7ff4de9428007e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176136
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-06 15:45:14 +01:00
Stephan Bergmann c54b8e5682 Avoid -Werror,-Wunused-function
Change-Id: I95ca13db07a778fc260cbb78364916cc7400e378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173590
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-09-18 20:12:09 +02:00
Mike Kaganski 539856dbb7 Fix formatting of dates
Redression after commit 81e1e0a2a6
(Refactor SbxValue::Format, 2024-09-13).

Change-Id: Ie7eb50c32f3c1a3aec73fc882dc33cce42734747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173449
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-09-17 05:55:13 +02:00
Mike Kaganski 81e1e0a2a6 Refactor SbxValue::Format
Change-Id: I1a55f2c6148246733699c1ff1086436af9d450b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173254
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-09-13 00:23:09 +02:00
Mike Kaganski b2257d1f78 Improve run-time Currency type support in Basic
Change-Id: I1e04c6022944034a30ef896b8cd24050ebe3bbd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173042
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-09 17:46:41 +02:00
Noel Grandin ac9eaf5d11 use less dynamic_cast when broadcasting SfxHint
Change-Id: If4d33cbbf36a9ad495b80a7347b39d0f4bc0405e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172857
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-05 08:10:26 +02:00
Mike Kaganski bb169c209c Fix ImpCurrencyToString to handle SAL_MIN_INT64
It can't be negated; so avoid the negation, and skip the minus in the
string result. Also, avoid needless creation of OUString.

Change-Id: If867c189b2ffd2794a58f66fd2511004ed4fc25a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172733
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-09-02 12:53:32 +02:00
Mike Kaganski 7bbf1f2a7d Refactor ImpCurrencyToString for simplicity
Change-Id: Ie7acafb3c81348f03340f1aaa53b3849c8dae4a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172694
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-09-01 04:06:52 +02:00
Mike Kaganski a795fddafa tdf#162724: use localized decimal separator in ImpCurrencyToString
Same as in ImpCvtNum

Change-Id: Icbaa237e944a39309b01fdb18e668d054ff61c60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172693
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-01 04:06:40 +02:00
Mike Kaganski 712bddcec5 Move variables into their usage scope
Change-Id: I8d708ecdc94c19069d955b19daf1a5c5c4bc2f45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172584
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-08-31 08:04:37 +02:00
Mike Kaganski 1ecde0f5d1 Simplify default ImpScan usage
Drop LibreOffice6FloatingPointMode, and move the check introcuced in
commit 47aabde053 (Make the tdf#97983
changes to BASIC optional) into a simplified ImpScan overload.

Change-Id: Ibef723878179113a5403d2a3c55ded9df9cb292d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172595
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-30 07:34:31 +02:00
Caolán McNamara 437412d79b cid#1557980 COPY_INSTEAD_OF_MOVE
and

cid#1557869 COPY_INSTEAD_OF_MOVE
cid#1557807 COPY_INSTEAD_OF_MOVE
cid#1557804 COPY_INSTEAD_OF_MOVE
cid#1557799 COPY_INSTEAD_OF_MOVE
cid#1557781 COPY_INSTEAD_OF_MOVE
cid#1557781 COPY_INSTEAD_OF_MOVE
cid#1557766 COPY_INSTEAD_OF_MOVE
cid#1557746 COPY_INSTEAD_OF_MOVE
cid#1557737 COPY_INSTEAD_OF_MOVE

Change-Id: I1866c576f525ea697c62e9e0a96890e5fdaa780f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171795
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-14 09:27:19 +02:00
Gabor Kelemen e1a351ca19 Remove now unneeded osl/diagnose.h
followup to commit 57c228803e

Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-07-20 10:20:31 +02:00
Noel Grandin 7d6e751faa loplugin:ostr basic
Change-Id: Ie5fc4676bd1cab2c0417b479bf08dda00936469a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-06 13:56:49 +02:00
Arnaud VERSINI a123c5b39a basic : use more OUString literals
Change-Id: I38f57c64c0d110e892982eaed2619c0915fe93b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166825
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2024-05-05 14:44:04 +02:00
Arnaud VERSINI 7ab8d33522 basic : use std::u16string_view and new OUString literal
Change-Id: Id3cd708b98e1b0551955562afe3ac594bdc6e50a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167153
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2024-05-05 13:42:05 +02:00
Mike Kaganski b3e6bec350 Fix warning C4589 when building with MSVC without -Wv:18
Discovered by https://gerrit.libreoffice.org/c/core/+/163717

Like these:

 C:\libcmis\inc\libcmis/document.hxx(51): warning C4589: Constructor of abstract class 'libcmis::Document' ignores initializer for virtual base class 'libcmis::Object'
 C:\libcmis\inc\libcmis/document.hxx(51): note: virtual base classes are only initialized by the most-derived type
 C:\libcmis\inc\libcmis/folder.hxx(58): warning C4589: Constructor of abstract class 'libcmis::Folder' ignores initializer for virtual base class 'libcmis::Object'
 C:\libcmis\inc\libcmis/folder.hxx(58): note: virtual base classes are only initialized by the most-derived type

Change-Id: Icc7f94cc02796a86b47b025df69ec3db971ad11e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163777
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-23 01:34:11 +01:00
Jonathan Clark 9cc8457abc tdf#128122 Updated BASIC CCur to reuse SvNumberFormatter
Previously, BASIC CCur used a custom, single-purpose currency string
parser which did not properly accommodate the user's locale setting.
This change replaces the custom parser with SvNumberFormatter, which
does correctly respect system locale.

Change-Id: I179915eb080e876e5e550dd350fdb86d7fa2bf4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160848
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-12-23 09:12:24 +01:00
Stephan Bergmann 1cb523eee4 Extended loplugin:ostr: basic
Change-Id: I041913b1fe2722145d770e5cdcf90cdf22957873
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159728
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 09:17:06 +01:00
Stephan Bergmann 625705f10e Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: basic
Change-Id: Ic82e02ff43db09174a74f4e584e2ce50e8983556
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158145
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19 15:17:53 +02:00
Caolán McNamara d28ba797df nDigitPos no longer appears in expression
so presumably we no longer need this suppression since:

commit d969715fa4
Date:   Wed Jul 19 22:29:35 2023 +0200

    Simplify a bit by removing a redundant condition

    line 627 already contains: if( nMaxDigit > nDigitPos )

Change-Id: If6ff93f91f5bd20a9a03ed828d6f4e598ff4f3da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154804
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-23 15:04:29 +02:00
Julien Nabet d969715fa4 Simplify a bit by removing a redundant condition
line 627 already contains: if( nMaxDigit > nDigitPos )

so here we know that nMaxDigit >= nDigitPos

Change-Id: Ia7ed69e19a6567a5947edaa57f687bf97476a616
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154661
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-07-20 09:10:06 +02:00
Noel Grandin 0193b284e8 new loplugin:constexprliteral
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.

This seems to make a different at least on Visual Studio

Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26 13:12:31 +02:00