summaryrefslogtreecommitdiff
path: root/vcl/workben
AgeCommit message (Collapse)Author
2020-07-12move CheckBox to toolkit-only headersCaolán McNamara
Change-Id: Id1b2dd11bd0ebd9c88cf7e86d990a1990d760b2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98605 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-12missing trailing commasCaolán McNamara
Change-Id: I6a541d5c34f933a08f3ed48b23e85a18d7e36afe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98594 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-11unoxml_component_getFactory doesn't exist anymoreCaolán McNamara
Change-Id: Iaf1ba4753c481f92096afd062ef0dd6210f0628e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98579 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-09stray remaining emfio_component_getFactory callCaolán McNamara
Change-Id: I37279fbca3bf83cf2c5609ddf9956ee915ae0b30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98424 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-08fix fuzzer buildCaolán McNamara
Change-Id: I1c96d177ddf6061e61f4027675e657c2d7fd446e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98367 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: vclStephan Bergmann
Change-Id: I7559ab5c98a22e315549b5dfc651e937697cac22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97742 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-23move ListBox to toolkit-only headersCaolán McNamara
Change-Id: I6266dedb17cd7c3b730fc69804695536fef37cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96751 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-23FixedBitmap can be in a toolkit only headerCaolán McNamara
Change-Id: I22bb548f7f0c1ef0de157f99915fbaf6473c284b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96861 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-05Upcoming loplugin:elidestringvar: vclStephan Bergmann
Change-Id: Id746bbb3caeb7555e2a89b13fa6dcb089778002a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95597 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-22Related: tdf#132536 drop FreetypeManager FreetypeFont cachingCaolán McNamara
the FreetypeFont only makes sense in the context of the FreetypeFontInstance it belongs to so remove the faux "garbage collection" and just have FreetypeFontInstance own the FreetypeFont and keep it simple. Setting a value low enough to make the garbage collection kick in just crasheed libreoffice by pulling FreetypeFont out from under living FreetypeFontInstance seeing as the Cache/Uncache was by the FreeTypeTextRenderImpl not the FreetypeFontInstance which had HarfBuff faces which continued to point to the removed FreetypeFont There is still a cache at the LogicalFontInstance level, so this aligns the libfreetype platforms with windows, mac etc. Change-Id: Iac669fae8dc1df81a5bc10d2943d84a2ff623180 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94546 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-20move ComboBox to toolkit-only headersCaolán McNamara
Change-Id: If5f0ab1fba8fa7302b7c0e8d2b25761ab64c97e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94143 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-13fix oss-fuzz buildCaolán McNamara
Change-Id: Ia04a3e9c72c9b32f895c5925937d322f8dd963ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94135 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-08split button.hxx into toolkit-only pieceCaolán McNamara
Change-Id: I792efb417504a3b55043ff4fc3fd3597a9b953f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93678 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-01move some headers inside their respective modulesNoel Grandin
Change-Id: I6b463724e301989a60e423bbfc25aa1bf146ff5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93267 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-11rename vcl::Window::Update to PaintImmediatelyNoel Grandin
To make the code easier to read. Change-Id: Iebc648150391939fba5d1cd815c72dbcf02ceec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90378 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-16Revert "loplugin:constfields in vcl"Noel Grandin
This reverts commit 59887868da3499c68d5f259cfa48178354397448. Change-Id: I0f3f6a7680c78103a559a0f881badc8211b97ace Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90544 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-14move dialog.hxx to vcl/include/toolkitCaolán McNamara
Change-Id: Ia3877f58b6e5ccc4fb1621e6b928638e0c850e7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88602 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-13drop workben outdevgrindCaolán McNamara
Change-Id: I94978f84b45daec9ba7e782087e45182def234d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88601 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-17flush out unused Font objectsCaolán McNamara
Change-Id: Ifd6379b2cb6e5945ff509be8dc61c61bd70724c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86938 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2019-11-27move opengl vcl files to opengl/Luboš Luňák
Better to have all of them together rather than scattered. Change-Id: I1f8bbfb7018a6c28c87e4dfa2acbf4efde62894b
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-19Rename GlyphCache to FreetypeManagerJan-Marek Glogowski
And while at it remove the unneeded getPlatformGlyphCache abstraction. Change-Id: Id5cad751eda9e6bf177dfb4816280d7c5af7066a Reviewed-on: https://gerrit.libreoffice.org/83125 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-11-17Extend loplugin:external to warn about enumsStephan Bergmann
To mitigate the dangers of silently breaking ADL when moving enums into unnamed namespaces (see the commit message of 206b5b2661be37efdff3c6aedb6f248c4636be79 "New loplugin:external"), note all functions that are affected. (The plan is to extend loplugin:external further to also warn about classes and class templates, and the code to identify affected functions already takes that into account, so some parts of that code are not actually relevant for enums.) But it appears that none of the functions that are actually affected by the changes in this commit relied on being found through ADL, so no adaptions were necessary for them. (clang::DeclContext::collectAllContexts is non-const, which recursively means that External's Visit... functions must take non-const Decl*. Which required compilerplugins/clang/sharedvisitor/analyzer.cxx to be generalized to support such Visit... functions with non-const Decl* parameters.) Change-Id: Ia215291402bf850d43defdab3cff4db5b270d1bd Reviewed-on: https://gerrit.libreoffice.org/83001 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-04readme not a sufficient indicatorCaolán McNamara
Change-Id: Idd5cd004b873280e202b16c182356977045bdab4 Reviewed-on: https://gerrit.libreoffice.org/81993 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-30imgctrl.hxx only used by vcl and toolkitCaolán McNamara
Change-Id: I77e2efa77d9fbc0830553faed269e1fec2b2a286 Reviewed-on: https://gerrit.libreoffice.org/81713 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-17loplugin:buffereadd find stuff involving adding *StringBufferNoel Grandin
and create conversion methods on *StringBuffer to make this work Change-Id: I3cf5ee3e139826168894b46eff8ee4bcde00cb7e Reviewed-on: https://gerrit.libreoffice.org/80949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10WaE: -Wreturn-typeCaolán McNamara
Change-Id: I6e9d667cc286ebab796398fac293077718bbf877 Reviewed-on: https://gerrit.libreoffice.org/80619 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-04enable -Wunused-exception-parameter on clangNoel Grandin
which is useful because our MSVC build will warn about this by default Change-Id: Idcc0f08b69b6eda4dd2ab010a5fdb674787bebcf Reviewed-on: https://gerrit.libreoffice.org/80184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-03merge msgbox and stdtextCaolán McNamara
Change-Id: If95d78746eff3ae5343e7d4c6bb2433537ccb84d Reviewed-on: https://gerrit.libreoffice.org/80099 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-27Error: attempt to subscript container with out-of-bounds index 24Stephan Bergmann
...doing `bin/run vcldemo` and clicking on the third column in the third row Change-Id: Ibe93f701a1ebf2447d5f5240e9a4ecab378918ef Reviewed-on: https://gerrit.libreoffice.org/79665 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-19improve and enable loplugin:fragiledestructorNoel Grandin
Where the problem was benign and the class was not extended, I marked the class as final. Where the problem was benign and the class was extended, I marked the relevant callee methods as final. Other cases were excluded in the plugin. Change-Id: Idb762fb2206af4e8b534aa35ff77f8368c7909bc Reviewed-on: https://gerrit.libreoffice.org/79089 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-17No need for explicit OpenGLZone::enter/leave calls from vcldemoStephan Bergmann
(though I have no idea how to actually test the affected code) Change-Id: Ib74d966d021e337bfab94c223812cb51c02c705f Reviewed-on: https://gerrit.libreoffice.org/79059 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-31ofz#16753 build failureCaolán McNamara
Change-Id: Id7ec5cff7d5784135a3266d1b3d0c27e21dbb04b Reviewed-on: https://gerrit.libreoffice.org/78341 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-22loplugin:constmethod in vclNoel Grandin
Change-Id: I20545527b117c9562b91076b748fb3e2659d2497 Reviewed-on: https://gerrit.libreoffice.org/77944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15loplugin:sequenceloop in unoxml..vclNoel Grandin
Change-Id: Ic3c48ec4d86252b62d3dd25bbc198f7d7fb75e90 Reviewed-on: https://gerrit.libreoffice.org/77533 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-03ofz#16191 add en_LK locale data stubCaolán McNamara
Change-Id: I0a4fd74e9f50e5d62d2bbd294a42cd272af90e44 Reviewed-on: https://gerrit.libreoffice.org/76891 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): vclStephan Bergmann
Change-Id: I0bd1d26f6fc4052b812fde33ebd1d63111426942 Reviewed-on: https://gerrit.libreoffice.org/76627 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-30tdf#62699 Drop (now) pass-through header include/vcl/salbtype.hxxGabor Kelemen
Change-Id: I2e2093ac3c8c6833b70d4932bc12a82a4483bde5 Reviewed-on: https://gerrit.libreoffice.org/76499 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-25improve loplugin:simplifyconstructNoel Grandin
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-18loplugin:logexceptionnicely in vclNoel Grandin
Change-Id: I0ed575a11c84c2e8aabfa1b4204ba6ae27393d5f Reviewed-on: https://gerrit.libreoffice.org/74245 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-18Simplify Sequence iterations in vclArkadiy Illarionov
Use range-based loops or replace with comphelper or STL functions Change-Id: If046738084c2d13cc1eaea6a03aaf60b63f62767 Reviewed-on: https://gerrit.libreoffice.org/74104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-05ofz#15068 build failureCaolán McNamara
Change-Id: Ic306faa25c726be39bc76fa9d492204ad0602810 Reviewed-on: https://gerrit.libreoffice.org/73554 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-05Linguistic: new underlining styles for grammar checkersOlivier R
This patch adds two new underlining styles: - BOLDWAVE: a thicker version of the default WAVE style - BOLD: a thick straight line No default setting changed. It's up to the grammar checkers to specify the underlining style they want. This contribution to LibreOffice is licensed under the MPLv2/LGPLv3+ dual license. modified : include/vcl/outdev.hxx modified : offapi/com/sun/star/text/TextMarkupDescriptor.idl modified : sw/source/core/inc/wrong.hxx modified : sw/source/core/txtnode/fntcache.cxx modified : vcl/source/outdev/textline.cxx modified : vcl/workben/outdevgrind.cxx Change-Id: I5629253905ba40c51cc748a7ceeb84170ef5d94c Reviewed-on: https://gerrit.libreoffice.org/73412 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-05-06ofz#14612 add en_ZM locale data stubCaolán McNamara
Change-Id: I1cf10d297e4be1c4db68b9272f7104d4c1360145 Reviewed-on: https://gerrit.libreoffice.org/71876 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-15loplugin:sequentialassign in vclNoel Grandin
Change-Id: I530b81b3258a6e1c1456da53bfe1285f14aee712 Reviewed-on: https://gerrit.libreoffice.org/70734 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-14tdf#120703 PVS: Silence V522 warningsMike Kaganski
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839 Reviewed-on: https://gerrit.libreoffice.org/70730 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-02ofz#13431 fix buildCaolán McNamara
Change-Id: I29c271188dc96205e335dbf8d7b11a3711e6e634
2019-03-01ofz#13431 fix buildCaolán McNamara
Change-Id: I55085ede7161c06c85ab14d553f27ac505cbbbc2