Commit Graph
206 Commits
Author SHA1 Message Date
Noel Grandin 15bc492281 tdf#146382 cant open file from Explorer-attached remote location
problem spotted by mikekaganski

regression from
    commit 0b46361ef8
    Author: Noel Grandin <noel@peralex.com>
    Date:   Sat Nov 20 08:03:49 2021 +0200
    tdf#133835 speedup calc autofilter (4)

where I changed the behaviour of parseHostOrNetBiosName from overwriting
the destination buffer to appending to it.

Change-Id: I1bd3c7eade035a867c026364f5e114c1e652ca32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127352
Tested-by: Gabor Kelemen <kelemeng@ubuntu.com>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-24 11:27:39 +01:00
Andrea Gelmini 0ce6e166a4 Fix typos
Change-Id: I5e41be3f7e650db0019bcd42a3c1c2cb3bc5dd0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126155
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-01 06:03:13 +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
Andrea Gelmini ec5788d893 Fix typos and translations
Change-Id: Ic358f008e09718b6f726a55edfe3a3f78bba2942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125728
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2021-11-24 18:08:38 +01:00
Stephan Bergmann 792cd48783 Add test for INetURLObject::changeScheme
Change-Id: I84497ee93e30b639199bbbb958ac1b2c758db50c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125693
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-23 14:16:28 +01:00
Stephan Bergmann d9bc3affb5 -Werror,-Wunused-macros
(when e.g. building natively on macOS ARM64)

Change-Id: Ibff6f913a6251573058c52a8b4106233fad1d443
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124322
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-28 15:48:06 +02: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
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
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
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
Mike Kaganski 59e969def7 Fix ctor taking Point and Size, to properly handle regative sizes
(alinged to SetSize)

Change-Id: I123a584ead91faae0fec4d25938529b2d68e4a3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120559
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-17 09:21:59 +02:00
Mike Kaganski 4639ca2f87 Rename setX/setY to SetPosX/SetPosY, to align with SetPos
Change-Id: I856194f26fefad993f416d7b92b57a9417a3c0a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120546
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-16 20:09:43 +02:00
Mike Kaganski 581b2cf796 Drop tools::Rectangle::getX/getY, which are just duplicates of Left/Top
The change allowed to simplify many places where previously this API was
used, to avoid inefficient calculations (e.g., moving rectangle keeping
its size, and then immediately changing the size).

Change-Id: Ica2dc594d91cae83e2c2740c1f4fb23f44998916
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120461
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-16 15:53:02 +02:00
Mike Kaganski bfed58821f Drop convertMm100ToTwip in favor of the new o3tl::toTwips
Step by step, duplicates from <tools/UnitConversion.hxx> may go

Change-Id: Id4c03ff8adc120ae06dbfdbdfb4f5ff0bb51f489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120315
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-11 14:19:24 +02:00
Andrea Gelmini 6bb3a9dde8 Fix typos
Change-Id: Ib48f6c8e0424e6843d2b3a7b3558d1d8714a80ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119792
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-08-01 14:21:35 +02:00
Tomaž Vajngerl eb31491b2a tools: use upper case GetWidth/GetHeight for Rect for repr. string
When a rectangle is written to a string stream (usually used for
representation string in CPP unit tests) we used getWidth and
getHeight. It turns out that this methods don't return the correct
value for width / height (off by one) in many cases so instead we
need to use the upper-case variants GetWidth/GetHeight.

Change-Id: Id655236155f94e092d9e9c24f9bd6857e9b0a558
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119489
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-07-30 08:20:21 +02:00
Tomaž Vajngerl 9ef167c384 tools: handle special chars correctly in XmlHandler + test
Add the char encoding handler when calling xmlOutputBufferCreateIO
so that special chars are handled correctly. Previously we just
set nullptr.

