Commit Graph
1128 Commits
Author SHA1 Message Date
Andrea Gelmini b621e3e901 Removed duplicated include
Change-Id: I7e1608faf0dcb92ad710cb0f6346e9ceca2954aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132559
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2022-04-05 21:45:28 +02:00
Tomaž Vajngerl cf4d5ed026 add tools::Guid class to generate, parse GUID values
Change-Id: Ie4d8fad4d8f22c8277c22c21b7a9eb3e7c9e4f1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132513
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-05 01:57:21 +02:00
Caolán McNamara 59a7c40255 reduce down to the part and config we are using and move to tools
Change-Id: Ifaddc59c3c7834808d368c138a5ec7c0b80db14c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-19 22:56:05 +01:00
Noel Grandin a378ac93e1 tdf#147921 Filesave DOC: wrong layout and then all missing from 7.3
regression from
    commit 990b2cb056
    Author: Noel Grandin <noel@peralex.com>
    Date:   Mon Jun 21 13:00:07 2021 +0200
    simplify and improve Wildcard

Cannot pass a string_view into something expecting a char* because
then it gets the length wrong.

Change-Id: I638660a1e9a8a0d17e4d2f77500b3f01365a43d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131396
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-12 08:41:25 +01:00
Bartosz Kosiorek 7b28920382 tdf#113066 tdf#142204 EMF Implement SETARCDIRECTION
Change-Id: I30206c68ecf1829ba0094e6259b8ed7dc05f2e9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131103
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-03-10 21:19:59 +01:00
Luboš Luňák 0156eba766 make Calc jumbo sheets an explicit build feature
On 32bit platforms tools::Long is 32bit, which is not enough
for pixel coordinates with 1m+ Calc rows+. So do not allow jumbo
sheets for such platforms.

Change-Id: I2ebd56a051470d33fca967918af3e7d2b0172dc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130713
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-01 10:48:13 +01:00
Caolán McNamara 50fa3055ad cid#1500555 try -taint_source function annotation tag on function body
Change-Id: Iecc87e118e5c5a85ae40e1ae79348883ea328d8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130482
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-24 13:06:40 +01:00
Caolán McNamara d4ec94c90a cid#1500555 try -taint_source function annotation tag
Change-Id: I237a22968024814d578d387e99ae96b748382e00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130433
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-23 14:56:32 +01:00
Luboš Luňák d697c96178 make DBG_UNHANDLED_EXCEPTION no-op if SAL_LOG_WARN is not enabled
ee0e19296b make the macro unconditional,
but that means it calls both DbgUnhandledException() and
DbgGetCaughtException(), and then log it as SAL_WARN that's
a no-op. With the document from tdf#105036 it added ~13% CPU time.

