Commit Graph
307 Commits
Author SHA1 Message Date
Mike Kaganski d6a656b8d9 Fix build
C:\PROGRA~1\MICROS~1\18\COMMUN~1\VC\Tools\MSVC\1450~1.357\Include\utility(472): error C2079: 'std::pair<TranslateId,ErrCode>::first' uses undefined struct 'TranslateId'
C:\PROGRA~1\MICROS~1\18\COMMUN~1\VC\Tools\MSVC\1450~1.357\Include\utility(472): note: the template instantiation context (the oldest one first) is
C:\lo\core\include\basic/sbdef.hxx(71): note: see reference to class template instantiation 'std::pair<TranslateId,ErrCode>' being compiled
make[1]: *** [C:/lo/core/solenv/gbuild/LinkTarget.mk:338: C:/lo/build/workdir/CxxObject/sfx2/source/appl/appinit.o] Error 2
C:\PROGRA~1\MICROS~1\18\COMMUN~1\VC\Tools\MSVC\1450~1.357\Include\utility(472): error C2079: 'std::pair<TranslateId,ErrCode>::first' uses undefined struct 'TranslateId'
C:\PROGRA~1\MICROS~1\18\COMMUN~1\VC\Tools\MSVC\1450~1.357\Include\utility(472): note: the template instantiation context (the oldest one first) is
C:\lo\core\include\svtools/soerr.hxx(37): note: see reference to class template instantiation 'std::pair<TranslateId,ErrCode>' being compiled
make[1]: *** [C:/lo/core/solenv/gbuild/LinkTarget.mk:338: C:/lo/build/workdir/CxxObject/sfx2/source/view/ipclient.o] Error 2

Change-Id: Ia744dee615caec679218c35ffecec6e5ef663d42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199597
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-02-18 13:44:22 +01:00
Gabor Kelemen fd2e467ba3 tdf#146619 Run IWYU in fw decl mode on include/[a-c]*
After recent commit 851fb75779
recheck these directories in include/ again
to test drive the new --headersfwd mode of bin/find-unneeded-includes

Change-Id: I0ede437c4f9958cd98210ed1760a5b98ea8bd1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192377
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-08 09:37:19 +01:00
Mike Kaganski e16910adad SbModule: [GS]etSource32 -> [GS]etSource
The *32 methods were initially introduced in a series of "Basic Modules > 64K"
commits (2003), in addition to the pre-existing [GS]etSource methods. Then, in
commits d41b8ac9e5 (callcatcher: shave off a few
more, 2015-02-02) and 919375354c (GetSource32
and GetSource are identical, 2019-12-09), the original methods were dropped.
Now the '32' suffix to the methods makes no sense.

Change-Id: I9dc172ce973b1b49511518f184d174ea68227cdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192086
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-09 22:06:25 +02:00
Mike Kaganski 79a2e1d861 tdf#168750: Make sure that class module is recognized on load
The problem appeared, when a macro loaded a library with a class module,
that had a public element (e.g., a function) with the same name, as used
for a local variable in the macro without a prior DIM.

Normally, there is a precaution in SbModule::Find, which hides the names
in class modules. However, this precaution failed during load.

The reason was, that the flag identifying the module as a class module
was set only when the module got compiled. It turned out, that first, it
is parsed in SbModule::SetSource32 only partially, with minimal work to
recognize the names (and a few other small things). At this stage, it is
not marked as class module yet; and when the clashing name is looked up,
it gets found in the module. Then its value is requested; at this point,
the module gets compiled, and the "class module" flag is set; then, if
the class module element tries to use another name from the same module,
it fails, which produces visible error message.

This change makes sure, that the initial fast parse stage also checks
Option ClassModule, to set it properly. Also it drops redundant variable
bIsProxyModule from SbModule, because mnType already contains the needed
type information. And lastly, it reorders SbModule::Find a bit, to avoid
searching a module, only to discard the result immediately, because it's
a class module.

