summaryrefslogtreecommitdiff
path: root/basegfx
AgeCommit message (Collapse)Author
2020-06-09basegfx: test of coordinate system conversionTomaž Vajngerl
Change-Id: I059d1f272f0633c450287f272083bb09732357b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95304 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit b5dee02018f9f7cd8d9afc6e8991e6e20ebb0e81) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95915 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-07remove Matrix class from basegfx, convert B2DHomMatrix testsTomaž Vajngerl
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> (cherry picked from commit 4501a0ba623ad61c5a4e0b807da2e96f0e4ce82c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95699 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-06basegfx: test B2DHomMatrix and Matrix togetherTomaž Vajngerl
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> (cherry picked from commit 60f14ad158801183519ff929167b8526b7941670) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95640 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-23tdf#129845: Better solution using already existing infoArmin Le Grand
Use calculateCombinedHoldCyclesInSeconds() in central places of system-dependent buffering and the zero value to early exclude data from buffering. This solves the problem on all system-dependent usages in a central place. Also enhanced to roughly allow buffering for bitmaps unchanged, for polygons starting with ca. 50 coordinate pairs. Added special treatments to Cairo version to allow temp buffer objects without copying the path data. This needed some extra stuff due to Cairo not allowing to work with it's cr-internal path object directly. Change-Id: Icd0a0d8091707fe356a82f5c7ec48f36ad44ccde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87199 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2020-05-14tdf#130655 added callback interface to ::applyLineDashingArmin Le Grand (Collabora)
This version of the tooling method allows to avoid collecting line snippets in a return value PolyPolygon. Instead, offer lambda functions to get callbacks for created snippets. The original method using a B2DPolyPolygon return value is adapted to already use this, so serves as example of usage and ensures that only one identical algorithm is used. (cherry picked from commit 0dc4fddb9c76a3f4682eca4059b42a079e74e735) [ Fixes the cui/ build. ] Change-Id: Ie306968a895ad280fc2425fb40b3244769216ba0
2020-03-17tdf#130150 Improve clipping in PDF exportArmin.Le.Grand (CIB)
For more info and discusson please have a look at the task. It reverts the change from tdf#99680 which did a wrong paradigm change in how clip in Region(s) is defined and tries to fix the underlying error in a more correct way. This includes problems noted in tdf#44388 and tdf#113449. This is a decent improvement, but - due to dealing with numerical problems - not yet the whole healing. Still thinking about how to solve this for good. Adapted PdfExportTest::testTdf99680() and PdfExportTest::testTdf99680_2() as needed, empty clip regions are allowed again. Added comments, too. Had to change solvePolygonOperationAnd to work on ranges if both inputs *are* ranges. The AND-case is then completely solvable. Also increased geometry for transformations of clip geometries - may help later. Change-Id: I2370447597faa6efb81d58ee31c63654e304262e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89874 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 6dff631f8f4b964b48aadde52a1e1b8b04b9ba53) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89923 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-22Adapt SAL_WARN to C++20 deleted ostream << for sal_Unicode (aka char16_t)Stephan Bergmann
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html> "char8_t backward compatibility remediation", as implemented now by <https://gcc.gnu.org/ git/?p=gcc.git;a=commit;h=0c5b35933e5b150df0ab487efb2f11ef5685f713> "libstdc++: P1423R3 char8_t remediation (2/4)" for -std=c++2a, deletes operator << overloads that would print an integer rather than a (presumably expected) character. Change-Id: Ic70d3e90e4b990d297e35f07379fe4952e138820 Reviewed-on: https://gerrit.libreoffice.org/84321 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit b8bb7fd853db5d0d7cc4ea9120efb1a707e46c22) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87211 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2019-10-26size some stringbuffer to prevent re-allocNoel Grandin
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512 (e.g. in emfio/). Change-Id: Ib7caf35a1b7e42b0e4ed8aa812493449e3eefc8f Reviewed-on: https://gerrit.libreoffice.org/81540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-07cid#1454631 Logically dead codeCaolán McNamara
Change-Id: Ie2850a38db3d2e343d9fc19e245eb97238196110 Reviewed-on: https://gerrit.libreoffice.org/80339 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-28loplugin:virtualdead in basegfxNoel Grandin
Change-Id: I8b3f7810eb08b5217df30b7be27aafadeeed247a Reviewed-on: https://gerrit.libreoffice.org/79647 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-23do not require $(SRCDIR) in every gb_Library_set_precompiled_headerLuboš Luňák
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c Reviewed-on: https://gerrit.libreoffice.org/79360 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-08-19loplugin:constvars in accessibility..basegfxNoel Grandin
Change-Id: Id6a0b48c3440be394419e87bd7a4f63bd0a1e758 Reviewed-on: https://gerrit.libreoffice.org/77721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): basegfxStephan Bergmann
Change-Id: Ic9aa3163bdddc84e69f346320e201e9db628ef98 Reviewed-on: https://gerrit.libreoffice.org/76696 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-28loplugin:oncevarNoel Grandin
Change-Id: I3c014f53607a849c743a2fd1aa47d03d5af978fb Reviewed-on: https://gerrit.libreoffice.org/76495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-28unit test for B2DPointTomaž Vajngerl
Change-Id: I86a9d555e4915658acf5829fbf7c8336255d6343 Reviewed-on: https://gerrit.libreoffice.org/76490 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-19loplugin:referencecasting in avmedia..basicNoel Grandin
Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014 Reviewed-on: https://gerrit.libreoffice.org/75934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-09Fix typoAndrea Gelmini
Change-Id: I176857689f0594ba2814b419a0ec1f8ce3423c2a Reviewed-on: https://gerrit.libreoffice.org/75260 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-07-06Fix typoAndrea Gelmini
Change-Id: I14ec3a1351ec3fc32f4ead36886a06bb5fd5efe9 Reviewed-on: https://gerrit.libreoffice.org/75150 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-01Improve the looks of a wave line by draw it with bezier curvesTomaž Vajngerl
This adds drawing the wave line (typically used to underline the wrongly spelled words) with bezier curves. Previously the wave lines were drawn with drawing pixels, which didn't look that good, especially on HiDPI display, so the looks of wave lines now is therefor much better. The creation of the wave line as a polygon has been added to the basegfx module, so it can be reused if needed. In addition, everytime we draw the waveline, we have to enable antialiasing, to have a much better quality of the curves. By default the antialiasing is disabled for some reason. This also adds ScopedStates.hxx file which currently includes ScopedAntialiasing, which sets the antialiasing to a certain state for the time the object is in scope, and then sets it back to the original state. Change-Id: I4b866fc5d69725eb7f6f78a1acf4176b1205aa73 Reviewed-on: https://gerrit.libreoffice.org/74810 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-06-28add appendQuadraticBezierSegment to B2DPolygonTomaž Vajngerl
This adds a convenience method to B2DPolygon to add a quadratic bezier segment, which converts its one control point to two control points of a cubic bezier segment. The SVG path import is also modified to use this new method instead of converting inside the importer itself. Change-Id: I96e9b306066d9ccf2542b17a117db01fa235f405 Reviewed-on: https://gerrit.libreoffice.org/74809 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-05-14Revert "drawinglayer: avoid AA for hairline polygons built from ...Miklos Vajna
.. hori/vert lines only" This reverts commit f8b4d371eddd27594d549fb00294c01229a9bd24. Tomaz considers this ugly and it's no longer needed since commit 93abdf39b01bb7b404dc09ef37369a4350fb0d10 (sw lok: assume no windows in SwLayoutFrame::PaintSwFrame(), 2019-05-14). Conflicts: basegfx/test/B2DPolygonTest.cxx Change-Id: Ia9b29921ff3e5d82085e1abf9f39c172357a5e13 Reviewed-on: https://gerrit.libreoffice.org/72297 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-11Fix typoAndrea Gelmini
Change-Id: I3ba8dc5a2519a85a2da88f1d40832dd2fb6c10a6 Reviewed-on: https://gerrit.libreoffice.org/72144 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
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-09drawinglayer: avoid AA for hairline polygons built from hori/vert lines onlyMiklos Vajna
For one, it seems this was the intention already since commit 85c70f37b56299f6fa02312c0fb73cc55af084ef (CWS-TOOLING: integrate CWS aw063, 2009-03-04): "suppress AntiAliasing for pure horizontal or vertical lines". For another, this fixes the TileCacheTests::testTileWireIDHandling() testcase in online.git, which assumes that the indicators at the corners of the Writer body frame (paragraph marks hidden / default case) can be painted multiple times, producing pixel-by-pixel matching results. But in reality AA breaks that assumption, and we know these indicators are never diagonal lines. Change-Id: Ib74f823165799991296b64cee58ec106dbdcedcf Reviewed-on: https://gerrit.libreoffice.org/72000 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-08Fix typoAndrea Gelmini
Change-Id: Iea5bd392f82e26e3c60ca332ae4bea942888e236 Reviewed-on: https://gerrit.libreoffice.org/71928 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-12loplugin:sequentialassign in accessiblity..canvasNoel Grandin
Change-Id: I984717138ac85c1af5fc363fda06f5c2b5497965 Reviewed-on: https://gerrit.libreoffice.org/70641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-04Fix typoAndrea Gelmini
Change-Id: I455817e1caa35ce61a40b8d473ae9a132677b2f2 Reviewed-on: https://gerrit.libreoffice.org/70230 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-01Fix typoAndrea Gelmini
Change-Id: Ib38d3dd25f15ce403ee9ff461a94331a4a7c24ac Reviewed-on: https://gerrit.libreoffice.org/70019 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-16Simplify containers iterations in basctl, basegfx, basic, bridgesArkadiy Illarionov
Use range-based loop or replace with STL functions Change-Id: I8594740103bdc2091c2d03d4b92bbe8393f5378c Reviewed-on: https://gerrit.libreoffice.org/69223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-08new loplugin constvarsNoel Grandin
detect static variables that can be made const. Thanks to mike kaganski for suggesting this. Here I introduce a new plugin feature - using markers in nearby comments to disable the plugin for specific vars. Some of this stuff was old debugging code. I removed the stuff that was older than 5 years. Change-Id: I6ec7742a7fdadf28fd128b592fcdf6da8257585c Reviewed-on: https://gerrit.libreoffice.org/68807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27loplugin:simplifybool improve search for negated operatorNoel Grandin
Change-Id: Id6ac35fefa5c3e1f64c222713791e849b3cb4d34 Reviewed-on: https://gerrit.libreoffice.org/68379 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-19Fix typoAndrea Gelmini
Change-Id: I3db38c6294aaaa4fe6c91fac83f1f1c087398b6a Reviewed-on: https://gerrit.libreoffice.org/66954 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-02-18tdf#42949 Fix IWYU warnings in basegfx/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ic8476ddc7805546f2f6f253f282ac976bb3b7bd6 Reviewed-on: https://gerrit.libreoffice.org/67699 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-08loplugin:indentation in basctl..bridgesNoel Grandin
Change-Id: Ie4e27466c4258c6f774a3ebb82ec3a88c28fd753 Reviewed-on: https://gerrit.libreoffice.org/67525 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-01Fix typosAndrea Gelmini
Change-Id: Ib748f39705cb4cee9f331e1d048a3f531116c616 Reviewed-on: https://gerrit.libreoffice.org/67242 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-01-29b2dpolygontools: removing debug code, doesn't seem to be usefulTomaž Vajngerl
Change-Id: Id1aff2ede83e4c35976ebd51fc05aeea80dfae20 Reviewed-on: https://gerrit.libreoffice.org/67049 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-01-28split basegfx 2d tests to separate files (one per tested class)Tomaž Vajngerl
Change-Id: Icb2f745851ba3de31f6a672d1bc20659de687d2e Reviewed-on: https://gerrit.libreoffice.org/67031 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-01-28basegfx: just use the std::clamp for clamping the inputTomaž Vajngerl
Change-Id: Ia7d6c103956c8e3cebd6ebe656fd88586d33a9c8 Reviewed-on: https://gerrit.libreoffice.org/67032 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-01-24loplugin:constparams in basctl..chart2Noel Grandin
Change-Id: I9ac9a34ba58f411d5aad235407553df63216319c Reviewed-on: https://gerrit.libreoffice.org/66791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-13basegfx: Kill empty .cxxTakeshi Abe
Change-Id: I5bf94400d787bd57396870878d3ae7bd1e36e22d Reviewed-on: https://gerrit.libreoffice.org/66263 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-11Drop o3tl/clamp.hxx, use C++17 std::clamp insteadStephan Bergmann
Change-Id: I5043c787dcc3b78bc7fdff130564801194e39f46 Reviewed-on: https://gerrit.libreoffice.org/66177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-10EmptyBPixel is unusedStephan Bergmann
...since b62826ad3887305a76ee1ceabe2060f9d6e8723f "Remove more unused methods" BPixel was marked BASEGFX_DLLPUBLIC, but all its member functions are defined inline in include/basegfx/pixel/bpixel.hxx, and basegfx/source/pixel/bpixel.cxx was the only .cxx from Library_basegfx that included it. So on Windows, non- inline implementations of the BPixel member functions are no longer exported from Library_basegfx, even though code in drawinglayer using BPixel expects that (and would thus start to fail to link on Windows). So just not mark that all- inline BPixel class as DLLPUBLIC. Change-Id: I7553a7ac5a57b5d175d7c81b3908ad7b80b064c3 Reviewed-on: https://gerrit.libreoffice.org/66043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-10Replace uses of rtl/instance.hxx with plain local static vars in basegfxStephan Bergmann
Change-Id: I13fbecf59e99547bbe85124dc9aa2777eef015d7 Reviewed-on: https://gerrit.libreoffice.org/66072 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-09EmptyTuple is unusedStephan Bergmann
...since b3c3e116ff0eb9b550b73d3901395c042e31d192 "unusedcode.easy: Removed unused code" Change-Id: I472af471c82676b226685bf67ee90857b6607c5e Reviewed-on: https://gerrit.libreoffice.org/66045 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-31cppcheck: Consider using std::count_if algorithm instead of a raw loop.Tóth Attila
Change-Id: I994910cfba1d2ec63f48094f1ef5c52226ecf322 Reviewed-on: https://gerrit.libreoffice.org/65776 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-25Fix typoAndrea Gelmini
Change-Id: I994a7a6c98d2e6ba32d5e005e204e9ec1f8be44b Reviewed-on: https://gerrit.libreoffice.org/63999 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-25Fix typoAndrea Gelmini
Change-Id: I8e90b4592d041e63bd2efa914446db96dd293ac9 Reviewed-on: https://gerrit.libreoffice.org/63964 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>