summaryrefslogtreecommitdiffstats
path: root/cppcanvas
Commit message (Collapse)AuthorAgeFilesLines
* Simplify containers iterations in cppcanvas, cppu, cppuhelperArkadiy Illarionov2019-11-221-4/+2
| | | | | | | | | | | | Use range-based loop or replace with STL functions Change-Id: I72bf7cdb632c04e2fc8d4f7ab85cb6571222aa07 Reviewed-on: https://gerrit.libreoffice.org/68636 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/83472 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com>
* Fix typosAndrea Gelmini2018-11-071-1/+1
| | | | | | | Change-Id: Id6f5edca053048540b57fd9871aabd1c71f9b64f Reviewed-on: https://gerrit.libreoffice.org/62902 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
* tdf#70851 fix strange waveline polygon.Mark Hung2018-11-061-12/+11
| | | | | | | | | | | ::basegfx::utils::createWaveline was invoked with incorrect parameter, resulted in wavelines rendered along a 4-sided rectangle instead of a line. Change-Id: I30f52c95bdb4f804438b04559ba339ba95dee6e1 Reviewed-on: https://gerrit.libreoffice.org/62838 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* tdf#37636 Render textlines with colors.Mark Hung2018-11-054-36/+235
| | | | | | | | | | Create a new helepr class, TextLinesHelper, to handle textline colors and overall size. Change-Id: I8635199819443429f7be1754a298e9a21ef17f8c Reviewed-on: https://gerrit.libreoffice.org/62832 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* tdf#37636: pass bNormalText to cppcanvas::internal::TextRenderer.Mark Hung2018-11-051-11/+11
| | | | | | | | | | | so that we know whether we are rendering a normal text or othewise (like shadow, etc.) because it is not necessary to use the textline color or overline color when rendering the shadow. Change-Id: I51c21bbb4e3cec226320b46e2cdba4cd5e8792d6 Reviewed-on: https://gerrit.libreoffice.org/62831 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* tdf#37636 create underlines, overlines, strikeout separatelyMark Hung2018-11-052-205/+249
| | | | | | | | | | | and expose a new cppcanvas::tools::createTextLinesPolyPolygon interace to fetch them in order to fill each of them with their own color later. Change-Id: I26e99a9af87a69d9cb71cda6a4c03c4ba42158dc Reviewed-on: https://gerrit.libreoffice.org/62830 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* tdf#37636 take care of MetaOverlineColorAction in mtfrenderer.Mark Hung2018-11-052-0/+29
| | | | | | | | | | Keep the overline color in DevOutState so that it can be used in text actions later. Change-Id: Ia584de9b78e1adf6862c09fb50cbed1f16e2ad0b Reviewed-on: https://gerrit.libreoffice.org/62829 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* cppcanvas::mtfrenderer refactorMark Hung2018-11-051-37/+24
| | | | | | | | | to get rid of one of the initEffectLinePolyPolygon we used. Change-Id: I04c6e1dc72e1f3936bfd268a3b1092bdc4a9b199 Reviewed-on: https://gerrit.libreoffice.org/62828 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* tdf#43671 creatCanvasFont with EmphasisMark.Mark Hung2018-10-312-4/+14
| | | | | | | Change-Id: I8c7592e9bdb212fcbb07655e81faadd07ed880f7 Reviewed-on: https://gerrit.libreoffice.org/62244 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* tdf#100236 Implement linestyles with dash and dots.Mark Hung2018-10-231-104/+93
| | | | | | | | | | | Allow append dashes to have dash and dot line styles. Segment length parameters were taken from cppcanvas, also restructure the code to use the same appendDashes function. Change-Id: I17c0796dbe722c4c6d5e91d0e318570a52a2514c Reviewed-on: https://gerrit.libreoffice.org/62084 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* tdf#70851 render wave underlines in slideshow.Mark Hung2018-10-221-6/+13
| | | | | | | Change-Id: I31b2717e60b5eae6c992e27700e589938764957c Reviewed-on: https://gerrit.libreoffice.org/62035 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* tdf#100236 implement waveline in mtfrenderer.Mark Hung2018-10-221-6/+50
| | | | | | | | | | | | Create B2DPolygon with ::basegfx::utils::createWaveline to render the waveline. Parameters are adapted from the drawinglayer. Thickness of the line isn't really implemented yet. Change-Id: I74d05744632d5d54e439a2a3e144fa2daf4ae1bb Reviewed-on: https://gerrit.libreoffice.org/61947 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* loplugin:singlevalfieldsNoel Grandin2018-10-172-5/+0
| | | | | | | | | tighten up the handling of binary operators Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee Reviewed-on: https://gerrit.libreoffice.org/61777 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#55361 adjust leftmost position for RTL text while animation.Mark Hung2018-10-091-9/+30
| | | | | | | | | | Set the leftmost position correctly based on logical advancement values of XTextLayout to render the substring of a RTL text. Change-Id: Ib65b433105274f6ebfd251e92d831f1b28516294 Reviewed-on: https://gerrit.libreoffice.org/61459 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
* Silence new Clang trunk -Wdefaulted-function-deletedStephan Bergmann2018-10-022-4/+4
| | | | | | | | | | | | | | This mostly affects explicitly defaulted functions that had recently been user- declared to silence new GCC trunk -Wdeprecated-copy. It is not entirely clear to me what the best approach is overall, see my mail <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20181001/245321.html> "Re: r343285 - [cxx2a] P0641R2: (Some) type mismatches on defaulted functions only", but lets just explicitly delete those functions for now. Change-Id: If8c72f612f67a8feb8b03c2fb988c807e704ef03 Reviewed-on: https://gerrit.libreoffice.org/61259 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:staticconstfield improvementsNoel Grandin2018-09-171-24/+5
| | | | | | | Change-Id: Ia0a19736dfd4500bb17b04c072710f8ee8744031 Reviewed-on: https://gerrit.libreoffice.org/60526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:simplifyconstruct in canvas..cuiNoel Grandin2018-09-063-8/+0
| | | | | | | Change-Id: I02eba1df117a9d0df42bcac13c3251cb4fa6da14 Reviewed-on: https://gerrit.libreoffice.org/60074 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Bin superfluous whitespace on empty lineTor Lillqvist2018-08-281-1/+1
| | | | Change-Id: Ida0ab3cd78514b2c10f8e6655becefe794217f8c
* Use more basegfx deg<->rad functions, instead of direct formulasMike Kaganski2018-08-041-3/+3
| | | | | | | | | | | | | | | Also make the functions constexpr. Due to slight changes in floating-point arithmetics (90.0 instead of 180.0, M_PI2 instead of M_PI resp.), results might differ in last digits (usually 17th decimal digit). This has lead to need to tweak char2dump's PieChartTest unit test. Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3 Reviewed-on: https://gerrit.libreoffice.org/58583 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* loplugin:stringloop cui,dbaccessNoel Grandin2018-07-281-4/+4
| | | | | | | Change-Id: I32b63d2435d36b869823ea022ebd7f8347a46ea0 Reviewed-on: https://gerrit.libreoffice.org/58211 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* cppcanvas: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann2018-07-272-10/+10
| | | | | | | | | | | | | | | ...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. There appears to be no good reason for these classes to have a deleted copy assignment op, so just change that to implicitly-defined, too. Change-Id: I65fb6ea78a13b7b3d237529613c0489c8cf50614 Reviewed-on: https://gerrit.libreoffice.org/58119 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Add missing sal/log.hxx headersGabor Kelemen2018-07-1617-0/+17
| | | | | | | | | | | | | | rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from connectivity to cui Change-Id: I9903c10d0a04bbeb93d0f776d1d252b152459499 Reviewed-on: https://gerrit.libreoffice.org/57408 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* loplugin:oncevarNoel Grandin2018-07-091-6/+3
| | | | | | | Change-Id: Id295dc0db174a448ef73db9de34f2de07d47f09a Reviewed-on: https://gerrit.libreoffice.org/57108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* rhbz#1589029 tdf#93789 impress not showing text highlight in presentation modeCaolán McNamara2018-06-114-21/+119
| | | | | | | | | | | | | the text hightlighting feature was implemented backed on to the vcl TextFillColor feature. TextFillColor fills the background of the bounds of the text with that color Likely either the same problem or similar as tdf#93789 Change-Id: Iace62cedc49e5f5844ac35d3caa23249b6cb4bc1 Reviewed-on: https://gerrit.libreoffice.org/55629 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* tdf#42949 remove unused compheler includes ..Jochen Nitschke2018-06-051-1/+0
| | | | | | | | | and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* drop Graphic::GetBitmapNoel Grandin2018-05-311-1/+1
| | | | | | | | | | | | so that we flush out various code using Bitmap, in favour of using BitmapEx. This is part of the process of making Bitmap largely an internal detail of vcl Change-Id: Iaf2ead5e3d9960838723fb55b812b97108093d74 Reviewed-on: https://gerrit.libreoffice.org/55062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:unusedfields-in-constructor in variousNoel Grandin2018-05-291-5/+4
| | | | | | | Change-Id: Ie0fb647938e3cf730976fb2e435b92bfd67ef645 Reviewed-on: https://gerrit.libreoffice.org/54998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* make Bitmap/BitmapEx constructors explicitNoel Grandin2018-05-121-3/+3
| | | | | | | | | | | | and add BitmapEx::operator=(Bitmap const &) Image::Image(Bitmap const &) to lessen the fallout Change-Id: Iff5fab88d167a7be739c370c9933d36c297bc61c Reviewed-on: https://gerrit.libreoffice.org/54162 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* fix Windows buildNoel Grandin2018-04-121-0/+1
| | | | | | after commit 5dd762ddc182 "hold MetaAction by rtl::Reference" Change-Id: I21baeca159efb09b19a81c27b7eb96bcade1e469
* use more DBG_UNHANDLED_EXCEPTIONNoel Grandin2018-04-091-2/+2
| | | | | | | | | so we get nice logs of the exception dynamic type for UNO exceptions. Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb Reviewed-on: https://gerrit.libreoffice.org/52465 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Revert "long->sal_Int32 in tools/gen.hxx"Stephan Bergmann2018-04-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0. As discussed at <https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html> "long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with signed integer overflow, and the original plan was to redo it to consistently use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/> "sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed miserably on Windows, causing odd failures like not writing out Pictures/*.svm streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best approach is to just revert the original commit, at least for now. Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix Library_vclplug_qt5". Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae Reviewed-on: https://gerrit.libreoffice.org/52532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* long->sal_Int32 in tools/gen.hxxNoel Grandin2018-04-031-4/+4
| | | | | | | | | which triggered a lot of changes in sw/ Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6 Reviewed-on: https://gerrit.libreoffice.org/48806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* remove unused processfactory.hxx includesJochen Nitschke2018-04-011-1/+0
| | | | | | | | | and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
* loplugin:unusedmethodsNoel Grandin2018-03-145-123/+0
| | | | | | | Change-Id: I7c780be3e2740fd9b03c39ebe16935d61caf4f7e Reviewed-on: https://gerrit.libreoffice.org/51257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Move (and rename) graphic stuff from svtools to vclTomaž Vajngerl2018-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is preparing to change how GraphicManager works where it won't base itself around GraphicObject anymore but Graphic. No functional or cosmetic change was made to the classes, only changes that were needed because of the move and rename. The only thing that wasn't moved is the GraphicRenderer as it is not needed in vcl for now (but makes sense to move it in the future to keep graphic stuff together). grfmgr was renamed to GraphicObject as the GraphicManager will be changed a lot and most likely moved out, so the name grfmgr won't make any sense anymore. All the UNO implementations were renamed with a prefix Uno and used the same name as the class name. This is made to be more specific which are the Uno objects (for example graphic.cxx contained the implementation of XGraphic, which is similar to graph.cxx contains Graphic). Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137 Reviewed-on: https://gerrit.libreoffice.org/51068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* use more Color in cppcanvas..drawinglayerNoel Grandin2018-03-072-5/+5
| | | | | | | Change-Id: Ib0f15e8d4c01c1d2059cf32cc882042766d2a682 Reviewed-on: https://gerrit.libreoffice.org/50861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* delete colordata.hxxNoel Grandin2018-03-021-1/+0
| | | | | | | | | move what we still need into color.hxx Change-Id: Ied7e31eb16468aa334c666b1499a6262f16a6350 Reviewed-on: https://gerrit.libreoffice.org/50561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* convert COL_ constants to be of type ColorNoel Grandin2018-02-281-3/+3
| | | | | | | Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* replace Color(COL_*) with COL_*Noel Grandin2018-02-272-6/+6
| | | | | | | | | | | | | | | using git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)" | xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g" and then some manual fixup where the resulting expression no longer compiled Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4 Reviewed-on: https://gerrit.libreoffice.org/50372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* vcl: remove BitmapColor Color() operatorChris Sherlock2018-02-051-1/+1
| | | | | | | | | | | BitmapColor has a Color() operator. However, this is confusing and tends to hide that the two classes aren't the same. I have converted this to GetColor(). Change-Id: I0be2dcb3fc420e7be9c8d04330e7a3fe69a5412a Reviewed-on: https://gerrit.libreoffice.org/48245 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:unused-returns in basegfx..cppcanvasNoel Grandin2018-01-252-5/+3
| | | | | | | 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>
* loplugin:unusedmethods also check for functions returning boolNoel Grandin2018-01-192-4/+2
| | | | | | | | | we were previously excluding them Change-Id: I48a68799b0de60b4995fae541eb363e043d4dd11 Reviewed-on: https://gerrit.libreoffice.org/48167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr in EMFPPenNoel Grandin2018-01-192-6/+4
| | | | Change-Id: Icc50b2ff1d6c7490b67d39aed7c3621b74c03bac
* loplugin:useuniqueptr in EMFPRegionNoel Grandin2018-01-192-6/+2
| | | | Change-Id: I19107173318180ec08864e523f4065181eac00cc
* loplugin:useuniqueptr in EMFPBrushNoel Grandin2018-01-192-36/+17
| | | | Change-Id: I17fc33cfd7c15734fd961fa76c676424900a4373
* More loplugin:cstylecast: cppcanvasStephan Bergmann2018-01-123-23/+23
| | | | | | | | auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ib58b16600c97f8dab1b32d7e049c946ca82e660b
* tdf#42949 Fix some Include What You Use warningsMiklos Vajna2017-12-221-4/+0
| | | | | | | Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33 Reviewed-on: https://gerrit.libreoffice.org/46946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* loplugin:salcall fix functionsNoel Grandin2017-12-111-1/+1
| | | | | | | | | | since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxxStephan Bergmann2017-12-061-1/+5
| | | | | | | | | ...and fix the fallout Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92 Reviewed-on: https://gerrit.libreoffice.org/45195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Make loplugin:unnecessaryparen look through implicitStephan Bergmann2017-11-231-10/+10
| | | | | | | | | | ...similar to how <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent" does for loplugin:simplifybool Change-Id: I23eef400af71c582d380c9bae6546ce06e8a1e18 Reviewed-on: https://gerrit.libreoffice.org/45122 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>