Change-Id: I7ef44130869625cc4662bf168550a3f987390287
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117355
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-17 15:03:29 +02:00
Noel Grandin 39c3574b79 use string_view in INetURLObject::encode
Change-Id: Ib686c6872388b02c8939d3b65f6bd25cda348bc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114754
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-28 15:41:02 +02:00
Luboš Luňák 17e9789f6c reduce copy pasta with Color::GetLuminance()
Change-Id: I2eda3607a3be6ee56f0a9ddd14131be783b9698a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114294
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-20 14:18:42 +02:00
Tomaž Vajngerl 711ec7b6c7 vcl: move Fraction reading/writing to GenericTypeSerializer
Change-Id: Iccacaa7fd9cffe1d99f76def854c2150bb4d94f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113499
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-04-02 15:23:26 +02:00
Andreas Heinisch ea61644abe tdf#58745 - Detect end of month when extending a date list
Change-Id: Icaa64a493598dc4bb8f2d6d076ad4300e2e4dde6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112976
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-03-25 09:42:40 +01:00
Stephan Bergmann 6b00d0576a Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b)
...by re-enabling the code temporarily #if'ed-out in
a528392e71 "Fixed/improved
loplugin:cppunitassertequals" (and which then triggers lots of other
lopglugin:cppunitassertequal CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL warnings).

For two css::uno::Reference equality comparisons in cppu/qa/test_any.cxx, it
was more straightforward to rewrite them with an explicit call to operator ==
(which silences loplugin:cppunitassertequal) than to adapt them to
CPPUNIT_ASSERT_EQUAL's requirement for arguments of identical types.

In sc/qa/unit/ucalc_pivottable.cxx, ScDPItemData needs toString, which has been
implemented trivially for now, but might want to combine that with the
DEBUG_PIVOT_TABLE-only ScDPItemData::Dump.

Change-Id: Iae6d09cf69bd4e52fe4411bba9e50c48e696291c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110546
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-08 09:15:01 +01:00
Caolán McNamara 4e639c37b4 ofz#29691 revert throw SvStreamEOFException
reasonably sane code like
s.ReadUInt32(a).ReadUInt32(b).ReadUInt32(c).ReadUInt32(d);
if (s.good())
    // use a, b, c d;
stopped working.

FWIW on a short read we retain whatever was in the variable before the
read, rather than overwrite it with new random data, so
sal_uInt32 a(0xdead); s.ReadUInt32(a); assert(s.good() || a == 0xdead);

the msoffice ppt/escher/xls/doc filters especially speculatively parse
and rely on a variables preinit value in the case of a short read.

commit b345a2bab0
    cid#1470786 Uncaught exception

commit 71aec4726a
    ofz#29528 uncaught exception

commit bed03603f6
    ofz#29414 uncaught exception

commit 684885a99a
    ofz#29443 uncaught exception

commit 93574ac776
    ofz#29251 Abrt

commit 413db68d95
    ofz#29152 short read

commit f400e88304
    ofz#29151 short read

commit 96ea80a725
    ofz#29129 Abrt on uncaught exception

commit 646a635efe
    ofz#28931 Indirect-leak

commit b0e573f186
    ofz#29030 Abrt in xlsfuzzer

commit 95407c3916
    ofz#28902 uncaught exception

commit 45175d655a
    oss-fuzz: tgafuzzer doesn't pass sanity check

commit b82fc702ba
    oss-fuzz: psdfuzzer doesn't pass sanity check

commit e7c76d604a
    oss-fuzz: epsfuzzer doesn't pass sanity check

commit 901e5e7c91
    oss-fuzz: xlsfuzzer doesn't pass sanity check

commit 127bfab61c
    oss-fuzz: pngfuzzer doesn't pass sanity check

commit 77387ae00a
    oss-fuzz: mtpfuzzer doesn't pass sanity check

commit 974ffa79b0
    oss-fuzz: xlsxfuzzer doesn't pass sanity check

commit 6d6d104cbb
    oss-fuzz: bmpfuzzer doesn't pass sanity check

commit a7d1d107ec
    oss-fuzz: qpwfuzzer doesn't pass sanity check

commit 898993aa62
    oss-fuzz: pcxfuzzer doesn't pass sanity check

throw/catch parts of
commit 8c9a4ff511
    throw exception in SvStream when reading past end of file

