summaryrefslogtreecommitdiff
path: root/basegfx
AgeCommit message (Collapse)AuthorFilesLines
2021-04-19Updated README.md filesHossein1-1/+1
* Updated README.md contents to fix various issues * Fixed source links by using [git:], processed by mkdocs scripts * Added README.md for ios, setup_native, unotest * Fixed issues with "underline" and "less than" sign Change-Id: I3e52a1d3372586c390ee6c42a2ef48bbabc81398 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114248 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-09Recheck include/ with IWYUGabor Kelemen1-0/+1
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein1-1/+3
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-01tdf#124176 Use pragma once instead of include guardsrounak1-4/+1
Change-Id: I778393686b9a51df6437c61a814e5c62a34302de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113433 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-26Drop these definesMike Kaganski1-4/+2
Change-Id: I7ff56d6f016ea90c4b5cdcbbb36141627037c0ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113125 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein1-0/+0
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-09Make sal/config.h the first in pchMike Kaganski1-2/+2
By convention, it should be the first include in C/CXX files; so use of pch should not break that. Change-Id: Ic329c5f39e8f48ad1778724368e262e48972342b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112123 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-08update pchesCaolán McNamara1-1/+2
Change-Id: Icf55ddda055d11b649e7607c2cdd8b6d6ddfefbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110483 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-08Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b)Stephan Bergmann1-2/+2
...by re-enabling the code temporarily #if'ed-out in a528392e71bc70136021be4e3d83732fccbb885e "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-02Added Unit test to BColorModifierDeb Barkley-Yeung2-0/+189
Change-Id: I19aee93f68e5e01ef99f8447db4ffb1f68acaaa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109853 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-02tdf#139002 dont hang opening pathological SVGsNoel Grandin1-0/+7
This is a workaround, but (a) this contains several pathological SVGs, which have clearly been very badly created eg. an svg path with 2699660320 elements. (b) the diagrams all look fine to me, so clearly the winding-rule change is not that critical in this case Change-Id: I48aac512e2de2ae4e63a4d1816c3d4d5901b3bf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110242 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-31basegfx::utils::applyLineDashing simplify !aLineTargetCallBack checksDr. David Alan Gilbert1-10/+4
cppcheck points out that there's an early check and return for !aLineTargetCallback: if(fTools::lessOrEqual(fDotDashLength, 0.0) || !aLineTargetCallback || !nPointCount) { .... return; } so we don't need to test it later. Change-Id: I93fead38ced03ad52c6a81701902cf9deda3bb58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109847 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-24Use ContainerType().swap and avoid local variablesMike Kaganski1-5/+2
Change-Id: I773555180758a97aff37f9bc27de83c355d71521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-09fix coverity parse errorsCaolán McNamara3-7/+7
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-27std::list::size() has constant complexity since C++11Jochen Nitschke1-9/+3
Change-Id: I18cfbf84e1ca2cc6d3a7e7f01e943ef8afb23362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108334 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-26New loplugin:stringliteralvarStephan Bergmann3-10/+10
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-16replace std::min(std::max()) with std::clampNoel1-4/+4
Change-Id: I76e34e8020d98292e8ffde387542b7029f85a42d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-13tdf#123936 Formatting files in module basegfx with clang-formatPhilipp Hofer3-35/+23
Change-Id: I29bfa5de3bfd8ad2989cba0269f48f79edd58fd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105645 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-12New loplugin:stringviewparamStephan Bergmann2-6/+10
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-05tdf#42949 Fix new IWYU warnings in directories [ab]*Gabor Kelemen8-8/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib0008b9bb095f27e5e436d6b507dc709ab7bf01a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105313 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-30tdf#124176 Using pragma once instead of inclusive guardsdiwanshu8852-8/+2
Change-Id: I39f34dc94e0df09e6951c26a90a666553cadf4d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105036 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-10-24tdf#124176 Using pragma once instead of include guardsBetül İnce1-4/+2
Change-Id: Ib8cfeb774851afd62e2bd5b29b0d61d52a0dbad9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104694 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2020-10-23tdf#124176 Using pragma once instead of include guardsgizemozgun1-4/+1
Change-Id: I2f2470f509ff4a6cef5962755c6de86ebf1a89a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104708 Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Tested-by: Jenkins
2020-10-21use tools::Long in basegfx..chart2Noel1-8/+8
Change-Id: Ide4014348d51f0b5f59e1e91b8d41c7748853254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-06loplugin:const* make some params and methods constNoel2-4/+4
Change-Id: If7fbb25037343e18081a8ee7064840d75e9a45a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104010 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-03Add unit tests to B2DPointDeb Barkley-Yeung1-0/+124
Change-Id: I760721a691730dc588f271a5b51f7e1ffcc6eef7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101818 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-02drop unused MinimalSystemDependentDataManagerCaolán McNamara1-38/+0
Change-Id: I6e5413bb79acac93abfb8398550c157e7b667a67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101942 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-30Fix typo in codeAndrea Gelmini1-1/+1
Change-Id: If6683cd134e9bd675ec9b6f9a59fa667ebb41da0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101647 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-17Fix typosAndrea Gelmini1-2/+2
Change-Id: Id31299912b822baf9eecbb03cba53339f0528ae8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100867 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-14loplugin:simplifybool moreNoel Grandin2-6/+6
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-07tdf#133477 basegfx: fix center of rotated gradientsTünde Tóth1-3/+3
in the case of square and quadratic gradient styles. Change-Id: I2e5522930b472bf2ee702c780f39aa187bd7b64f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95356 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-26basegfx: remove completly useless namespace opening and closingArnaud Versini1-27/+0
Change-Id: I6959e9eabd6623435cc534c55869a844b0f207d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16compact namespace: basegfx,canvasNoel Grandin2-10/+4
Change-Id: Idc808459b403bcdcccbd86b73dd22b424e507c8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98897 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16merge needlessly split polygons back in Skia drawing (tdf#133016)Luboš Luňák2-0/+104
There are places in LO code that needlessly split polygons into a group of adjacent polygons. These should theoretically result in the same, but only if antialiasing is not used (where Skia has a problem and according to Skia developers that's not really Skia's fault). So whenever a possibly problematic polygon is asked to be drawn, delay it and try to merge it with followup polygons back into one polygon where those needlessly created problematic edges do not exist. This is indeed just a hack and those problematic places should be fixed, but oh well :/. Change-Id: I1b03fe7c2f5e8c962b0dcb8962196b7fea090146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98887 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens1-1/+1
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-30Upcoming improved loplugin:staticanonymous -> redundantstatic: basegfxStephan Bergmann1-1/+1
Change-Id: I66b7e0fd74c7ce57cd2859e189caadb84be4d541 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97521 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin1-2/+1
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-02basegfx: test of coordinate system conversionTomaž Vajngerl1-0/+32
Change-Id: I059d1f272f0633c450287f272083bb09732357b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95304 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-28loplugin:simplifybool in accessibility..basicNoel Grandin2-2/+2
Change-Id: Ibf6cef4baa2d3d400d953ac8bc97a66b5901def9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-19tdf#88205 EasyHack change css::uno::Sequence initializationsvgeof1-4/+3
1st commit. Use initializer lists for uno::Sequence in 4 files Change-Id: I0192b4b8f023fb8d606dff81c4b910c8c7c2a9a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93900 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-05-15use for-range on Sequence in basctl..canvasNoel Grandin1-4/+4
Change-Id: Idad3d8fbe785c7b1b8b287a3227372adb2757de8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94260 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-04Fix typoAndrea Gelmini1-1/+1
Change-Id: Ic084ebbc04731b362bac0cf51e4b2bbdf5ef0526 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93208 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen6-0/+6
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-19loplugin:flatten in basegfxNoel Grandin13-1106/+1106
Change-Id: Ic8bc586e1a4977322dcb371c0fff6411783df9d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92484 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14loplugin:buriedassign in b*Noel Grandin6-6/+12
Change-Id: Ic20f46105a30b54bc5a991b4070e6c8edb15376e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-30OSL_ASSERT->assert in basegfxNoel Grandin1-1/+1
Change-Id: I7ff49d327e435e2d6ea5f8bdcf7ce8d5302eea1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-30remove Matrix class from basegfx, convert B2DHomMatrix testsTomaž Vajngerl1-122/+59
The common test cases of MAtrix and B2DHomMatrix are just converted into additional test cases for B2DHomMatrix. Change-Id: I8ed2f6d25263797b21a844e209e910a8a3f2a347 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91342 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-29basegfx: test B2DHomMatrix and Matrix togetherTomaž Vajngerl1-0/+126
This adds a test for B2DHomMatix and Matrix to test them together. Ther reason for this is that we can remove Matrix in favour to B2DHomMatrix, but first we need to make sure it is safe so by checking that the operations in Matrix yield the same result as with B2DHomMatrix. Change-Id: Ia93c1d3c7b2b7ff257c35831ff31afad3e8f34ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91312 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-23make more classes private in mergedlibs modeNoel Grandin1-0/+1
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-14tdf#130974 replace `rtl::math::isSignBitSet` with `std::signbit`.Yukio Siraichi1-1/+1
Change-Id: I91235eee8c6a9d4a59c1933527b49141f64cd91b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90478 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>