297 Commits
Author SHA1 Message Date
Mike Kaganski 67346d08e9 tools: keep the input deflate could not take in one pass
ZCodec::Compress read a fresh chunk over whatever deflate had left unconsumed.
deflate stops as soon as its output buffer is full, and the write-back that
frees that buffer only ran at the top of the next iteration, by which time the
tail of the previous chunk was gone.

Nothing said so. EndCompression answers with the number of bytes taken and no
caller compared it, so the result was a shorter document than the one handed
in, compressed perfectly well. Passing 100000 bytes through a 64 byte output
buffer took 49152 of them.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I1044a46aa1d1f424e7d699a927e01a8427768919
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13208
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 23e2e9c2136d8b5c9fd6d9604bccd35e9b657571)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211555
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-29 15:58:29 +02:00
Andrea Gelmini dcc4abb880 Fix typos
Change-Id: Ie4170e9a8268508196ffd415e6cc5b9daef466f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210209
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 16:44:29 +02:00
Noel Grandin 8be85cad83 switch INetURLObject::IsExoticProtocol to default-deny
and whitelist known-good stuff, rather than playing
whack-a-mole with bad protocols.

Change-Id: I8ea95a2af57b826f16f3d97daffac15659a4ad9c
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9687
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 7e5feed961ef2344d580d63a5752e9d6e2c0797e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210126
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-27 15:46:41 +02:00
Andrea Gelmini 9f970f8cf6 Fix typo in code
Change-Id: Id22fea4a07aa6fee9783565cd4d7f14ecdff1d17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210041
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-27 10:41:40 +02:00
Andrea Gelmini c455a75578 Fix typos
Change-Id: I620dbd48232d8d2c7e99586d3445654880699cae

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209806
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-25 15:46:10 +02:00
Andrea Gelmini 467e3b4f49 Fix typos
Change-Id: I8000ee277d51b91e8e04c99afa4327a4245e435f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209475
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-22 10:26:48 +02:00
Caolán McNamara 4ba5567cc4 match the package content provider when checking a vnd.sun.star.pkg url
IsExoticProtocol used GetHost() to recover the nested package url of a
vnd.sun.star.pkg url, but the package content provider in
ucb/source/ucp/package/pkguri.cxx uses the whole authority between "://"
and the next '/', which GetHost() truncates at '@'. Check the same
substring the provider does.

The vnd.sun.star.zip branch below already did the equivalent extraction,
so pull the shared parts into a helper that both branches call.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I27be6a839108f2e58d62baefc1a71dcbfc9a4568
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4410
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
(cherry picked from commit ce436efb34d2e0e90ee2cdb450da285530c562f7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206681
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-16 16:14:58 +02:00
Muhammad Naeem 5c812142b2 tdf#143148: Use pragma once instead of include guards
- Convert include guards to #pragma once in salhelper, starmath, tools, ucb, and o3tl.
- Kept changes minimal to a small cross-module batch as requested by the easyHack guidance.
- Verified with: container=1 make -j4 o3tl.build salhelper.build starmath.build tools.build ucb.build

Change-Id: Ic047061433985e12be41bdb6463ac4c8e8969ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204555
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-05-02 13:12:13 +02:00
Noel Grandin 3c5f8e3dea SvFileStream::ReadUniOrByteStringLine should not need to specify encoding
Instead, rely on the stream being set into the correct encoding
during stream initialisation.

Change-Id: I96b6818dd07cf4b83959884bcbe3be2cbf90b476
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200457
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-02-26 20:18:50 +01:00
Stephan Bergmann 9b4077998d Add test
...for 0468b71c3f284ad6f7826aee79b8adb1998fc018 "fix asan heap-use-after-free"

Change-Id: I4045a2a3635d628d7f681406bd6a8b9f26fa23d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200351
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-26 17:45:50 +01:00
Gabor Kelemen c511c65434 tdf#146619 Use more forward declarations in include/tools
Change-Id: Iab2938f82a9fd7ef3334d69c4fd07a9d963a9e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198237
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-02-01 09:23:01 +01:00
Mike Kaganski b708490b2d Fix Windows build, where sal_Int32 != int
... after commit 99354e5cb0 (introduce
tools::XPath to be able to reuse the result after call, 2025-12-22).

Change-Id: I2b096c027dfe1e71e7a74906b3b03ab3a895679b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196147
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-23 10:43:00 +01:00
Tomaž Vajngerl 7d1b4abc54 tools: destroy objects in the correct order in XPathTest
Use xmlDocUniquePtr in XPathTest instead of manually handling the
pointers and deleting it with xmlFreeDoc function at the end. This
causes that the objects are not deleted in the correct order.

Change-Id: I9933dc3f354c1374a2e53c9f65ff98b5e6a443c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196144
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2025-12-23 07:44:11 +01:00
Tomaž Vajngerl 99354e5cb0 introduce tools::XPath to be able to reuse the result after call
In tests we many times rerun the XPath search to just check another
XML attribute, or first check the size of child elements and then
check each element's attributes in a separate call (re-running the
XPath search). Re-running an XPath search all the time takes up
quite some CPU resources and doing it a lot will accumulate, so the
idea here is to have an object as a result on which you can reuse
instead of re-running the search.

