/external/apache-commons/

eoffice-5-0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/tools/qa
AgeCommit message (Collapse)Author
2024-12-07Fix check for further exotic protocolsStephan Bergmann
...that were added in 59891cd3985469bc44dbd05c9fc704eeb07f0c78 "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-11-30tdf#147021 - Use std::size() instead of SAL_N_ELEMENTS() macroRosh
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-15add a couple of tests for tools::BigIntNoel Grandin
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-04new loplugin:staticconstexprNoel Grandin
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-10-21Make tools::Time ctor taking sal_Int64 privateMike Kaganski
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-07-07move UniqueID to tools and rework to increase counter in constructorTomaž Vajngerl
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-05-16loplugin:ostr in toolsNoel Grandin
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-04-17Drop FRound, and use generalized basegfx::froundMike Kaganski
Change-Id: I7447e649dc3ef4e51242f69c7486a3e84e103d2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166159 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-25Avoid MAX_PATH limitation in launcherMike Kaganski
... 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-23use more string_view in tools::JsonWriterNoel Grandin
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-06return string_view from some XmlWalker methodsNoel Grandin
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-01-08Simplify JsonWriter a bitMike Kaganski
Change-Id: Ifa4278cfd62df4179dd3ae627369c077e31dbd00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161780 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-20Simplify and rename for clarityMike Kaganski
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-20ofz#65165 Stack-buffer-overflow READ 4 test caseCaolán McNamara
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 bcbc0857bf4bc24b5ea36e445a367cce0a382da4 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-16Drop incorrect conditional compilationMike Kaganski
Since commit 396196d6143e377f83a81557f4630ac7e7ad9471 (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-11-19Extended loplugin:ostr: toolsStephan Bergmann
Change-Id: I70df74d005c7fca14b1bcb70f4870023bd3af4a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159668 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-01tdf#157820: handle \\?\ prefixes in INetURLObjectMike Kaganski
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-10-15Repurpose loplugin:stringstatic for O[U]String vars that can be constexprStephan Bergmann
...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-07loplugin:ostr: automatic rewriteStephan Bergmann
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-10-05Drop MinMax in favor of std::clampMike Kaganski
Change-Id: I021f524b232ddbe091981444d859d35dd9cd05ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157582 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-23Introduce tools::Duration individual time values ctorEike Rathke
Change-Id: I516d3727cbcf6667b32dc963febbf4b753ef6a91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153497 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-06-22Introduce tools::Duration(sal_Int32 nDays, const Time& rTime) ctorEike Rathke
Change-Id: If002e04536149b49b2249103ac914d17dec3fae6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153409 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-06-17Related: tdf#153517 Introduce class tools::DurationEike Rathke
Change-Id: I73ea6e162c73382ba470a306ce2852dbff3d1314 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153202 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-04-24loplugin:unnecessarygetstr extend to more std::string checkingNoel Grandin
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-05fix leaks when using tools::JsonWriterNoel Grandin
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>