summaryrefslogtreecommitdiff
path: root/include/cppcanvas
AgeCommit message (Collapse)Author
2020-05-03use more compact namespace syntax in /includeNoel Grandin
excluding the UDK headers of course Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-02remove some unused headersNoel Grandin
found with a little python script(include) and some grepping, so probably not 100% reliable. Change-Id: I1a26a37ef7297c2cc07ed5fd2e0af45280e64c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87824 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-30Avoid -Werror,-Wdeprecated-enum-float-conversionStephan Bergmann
...with recent Clang 10 trunk: > slideshow/source/engine/shapes/viewshape.cxx:813:81: error: arithmetic between enumeration type 'cppcanvas::Canvas::(anonymous enum at include/cppcanvas/canvas.hxx:57:9)' and floating-point type 'double' is deprecated [-Werror,-Wdeprecated-enum-float-conversion] > const double nXBorder( ::cppcanvas::Canvas::ANTIALIASING_EXTRA_SIZE / rViewTransform.get(0,0) ); > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I30b8457250545a9a16b2e29f94e0623175f43ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85968 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-16tdf#42949 Fix IWYU warnings in include/Gabor Kelemen
Recheck directories in include/ between vcl and svx in the module hierarchy Found with bin/find-unneeded-includes Only removal proposals are dealt with here. New IWYU and recent developments in f-u-i helped to identify some non self contained files, those were fixed too. Change-Id: Ieab6083ee2aae33baf32d05943b07ad2de6f9d7f Reviewed-on: https://gerrit.libreoffice.org/75170 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-05tdf#42949 Fix IWYU warnings in include/cppcanvas/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I8174b6e684b5b46a8abd3ca825b7de75f9255df3 Reviewed-on: https://gerrit.libreoffice.org/68703 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-28remove some unused typedefsNoel Grandin
Change-Id: I7775a7d86e9641cd514e58f03d3727d2ad846120 Reviewed-on: https://gerrit.libreoffice.org/68485 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-28Silence bogus GCC 8 -Werror=virtual-move-assignStephan Bergmann
...seen with at least gcc-c++-8.1.1-1.fc28.x86_64 and gcc-c++-8.1.1-5.fc28.x86_64 after 5065bcf513147c1b92edc9d393768b01bc693c3a "cppcanvas: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)" and 6844ef8a7ed9b253b6cca4c8d8aec54ef05d013e "cppcanvas: avoid -Werror=deprecated- copy (GCC trunk towards GCC 9)": > [CXX] cppcanvas/source/wrapper/implbitmapcanvas.cxx > In file included from cppcanvas/source/wrapper/implbitmapcanvas.hxx:26, > from cppcanvas/source/wrapper/implbitmapcanvas.cxx:28: > include/cppcanvas/bitmapcanvas.hxx:41:11: error: defaulted move assignment for ‘cppcanvas::BitmapCanvas’ calls a non-trivial move assignment operator for virtual base ‘cppcanvas::Canvas’ [-Werror=virtual-move-assign] > class BitmapCanvas : public virtual Canvas > ^~~~~~~~~~~~ Change-Id: I5348eb110c147957347554504a7e7c6d7fb32b70 Reviewed-on: https://gerrit.libreoffice.org/58185 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-26cppcanvas: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc. Change-Id: Ifa6e6f71f73b9d0a577de1a90cbf3a8c969ac062 Reviewed-on: https://gerrit.libreoffice.org/58073 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-25loplugin:unused-returns in basegfx..cppcanvasNoel Grandin
Change-Id: I32dc8c92871c8349651d2f4204a332d387e6e1b2 Reviewed-on: https://gerrit.libreoffice.org/48428 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-09remove cppcanvas Color classNoel Grandin
which actually does nothing useful. Looks like it was originally intended to be used to implement color profiles, but since nothing has happened on that front since it was created, safe to say it never will. Probably not the right place in the graphics stack to do it anyhow. Change-Id: I36990db4036e3b4b2b75261fc430028562a6dbd9 Reviewed-on: https://gerrit.libreoffice.org/43240 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22loplugin:unusedfields in cppcanvas..cuiNoel Grandin
Change-Id: I1cf1f7919e03d863c6f7756e1caf3b9313777479 Reviewed-on: https://gerrit.libreoffice.org/40294 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03new loplugin:unusedenumconstantsNoel Grandin
These are the simple removals, where it is obviously safe, the more complex ones will come in separate commits Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308 Reviewed-on: https://gerrit.libreoffice.org/33828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03loplugin:unusedmethods unused return typesNoel Grandin
Change-Id: I88204bca60dd1e299b040c52bc87e500cbfaa930 Reviewed-on: https://gerrit.libreoffice.org/30519 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-04-02cleanup: remove unused Reference.h(xx) includesJochen Nitschke
and unused using-declarations from Reference.h Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19 Reviewed-on: https://gerrit.libreoffice.org/23735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-10-29remove boost::noncopyable from /includeNoel Grandin
Change-Id: I9fa22b06fabf79043ebc68be7afebc6e810f4db1
2015-10-27loplugin:unusedmethodsNoel Grandin
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861 Reviewed-on: https://gerrit.libreoffice.org/19231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-21com::sun::star->css in include/cppcanvasNoel Grandin
Change-Id: Iffaf661fe915c9b0e3500ae3923fd8300583c512 Reviewed-on: https://gerrit.libreoffice.org/19484 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-09-14boost->stdCaolán McNamara
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c Reviewed-on: https://gerrit.libreoffice.org/18564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-17Put Polygon from tools under tools:: namespaceNorbert Thiebaud
Polygon is one of these names that Clash with some system objects A similar work has been done earlier with PolyPolygon. Change-Id: Icf2217cb2906292b7275760f1a16be0e150312f5 Reviewed-on: https://gerrit.libreoffice.org/17789 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-05loplugin:unusedmethodsNoel Grandin
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba Reviewed-on: https://gerrit.libreoffice.org/17506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-13loplugin:staticmethodsNoel Grandin
Change-Id: I33a8ca28b0c3bf1c31758d93238e74927bebde9c
2015-02-07loplugin:deletedspecialStephan Bergmann
Change-Id: I988d7cdfa048a3b093ebc34f9016ac42440daa4b
2015-01-26followup code removal after changing virtual methods to non-virtualNoel Grandin
This cleanups up indentation and removes dead classes. This is a followup patch to commit 272b1dd55797aacf511fb4342b0054e3697243f6 "new loplugin: change virtual methods to non-virtual" Change-Id: I1c2139589cf8cb23bb9808defe22c51039d38de1
2015-01-26new loplugin: change virtual methods to non-virtualNoel Grandin
Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2014-09-30fdo#82577: Handle PolyPolygonNoel Grandin
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows PolyPolygon typedef. Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2013-11-29Further XCanvas != XBitmapCanvas cleanup.Thorsten Behrens
It seems I missed a few places in 21ec9beae29b19b8ec6f0a16fd0e708e4f210208, getting that straight now hopefully. Change-Id: I34fc8df2d1ee65bef0639b3de9487ff311bed89a
2013-11-29Revert "Resolves: fdo#71527 make presenter console not crash/useless"Thorsten Behrens
This reverts commit 639aa8e72639fd01e9004977f1cfaafc13b1e45f. Change-Id: I0ac1a7ada530791e2d34d2f0802213c869ea48a1
2013-11-28Resolves: fdo#71527 make presenter console not crash/uselessCaolán McNamara
Basically reverts the pieces of 21ec9beae29b19b8ec6f0a16fd0e708e4f210208 to make XSpriteCanvas a XBitmapCanvas again Otherwise PresenterHelper::loadBitmap is not an XBitmapCanvas and so VclFactory::createBitmap cannot succeed Change-Id: I197adf98e915102f383ee050a8ea16d1e41cecf2
2013-10-23fixincludeguards.sh: include/c*Thomas Arnhold
Change-Id: Icba422d99836518a1b662b15144bc9334bed1473
2013-10-22fdo#68849 add some header guardsThomas Arnhold
Change-Id: I1cd598fba94e337c2ccad68a4a888743aeb292f0
2013-10-07XCanvas does no longer imply XBitmapCanvasThorsten Behrens
Remove the implication that XCanvas IS-A XBitmapCanvas, i.e. one can access underlying pixels. That's a preparation for display-list based canvas implementations, and was a rather silly assumption in the first place. Also fixes up all client sites. Change-Id: I7a3d6f68ef46fe94b23cce7759cc0b8b6ca4dae9
2013-04-23execute move of global headersBjoern Michaelsen
see https://gerrit.libreoffice.org/#/c/3367/ and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a