In addition it is possible to combine the search path from the
previous search, so it is possible to construct paths in a more
concise way.

Example:
auto primitivePath = aXPath.create("/primitive2D");
auto polyPath = aXPath.create(primitivePath, "/polypolygon");

polyPath will use a combined path "/primitive2D/polypolygon"
as the search path.

Checking can be done by simply using CPPUNIT_ASSERT* functions
with this, but we might extend UnoApiXmlTest with some checks
for convenience because the assertXPath methods do have better
reporting when the assert fails. Also integration into the
UnoApiXmlTest class will need to be done, because namespaces need
to be registered before tools::XPath can be used correctly. This
change does not touch that yet.

A couple of tests in SvdrawTest have been changed to use the new
tools::XPath class - most notable testRectangleObject. These tests
don't use any namespaces so it is easy to convert those.

Change-Id: I29251d2e7f4c3ee5b76e46daf78c21d0ca067cb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195618
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-12-22 09:50:21 +01:00
Tomaž Vajngerl ecf75f2637 tools: support XmlWriter construction from xmlTextWriterPtr
So we can use it in dumpAsXml functions and eventually use it as
a replacement to directly using libxml.

Change-Id: I204d487b52343f69224fec2fd480657785bc0a69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195167
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-12-08 04:15:21 +01:00
Noel Grandin 4e2b089020 loplugin:stringloop
resurrect the plugin and run it over the codebase

Change-Id: I443a75961124aabd1e62b3c4bc166d52e4621b52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194870
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-12-01 14:25:01 +01:00
Tomaž Vajngerl 4fa74cefc3 tools: use string_view instead of OString in XmlWriter
Change-Id: I55dd06fc432d9686b370274a4621d61c035a99dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193997
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-11-19 07:33:37 +01:00
Tomaž Vajngerl 35a61e79b2 extend XmlWalker test
Change-Id: Id46605dac8e9033a776e84e6533768ebcf339bbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180551
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2025-01-22 08:11:06 +01:00
Tomaž Vajngerl b9477183bb tools: moved function to create the color from string to tools
Will be needed again in a follow up commit.

Change-Id: Idbe2f540f9c3fb974f7dadf62dc099a0791bb0c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180378
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2025-01-20 01:40:10 +01:00
Stephan Bergmann 8075798b22 Fix check for further exotic protocols
...that were added in 59891cd398 "look at
'embedded' protocols for protocols that support them"

Change-Id: I42836d6fd27cd99e39ab07e626053f002a2651f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178047
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-12-07 22:22:23 +01:00
Rosh 71ec40df42 tdf#147021 - Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I2495fa1ad081ad75bd8e79a22bdeaa97217aa398
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177581
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-11-30 09:27:12 +01:00
Noel Grandin 08e566f0c9 add a couple of tests for tools::BigInt
because I might touch this area and I want to be sure I don't mess it up

Change-Id: I62c177031f690f4455a58f3280ed26186df94158
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176620
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-15 11:38:18 +01:00
Noel Grandin 5de73f04f3 new loplugin:staticconstexpr
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04 08:51:00 +01:00
Mike Kaganski 7e5f69aa33 Make tools::Time ctor taking sal_Int64 private
This ctor is meant to set the value of nTime directly; and that value
is not nanoseconds, but an encoded value, using SEC_/MIN_/HOUR_MASK.
But in some places, this ctor was misused for setting of nanoseconds,
which would only accidentally work for values less than one second.
All places that initialized tools::Time with 0, now use EMPTY.

This makes the ctor private; and for the very few cases where really
the encoded value of nTime is stored / restored, fromEncodedTime is
introduced.

