summaryrefslogtreecommitdiff
path: root/cppcanvas
AgeCommit message (Collapse)Author
2018-11-21loplugin:redundantfcast improvementsNoel Grandin
check for calls to constructors, and extend the list of types we check for unnecessary temporary creation Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec Reviewed-on: https://gerrit.libreoffice.org/63472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-07Fix typosAndrea Gelmini
Change-Id: Id6f5edca053048540b57fd9871aabd1c71f9b64f Reviewed-on: https://gerrit.libreoffice.org/62902 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-11-06tdf#70851 fix strange waveline polygon.Mark Hung
::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>
2018-11-05tdf#37636 Render textlines with colors.Mark Hung
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>
2018-11-05tdf#37636: pass bNormalText to cppcanvas::internal::TextRenderer.Mark Hung
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>
2018-11-05tdf#37636 create underlines, overlines, strikeout separatelyMark Hung
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>
2018-11-05tdf#37636 take care of MetaOverlineColorAction in mtfrenderer.Mark Hung
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>
2018-11-05cppcanvas::mtfrenderer refactorMark Hung
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>
2018-10-31tdf#43671 creatCanvasFont with EmphasisMark.Mark Hung
Change-Id: I8c7592e9bdb212fcbb07655e81faadd07ed880f7 Reviewed-on: https://gerrit.libreoffice.org/62244 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-10-23tdf#100236 Implement linestyles with dash and dots.Mark Hung
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>
2018-10-22tdf#70851 render wave underlines in slideshow.Mark Hung
Change-Id: I31b2717e60b5eae6c992e27700e589938764957c Reviewed-on: https://gerrit.libreoffice.org/62035 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2018-10-22tdf#100236 implement waveline in mtfrenderer.Mark Hung
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>
2018-10-17loplugin:singlevalfieldsNoel Grandin
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>
2018-10-09tdf#55361 adjust leftmost position for RTL text while animation.Mark Hung
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>
2018-10-02Silence new Clang trunk -Wdefaulted-function-deletedStephan Bergmann
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>
2018-09-17loplugin:staticconstfield improvementsNoel Grandin
Change-Id: Ia0a19736dfd4500bb17b04c072710f8ee8744031 Reviewed-on: https://gerrit.libreoffice.org/60526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06loplugin:simplifyconstruct in canvas..cuiNoel Grandin
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>
2018-08-28Bin superfluous whitespace on empty lineTor Lillqvist
Change-Id: Ida0ab3cd78514b2c10f8e6655becefe794217f8c
2018-08-04Use more basegfx deg<->rad functions, instead of direct formulasMike Kaganski
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>
2018-07-28loplugin:stringloop cui,dbaccessNoel Grandin
Change-Id: I32b63d2435d36b869823ea022ebd7f8347a46ea0 Reviewed-on: https://gerrit.libreoffice.org/58211 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27cppcanvas: 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. 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>
2018-07-16Add missing sal/log.hxx headersGabor Kelemen
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>
2018-07-09loplugin:oncevarNoel Grandin
Change-Id: Id295dc0db174a448ef73db9de34f2de07d47f09a Reviewed-on: https://gerrit.libreoffice.org/57108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11rhbz#1589029 tdf#93789 impress not showing text highlight in presentation modeCaolán McNamara
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>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke
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>
2018-05-31drop Graphic::GetBitmapNoel Grandin
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>
2018-05-29loplugin:unusedfields-in-constructor in variousNoel Grandin
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>
2018-05-12make Bitmap/BitmapEx constructors explicitNoel Grandin
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>
2018-04-12fix Windows buildNoel Grandin
after commit 5dd762ddc182 "hold MetaAction by rtl::Reference" Change-Id: I21baeca159efb09b19a81c27b7eb96bcade1e469
2018-04-09use more DBG_UNHANDLED_EXCEPTIONNoel Grandin
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>
2018-04-07Revert "long->sal_Int32 in tools/gen.hxx"Stephan Bergmann
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>
2018-04-03long->sal_Int32 in tools/gen.hxxNoel Grandin
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>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke
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>
2018-03-14loplugin:unusedmethodsNoel Grandin
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>
2018-03-11Move (and rename) graphic stuff from svtools to vclTomaž Vajngerl
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>
2018-03-07use more Color in cppcanvas..drawinglayerNoel Grandin
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>
2018-03-02delete colordata.hxxNoel Grandin
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>
2018-02-28convert COL_ constants to be of type ColorNoel Grandin
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>
2018-02-27replace Color(COL_*) with COL_*Noel Grandin
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>
2018-02-05vcl: remove BitmapColor Color() operatorChris Sherlock
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>
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>
2018-01-19loplugin:unusedmethods also check for functions returning boolNoel Grandin
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>
2018-01-19loplugin:useuniqueptr in EMFPPenNoel Grandin
Change-Id: Icc50b2ff1d6c7490b67d39aed7c3621b74c03bac
2018-01-19loplugin:useuniqueptr in EMFPRegionNoel Grandin
Change-Id: I19107173318180ec08864e523f4065181eac00cc
2018-01-19loplugin:useuniqueptr in EMFPBrushNoel Grandin
Change-Id: I17fc33cfd7c15734fd961fa76c676424900a4373
2018-01-12More loplugin:cstylecast: cppcanvasStephan Bergmann
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
2017-12-22tdf#42949 Fix some Include What You Use warningsMiklos Vajna
Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33 Reviewed-on: https://gerrit.libreoffice.org/46946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-11loplugin:salcall fix functionsNoel Grandin
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>
2017-12-06Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxxStephan Bergmann
...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>
2017-11-23Make loplugin:unnecessaryparen look through implicitStephan Bergmann
...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>