Commit Graph
6407 Commits
Author SHA1 Message Date
Caolán McNamara b03cc1dd65 cid#1474008 silence Unchecked return value from library
Change-Id: I23228ae5d61654e2c2d401453bc741a2a6074278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145539
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-16 10:33:02 +00:00
Caolán McNamara 019c49ec96 draw selection bounds without using RasterOp::Invert
Change-Id: I65fa68bbd8ff40c0e324851376dd8a8a1614ac99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145396
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-12 20:05:09 +00:00
Caolán McNamara af27dabe81 mbDragDrawn is always false when queried
Change-Id: Ie8eda3465381eeed62d3271040c1697ef8f6559a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145395
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-12 20:05:00 +00:00
Julien Nabet e78859005b Curl:CURLOPT_REDIR_PROTOCOLS(_STR): use only "https", not "http"
Change-Id: If615503b598f6823d7978f12e666832c82b63ece
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145334
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-01-12 10:32:36 +00:00
Julien Nabet 071c66521c Fix types for Curl elements (update part)
"CURLOPT_REDIR_PROTOCOLS_STR" has been added with Curl 7.85
so check if Curl version is 7.85 min or use the previous version "CURLOPT_REDIR_PROTOCOLS"

Change-Id: Iacf6a3c37aba63d615eaa93352b098b1c9183533
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145208
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2023-01-11 10:14:47 +00:00
Julien Nabet 6410fafc6f Fix deprecated Curl elements for update part
Change-Id: Ide008c8a80800b33c8104ec3d697e836fae73827
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145186
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-01-09 10:40:19 +00:00
Stephan Bergmann 19691c3b68 Revert all the recent loplugin:unocast changes
...as obsoleted by ef53355355 "Rudimentary support
for dynamic_cast on UNO proxy objects".

This reverts all of:
4cfcc9ac37 "loplugin:unocast (framework::Desktop)"
03efbf72f4 "loplugin:unocast
 (vclcanvas::TextLayout)"
80099fdd51 "loplugin:unocast (SalGtkXWindow)"
cc147f576d "loplugin:unocast
 (sdext::presenter::CachablePresenterView)"
40db42be1d "loplugin:unocast
 (vclcanvas::CanvasFont)"
2d1e7995ea "loplugin:unocast (CairoColorSpace)"
4c0bbe4bd9 "loplugin:unocast
 (canvas::ParametricPolyPolygon)"
8980366662 "loplugin:unocast
 (vclcanas::CanvasBitmap)"
d5e0c2c8db "loplugin:unocast
 (sfx2::DigitalSignatures)"
c0c4519e0d "loplugin:unocast
 (VCLXAccessibleComponent)"
feb8b833a6 "loplugin:unocast (VCLXDialog)"
1fa58cc6cc "loplugin:unocast (VCLXMultiPage)"
f481f036de "loplugin:unocast
 (DocumentSettingsSerializer)"
73df933f5f "loplugin:unocast
 (css::embed::EmbeddedUpdate)"
420165ab0e "loplugin:unocast
 (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)"
9abe8ee067 "loplugin:unocast (MutableTreeNode)"
9f3022ceb0 "loplugin:unocast (VCLXTabPage)"
1be70dda02 "loplugin:unocast
 (vcl::unotools::VclCanvasBitmap)"
d6a70bb641 "loplugin:unocast
 (basegfx::unotools::UnoPolyPolygon)"
5a14f009e6 "loplugin:unocast
 (xmlsecurity::Certificate)"
99009c9535 "loplugin:unocast (sd::Annotation)"
0c7585c5fa "loplugin:unocast (sd::TextApiObject)"
24e14afd1b "loplugin:unocast
 (SignatureVerifierImpl)"
1a7ad0c10d "loplugin:unocast
 (pcr::PropertyEventTranslation)"
a97e2d2702 "loplugin:unocast (RangePageBreaks)"
19dfdf86ad "iloplugin:unocast
 (pcr::OFormattedNumericControl)"
f9785ea595 "loplugin:unocast
 (frm::OInterfaceContainer)"
5e5f40a4a9 "loplugin:unocast (ScVbaShapes)"
27b35b2c21 "loplugin:unocast (ScVbaShapeRange)"
cb3108f860 "cid#1517812 Dereference null return
 value"
feba0ddb15 "loplugin:unocast
 (weld::TransportAsXWindow)"
4d6c232165 "loplugin:unocast
 (oox::ForumlaImExportBase)"
4844c096a8 "loplugin:unocast
 (cairocanvas::SurfaceProvider)"
9a0b523e0a "loplugin:unocast
 (cairocanvas::CanvasBitmap)"
8a5648d8e5 "loplugin:unocast
 (cairocanvas::TextLayout)"