Change-Id: I1f1994bd9aab1b51a41b1de637619049fe820da4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175283
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-21 10:30:58 +02:00
Tomaž Vajngerl 02c91f82c2 move UniqueID to tools and rework to increase counter in constructor
In the tools module it can be used in more other modules.

Changed the instantiation to increase the counter already in the
constructor, so no need to check if the ID is 0.

Also test for UniqueID

Change-Id: I77c80461875c69496a7e218534d16d6550c168c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170061
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-07-07 09:41:02 +02:00
Noel Grandin 45f9627659 loplugin:ostr in tools
Change-Id: I0e601100b034eaa99b08c7cbf09e5f817e69b507
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167736
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-05-16 14:49:58 +02:00
Mike Kaganski ea9904c896 Drop FRound, and use generalized basegfx::fround
Change-Id: I7447e649dc3ef4e51242f69c7486a3e84e103d2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166159
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-17 03:56:59 +02:00
Mike Kaganski 3234c4e35f Avoid MAX_PATH limitation in launcher
... and drop some manual memory management.

Change-Id: I4c60ce559ff185d4685a6b9799a97651438115b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162502
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-25 07:29:40 +01:00
Noel Grandin 4603aa2888 use more string_view in tools::JsonWriter
Change-Id: Ia3ac54a1164b99a806298a47115ea3bc570f3b0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163810
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-23 16:50:33 +01:00
Noel Grandin 8f53681856 return string_view from some XmlWalker methods
elides some OString temporaries

Change-Id: Ic07f18eb3c71637593e64128605c1ebfa8e68474
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163044
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-06 17:08:27 +01:00
Mike Kaganski 7413b4ad50 Simplify JsonWriter a bit
Change-Id: Ifa4278cfd62df4179dd3ae627369c077e31dbd00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161780
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-08 13:05:31 +01:00
Mike Kaganski c684aa9cf3 Simplify and rename for clarity
Change-Id: Ic97a2b313c6f7d9da540a8867f01362c2fe7b0d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161052
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-20 20:29:51 +01:00
Caolán McNamaraandMike Kaganski b64f23b235 ofz#65165 Stack-buffer-overflow READ 4 test case
make VALGRIND=memcheck CppunitTest_tools_test

 Conditional jump or move depends on uninitialised value(s)
    at 0x13348ADA: BigInt::DivLong(BigInt const&, BigInt&, BigInt*) const (bigint.cxx:306)
    by 0x13349A0A: BigInt::operator/=(BigInt const&) (bigint.cxx:635)
    by 0x12A58F67: tools::BigIntTest::testLenB1() (test_bigint.cxx:103)
    by 0x12A5C6A8: void std::__invoke_impl<void, void (tools::BigIntTest::*&)(), tools::BigIntTest*&>(std::__invoke_memfun_deref, void (tools::BigIntTest::*&)(), tools::BigIntTest*&) (invoke.h:74)

if ( (static_cast<sal_uInt64>(aTmpB.nNum[nLenB1 - 1]) * nQ) >
                                         ^ nLenB1 is 0
    ((nTmp - static_cast<sal_uInt64>(aTmpB.nNum[nLenB1]) * nQ) << 32) + aTmpA.nNum[j - 2])

Since:

commit bcbc0857bf
Date:   Sun Dec 17 21:11:31 2023 +0300

    Simplify BigInt

Co-authored-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Id8dbff23f7b4312ba666e1443c41b7869713bfbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160953
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-20 05:49:41 +01:00
Mike Kaganski 247c64fa02 Drop incorrect conditional compilation
Since commit 396196d614 (BigInt's
non-big value type is currently sal_Int32, 2020-11-14), fixed-size
sal_Int32 is used in the unit test; so it must not depend on size
of unrelated long type.

Change-Id: Ida276e87b927381d093796f4137774a18acded82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160857
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-16 20:29:05 +01:00
Stephan Bergmann db9104a366 Extended loplugin:ostr: tools
Change-Id: I70df74d005c7fca14b1bcb70f4870023bd3af4a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159668
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19 17:29:09 +01:00
Mike Kaganski 9f1289f1e3 tdf#157820: handle \\?\ prefixes in INetURLObject
They are already handled in osl file URL functions.

Change-Id: Id0c224bdb79963e7ce52abde57bf05b0a6a81ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158741
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-01 10:24:21 +01:00
Stephan Bergmann b4844c310b Repurpose loplugin:stringstatic for O[U]String vars that can be constexpr
...now that warning about O[U]String vars that could be O[U]StringLiteral is no
longer useful