Change-Id: Ic49c249768b17b64d8e868655dbc05b31906c2e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109621
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-20 16:20:25 +01:00
Noel 1e9255303d make internals of ::Color private
was made public in
    commit d487d6e082
    rework Color to have R,G,B,A public variables

but it's best to keep them private since we're changing the internal
representation - and there is surprisingly little that depends
on accessing the internals anyhow.

Change-Id: I234d80fb33105f7bf5b865fb7c8194d893b09878
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109508
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-18 11:44:00 +01:00
Tomaž Vajngerl cd65d6c067 tools: support reading xml namespace with XmlWalker
Adds methods namespaceHref and namespacePrefix for reading the
current element's namespace prefix and the href.

Change-Id: I1c16857c6fc0bdfde2d983d8f42f153111119029
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109442
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-01-17 01:07:29 +01:00
Noel 63a68064bb make the Color constructors explicitly specify transparency
to reduce the churn, we leave the existing constructor in place,
and add a clang plugin to detect when the value passed to the
existing constructor may contain transparency/alpha data.

i.e. we leave expressions like Color(0xffffff) alone, but
warn about any non-constant expression, and any expression
like Color(0xff000000)

Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16 10:07:07 +01:00
Noel d765ec2295 transparency->alpha in tools::Color
this just changes the Get/Set methods, the constructor and internal
representation of Color is not changed.

Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-12 17:38:53 +01:00
Stephan Bergmann 042033f1e6 loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-29 16:42:33 +01:00
Noel 8c9a4ff511 throw exception in SvStream when reading past end of file
to avoid chasing weird problems where we read past the end
of file, which leads to random data in the variable we read into.

I expect a couple of possible regressions from this change

(1) memory leaks caused by non-exception-safe memory handling.
Of which there should not be much because we're pretty good
about using smart pointer classes these days.

(2) Broken files which used to load, will no longer do so.
These will have to be debugged by putting a breakpoint
on the SvStreamEOFException constructor, and examining
the backtrace to see where we should be catching and ignoring
the exception to make the code continue to handle such broken
files.