Change-Id: I9360169e6e3976d40271bc5602765e56f58971d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130069
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-17 15:23:45 +01:00
Luboš Luňák 807a15bd64 MSVC -arch is independent from the ability to use CPU intrinsics
It's possible to write AVX512 intrinsics in code compile only with
-arch:AVX . So do not require -arch for being able to do so,
especially since there is no -arch option for only AVX512F without
other AVX512 subsets (the option enables also CD, BW, DQ and VL
https://docs.microsoft.com/en-us/cpp/build/reference/arch-x64).

https://crashreport.libreoffice.org/stats/crash_details/55ef825d-c323-4df9-95e2-76672c674e60
is presumably caused by this, I can see use of registers XMM0-15
in arraysumAVX512.cxx built with -arch:AVX2 but when built
with -arch:AVX512 registers XMM16-31 are used too (I'm not sure
if that's AVX512DQ or something else, I can't find info on it).

Change-Id: I74473333a17e618327d43b920b8929d1b0e733b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129724
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
2022-02-10 17:32:04 +01:00
Luboš Luňák 2d36e7f518 remove AVX and AVX512 code from Calc
It's been a source of numerous problems since the beginning.
Poor separation of C++ code causing the compiler to emit some generic
code as CPU-specific, compiler optimizations moving CPU-specific
code out of #ifdef to unguarded static initialization, etc.

And it doesn't seem to even particularly improve performance,
on my Ryzen2500U for one full column (1m cells) sumArray() takes
about 1.6ms with AVX, 1.9ms with SSE2 and 4.6ms with generic code.
So SSE2 code is perhaps worth it, especially given that SSE2 is our
baseline requirement on x86_64 everywhere and x86 on Windows,
but AVX+ is nowhere near worth the trouble.

So this code removes all AVX+ code from Calc, and makes SSE2
a hardcoded option on where it's guaranteed. If we raise the baseline
to AVX, the SSE2 code may be replaced by the one removed by this
commit. Generic code is there for other platforms, if other platforms
add CPU-specific code, they should preferably follow the same rules.

This does not necessarily mean that CPU-specific code cannot
be used at all. Some externals use them, for example. It just
needs to be working, maintained, and worth the trouble.

Change-Id: I5ab919930df9d0223db68a94bf84947984d313ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129733
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
2022-02-10 16:33:07 +01:00
Mike Kaganski 4e0ba699ab Simplify SvGlobalName
Its data only takes 16 bytes, the same as std::string_view on 64-bit
platforms, which is considered trivial. No need to use cow_wrapper
that would itself take 8 bytes, and have the performance penalty.

Also reuse the conversion to sequence from comphelper.

Change-Id: I3e3177ea759bf22d099aaa5402559196c5934ee0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129679
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-09 06:11:39 +01:00
Stephan Bergmann dcd9e98383 float-cast-overflow
...after ea771e85b2 "Resolves: tdf#146997 use
sal_Int64 instead of sal_Int32 for spinbutton values" changed the default values
of pcr::ONumericControl::setMin/MaxValue
(extensions/source/propctrlr/standardcontrol.cxx) from int to sal_Int64 limits.

With SAL_USE_VCLPLUGIN=gtk3, in Writer creating a "Form - Label" and selecting
"Control Properties" in its context menu caused

> include/tools/helpers.hxx:75:93: runtime error: 9.22337e+18 is outside the range of representable values of type 'long'
>  #0 in FRound(double) at include/tools/helpers.hxx:75:93
>  #1 in (anonymous namespace)::GtkInstanceSpinButton::fromGtk(double) const at vcl/unx/gtk3/gtkinst.cxx:16443:16
>  #2 in (anonymous namespace)::GtkInstanceSpinButton::get_range(long&, long&) const at vcl/unx/gtk3/gtkinst.cxx:16521:15
>  #3 in weld::MetricSpinButton::update_width_chars() at vcl/source/window/builder.cxx:258:24
>  #4 in weld::MetricSpinButton::set_range(long, long, FieldUnit) at include/vcl/weld.hxx:1991:9
>  #5 in weld::MetricSpinButton::set_min(long, FieldUnit) at include/vcl/weld.hxx:2005:9
>  #6 in pcr::ONumericControl::setMinValue(com::sun::star::beans::Optional<double> const&) at extensions/source/propctrlr/standardcontrol.cxx:401:38

and similarly for pcr::ONumericControl::setMaxValue:

For one, for fVal = -9223372036854775808 (i.e., -2^63), -fVal + 0.5 (i.e.,
9223372036854775808.5) was outside the range of 64-bit tools::Long, so rewrite
the non-positive branch in a simpler way (and I have no idea why it was written
in the more complex way in the first place).

For another, for fVal = 9223372036854775807 (i.e., 2^63 - 1), fVal + 0.5 (i.e.,
9223372036854775807.5) cannot be represented as IEEE 754 double exactly and is
represented as 9223372036854775808, which was similarly outside the range of
64-bit tools::Long, so treat that limit value specially on the positive branch.

Change-Id: Ic2a553e9ce6319eac591058b1218b29dffaeab2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129638
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-07 23:48:59 +01:00
Szymon Kłos 496fcccfa6 jsonwriter: ensure correct number of bytes is available
In some functions author forgot that addCommaBeforeField()
can add additional two characters.

I didn't change cases where more bytes than needed are requested.

Additional change is that in debug mode there is a marker at the
end of allocated buffer - we check that after every write to
detect overflow. No need to request more space for a marker as
we always allocate "needed size * 2".

Change-Id: I28066797b0ba833e408b0a731abc01b7fd989da3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126535
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129163
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-01-31 17:01:33 +01:00
Andrea Gelmini 12e03ccd0c Remove break; after return
Change-Id: Ieafdbe14a3e51bc5d804e3cfe3c6f5757bef3ff0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128216
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-12 08:26:21 +01:00
Noel Grandin 17950f4d20 use less SvStream::Flush()
Flush() turns into a sync() on the device, which is pretty slow.
Most of the time all we actually want to do is to flush the internal
buffers from the SvStream.

So expose the FlushBuffer method and use that where possible.

And also means we don't need the mbDontFlushOnClose flag on SvStream
any more.

Change-Id: Ibe089b88b325f0fdc565200a97ce72cd26b7fcfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128214
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-10 17:59:45 +01:00
Chris Sherlock dabeab27da vcl: Create listfonts utility
The listfonts utility gets the details of all available fonts on the
system. It prints out the information, or stores it in a text file,
if a file name is passed to it as an argument.

An example invocation to store the information in a file named
fonts.txt is:

    ./bin/run listfonts fonts.txt

To get the correct font metrics, you actually have to get the font
metric from the system, and then set it as the current font of
OutputDevice, then get the font metric (which corrects a variety of
things like the orientation, line, height, slant, etc. - including
converting from logical coords to device coords).

The information is reported for each font family. On the top is the
family name, and then comes other details. Here is a report for an
example font:

FreeSans
    Family type: swiss
    Style name: Regular
    Weight: normal
    Italic: none
    Pitch: variable
    Width type: normal
    Alignment: top
    Charset: UCS2 (aka Unicode)
    Symbol font? no
    Ascent: 13
    Descent: 3
    Internal leading: 0
    External leading: 2
    Line height: 16
    Slant: 0
    Bullet offset: 0
    Fullstop centered? yes
    Orientation: 0 degrees
    Quality: 18477

There is a -v (or --verbose) option that output font features.

Change-Id: Icfc4da96459bea47c4233a5509496566c04d460c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127365
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-01-08 12:58:14 +01:00
Mike Kaganski 8b333c7694 Use rtl functions instead of own surrogate checking/combining
Change-Id: I3eb05d8f5b0761bc3b672d4c855eb469f8cc1a29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127375
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-24 21:42:08 +01:00
Gabor Kelemen fbe169fa17 Recheck include/[s-x]* with IWYU
See tdf#42949 for motivation

Change-Id: Iaebddd648c52c175da17d2a55a1e8de82c213f4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127330
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-24 01:44:48 +01:00
László Németh f348440e17 tdf#146120 sw: show tracked table changes with different color
In Change Tracking, show deleted table rows in cyan and
inserted rows in pink. In this case, don't show original
table row or cell background.

Follow-up to commit f481c2c8e7
"tdf#144057 sw track changes: hide deleted table rows".

Change-Id: Ib9cc411b62b92bc8a83dda7589f3e798f7e96f41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126482
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2021-12-08 13:07:51 +01:00
Noel Grandin e10e5c15cc improve the script for reducing symbol exports
And apply some of the results

Change-Id: If555476fdd951cbc1d01fb3ef3ab1cbca2b64960
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124896
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-01 12:13:59 +01:00
Luboš Luňák 93b0498451 remove unnecessary virtual inheritance
SvLockBytes is only inherited by UcbLockBytes, and that one is not
inherited by anything, so there's no diamond inheritance, so there's
no point. Probably a case of somebody not really understanding
virtual inheritance and using it "just in case".

Change-Id: I2c01f29634c4f1ff2b55d7552fc571b653878ace
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126074
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-30 10:38:57 +01:00
Miklos Vajna 8662293d17 tools Color: implement MSO-style luminance modulation/offset filter
To be used when a filtered theme color will be applied on the UI, and
not at PPTX import time.

Change-Id: Ifb56e38e59b529ef436063c407ee156d76a77f9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126011
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2021-11-29 09:51:16 +01:00
Noel Grandin 7566479a7a tdf#133835 speedup calc autofilter (11)
Size the buffer at construction to avoid realloc

Change-Id: I7fed6e345104fe9d4192aaa9664e7fe2662218bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125691
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23 12:29:42 +01:00
Noel Grandin 1b327e4a33 tdf#133835 speedup calc autofilter (9)
Remove the temporary buffer in INetURLObject::setAbsURIRef,
and just write directly to the main buffer.

This is a behaviour change since we are "committing" bad data to the
buffer if the URL is incorrect, but since it that case we set the
whole object to be invalid, that should not matter.

Change-Id: Ic8e7d4027bcb927005edd7de4098f4f525412869
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125648
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 12:20:18 +01:00
Mike Kaganski de4cb026b5 Generalize DegreeN
This potentially allows to introduce other degree fractions easily,
like Degree<sal_Int64, 60000>, with automatically defined conversion
functions.

Change-Id: Id1c32d9e029943844bdc833178c1f99387ff87fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-22 11:25:38 +01:00
Noel Grandin 7805a224b9 tdf#133835 speedup calc autofilter (6)
INetURLObject::SetPort Avoid allocating temporary string on heap,
saves 20%

Change-Id: I61ba4bd80c561266341143e35650b54b9d70f1d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125624
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 07:50:59 +01:00
Noel Grandin dc2010964f tdf#133835 speedup calc autofilter (5)
Tweak INetURLObject to reduce the number of
OUString and OUStringBuffer we create,
saves 5%

And add a asView() method to OUStringConstExpr,
to make it easier to pass to OUStringBuffer::insert

Change-Id: I115ec2398cfc8df39bd1efbbd5f0d5cc9712dba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125600
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21 15:47:25 +01:00
Noel Grandin 0b46361ef8 tdf#133835 speedup calc autofilter (4)
Tweak INetURLObject::parseHost so it doesn't need its own
OUStringBuffer, and can just use the callers'
Saves 5%

Change-Id: I481fabd4272bc9f172dd751a7019090b95a65e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125599
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21 10:26:52 +01:00
Mike Kaganski bc0ab08634 Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversions
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2021-11-19 15:42:03 +01:00
Noel Grandin 4bc44490f5 loplugin:stringliteraldefine in tools
Change-Id: I348b9a844c009f9c19301baa76d31b12f67c6130
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125535
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-19 12:56:36 +01:00
Mike Kaganski 7e23fec4b7 Introduce 'scale' to Point/Size/Rectangle, to simplify anisotropic scaling
Change-Id: I12c25838e8eec8d05e43b593790847c626edde31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124638
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-03 12:50:06 +01:00
Luboš Luňák ed43620c00 CPU-specific files should not include templates or inlines
Otherwise the possible copy emitted compiled with CPU-specific
instructions might be chosen as the copy to keep and would be
used by generic code. See history for the Calc Kahan code.

Change-Id: Ifc1bbd8d9720d9effe05b8ff8ee5e804363939df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124257
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-27 18:36:59 +02:00
Chris Sherlock ed92e40aea vcl: test OutputDevice::DrawPolyPolygon()
Change-Id: I166f715489ecff3095ccfb485153629050bfca20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122977
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-18 20:22:39 +02:00
Mike Kaganski 02d225f2a4 Simplify JsonWriter a bit
Move ensureSpace code to json_writer.cxx, and merge with reallocBuffer.
The methods are private, and are only used in methods in the same .CXX,
so the code will get inlined as compiler decides anyway, but becomes
simpler.

Make extractDataAs* to consider the known size of the data, to avoid
calculating null-terminated size. To do that, the code is moved from
extractData to private extractDataImpl, which returns both pointer
and size.

Change-Id: I7c0e425b5c584089c6e866c31d4cfdb5e242d66b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123568
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14 07:40:52 +02:00
Mike Kaganski 03c474c640 Unify JsonWriter::put and putRaw a bit
In the process, it turned out that there was unnecessary conversion
of OStringBuffer to OString and back to OStringBuffer when using
putRaw, which is avoided now.

Change-Id: I1e3ee685679df0b025bee8f4430624ee5bc9ccb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123547
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-13 17:39:32 +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
Julien Nabet 33206d7ae6 Match order of the beginning of fldunit.hxx with FieldUnit.idl
Change-Id: I5ddb120e66fed214cab484f9cd668dfa6f75d123
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123231
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-07 21:54:03 +02:00
Noel Grandin 7183b3ba23 loplugin:constmethod handle more cases
remove some of the naming limitations, and handle pointer parameters
better.

I only let the plugin run up till vcl/

Change-Id: Ice916e0157031ab531c47f10778f406b07966251
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122892
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30 19:00:57 +02:00
Caolán McNamara 238b6cf0ff WB_DEFAULTWIN should be sufficient to flag that no icon is required
Change-Id: Ibb5d8331d5d47e2b5c163c2797b2e7b5cee4b285
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122517
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-23 13:02:34 +02:00
Aleksei Nikiforov 9b4478e62c tdf#144624 Prevent infinite recursion when loading SVG icon
When Generic/X11 VCL backend plugin loads SVG icon,
it creates virtual device for rasterizing an SVG icon,
which in turn tries to load an SVG icon,
and thus infinite recursion happens.

Change-Id: I7559b6255e6718e64ef4a6e7c79d597375e5823a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122344
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-23 11:36:09 +02:00
Luboš Luňák b22d478531 clean up ambiguous confusing rectangle APIs like IsInside()
Reading 'rectA.IsInside( rectB )' kind of suggests that the code
checks whether 'rectA is inside rectB', but it's actually the other
way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(),
which should make it clear which way the logic goes.

Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
2021-09-20 12:10:44 +02:00
Noel Grandin 9490588c24 clang:optin.performance.Padding in tools
Excessive padding in 'class tools::JsonWriter' (15 padding bytes, where
7 is optimal).

Change-Id: I7e37eec095d935a344b2e5fea7bb108ee878472a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121920
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-10 21:19:24 +02:00
Luboš Luňák 55accad663 add back getX()/getY() to tools::Rectangle
581b2cf796 cleaned up some usage of the class and removed
getX()/getY(). But that means that the (probably most) common case
of treating rectangles as x,y,w,h now doesn't work, and one has
to use either left,top,right,bottom (which doesn't always mentally
fit), or the IMO weird left,top,width,height.

Change-Id: Ie9516f69af48490635346c76821be9a9eedd686c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121079
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2021-08-26 17:24:26 +02:00
dante b0bf212fb9 Correction on cpui flags
Change-Id: I34781d98f614c1d5df97460fc2e7b59be3bb6512
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121090
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2021-08-26 16:34:09 +02:00
dante 5b9cf5881e tdf#142307 - Upgrade SSE2 sum to AVX512 sum with Neumaier 1
This part focuses on allowing it on replacing arrayfunctor
By thefault it will try AVX512F (1,17%)
If not available will use AVX (94,77%)
Use of AVX2 (82,28%) has been avoided even if the code could been more compact
Source of hardware statistics: https://store.steampowered.com/hwsurvey

Change-Id: Iae737a565379e82c5f84f3fdee6321ac74f59d40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115675
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-26 08:48:35 +02:00
Andrea Gelmini 6f4e2a71da Fix typo
Change-Id: I225688ee50b87c5019f83060ec8bbf614df6174f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120744
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-08-19 18:10:42 +02:00
Noel Grandin 4dbe4a9313 loplugin:passstuffbyref
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18 18:19:09 +02:00
Caolán McNamara 88bf1749f1 undo changes to TextAlign
revert commit 8689bd5490
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Thu Jul 29 20:49:29 2021 +0100

    convert TextAlign to scoped enum

lets leave this as it always was

Change-Id: Id4d2a5644974cdd2b0ed6d361d5c52629674d057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120626
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18 12:53:31 +02:00
Mike Kaganski 17f524a37c Fix o3tl::convert for Rectangle, to operate on right/bottom values
... instead of using confusing/ambiguous size having two interpretations.

This reverts some of the unit test changes made in commit
fa339b3adb.

Change-Id: Ic56417703e32c1d92bcee76ad8ff494824bd4a1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120564
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-17 22:32:22 +02:00