Change-Id: I8add9873bf31fb767b64d27a36aef8e3a89a0de0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192075
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-10-09 05:57:56 +02:00
Mike Kaganski 2f37849bb1 tdf#81003: override GetDate in SbUnoObject to handle oleautomation::Date
Without that, there is no code to deliver that value. The call to
SbxValue::Get will eventually get to the SbUnoObject containing a
css::bridge::oleautomation::Date in struct info; and there it will
find that the object's SbxValue points to itself, at which point,
it will error out from SbxValue::TheRealValue.

Change-Id: Ia08fb2a7b1bcd7292faf5a5719a4fad0054a3f5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190384
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-29 20:25:24 +02:00
Paul McQuade 48ece7e0c3 tdf#143148: Use pragma once instead of include guards
Change-Id: Ice4a6c35cd92a17fe1971c932e2ccaf36b4a189d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188066
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-07-19 16:30:30 +02:00
Caolán McNamara 7daf54c93d avoid uno casting cost, and simplify
these are always XStorageBasedLibraryContainers, so transport
around as that and can avoid casting and some expensive throw/catches

Change-Id: I772efceea3bb4f38d70be0497345f5f81173494c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181156
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-02-05 14:01:39 +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
Gabor Kelemen de8b935e16 Drop unneeded forward declarations from include/ even harder
test drive the new bin/find-unneeded-includes --fwdecl mode
with iwyu 0.23 instead of 0.21, this seems to find more unneeded
fw declarations

Change-Id: I451e571c70eb74f46c799753e3c5a53c0110da36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179707
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-01-06 09:28:27 +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
Noel Grandin 78693c376e tdf#108189 inspection of object hangs LO
There is no general solution to this that I am aware of, so just
implement a rather specific solution that will need periodic extending
to check for other dangerous properties

Change-Id: Ie09d89416fea5b7cdf782319ed9921657faa5a5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176593
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-14 18:02:03 +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
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
MelvinYG 4298833106 tdf#143148: Use pragma once instead of include guards
Change-Id: Id648d25e47034e209b291bf73ac4878226b4e755
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175105
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-10-18 14:19:53 +02:00
Abrar Emad 8e2369a781 tdf#143148 Use pragma once instead of include guards
Change-Id: I9df35198804cca98cd71c19fa4ef74fb6f47fd5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175013
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-10-16 16:14:52 +02:00
Abraham Samuel Adekunle 3287deb82e tdf#143148 Use pragma once instead of include guards
Change-Id: I70338b85b9c0205a7dd2349d10c621ceddacb176
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174849
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-10-13 20:55:50 +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
Caolán McNamara 2b4734c8a4 SbClassModuleObject never take a non-null arg
Change-Id: I1be4710a32355c104ba25005ec4f46c6f650b9c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172443
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-27 09:41:48 +02:00
Caolán McNamara 740194221e use a shared_ptr for SbiBreakpoints pBreaks as well
Change-Id: I3dec5ffe5fdf937d761c902970a94b73878a2cd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172441
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-27 09:41:41 +02:00
Caolán McNamara 0fb841d90a cid#1554789 Different smart pointers managing same raw pointer
lets just use a shared_ptr here

Change-Id: I31ec113da2c060e8b89ea4e438d182f0f22e810f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172440
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-27 09:41:24 +02:00
Caolán McNamara 41590e7d1f WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I8edb1fefe1b2b8a3db3ee8f3a0eed59c7f08a36e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166863
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-05-02 09:24:11 +02:00
Noel Grandin 5058a54d8d reduce symbol visibility
Change-Id: Iad2d114d257244f456d5579636e5c25ce070a08a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166805
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-28 22:30:17 +02:00
Omkar Santosh Nikam 681e113fae tdf#143148: Use pragma once instead of include guards
Change-Id: I2beda26661abb57ffa7b7d6e404eb5f5a26ca5b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166162
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-04-17 17:53:54 +02:00
Omkar Santosh Nikam 123fdb0c7a tdf#143148: Use pragma once instead of include guards
Change-Id: I84080f2b647ccdd91fa44401b4edae4bf31a92a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166167
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-04-17 17:53:30 +02:00
Omkar Santosh Nikam 7d1dc5707e tdf#143148 Use pragma once instead of include guards
Use pragma once

