summaryrefslogtreecommitdiff
path: root/basegfx
AgeCommit message (Collapse)AuthorFilesLines
2016-07-20Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann2-10/+9
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. (cherry picked from commit 14cd5182c5f64c43581c82db8c958369152226ac) Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-07-20Fix typosAndrea Gelmini5-7/+7
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3 Reviewed-on: https://gerrit.libreoffice.org/21797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 534b2a4b58ba765dbc256d6297e33453524915e2)
2016-07-12update loplugin stylepolice to check local pointers varsNoel Grandin1-7/+7
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit e8fd5a07eca70912ddee45aaa34d434809b59fb7) Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
2016-05-25tdf#99130 use subdivision on B2DPolygon, angle based subdivisionTomaž Vajngerl2-30/+1
Remove the subdivider we used until now as there is a better way to subdivide a polygon with getDefaultAdaptiveSubdivision, which in additiona also caches the result. The subdivider used in getDefaultAdaptiveSubdivision was a limited count based subdivider so this exchanges that with an angle based one which gives much better results. Reviewed-on: https://gerrit.libreoffice.org/25033 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 37ed508022e0be8b793caa4748cfee634c1c8a9c) Change-Id: I95c009ccf3d54305df0d8eef177cab0df0a23bea Reviewed-on: https://gerrit.libreoffice.org/25381 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-29opengl: shader based polyline rendering - fixes tdf#97137 for OGLTomaž Vajngerl1-0/+29
Adds native opengl polyline rendering to draw polylines, line joins and line caps as triangle strips. The vertex shader allows for the dynamic line width by calculating the correct vertex posiitons, and the fragment shader is used for anti-aliasing. (cherry picked from commit d18ad8a7fb3257001a5045e11f3f770a48a7fa69) Change-Id: If7982c828cae1fae59c57194c8ac77e5ad7f1d26 Reviewed-on: https://gerrit.libreoffice.org/22706 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2015-11-20loplugin:unusedfields in basegfxNoel Grandin1-7/+0
Change-Id: Ibf7455fd20522ad52031089d2700533efc56c395 Reviewed-on: https://gerrit.libreoffice.org/20077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15Fast PCH generator and optimized PCH filesAshod Nakashian1-40/+59
Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-15use initialiser for Sequence<OUString>Noel Grandin1-2/+1
using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-13tdf#88352 correct triangulator numerical problemArmin Le Grand1-2/+5
The basegfx Triangulator is used in slideshow with canvas to triangulate the mask geometres. This uses tools::isPointInTriangle which uses basegfx::tools::arePointsOnSameSideOfLine. This uses the cross product to solve and for tests against zero the fTools::equalZero call. The triangulator then uses the more precise rtl::math::approxEqual to test if one of the points of the triangle is equal to the test point. In rare cases this can lead to a position where a point is seen as inside the triangle wrongly because it is not detected as equal to one of the triangle points. To solve, use increased accuracy. Change-Id: I73e12b711f14d4c48e829d5db1cadefa0917c19b Reviewed-on: https://gerrit.libreoffice.org/19925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-11-11new loplugin: memoryvarNoel Grandin1-3/+2
detect when we can convert a new/delete sequence on a local variable to use std::unique_ptr Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc Reviewed-on: https://gerrit.libreoffice.org/19884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann16-74/+74
Change-Id: Ib64fc63905cf44a0d32393d52ee587d0aa2d9dfa
2015-10-30basegfx tree cleanupMario J. Rugiero5-58/+30
- Eliminated an unnecessary boost/bind.hxx include. - Replaced simple old-style for loops that iterated over a container by ranged based for loops. - Replaced for_each by ranged based for loops wherever valid. Change-Id: Ib5c8291cf6d417047b350560f0428723efeccd1c Reviewed-on: https://gerrit.libreoffice.org/19679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-27loplugin:unusedmethodsNoel Grandin5-112/+0
Change-Id: I73180266c0af98dbd8d29bd3b11850996b94def9 Reviewed-on: https://gerrit.libreoffice.org/19195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-10-26WaE: loplugin:defaultparamsTor Lillqvist1-2/+1
Change-Id: Ibb93059d4adab6b672cb9122b2dc8fe8af5bbbd6
2015-10-26Replace boost::bind by lambdas in basegfx tree.Mario J. Rugiero3-38/+14
Change-Id: I8f72bec11b5dfd71cc60a18b980629c176d43f49 Reviewed-on: https://gerrit.libreoffice.org/19595 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-22coverity#1326120 try and silence Constant expression resultCaolán McNamara2-4/+4
Change-Id: Iafd034dd51135ad99f56279ceee1c770f91436b0
2015-10-20loplugin:defaultparamsStephan Bergmann1-2/+1
Change-Id: I44f3c4c2b6adf766f569f90367dcc294ec734616
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann6-22/+22
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-1/+1
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-05clang-analyzer-deadcode.DeadStoresStephan Bergmann2-5/+0
Change-Id: Id2d7c2aa0ba1783710a141bd910af785ecf81f8a
2015-09-30Fix typosAndrea Gelmini4-5/+5
Change-Id: Ie0e941d48457d758525353d6c5cf858652f86fd3 Reviewed-on: https://gerrit.libreoffice.org/18938 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-29loplugin:removeunusedmethods, remove unused stuffNoel Grandin1-22/+0
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-09-18boost->stdCaolán McNamara2-7/+6
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0 Reviewed-on: https://gerrit.libreoffice.org/18670 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-11loplugin: defaultparamsNoel Grandin5-9/+9
Change-Id: I29ef505ee77965df33677f8051ec39398ef0c74e
2015-07-20com::sun::star->css in basegfxNoel Grandin6-70/+70
Change-Id: I27f28e6a09e8bc9e90f0b60a7ac8519b2ab41860 Reviewed-on: https://gerrit.libreoffice.org/17166 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-14Revert "Avoid loplugin:staticmethods in non-debug build"Stephan Bergmann1-1/+0
This reverts commit d0ba487bae3a0f6d1fcb9af13397c85e70ad8e1b, obsoleted by cbce40e965acef51822b31d73da5fbc271fbcad0 "Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug builds."
2015-07-10do not include boost/utility.hppMichael Stahl2-2/+2
It just includes a bunch of other boost headers; mostly we need boost/noncopyable.hpp so include that directly. This eliminates 831 MB(!) of boost/preprocessor/seq/fold_left.hpp completely, which is the 2nd biggest header after ustring.hxx. Change-Id: I3df55770adcb46e56f389af828e8ba80da2dc1f2
2015-07-08Avoid loplugin:staticmethods in non-debug buildStephan Bergmann1-0/+1
Change-Id: Ie943f6a998f142014c0405892264c8257dccaf6f
2015-07-08s/Coordiante/CoordinateTor Lillqvist2-61/+61
Change-Id: Iac584b09844b5877586061e9a44b1f7473bffed4
2015-07-08Fix typosAndrea Gelmini1-1/+1
Change-Id: I70b03c152f63e48341dc5629a99b0eeab7b497c0 Reviewed-on: https://gerrit.libreoffice.org/16834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-07-07Fix some misspellingsTor Lillqvist2-2/+2
Change-Id: Iff2303650e1dcfc56064907a28df1c4c452eac56
2015-07-04Fix typosAndrea Gelmini3-3/+3
Change-Id: I75b4ad61785bf0ba1cb07735d938c0977356b8cc Reviewed-on: https://gerrit.libreoffice.org/16705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-06-30Fix typosAndrea Gelmini2-2/+2
Change-Id: I1c5e4970d4e90bdea68a901294594104de5e189e Reviewed-on: https://gerrit.libreoffice.org/16582 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-28Fix typosAndrea Gelmini2-2/+2
Change-Id: Ifd126a535f18db79a18aaec61b76cdf26ab33dff Reviewed-on: https://gerrit.libreoffice.org/16522 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-22Fix typosAndrea Gelmini2-2/+2
Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b Reviewed-on: https://gerrit.libreoffice.org/16408 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-21Fix typosAndrea Gelmini1-1/+1
Change-Id: I2297bf392a405f02be2450f4624f1c9fc0b512ce Reviewed-on: https://gerrit.libreoffice.org/16373 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-16Fix typosAndrea Gelmini1-1/+1
Change-Id: I28cfc629dc3d6ef54128615452667ccce86c1072 Reviewed-on: https://gerrit.libreoffice.org/16297 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-14cppcheck: redundantCondition [part1]Julien Nabet1-2/+1
Change-Id: I21c5340e7b5ec09248b08aa76f43acf883c56cd8
2015-06-11Typo: vertival -> verticalAndras Timar1-2/+2
Change-Id: I3dce3d131ce78713333d6e4bc2f3e839af5e04ec
2015-06-04Removed getNormal() from polygontools, it just calls B3DPolygon::getNormal()Zsolt Bölöny1-5/+0
Change-Id: I5a59ff8e0db1aee52d0b683c9c64e4b18b64e66b Reviewed-on: https://gerrit.libreoffice.org/16077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-04uno::Sequence provides now begin and endNoel Grandin1-3/+1
use begin() and end() when calling std::copy on an uno::Sequence Inspired by commit b34b648fc3262c5d9aa295f621e8fe9c97d4c6b2 "uno::Sequence provides now begin and end" Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b Reviewed-on: https://gerrit.libreoffice.org/16057 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-04convert B2DLineJoin to scoped enumNoel Grandin1-7/+7
Change-Id: I4fb8f2c9e2080e3aa542d2ccf838e6784baa8429
2015-06-04convert B2VectorContinuity to scoped enumNoel Grandin6-14/+14
Change-Id: Ifa401dd0d2d1bef8c0ae2987d2aee86100b59816
2015-06-04convert B2VectorOrientation to scoped enumNoel Grandin10-79/+79
Change-Id: Id7e444bc896ae5d52e5a0bd1b471679c4945afa4
2015-06-02Replaced boost::tuple with std::tupleZsolt Bölöny3-8/+5
Change-Id: Ia001c8e1e00df85d2be93e330811a1081179785d Reviewed-on: https://gerrit.libreoffice.org/15816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-01Remove B1IRange, it's not used anywhereZsolt Bölöny2-3/+0
Change-Id: I2eeded849b9b36611407e8ecc545d7801939e4c9 Reviewed-on: https://gerrit.libreoffice.org/15815 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-01Remove B1IBox, it's not used anywhereZsolt Bölöny1-60/+0
Change-Id: Ifff5fc008552f80fcbb705013c1f578f5f825b24 Reviewed-on: https://gerrit.libreoffice.org/15814 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-28new clang plugin: loopvartoosmallNoel Grandin5-12/+12
Idea from bubli - look for loops where the index variable is of such size that it cannot cover the range revealed by examining the length part of the condition. So far, I have only run the plugin up till the VCL module. Also the plugin deliberately excludes anything more complicated than a straightforward incrementing for loop. Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015
2015-05-27Remove B3IPoint, it's not used anywhereZsolt Bölöny2-70/+0
Change-Id: I7031c126179bbceebc40dcbdab5a0570db5bc29f Reviewed-on: https://gerrit.libreoffice.org/15813 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-27B3IVector is not used anywhereZsolt Bölöny2-42/+0
Change-Id: Ic439b33c974500f1b351b41a0e391ffec71007b3 Reviewed-on: https://gerrit.libreoffice.org/15808 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>