Change-Id: I389e72038171f28482049b41f6224257dd11f452
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-15 21:15:49 +02:00
Stephan Bergmann e0c33ec15f loplugin:ostr: automatic rewrite
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2023-10-07 00:47:20 +02:00
Mike Kaganski d205274a01 Drop MinMax in favor of std::clamp
Change-Id: I021f524b232ddbe091981444d859d35dd9cd05ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157582
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-05 13:58:12 +02:00
Eike Rathke c968d89890 Introduce tools::Duration individual time values ctor
Change-Id: I516d3727cbcf6667b32dc963febbf4b753ef6a91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153497
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2023-06-23 18:32:17 +02:00
Eike Rathke 986c2d86a7 Introduce tools::Duration(sal_Int32 nDays, const Time& rTime) ctor
Change-Id: If002e04536149b49b2249103ac914d17dec3fae6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153409
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2023-06-22 01:40:00 +02:00
Eike Rathke eac63ab120 Related: tdf#153517 Introduce class tools::Duration
Change-Id: I73ea6e162c73382ba470a306ce2852dbff3d1314
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153202
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2023-06-17 15:16:09 +02:00
Noel Grandin 5c1561561a loplugin:unnecessarygetstr extend to more std::string checking
suggested by mike kaganski

Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-24 18:04:50 +02:00
Noel Grandin e57d5daaea fix leaks when using tools::JsonWriter
Specifically in sd/source/core/annotations/Annotation.cxx

We seem to end up fixing leaks here often.
The current tools::JsonWriter API is just very hard to use correctly.

So rather return an OString, which is cheap to copy,
and push that down into the LOK code.

AFAIK that seems to end up requiring less code and less adhoc copying
of data (specifically the queueing code in init.cxx was creating
copies when converting to std::string).

Ideally, we could have some special API to avoid the new strdup()
calls in init.cxx, but not sure how to prevent other people
from accidentally using that.

Change-Id: Ia33437c1bfd9cc2d54dfb99914d1b72db20335f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-05 17:02:46 +02:00
Stephan Bergmann 96537cd465 Teach INetURLObject about RFC 7230 URLs with no path but query
While RFC 2616 "Hypertext Transfer Protocol -- HTTP/1.1" defined

> http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

RFC 7230 "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing"
defines

> http-URI = "http:" "//" authority path-abempty [ "?" query ]
>            [ "#" fragment ]

Change-Id: I83b1baa404d28bf3b28b1db812f8930bbc1aaf90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148064
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-01 17:41:27 +00:00
Stephan Bergmann df5995b0bf Only specialize CppUnit::assetion_traits<T>::toString member functions
...not the whole CppUnit::assetion_traits<T> classes (where applicable).  That
avoids spelling out the (identical) equals member functions, and also leaves
around the less and lessEqual member functions, in case they want to be used
after all.

Change-Id: I18f8d6cff0353921ced4952b33a0c85ff8292923
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147165
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-16 21:16:12 +00:00
Tomaž Vajngerl eff28a8a17 tools: rearrange Rectangle test, add construction test case
Change-Id: I735600181665100e8540b6f5f14ffebfe6f33371
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146305
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-29 14:23:48 +00:00
Mike Kaganski e7be4bb5a3 Fix StartWritingUnicodeText
Its comment in include/tools/stream.hxx tells:
  Switch to no endian swapping and write 0xfeff

It was introduced in commit 3c2105e07d
  Author Eike Rathke <er@openoffice.org>
  Date   Fri Dec 22 00:19:05 2000 +0000
    new: read/write Unicode or Bytecode

and included a call to SetEndianSwap( FALSE ). That call was dropped
in commit 8130714148
  Author Noel Grandin <noel@peralex.com>
  Date   Mon Jan 05 08:47:31 2015 +0200
    fdo#84938: replace NUMBERFORMAT_INT_ constants with 'enum class'

(likely by accident).

To simplify the fix, drop redundant m_nEndian: m_isSwap is enough.

Change-Id: Ia9a0fe2d55563e7ba21bd4cf17c4ca999c6feaf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141521
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-22 09:32:54 +02:00
Chris Sherlock 6c0bb0f9b8 tools: test Rectangle::Normalize()
Change-Id: Ia3fec45b2b6dd0011910c8db5819e161485336c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138713
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-24 10:55:29 +02:00
Chris Sherlock 57fddf3e64 tools: json writer test does not need to use test::BootstrapFixture
Change-Id: Iea7fa63ca7a3208d065ac2960998041672fc8d7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136231
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-09 15:28:30 +02:00