28c27a0623 "loplugin:unocast
 (cairocanvas::CanvasFont)"
53bc223cb3 "loplugin:unocast
 (cairocanvas::RepaintTarget)"
5f70b0b9f6 "loplugin:unocast (SvXMLImport)"
068187a898 "loplugin:unocast (VCLXWindow)"
88b4f96620 "loplugin:unocast
 (sfx2::sidebar::SidebarController)"
f1b7a69b28 "loplugin:unocast
 (SvxLineStyleToolBoxControl)"
ba76f0ba7e "loplugin:unocast
 (i18npool::Calendar_gregorian)"
840154daf9 "loplugin:unocast
 (framework::AddonsToolBarWrapper)"
b0e9c4c5f0 "loplugin:unocast
 (GrammarCheckingIterator)"
8ee6cfc965 "loplugin:unocast
 (ucb::ucp::ext::Content)"
5b8cd77c11 "loplugin:unocast
 (basic::SfxScriptLibraryContainer)"
9e73ff9fce "loplugin:unocast
 (sdext::presenter::PresenterNotesView)"
a98acca8fb "loplugin:unocast
 (SelectionChangeHandler)"
c0b59ad6e3 "Consistently use
 comphelper::getSomethingImpl<I>(aIdentifier, this)"
276e3ccbdd "loplugin:unocast
 (vclcanvas::RepaintTarget)"

Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-05 11:45:51 +00:00
Stephan Bergmann 1a7ad0c10d loplugin:unocast (pcr::PropertyEventTranslation)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

Change-Id: I0800465df08a8caa4d48e205f181d3eb35611dc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144695
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-22 06:56:41 +00:00
Caolán McNamara cb3108f860 cid#1517812 Dereference null return value
Change-Id: Ia9cf34f03a18e499f83e495c0f3714b7476c3973
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144687
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-21 23:59:19 +00:00
Stephan Bergmann 19dfdf86ad iloplugin:unocast (pcr::OFormattedNumericControl)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

(Making the base class pcr::CommonBehaviourControl TControlInterface template
parameter variadic required swapping it with the other TControlWindow template
parameter.)

Change-Id: Iadc9dc7eb8fbe882b63b5db49d8a39ae5c4c05c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144653
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-21 11:58:06 +00:00
Stephan Bergmann feba0ddb15 loplugin:unocast (weld::TransportAsXWindow)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

On macOS, where we implicitly use -fvisibility-inlines-hidden-static-local-var
since
<https://github.com/llvm/llvm-project/commit/d46f2c51e4c849683434bb5a0fb6164957474b8f>
"Make -fvisibility-inlines-hidden apply to static local variables in inline
functions on Darwin", the static id local var in
weld::TransportAsXWindow::getUnoTunnelId cannot be in an inline function
implicitly hidden via -fvisibility-inlines-hidden.  Explicitly marking the
function as VCL_DLLPUBLIC would help, but would in turn cause MSVC error 2487
("member of a dll interface class may not be declared with dll interface").  So
just make the function non-inline in a new vcl/source/window/weldutils.cxx
(which would arguably be the best approach for the whole class, anyway).

Change-Id: Ib5615f6aae19346ea05b8b85ff77c0e5ea860994
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144331
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-20 08:34:38 +00:00
Caolán McNamara 1726c27e0d check SfxObjectShell::Current()
SfxObjectShell::Current() can return null, it's based on the equally
vile SfxViewFrame::Current()

Change-Id: Ia5c7783680e9d8e5d3075078f16a2c15cb6f7a47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144339
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16 21:17:15 +00:00
Stephan Bergmann dca6880983 Fix deadlock
...introduced with 73e062be1f "blind fix for some
7.4.3.2 crashes in UpdateCheckJob" (and wreaking havoc during
--enable-online-update `make check`)

Change-Id: Idde4e4fa8ab94dafa141eb740aba1d874de4717d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144320
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-16 14:21:16 +00:00
Noel Grandin 73e062be1f blind fix for some 7.4.3.2 crashes in UpdateCheckJob
I am guessing that state in this object is being touched from
multiple threads (since it is an UNO service object), and one or
more of the threads are consequently seeing inconsistent state.

Change-Id: Ib925740d3b8db2713c4f132d0367b794a412a269
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144248
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-16 06:34:35 +00:00
Caolán McNamara f1d5143c2f Resolves: tdf#152157 show update icon on all menubars
and not just the active one, so they are of a consistent height with
eachother. BubbleWindow is only shown for the active one.