Change-Id: Iedf25f6034f285e9bdcab515ec6d9e20b230d969
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165955
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-10 22:29:08 +02:00
Noel Grandin 1e31403bc8 loplugin:unusedenumconstants
Change-Id: I889b4f63e098fecf22ffd4fb98937d62dbdd70b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165791
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-04 19:58:35 +02:00
Noel Grandin cd35a509ef reduce symbol visibility in --enable-mergelibs=more mode
Change-Id: If811c9ec336543227db73c990248b9113846cf2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-13 08:14:38 +01:00
Noel Grandin 6ba9e3323d loplugin:unusedfields
The sPassword field in SvtHistoryOptions became redundant
after
    commit c0fffdc36d
    Author: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
    Date:   Mon Oct 2 12:35:21 2023 +0200
    [API CHANGE] Remove deprecated Password config item

Change-Id: Ie0c4597da5cd510f405400c215110c1e357cb497
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-13 18:09:16 +01:00
Noel Grandin 8faf693cd1 loplugin:fieldcast in ModuleSizeExceeded
Change-Id: I1903967d94fcd738b9e2ed8de9a19d42614a749e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159252
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10 09:53:01 +01:00
Noel Grandin b875ceabf0 loplugin:fieldcast in SbModule
Change-Id: I92084a1cf31832404aca43f0c8e2137a33978976
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159251
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10 09:52:53 +01:00
Noel Grandin d9e322d60f replace ErrorInfo with simpler mechanism
Instead of returning ErrCode class everywhere, return a new
class ErrrCodeMsg, which combines an ErrCode with the other
parameters that are used to control the error reporting.

I do not change everything that uses ErrCode here, I started
from SfxBaseController/SfxMedium and worked outwards.

This change serves two purposes

(1) Replace the extremely whacky ErrorInfo mechanism we were
using to smuggle information into the error handler reporting
mechanism with a very straightforward approach of just combining it
into the error class.
(2) Allow us to capture the source location that produced the error,
which makes debugging the source of a problem soooo much easier.

Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-03 10:12:41 +02:00
Andreas Heinisch 17154ceafe tdf#92620 - Adjust error message about exceeding legacy module size
Adjusted the error message about exceeding legacy module size and
removed the code for saving image version 11. Modules using image
version 11 still can be loaded. Saving modules always result in
an image version higher than image version 11 depending on the
size of the module.

In addition, some minor performance issues (construction of the error
message and the correct list of modules) were fixed.

Change-Id: I3bde9fcc1596b63446193c836fa7b5cb06eb7d97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149687
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-07-24 13:55:28 +02:00
Noel Grandin bc2101646b loplugin:stringviewparam improvements
improve the check by checking for methods that exclude
using string_view, rather than checking for methods that
__can__ use string_view, which leads to exposing
some holes in our o3tl/string_view.hxx coverage.

Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-14 07:54:28 +02:00
Andreas Heinisch d622972dce tdf#142391 - Store method using 0x13 format only when actually needed
Change-Id: I907d234b20be5e3c7bee0d44407f1bf4c4b49f05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149175
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-03-28 07:36:48 +00:00
Mike Kaganski 527741d528 Related: tdf#153752 Use virtual method to avoid dynamic casts
Change-Id: I97c09d82699621d5a43a525b5f2cf75ff5d131c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147353
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-21 05:52:59 +00:00
Mike Kaganski ccd0ef98f7 tdf#153752: SbxObject::Execute: extra characters in Option Compatible mode
Change-Id: Ib3e4bd9eb9a249123a686f2434ded7b529fb050f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147345
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-21 04:30:34 +00:00
Andras Timar a2b8295f42 Fix error compiler error with VS2019 C2487
e.g. 'GetLibCount': member of dll interface class
may not be declared with dll interface

