summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2019-07-18cid#1448224 Unchecked return valueCaolán McNamara
Change-Id: Ie13b8b8f865e44f3746fdf79bf0b1b2cec2aba1d Reviewed-on: https://gerrit.libreoffice.org/75845 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-15make tools::Rectangle::getBottom return 0 when emptyNoel Grandin
LayoutConverter::calcAbsRectangle needed to be tweaked because we now end up with a zero width/height instead of a large negative number. Change-Id: I81f04759a1d5bf6f44753a1701596796fad40567 Reviewed-on: https://gerrit.libreoffice.org/75610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-15make tools::Rectangle::getWidth return 0 when emptyNoel Grandin
Change-Id: I5c7565309d380cdbe60a078d2c97f7dd1fae4274 Reviewed-on: https://gerrit.libreoffice.org/75517 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-12make tools::Rectangle::Bottom return Top when emptyNoel Grandin
Change-Id: Ia424b91149245907b045b43aa31a622e34e6e5bc Reviewed-on: https://gerrit.libreoffice.org/75504 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-12make tools::Rectangle::Right return Left when emptyNoel Grandin
I tried making this assert, but there are just too many places where we pass around empty rectangles, so rather just return the value of nLeft, in a similar fashion to methods like Rectangle::TopLeft Change-Id: I3377071ecae26f13e895ae411cd269f0bdbe0ef6 Reviewed-on: https://gerrit.libreoffice.org/75486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-10make tools::Rectangle::SaturatingSetX/Y respect empty stateNoel Grandin
Change-Id: Ifef4c2ff967fdfbe122bca99e55d84e8e6c6a635 Reviewed-on: https://gerrit.libreoffice.org/75343 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-10make tools::Rectangle::setY respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I6feb94ca2f24246b96757575288c86c0b0c54227 Reviewed-on: https://gerrit.libreoffice.org/75342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-10make tools::Rectangle::setX respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I2beae23bbdea36e91e0e367f9a94cbc35be3cd24 Reviewed-on: https://gerrit.libreoffice.org/75337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-10make tools::Rectangle::AdjustBottom respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I9a3f7a0356ab625681419f74af0b9884624f3642 Reviewed-on: https://gerrit.libreoffice.org/75336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-10make tools::Rectangle::AdjustRight respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I69c717be91712b73e9d3b8f9c83d26305c052bd5 Reviewed-on: https://gerrit.libreoffice.org/75300 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-09make tools::Rectangle::shrink respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: Id529037e82b2fdd8c2120877a44fc7e069fc8406 Reviewed-on: https://gerrit.libreoffice.org/75298 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-09Fix Android build after commit fc0850d2784eaa79257cf1ea8c5d078c5241b5bfMike Kaganski
The second parameter is unused Change-Id: Iaf82ea24737a162c6aa8ce6b9e237f656a10020a Reviewed-on: https://gerrit.libreoffice.org/75283 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-07-09fix android build - fallback getCpuId only had one parameterTomaž Vajngerl
Change-Id: I91c679506aad727c7f536e79e79a720db860b5ae
2019-07-09CPU intrinsics detection (SSE, AVX)Tomaž Vajngerl
Adds CPU intrinsics detection in configure pass for compile time detection and "cpuid" runtime detection of which CPU instruction sets are available on the user device. Change-Id: I0ee4d0b22a7c51f72796d43e7383a31d03b437ad Reviewed-on: https://gerrit.libreoffice.org/75175 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-08make tools::Rectangle::expandBy respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: Ib383bb990ddcd835ff37e98893e44156287e0488 Reviewed-on: https://gerrit.libreoffice.org/75227 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-28tdf#126121: WebDAV redirection detectionMike Kaganski
This rewrites URI of a document opened from a WebDAV mapped UNC path on Windows (like "file://server/DavWWWRoot/Dir/Doc.odt") into HTTP URI (like "http://server/Dir/Doc.odt"). This allows using WebDAV protocol for these files, and e.g. get information about other user who locked the document to show when asking if open read-only or a copy. Change-Id: I643fa8df30d4b163783b279b1b973304fcafff37 Reviewed-on: https://gerrit.libreoffice.org/71746 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-25improve loplugin:simplifyconstructNoel Grandin
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25tdf#94677 Calc is slow opening large CSV, improve tools::FractionNoel Grandin
Flatten the tools::Fraction class. Shaves 1s off a load time of 49s Change-Id: I7cbee9892831a1e47704a283351fa97eda262343 Reviewed-on: https://gerrit.libreoffice.org/74639 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-21Add test clarifying behavior of INetURLObject::setName on empty pathStephan Bergmann
...as the commit message of f270bd15fed87a9cb0f8dfa73b34c617d66f59c2 "Fix INetURLObject::setName description" observes: "But for a hierarchical URL with an empty (i.e., just "/" in the canonic form) path, setName("foo") actually returns false." (I /think/ it should work for bIgnoreFinalSlash=false, but which had been removed from setName with 359e0b47a0f96ffa595a0c38a5e5318d797812fe "loplugin:unuseddefaultparams".) Change-Id: I063000625d55c589782fe855923107719709df3a Reviewed-on: https://gerrit.libreoffice.org/74504 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-21Extend INetURLObject::setName and drop INetURLObject::SetNameMike Kaganski
Change-Id: I488313eeb363d2a9344d6bc801900d5b1f913020 Reviewed-on: https://gerrit.libreoffice.org/74463 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-18loplugin:logexceptionnicely in toolkit..unoxmlNoel Grandin
Change-Id: I0a3126545f9ef98640f6dd166290e9b9e91b8355 Reviewed-on: https://gerrit.libreoffice.org/74244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-12Revert "improve empty tools::Rectangle (width)"Noel Grandin
This reverts commit a46a257794f1f53b294735fc876c394be23a3811. Too many issues, I'm going to try landing this in smaller pieces to make it easier to fix regressions Change-Id: Ie5e8979838017af86c119c887b580385ba068d54 Reviewed-on: https://gerrit.libreoffice.org/73859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-07improve empty tools::Rectangle (width)Noel Grandin
This is the width part, the height part will come next. Instead of storing "empty" as a special value (which is easy to get wrong, eg. some image filters pass in that special value, expecting it to be a valid width), just use separate boolean values for width and height empty. Also lots of code was calling GetBottom() or GetRight() on an empty rectangle, getting back that magic value and doing calculations on it, resulting in completely bogus data. So (1) make the various Rectangle methods do something reasonable when the empty flags are set (2) fix various other code to handle empty better (3) assert when code accesses Bottom or Right and the empty flag is set. Change-Id: I1163378cd2773dd8b386210f83400bb6b4701069 Reviewed-on: https://gerrit.libreoffice.org/73564 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-22New loplugin:dataStephan Bergmann
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-14Switch everyone to stricter GetColorErrorJan-Marek Glogowski
This replaces the variant in Color with the stricter one of BitmapColor. I couldn't find any reasoning for the lazy variant used in Color. Change-Id: I6dab3ab94a7f24ef5e80299d64267e3be8df888c Reviewed-on: https://gerrit.libreoffice.org/72234 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-05-13Make BitmapColor inherit from / merge into ColorJan-Marek Glogowski
BitmapColor itself is kept to distingish the Color usage as part of a color palette, which continues to store the offset in the blue value. The original special mbIndex handling is long gone since commit 1fefdd6f3b41 ("Alpha channel in BitmapColor - change bIndex to alpha"), so there is no data difference. This also results in the following changes: * now has a basic_ostream<charT, traits>& operator<< (that was my actual starting point... for an other bug fix) * there is a minimal difference for GetLiminance BGR(29,151,76) => BGR(28,151,77) * no more return values for Merge and Invert (previously returning *this) * replaces all GetBlueOrIndex with GetIndex This leaves one "problematic" part: the GetColorError handling. At first glance it should probably be virtual. The Color variant is less strict then the BitmapColor one - for whatever reason. BitmapColor is always used to search for the best match in a Palette. Currently I'm simply leaving both variants. Would be nice to have an explict for functions here. Change-Id: I251ba3024a1d60f2a9d9fde9cd0a60f08e8322a7 Reviewed-on: https://gerrit.libreoffice.org/72181 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-12regenerate PCH headersLuboš Luňák
Change-Id: I4894023e42cbfa32916ee3ddfb2cfb5426cfc69f Reviewed-on: https://gerrit.libreoffice.org/72195 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-10Remove temporary config.ini after the testAurimas Fišeras
Change-Id: I7bc0c6554b4d5e870a49740b2b7243d9a9246ca8 Signed-off-by: Aurimas Fišeras <aurimas@members.fsf.org> Reviewed-on: https://gerrit.libreoffice.org/72063 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-08AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete)Stephan Bergmann
__cxa_demangle uses malloc/free for memory management, see <http://itanium-cxx-abi.github.io/cxx-abi/abi.html#demangler> Change-Id: I57f8465d1c70fbef4537068fd3aefc52295e1c63 Reviewed-on: https://gerrit.libreoffice.org/71942 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-07fix leak in exceptionToStringNoel Grandin
need to release the pointer we get back from demangle Change-Id: I74f1065006fe0cd5da79d0ec5caa514d216be9a1 Reviewed-on: https://gerrit.libreoffice.org/71859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-30tdf#42949 Fix IWYU warnings in tools/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I47974f5c24819eb60e6724f42d51bb206dc26d21 Reviewed-on: https://gerrit.libreoffice.org/71557 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-30improve loplugin:stringconstantNoel Grandin
to find more places we can elide the OUString() constructor at call sites Change-Id: Ie09f3c61f2c4b4959c97dc98ebcbaf7c51d5d713 Reviewed-on: https://gerrit.libreoffice.org/71514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-27Decouple reading/writing of Color into GenericTypeSerializerTomaž Vajngerl
This adds GenericTypeSerializer, which is now responsible of serializing the Color into a stream (other types will follow), but only for the older version of the binary format. The new version we just write the sal_UInt32 mValue directly. This is a start of decoupling the serialization of generic types in tools and vcl module from the actual type, so we can in the future replace those with basegfx variant. Change-Id: I92738e7c178cac5cbca882dcbe45c80cc8269466 Reviewed-on: https://gerrit.libreoffice.org/71404 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-22cleanup and rename COLORDATA_RGB to color::extractRGBTomaž Vajngerl
Change-Id: I8d53c7010b4fea2a74e48f0649e944a498c211c7 Reviewed-on: https://gerrit.libreoffice.org/71003 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-22Replace compile time test with a static_assertTomaž Vajngerl
There is no need to check this in a test when we can do it directly in the header. static_assert will complain when compiling something that uses the header file instead of waiting that it finds a piece of code, where it is actually needed. The purpose of the test was the same (fail early). The main problem was that Color can be created and converted to sal_uInt32 string completely in compile time, so it can be used for "case" in a "switch" statement, which requires that in "case" it uses a constant. Normally this isn't possible unless we resolve and convert a Color to sal_uInt32 in compile time. This use-case is used somewhere in the code, but it takes a lot of (re)compiling to get to that piece of code, where it would eventually fail. Change-Id: I1f1f9b77c19a0e61f78ce703b380d98a569da833 Reviewed-on: https://gerrit.libreoffice.org/71060 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-21rework Color to have R,G,B,A public variablesTomaž Vajngerl
Color is a wrapper around a sal_uInt32 variable. With a union, separate channels R, G, B, A sal_uInt8 variables can be added that occupy the same memory. This makes it much easier to access each color component separately, which is used quite a lot by various algorithms. This also adds the variables to public so everyone can enjoy the benefits. Tests have been extended to make sure this doesn't break the existing algroithms. Change-Id: I2e78e12df68e8c7f0f49420eef5e659b335ee397 Reviewed-on: https://gerrit.libreoffice.org/71002 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-17Fix uses of variables before their lifetimes beginStephan Bergmann
All of those have been broken with recent loplugin:sequentialassign changes (and have been found with a new plugin to be commited). The code in SbUnoClass::Find (basic/source/classes/sbunoobj.cxx) looks suspicious, but has been effectively like that ever since at least c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just marked it with a TODO comment for now. Change-Id: I0d691cb55ef317cf2b16b0490169de7ec97375cf Reviewed-on: https://gerrit.libreoffice.org/70874 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-15improve loplugin simplifyconstructNoel Grandin
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-15loplugin:sequentialassign in test..toolsNoel Grandin
Change-Id: I3a6c5807c3262dde6756551e9e955c4ceae09b4f Reviewed-on: https://gerrit.libreoffice.org/70732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-03Revert "add more append methods to *StringBuffer"Noel Grandin
This reverts commit 8cfa7f4dc00f3dd37e57917ef25c806b0e9e6e73. comment from sberg: we already have 70519a43e0d89a6b5d89859a6851f8c757c6b0c7 "Replace OUStringBuffer::appendCopy with append(std::u16string_view)" (which can be extended to OStringBuffer if needed) Change-Id: Ifcc550a8cf26ef38ad49fde8b067f53c999c9276 Reviewed-on: https://gerrit.libreoffice.org/70178 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-03add more append methods to *StringBufferNoel Grandin
which performs the append without needing the creation of a temporary *String Change-Id: If9ad3222275f26659db2e7df8d34f068977c4d17 Reviewed-on: https://gerrit.libreoffice.org/69826 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06loplugin:unnecessaryparen improve member expressionNoel Grandin
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741 Reviewed-on: https://gerrit.libreoffice.org/68757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-21loplugin:indentation (macOS)Stephan Bergmann
* Some .m/.mm files that still contained tabs instead of spaces have been cleaned up with Emacs' untabify (and apple_remote/source/HIDRemoteControlDevice.m needed further manual adaptions): apple_remote/source/GlobalKeyboardDevice.m apple_remote/source/HIDRemoteControlDevice.m apple_remote/source/KeyspanFrontRowControl.m apple_remote/source/RemoteControl.m vcl/osx/a11yrolehelper.mm * Some of the changes predate 0626e66d761de18f62e4d00d427903032da9d517 "Avoid loplugin:indentation after preproc conditional inclusion lines" and would likely have no longer been flagged since. Change-Id: Ibf5faffa743c7f79b36109d9879eb79d63c8c40f Reviewed-on: https://gerrit.libreoffice.org/68090 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-19pretty up logging of exceptionsNoel Grandin
Add exceptionToString() and getCaughtExceptionAsString() methods in tools. Use the new methods in DbgUnhandledException() Add special-case case code for most of the exceptions that contain extra fields, so all of the relevant data ends up in the log Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece Reviewed-on: https://gerrit.libreoffice.org/67857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11loplugin:indentation in lingucomponent..toolsNoel Grandin
Change-Id: I96ed4c51ce3fe45c1cb69a7d7ff917f1e152462e Reviewed-on: https://gerrit.libreoffice.org/67607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09move and extend primitive2dxmldump to drawinglayerTomaž Vajngerl
Also needs extending the XmlWriter to output double numbers as the attribute content. Change-Id: Ie749ea990d856c8c90092ed8153c24efda99c444 Reviewed-on: https://gerrit.libreoffice.org/67573 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-02-08o3tl::make_unique -> std::make_unique in tools..xmloffGabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26 Reviewed-on: https://gerrit.libreoffice.org/67474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-05Move dubious file: -> smb: conversion from INetURLObject to file UCPStephan Bergmann
The Linux-only conversion of file URLs with a non-empty (other than "localhost") authority to smb URLs had been added in 2010 with 0b9ef81ba5ff08d85f21275222458a5b9b9e484c "tools-urlobj-smb-scheme-patch.diff: migrated" (applying a Go-oo patch?) but giving no rationale beyond "process relative SMB paths (in hyperlinks) correctly". That makes it hard to tell whether that patch is (still) actively useful for anything, or was just a misguided hack from the beginning: * Why make this Linux only? What about other non-Windows OSs? (On Windows, such URLs can be resolved as UNC pathnames.) If the reason for Linux-only was that it is the only OS where LO can handle smb URLs via GIO, why not make it conditional on ENABLE_GIO? * Why map to smb? There are various remote file access protocols. Hardcoding smb looks arbitrary here. Anyway, INetURLObject is arguably at a wrong level for such a patch. To not drop the hack wholesale, reimplement it in the file UCP, forwarding to a potential other UCP that can handle smb URLs any file://<host>/... URLs (rewritten as smb URLs) that the file UCP cannot handle itself. (file://localhost/... URLs will already have been normalized to file:///... by INetURLObject when they reach the file UCP, and even if they were not, the osl/file.hxx functionality underlying fileaccess::TaskManager::getUnqFromUrl knows how to handle them, so they will not take the forward-to-smb code branch.) (The corresponding #ifdef WIN code from 0b9ef81ba5ff08d85f21275222458a5b9b9e484c has already been removed with 82034b04e81b74a048595b0eac0f73581ecbc9e4 "tdf#119326 crash when adding "Windows Share" File resource".) (I came across that 2010 patch while looking into <https://bugs.documentfoundation.org/show_bug.cgi?id=107461> "Does not support 'file://' scheme with actual hostname". A next step would be to make the file UCP actually handle any file://<host>/... URLs that denote the local host.) Change-Id: I77242705dc4c6c1e9cb3a4f32253224ac6cb13cb Reviewed-on: https://gerrit.libreoffice.org/67372 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-02tools: use std::swap() in Rectangle::Justify()Miklos Vajna
Change-Id: If613c9e54f8b6178937f085c594d16a9b883ac10 Reviewed-on: https://gerrit.libreoffice.org/67263 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>