summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2023-11-09warn about exotic protocols as wellCaolán McNamara1-1/+2
Change-Id: I50dcf4f36cd20d75f5ad3876353143268740a50f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151834 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 1305f70cff8a81a58a5a6d9c96c5bb032005389e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159034 Reviewed-by: Eike Rathke <erack@redhat.com>
2023-11-07add some protocols that don't make sense as floating frame targetsCaolán McNamara1-0/+8
Change-Id: Id900a5eef248731d1184c1df501a2cf7a2de7eb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158910 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 11ebdfef16501c6d35c3e3d0d62507f706557c71) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158900 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-11-02tdf#157820: handle \\?\ prefixes in INetURLObjectMike Kaganski2-17/+97
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> (cherry picked from commit 9f1289f1e3c9b4a5f2be7a7187877db6b5015973) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158705
2023-08-16Resolves: tdf#127334 Backport tools::Duration ScInterpreter::CalculateAddSub()Eike Rathke3-13/+174
All tools::Duration implementation for completeness. This is a combination of 5 (+2 typo) commits. Introduce tools::Duration(sal_Int32 nDays, const Time& rTime) ctor xChange-Id: If002e04536149b49b2249103ac914d17dec3fae6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153409 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 986c2d86a7b53a6599d014db7327f47cb33d4fea) Introduce tools::Duration individual time values ctor xChange-Id: I516d3727cbcf6667b32dc963febbf4b753ef6a91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153497 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit c968d8989004301b49d67a093a6eb8a629533837) Clamp and assert maximum hours value in Time::init() xChange-Id: Ia777222f3c797b90663b55499a57025e410b1d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153407 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit b07d72c6c1075efa6b64c67758566426c22c5225) Use tools::Duration in ScInterpreter::CalculateAddSub() ... for all (date+)time inflicted operands. xChange-Id: I93043d912867e2ef7d4af271b5c4566a3ffb4ef9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153291 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 174a72f3fd50d1146d6bedd4cc2a1971aa33be67) Resolves: tdf#127334 Increase tools::Duration accuracy epsilon unsharpness ... when converting from double, i.e. to 300 nanoseconds. Empirically determined.. xChange-Id: I92c43b5f244923363af5d44bece9c155126ca343 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155324 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 46e672db8002e7aaac881bee65b5c50c4e14c666) Change-Id: I92c43b5f244923363af5d44bece9c155126ca343 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155427 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-06-21rbOverflow was already set for bBadNS, unnecessary to set it againEike Rathke1-1/+0
Change-Id: I26e32b25b53be590bc24646803c7442385ec4d3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153393 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit b72a7c01b927912dd746f033b2ad4933e46b1b86) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153411
2023-06-21Use tools::Duration in friend double operator-() if DateTime has Time setEike Rathke1-10/+5
Change-Id: Iff3e2aad596fdfd1530c46cdeff28b44e5142517 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153327 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit d3d77d99e3e6f05b232923edc2ea23e513a721d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153349
2023-06-19Fix TB Jenkins_Linux_Ubsan (duration.cxx)Julien Nabet1-2/+4
/tools/source/datetime/duration.cxx:190:77: runtime error: negation of -2147483648 cannot be represented in type 'sal_Int32' (aka 'int'); cast to an unsigned type to negate this value to itself 0 0x7f08bd84936d in tools::Duration::Mult(int, bool&) const /tools/source/datetime/duration.cxx:190:77 1 0x7f08c1c1d27a in tools::DurationTest::testDuration() /tools/qa/cppunit/test_duration.cxx:219:26 Detected thanks to eac63ab120a181a1dff6317ee3d223327080e992 Related: tdf#153517 Introduce class tools::Duration Change-Id: I3804cc4ff4011a7f3b393b82b27f0c805682fbb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153254 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 99d01ff26fe69ccc66f49b3ddd43b258c3687f2c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153277 Reviewed-by: Eike Rathke <erack@redhat.com>
2023-06-17Related: tdf#153517 Introduce class tools::DurationEike Rathke5-19/+555
Change-Id: I73ea6e162c73382ba470a306ce2852dbff3d1314 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153202 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit eac63ab120a181a1dff6317ee3d223327080e992) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153218
2023-05-28Factor out DateTime::NormalizeTimeRemainderAndApply(tools::Time& rTime)Eike Rathke1-33/+15
Change-Id: Ie520b10baaeb4c94973c44435c3241e5d2254968 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152345 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-05-19Eliminate 24h loops in DateTime::operator+=/-=(tools::Time&)Eike Rathke1-14/+16
... and repeated Date::operator++/--() that each calculate lcl_DaysToDate( GetAsNormalizedDays() + 1 ) where Date::AddDays() does it once. Also, that probably never worked correctly with negative time results >=24h Change-Id: Ic67aaa3d93e0d6533501d52671acf765e2d9bbdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151984 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-04-27fix bug in json_writerJaume Pujantell1-1/+5
Ruler stores null-terminated strings in fixed length char arrays, so when creating a JSON a string might end earlier that it's size sugsests. Change-Id: Icdcaf35f9ce54c24dcd36368dc49bb688a2a65ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150542 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2023-04-24loplugin:unnecessarygetstr extend to more std::string checkingNoel Grandin1-1/+1
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-24loplugin:unnecessarygetstr extend to createFromAsciiNoel Grandin1-2/+2
idea from mike kaganski Change-Id: I0ecb9cad091d7a048d2ddae73165bf22748f3872 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-18tdf#143200 assert when pasting a cell to a large-height rangeNoel Grandin1-22/+22
The values are unfortunately genuinely outside the range that our Fraction class can work with. So do the least-bad thing for now, and reduce the magnitude of the values until they fit. Change-Id: Iedc34e9767b3d4a502f5d84efcdebc96c6514cac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-11Drop Writer::OutLongMike Kaganski1-10/+0
... and use SvStream::WriteNumberAsString, replacing Write[U]Int32AsString Change-Id: I10e56c532494239ed40ec01b6184dd06db463a0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150193 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10Drop SvStream::WriteCharPtrMike Kaganski2-12/+4
WriteOString is a better replacement Change-Id: Ic431b9aeb98d19fe61cff71360eee555105cc2bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150192 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10Use more *string_viewMike Kaganski1-4/+2
Change-Id: I1172febd45da4dba006f8495427fe45c6d9b9fa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150187 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-09new loplugin:unnecessarygetstrNoel Grandin1-1/+1
which prevents constructing unnecessary temporaries via getStr() Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-05fix leaks when using tools::JsonWriterNoel Grandin2-35/+18
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-03Simplify JsonWriter a bitMike Kaganski1-136/+47
Change-Id: I0ca4a0fcf4f19bc26ae931bae0b2ee53db47f12c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149951 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-30loplugin:stringadd in test..toolsNoel Grandin2-35/+27
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I8619fa3280338afdfe75bdbfda6cb118d396e1c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-18loplugin:stringadd use more O[U]StringCharNoel Grandin1-20/+24
Change-Id: I196e4539ad430a39415eff9d7170b33df7228230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149062 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08tdf#82984 tdf#94915 zip64 support (import + export)Attila Szűcs1-9/+14
Implemented import + export for "Zip64 Extended Information Extra Field", (in "Local file header" and "Central directory file header") and for Data descriptor. Focused only to be able to handle files with over 4GB uncompressed size, in the zip archive. The 64k filecount, and the 4GB compressed size limit is probably still present Tried to follow pkware .ZIP File Format Specification, Some cases were not clear to me and/or some zip compressing tool may not perfectly follow the standard, like 'extra field' should be 28 bytes long, but its reader now can read shorter (or longer) 'extra field'. Replaced some 32bit codes with 64bit codes, in stream handling, in deflater. Tested with an ods file that contained a content.xml that bigger then 4BG+ (import + export + reimport) on windows. I think 4GB+ files import/export would be too slow fot unittest. So, for unit test, used the small but zip64 format files, that was attached to the bugzilla tickets Note: It helps with Bug 128244 too (1 of the unittest tests it), but that ods file missing manifest.xml, so LO won't be able to import it. Change-Id: Idfeb90594388fd34ae719677f5d268ca9a484fb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147306 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2023-03-01Teach INetURLObject about RFC 7230 URLs with no path but queryStephan Bergmann2-3/+4
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-02-28move sanitizing of Size inside GenericTypeSerializerNoel Grandin1-0/+12
I cannot see a useful application of a Size that is negative (at least not in a file format). Change-Id: I0c5bd8c7d3987a5c7803af2a6ae0543c4a6d7754 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-27inline StreamData into SvFileStreamNoel Grandin2-48/+24
Change-Id: Ib2bfaa903b5c57b7d802afe7928720e6007d54ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147865 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-16Only specialize CppUnit::assetion_traits<T>::toString member functionsStephan Bergmann1-17/+6
...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-01-29tools: rearrange Rectangle test, add construction test caseTomaž Vajngerl1-38/+79
Change-Id: I735600181665100e8540b6f5f14ffebfe6f33371 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146305 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-27Remove support for AIXStephan Bergmann1-1/+1
As discussed in the mailing list thread starting at <https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html> "Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)", the bridge implementation at bridges/source/cpp_uno/gcc3_aix_powerpc is apparently dead and should thus be removed. However, that was the only bridge implementation for AIX, which implies that support for the AIX platform as a whole is dead and should thus be removed. Change-Id: I96de3f7f97d4fd770ff78256f0ea435383688be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-09tdf#147906 Use std::hypot for Pythagorean additionLeonid Ryzhov1-1/+1
Change-Id: Ia325af8d9a23e617eb62e6cecab0aa68f1d206f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145089 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-12-30I get "warning: unsupported syscall: __sys_prlimit64" in WASM so avoid thatTor Lillqvist1-1/+1
Change-Id: I8a9a19d3c7757e1b7e1d194c439280a9d4824c3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144876 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-11-22Calculate null-date days to assert only onceEike Rathke1-1/+4
Massively called it is really unnecessary to do that each and every time. The debug build is slow enough.. Change-Id: I06525e4ca1fa23a1d49dd735370eb157157800e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143127 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-11-22Avoid second null-date check of convertDateToDaysNormalizing()Eike Rathke1-1/+7
This is micro-optimization, but.. Change-Id: Ic5d43bc0ce9343cf194e189777109636d3b587c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143126 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-11-22Related: tdf#152114 Move some tools' Date class algorithms to comphelper::dateEike Rathke1-211/+17
So they can be reused, specifically in connectivity/source/commontools/dbconversion.cxx Change-Id: I8b2b59e3cb078a73d5f670f0756404471009cf9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143114 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-11-18ofz#53450 Integer-overflowCaolán McNamara1-1/+1
Change-Id: Iccabfb8991a4dca6ec05565f01f6cff82c642d27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142934 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-17ofz#53450 Integer-overflowCaolán McNamara1-2/+2
Change-Id: I106e703714083631c67d7b8a84180c3c485953d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142814 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-13Fix typosAndrea Gelmini1-1/+1
Change-Id: Ic1fb0ea483954f2994a87e05f33b320da3795227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142661 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-11-06-Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): toolsStephan Bergmann4-10/+13
(The "clang-format off" in tools/source/misc/json_writer.cxx is necessary because otherwise the code between the SAL_WNODEPRECATED_DECLARATIONS_PUSH/POP macros would be ill-formatted in a way that would trigger loplugin:indentation.) Change-Id: Ic96787865d4c96be07c41f4939893420dfa04046 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142339 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-27add some more asserts in Fraction::MakeFractionNoel Grandin1-1/+9
which I missed when inlining code in commit 8ac4dd510bd5f41882db0b647797674b06339f4e Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Oct 27 08:48:25 2022 +0200 tdf#123419 optimise ImplMakeFraction Change-Id: Ifd271ce89cea29a22d41b8e143e27df118f8df3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-27rational_ReduceInaccurate unnecessary hereNoel Grandin1-1/+0
as pointed out by mike kaganski, since we are already dealing with 32-bit values Change-Id: Ic621757f2d9a689e54c47f36cc6ba85a322c500e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141904 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-27tdf#123419 optimise ImplMakeFractionNoel Grandin1-0/+40
which is very hot here. Push it down into Fraction, where we can skip the construction of boost::rational intermediate values Change-Id: I7e5f18456a252a159d3a50e9297168e5ba9e1588 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141894 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-24tdf#133768 speed up temp file creationNoel Grandin1-0/+2
Use DELETE_ON_CLOSE attribute, so we can avoid calling osl_removeFile. Shaves 5% off the export time. Change-Id: I4fef8f181ef7a92c4805cc5996c3a17800a22602 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141718 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-22Fix StartWritingUnicodeTextMike Kaganski3-4/+54
Its comment in include/tools/stream.hxx tells: Switch to no endian swapping and write 0xfeff It was introduced in commit 3c2105e07d29b2069349e1a54e08463d359f988f 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 8130714148d58dd2bf1ef12dcc6dd6d5838be0d1 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-16Simplify a bitMike Kaganski1-5/+2
Change-Id: Ia983d24c539ab37bcc6457630634142cd5826056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141399 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-07ofz#52191 Integer-overflowCaolán McNamara1-7/+7
Change-Id: I97daf9327c55229fe7da546164d398353e0696a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141046 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-14move ErrCode to comphelper and improve debug output stringNoel Grandin1-0/+1
need to move it, because modules "below" vcl want to use the debug output method Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30ofz#50761 Integer-overflowCaolán McNamara1-6/+6
Change-Id: I8681e7b1b128e7ca33142b7120ad2d4bb3227493 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139019 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-28cid#1500491 silence Untrusted loop boundCaolán McNamara1-0/+1
Change-Id: I508337b8a8482b5aaa056a564a0dfa39cbbb4b56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138943 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-24tools: test Rectangle::Normalize()Chris Sherlock1-0/+98
Change-Id: Ia3fec45b2b6dd0011910c8db5819e161485336c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138713 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-24tools: rename Rectangle::Justify() to Rectangle::Normalize()Chris Sherlock2-7/+7
Jusify() normalizes the rectangle so both the Width and Height are positive, without changing the location of the rectangle. It ensures that the x and y coordinates will be moved to the top left of the rectangle. The name is strange, so renaming Justify() to Normalize(). Change-Id: Idbf163e65e52a798e38f785b8961b8042cf0cf2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137379 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>