Change-Id: I351be031bb083a3484a9a1b650a58892700e6fb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105936
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-18 06:54:06 +01:00
Noel bb06f51308 loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"

Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24 09:45:04 +01:00
Luboš Luňák 99f2ae505d tools::Polygon::Clip() is broken with bezier curves (tdf#137068)
It preserves the points, but not the flags. Work this around
by temporarily converting to B2DPolygon, where it works.

Change-Id: I120264fbc4c7c508386f23a06435891199565aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106188
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-11-20 12:29:17 +01:00
Philipp Hofer 1582d9a2c5 tdf#123936 Formatting files in module tools with clang-format
Change-Id: I0f66d02e67388cc4d21c5e96bf84b6848e8de63a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105721
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-18 12:04:58 +01:00
Noel 9536098ff1 simplify BigInt, remove isSet
no need for such a thing to be "nullable", just default it to zero,
as one would be expect for such a type.

Change-Id: Ic8b78ca3288355c90820135b9ced2c865ff7606e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105970
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17 14:31:01 +01:00
Mike Kaganski 396196d614 BigInt's non-big value type is currently sal_Int32
Change-Id: Iaca11d6279e17cf6301ef35d416829377c0ec964
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105841
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-14 19:51:56 +01:00
Noel 6436302f40 convert some more long -> tools::Long
grepping for stuff in template params this time

Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28 07:21:59 +01:00
Noel 2646023729 add tools::Long typedef and use it in tools
first step to switching long to a 64-bit type on 64-bit windows

Change-Id: I640d807426dfe713c7a8984ef560575f8288dbeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104516
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-19 12:56:30 +02:00
Dr. David Alan Gilbert 15a5a56326 Fix SSE2 cpuid checks
As per afb62b0e96 swing the actual
check into a separate file and make only that file be compiled
with the specific flag.

Change-Id: If848a041fc3a26cfaa79f945d63f6c43f8cf3772
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103497
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-28 13:22:11 +02:00
Dr. David Alan Gilbert dc4ba0a287 Fix SSSE3 cpuid checks
As per afb62b0e96 swing the actual
check into a separate file and make only that file be compiled
with the specific flag.

Change-Id: I7f75453f21271f38e0099bdf6b40f9138d8b4cff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103496
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-28 13:21:46 +02:00
Dr. David Alan Gilbert afb62b0e96 Fix AVX2 cpuid checks
At the moment test_cpu_runtime_detection_AVX2.cxx is compiled with
-mavx2 to allow it to use the intrinsics; however the compiler jumps
at the chance to use newer instructions outside the actual test;
in my case using AVX in the string manipulation in addTestsToSuite
when my CPU doesn't actually have AVX.

Swing the actual check into a separate file and only compile that
with the extra flag.

We probably need the same change for the SSE* checks as well.

Change-Id: I1683231932fff264a87c96ac95ac1d24b921163a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103075
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-22 08:32:58 +02:00
Stephan Bergmann 0587c88e23 Fix uses of char16_t*/wchar_t* stream inserters
...that are helpfully deleted in C++20, as now implemented at least by VS 2019
16.6.4 when using --with-latest-c++

Change-Id: Iaf80f793e73fc90768bb146c9cf3d300d6747c8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99170
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-21 21:32:10 +02:00
Noel Grandin 01e37e3e56 use tools::JsonWriter for dumping property tree
Change-Id: I8f55af19ba10b71bd621e69b27000ab7cb565309
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96677
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-25 10:16:37 +02:00
Andrea Gelmini 760980b0b5 Fix typos
Change-Id: I2bccc7beb2e9dfccd84b118a33a7aee9753a8be1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97040
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-25 08:18:10 +02:00
Tomaž Vajngerl 7ee6fa6487 Add test as an example how to add CPU intrinsics support
Also makes sure that if the CPU dataction or compiler detection
doesn't work correctly, the test could potentially crash.

Change-Id: If0862c0a736c8e1f5ba1117b248918e4c1fb2f4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96779
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-24 08:47:30 +02:00
Stephan Bergmann 921ee37ea3 Consolidate unique_ptr deleters calling free
Change-Id: I57a977dbb521270a466d464df8c31c364179ec20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96854
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-22 15:49:04 +02:00
Noel Grandin cb95276e6e use JsonWriter for the rest of ITiledRenderable
and fix bug in buffer reallacotion where mPos pointing
at the beginning of the new buffer instead of at the
correct index inside it.

Change-Id: Ie1ffaa176f6165e2cec85c93adc945312eff38e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96650
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-20 21:25:11 +02:00
Noel Grandin 8df7447139 asan: need to use malloc instead of new for tools::JsonWriter
because the LOK API expects memory returned from those calls to be
malloc'ed

Change-Id: If6fbfb60c433bd6e58bc90a9a90a90663e2e1c60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96676
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-19 15:38:52 +02:00
Noel Grandin c8bed6445b new json writer for LOK
we shave about 3 memory copies off in the process, and
make the class play nicely with our string types.

Change-Id: I1f614fb35b1de499ac99e3b33ac638ad81054bed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96393
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-18 10:54:10 +02:00
Tomaž Vajngerl b1c007cd06 tools: extend test for UnitConversion
Change-Id: I8fbc2a83f40fb04656f690b4b63d3cac9f0410c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95273
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-01 18:45:13 +02:00
Muhammet Kara f31af3ed40 clang-format toolkit, tools, uui with under 5-percent lines of change
Files which could become clang-format conformant with
under 5-percent lines of change relative to the total
count of lines in the file are found by using bin/find-clang-format.py,
and fixed with /opt/lo/bin/clang-format -i <path-of-the-file>

There will be follow-up patches to fix all 'under-5-percent' files.

Change-Id: I4952f350f4d22913ea94689b902ffa26c223ff96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90152
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-03-07 15:27:45 +01:00
Noel Grandin 1a53e60d44 sal_Char->char in tools
Change-Id: Id8be02e445ac439439b2f78ba4a7376dd19ce360
Reviewed-on: https://gerrit.libreoffice.org/85744
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-23 15:12:29 +01:00