Change-Id: I157c8c8b0e2a219c20ffde01ec4a04ba93b7f0e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143241
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24 21:33:17 +01:00
Caolán McNamara 5dbb85ca6a split RemoveBubbleWindow
Change-Id: I635bb587b7306bc5f5756a0c24260f10587cc4c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143226
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24 17:29:17 +01:00
Caolán McNamara c84ffb6114 add some notes on how to debug online update from a dev version
Change-Id: I7b4547bfee4ff0bd3bbe7366b6294e925852ce65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143221
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24 14:57:21 +01:00
Stephan Bergmann 4521cb0c40 Drop redundant -Wnon-virtual-dtor
Inspired by
<https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607102.html> "[PATCH]
doc: -Wdelete-non-virtual-dtor supersedes -Wnon-virtual-dtor", drop explicitly
enabling -Wnon-virtual-dtor in favor of -Wdelete-non-virtual-dtor, which is
already enabled by -Wall.

(-Wdelete-non-virtual-dtor first appeared in Clang 3.0,
<https://github.com/llvm/llvm-project/commit/8bd428574c717e68a8274739d2ba0f6dc16fd0fb>
"Add new warning that warns when invoking 'delete' on a polymorphic, non-final,
class without a virtual destructor", and GCC 4.7,
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=014ab419efc12a59efebd2720d79e1c055675c85>
"invoke.texi: Document -Wdelete-non-virtual-dtor. [...]")

Dropping the explicit setting of -Wnon-virtual-dtor (and nowhere setting it
implicitly via -Weffc++) means we can get rid of lots of places that either set
-Wno-non-virtual-dtor or use some pragma to ignore -Wnon-virtual-dtor.

(In various places across extensions/source/activex/ and winaccessibility/, the
commits f26996bd33 "Silence
-Werror,-Wnon-virtual-dtor in generated so_activex.h (clang-cl)" and
c6086ca653 "Silence -Werror,-Wnon-virtual-dtor in
generated UAccCOM.h (clang-cl)" had singled out some includes to wrap them in
pragmas.  Now that those pragmas are gone again, move those includes back to
where they had been prior to being singled out.  And the -Wno-non-virtual-dtor
in external/firebird/macos-arm64.patch.0 appeared first in
ccd0e5f445 "Make firebird build for macOS on
arm64", which, though it doesn't state it explicitly, apparently created that
patch's builds/posix/prefix.darwin_arm64 as a copy of firebird's already
existing builds/posix/prefix.* files, which routinely include that warning
option too, so keep it there too even if it is probably irrelevant throughout.)

Change-Id: I7e4fa9f2c07e267b2ed15607905027f6b78142f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143182
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-24 10:38:28 +01:00
Noel Grandin 9c2e77152c loplugin:unusedfields make some fields private
this is one of the secondary analyses this plugin performs

Change-Id: Iaa4424c2396470c6f1df85b0290fbffdda35fa08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143177
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-23 20:49:03 +01:00
Noel Grandin 57fcfc5a50 loplugin:unusedfields
Change-Id: Icf6e7e116a087e7f68b86bdb645850a2edaa2f78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143087
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-22 11:04:22 +01:00
Noel Grandin 727141098b loplugin:unusedfields start removing unused weld fields
Change-Id: If736ff669ffe24c3dd111c26285c19fc65806a3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142946
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-21 10:05:30 +01:00
Stephan Bergmann 47ef2aa370 -Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): extensions
Change-Id: I5ff1ad95c452c9e4b902ab547d84e6c2064db8ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142325
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-05 18:27:41 +01:00
OmkarAcharekar 75e6ffe31d tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I35c883a1b05a797e83a41698fa205796e681d7c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141482
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-10-18 14:24:06 +02:00
Noel Grandin 4b95451f85 split utl::TempFile into fast and named variants
which makes it easier to know what each variant requires
to stay on it's happy path

Change-Id: I3275a2543573367714bc78092e882f6535507285
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-29 09:11:18 +02:00
Noel Grandin 97eccc5d55 use more string_view in cui,extensions
Change-Id: I76253ae06af53f63206a47a84035317c6a5058b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140637
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-27 14:06:42 +02:00
Samuel Mehrbrodt 467085bfb0 Rename MouseNotifyEvent to NotifyEventType
Also contains keyboard and focus events, not only mouse events

Change-Id: Iec1d6c341b01a489ba80fe9634ea3579afb02ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139970
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-09-19 11:42:59 +02:00
Juan C. Sanz 5d40ced9e8 Revert "tdf#150569 Modify hardcoded dates to extend the range of accepted dates"
This reverts commit b20594f2fc.

Reason for revert: Further testing has shown some errors in other ways of displaying the data