Change-Id: I4856d0848447ca04747015015af4147b28c2f188
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147278
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-02-19 17:43:37 +00:00
Andras Timar cc584681ca set visibility of classes in mergelib+asan case
Change-Id: I2eb80d0b3002f174deea0d8657cb0cdbdec5be8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147144
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-02-16 09:49:56 +00:00
buldi 4e822d22e1 tdf#143148 Use pragma once instead of include guard
Change-Id: I6fa77335ced02442eec69b0dbb088505eb4b1aa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146818
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-02-13 13:18:18 +00:00
Stephan Bergmann a534361141 Fold OldBasicPassword into basic::SfxScriptLibraryContainer
Change-Id: Iaeaf30f63760185a2b1dd72feb980b94d9931d55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143253
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-25 10:12:38 +01:00
Noel Grandin fd3888c69a move ErrCode to comphelper and improve debug output string
need to move it, because modules "below" vcl want
to use the debug output method

Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-14 08:34:38 +02:00
Andreas Heinisch 7e2a8a9869 tdf#150139 - Add a concrete name to the error message
Add a concrete name to the "Property or method not found: $(ARG1)" error message when creating a listener.

Change-Id: I76c904793a96082c49f8aa2d45c76c50a453d892
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138061
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-08-22 19:03:42 +02:00
Caolán McNamara f7b34a779e cid#1500544 Uninitialized scalar variable
Change-Id: Ibe55cef41b6e6fd2ea10a9f4684e5f3e7926983a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138672
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-22 15:04:59 +02:00
Mike Kaganski f4ff0ed557 tdf#149622: also clear return value before calling method from SbxObject::Call
Moves the custom cleanup logic to overridden SbxMethod::Clear, to simplify
the cleanup code and make sure it restores empty Variant correctly.

Change-Id: I01fa0529acd9ac787ffcda60fd6836ade4afdcb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136108
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-20 12:46:27 +02:00
Noel Grandin 5ecdedbf81 clang-tidy modernize-pass-by-value in basic
Change-Id: I9034ab95a4ccb58e36e77d911dd33cc50857c03a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135176
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-31 15:11:27 +02:00
Noel Grandin cde416fea1 in SetGlobalUNOConstant, only retrieve old value if we need it
removes some unnecessary Find() work

Change-Id: I6af9c4d9a043d4361fcca1a034b2025fe7c10c28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134200
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11 21:55:11 +02:00
Noel Grandin d3849255b7 use more string_view in INetURLObject
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29 08:53:22 +02:00
Andrea Gelmini cbb66e9ace Fix typos
Change-Id: Iaf248ec769b82bdb22ac0620a1dc31ea90823d4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132535
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-05 21:49:04 +02:00
Mike Kaganski b32c85d0be Move creation of case-insensitive variable name to a central place
SbxVariable::NameToCaseInsensitiveName might then be used wherever
such names may be needed (see e.g. tdf#148358).

Change-Id: I7749a12a05225398848cbf72700c6f0bc119bc22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132561
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-05 11:30:24 +02:00
Mike Kaganski de81c2545a Related: tdf#144245 Optimize case-insensitive handling
1. Make BasicCollection::implGetIndexForName take OUString again,
after commit f7de7de118 made it take
std::u16string_view. All call sites pass OUStrings, and commit
ef32c3b4f9 made it create OUString
from the argument.
2. Have SbxVariable cache a case-insensitive variant of the name.
It is currently only used in the Collection implementation, but
may be used in other places; Tthe names are case-insensitive in
Basic, and VBA allows non-ASCII characters in names, so this
caching might be useful elsewhere.
3. Skip non-ASCII characters when calculating name hash, to allow
non-ASCII-containing strings still have some hash variance, when
at least some of the first 6 characters are ASCII.

Change-Id: If90ccea2c4b44c34967e6b764b6fab45b2976c40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132493
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-04 11:06:00 +02:00