Change-Id: Ic4909f8571c8730ab3ba622c7fad99f2646616ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139566
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-08 10:24:01 +02:00
jucasaca b20594f2fc tdf#150569 Modify hardcoded dates to extend the range of accepted dates
Replaces date range limits to allow entry of dates between 1/1/0001 and
31/12/9999, which is the normal date range in most database manager

May need some discussion

Change-Id: Ide8dfc64663d2ef2a66d8b7e1af3ef8ed3bb0af5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138845
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-07 12:48:16 +02:00
Noel Grandin dbc655a1e6 cid#1509230 Inefficient vector resizing with reserve.
preserve the benefits of reserving with the benefits of logarithmic
doubling

Change-Id: I41896d1cef3e9939fda13f055e045ccb5d6ea1ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139085
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-31 18:21:56 +02:00
PoonamShokeen 08a63a8854 tdf#145538 Use range based for loops
Change-Id: I144d020c6c57937caa800f019ab175597ed8ede4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137538
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-08-26 22:37:43 +02:00
Mike Kaganski c06e4fffd5 Drop obsolete code
Clang also defines _MSC_VER macro.

Change-Id: I7e483eb1811a3ce5c78a6721895026d004ca98fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138712
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-23 09:45:45 +02:00
Liu Hao 466f86abb7 tdf#148430 Use std math functions instead of rtl::math
Change-Id: I6bcb33d51c3974d0e8905e1ffeac556a99870aab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138294
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
2022-08-19 17:23:59 +02:00
Stephan Bergmann 91ba9654ba Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxx
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit.  (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx.  The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now.  Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)

Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18 17:10:19 +02:00
Justin Luth a8ae24a8bd tdf#150278: avoid gen/gtk3 difference in m_xPropBox->GetCurPage()
When switching between tabs, at this call SAL_USE_VCLPLUGIN=gen
was returning the switched-to-tab id, while gtk3 was still
returning the leaving-tab's id.

So just ignore all that an use the OnActivatePage value.

Change-Id: I166626eac033af65e95f8a280076a6bcc070bee3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138003
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-09 11:38:00 +02:00
Noel Grandin 0351bec874 use more o3tl::span
which means we can reserve precisely the right number of entries when
building maps

Change-Id: I580414699289369de4730caae09829bbd8759e82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-25 10:00:23 +02:00
Noel Grandin faa40c022c elide some makeStringAndClear() calls
Change-Id: I8636102554a76f2ba3f6297219b40761473a4489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137285
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21 11:01:22 +02:00
Noel Grandin c7c49309d0 clang-tidy modernize-pass-by-value in extensions
Change-Id: I9f31d6ddea3f99ed3334fa00d0f2c8448f9b9583
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136203
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21 13:17:18 +02:00
jsala 2c68c419c1 tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Also change some integer by std::size_t

Change-Id: I999b4dddba6ef1feb0a65aad24e97f507b577b59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136104
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-06-20 12:25:56 +02:00
Stephan Bergmann 5060c50158 Use o3tl::make_unsigned in some places
...where a signed and an unsigned value are compared, and the signed value has
just been proven to be non-negative here

Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24 16:50:03 +02:00
Julien Nabet 93b4191cef tdf#149096: don't translate "Get" and "Post" submit methods
Change-Id: I4427618dad0c168642225eaaf828a96e37936d8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134718
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-05-24 09:05:42 +02:00
Noel Grandin 9e57e16484 loplugin:unusedvariableplus
Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05 17:35:08 +02:00
Noel Grandin 9f1701d01d use more o3tl::getToken
found by inspecting call sites of OUString::getToken

Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05 12:57:00 +02:00
Stephan Bergmann 5e41345353 Just use Any ctor instead of makeAny in extensions
Change-Id: I0441d30044168563b0d5b8406fcc99b51a9cbc1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133817
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04 19:27:44 +02:00
Stephan Bergmann a1c62cfc60 Just use Any ctor instead of makeAny (macOS)
Change-Id: I6c185eecf943205f78567393f0ef588580ee4dab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133821
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04 15:26:09 +02:00
Noel Grandin ddef1e2c01 add o3tl::equalsAscii
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03 09:12:32 +02:00
Noel Grandin 5200a73627 use more string_view in various
found by examining uses of OUString::copy() for likely places

Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01 08:30:18 +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
Stephan Bergmann b12727e15a loplugin:stringviewparam
Change-Id: I8f27a2260e7195dd0a7dbb0b5e3dd0064ef06c81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133164
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-19 11:32:56 +02:00
Noel Grandin fdfd517a6f loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents

Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 08:38:53 +02:00
Noel Grandin 85c2ed8dc7 loplugin:stringview add check for getToken().toInt32
where we can convert that to
    o3tl::toInt32(o3tl::getToken(
and avoid the heap allocation of a temporary string

Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11 14:45:38 +02:00