summaryrefslogtreecommitdiff
path: root/bean/com
ModeNameSize
d---------sun / star31logplain
n.cxx?h=feature/wasm&id=59210b075b79e4fc58f86542d9947d6ed0073abd'>tools: rename Rectangle::Justify() to Rectangle::Normalize()Chris Sherlock Jusify() normalizes the rectangle so both the Width and Height are positive, without changing the location of the rectangle. It ensures that the x and y coordinates will be moved to the top left of the rectangle. The name is strange, so renaming Justify() to Normalize(). Change-Id: Idbf163e65e52a798e38f785b8961b8042cf0cf2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137379 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> 2021-09-28gives names to all the Idles and TasksNoel Grandin enforce it by making the constructor parameter non-default. Change-Id: I321543e4dcf15ea0a43ad8cce91d2f8dc22df6ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-09-20clean up ambiguous confusing rectangle APIs like IsInside()Luboš Luňák Reading 'rectA.IsInside( rectB )' kind of suggests that the code checks whether 'rectA is inside rectB', but it's actually the other way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(), which should make it clear which way the logic goes. Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins 2021-08-30tdf#74702 vcl: introduce GetSystemTextColor()Chris Sherlock Also rename DrawFlags to SystemDrawColorFlags, added a unit test. Change-Id: I3cb74b278e43561d1055b3b55b9730cdbdea51aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113559 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2021-05-17split OutputDevice from WindowNoel Grandin as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-05-05convert sal_uLong and tools::Long in vcl/settingsNoel Grandin Change-Id: I69711b791884218f4a14c85fe69072b9ea06dc79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115109 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-10-19use tools::Long in vclNoel Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-08-04loplugin:flatten in vclNoel Grandin Change-Id: I271cc67ecf34acbf0edbda960e33315fb6a1f9dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-05-22remove Size arg from Window::Draw and depend on GetSizePixelCaolán McNamara 90% of cases pass GetSizePixel as the Size arg already and this aligns Window::Draw with how Window::PaintToDevice works Change-Id: If5b024179a4b7a3b099177c2f6d4b1fb006b95ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94644 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> 2020-04-17loplugin:buriedassign in vclNoel Grandin Change-Id: I529052c1ba7591d91d3848080af8b06e077b6f14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92409 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-03-16remove unnecessary Window::Update() calls, which immediately follow InvalidateNoel Grandin Update() is effectively "paint immediately". Rather just let the invalidate do it's thing and have the widget paint on the next paint loop, along with the rest of the stuff. This is probably mostly cargo-cult, from the days when our invalidate/paint timer could take a long time to kick in. Change-Id: Idff06526e9a2892244cfd8ce6947916032b0d1a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90567 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins 2019-10-30SpinButton only needed by vcl and toolkitCaolán McNamara Change-Id: I1a99231a895269bc728ed7730fe277bb8e73a25e Reviewed-on: https://gerrit.libreoffice.org/81711 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2018-11-15loplugin:staticmethods in vclNoel Grandin Change-Id: I00333677db711761510a35dfae5ce70d61fb9491 Reviewed-on: https://gerrit.libreoffice.org/63397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-02-26loplugin:oncevar extend to tools/gen.hxx typesNoel Grandin Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2 Reviewed-on: https://gerrit.libreoffice.org/50283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-02-22loplugin:changetoolsgen in vclNoel Grandin Change-Id: I0fc68cf51fb23ed9bb86a5087e8247c81b024494 Reviewed-on: https://gerrit.libreoffice.org/50107 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-10-23loplugin:includeform: vclStephan Bergmann Change-Id: Id7dea3917740aaf4db8dada5e2bea6e117d714ea 2017-07-21migrate to boost::gettextCaolán McNamara * all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a 2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> 2017-02-14Convert WindowType to scoped enumNoel Grandin Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9 Reviewed-on: https://gerrit.libreoffice.org/34219 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-01-23Change all Idle* LINKs to be Timer*Jan-Marek Glogowski Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles Link in the Timer class. Now there are two possible solution: 1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or 2. split the inheritance of Idle from Timer again to maintain different Link<>s and move all common code into a TimerBase. While the 1st is more correct, the 2nd has a better indicator for Idles. This implements the first solution. And while at it, this also converts all call sites of SetTimeoutHdl and SetIdleHdl to SetInvokeHandler and gets rid of some local Link objects, which are just passed to the SetInvokeHandler call. It also introduces ClearInvokeHandler() and replaces the respective call sites of SetInvokeHandler( Link<Timer *, void>() ). Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69 2016-12-07convert VCLEVENT constants to scoped enumNoel Grandin Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba Reviewed-on: https://gerrit.libreoffice.org/31675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann ...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c 2016-06-20Convert PART to scoped enumNoel Grandin Change-Id: If4c2849beb207593d3d450ae3846ed24eaf66ca4 Reviewed-on: https://gerrit.libreoffice.org/26173 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> 2016-05-31Convert ControlType to scoped enumNoel Grandin Change-Id: Iaa13c3e7030296a97bab144103745867d43b4b19 Reviewed-on: https://gerrit.libreoffice.org/25554 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> 2015-12-12<vcl/spin.h> can be private to vclTor Lillqvist Change-Id: If723dd72479ab8d072581e9ffbf7a1462c5fecda 2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0 2015-09-04remove unused Link<> fieldsNoel Grandin Change-Id: I81401ae6d1b1e95375bf4a5792b3b83189be5683 Reviewed-on: https://gerrit.libreoffice.org/18304 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> 2015-08-17make Control::ImplCallEventListenersAndHandler take a lambdaNoel Grandin so that we make the Link<> calls type-safe, without having to make this a template method Change-Id: I2e36bd6aa7c63440f72d266b593e101965b5ebce 2015-05-27convert WINDOW_DRAW flags to scoped enumNoel Grandin Change-Id: I9400a286fab18d683b4c109007961685f01b6da3 2015-05-23VclPtr - add compat methods for old-style focus / notification.Michael Meeks The previous code would only invoke Window:: methods by the time we hit the destructor; do the same to avoid fixing more scattered crashers for now. Change-Id: Ibdcd1290309bb7fc31a44d534c52d357da022591 Reviewed-on: https://gerrit.libreoffice.org/15880 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> 2015-05-20cleanup codeTomaž Vajngerl Change-Id: I0fdcb3d179d87ae202199d2eb904e701bad45ab1 2015-05-07Refactor "SpinField" & "SpinButton" - use RenderContextTomaž Vajngerl Change-Id: I589f49179b446ae24037546075070641de5cb927 2015-05-05vcl: rename other members of StateChangedType for consistencyMichael Stahl Change-Id: Ifd3339813e5d3dfb54566fd226aaf2d2a199d59a 2015-05-05Use typed Timer::SetTimeoutHdl LinkStephan Bergmann Change-Id: Iaaf0c93e5b28c0f7dbe4f02eda8beeae30708100 2015-04-29replace Paint calls to Invalidate + fix compilationTomaž Vajngerl Change-Id: Id716c47d56922ab6ce0c3adb3d426ea814980674 2015-04-29mass rewrite Paint(Rect&) to Paint(RenderContext&, Rect&)Tomaž Vajngerl Change-Id: Ia1667246064d11827dbd149def15e5bf08b119b8 2015-04-09vcl: window destructors calling disposeNoel Grandin Extend plugin to warn on any vcl::Window subclass that has a destructor and does not implement dispose. Apply this provision to the necessary classes in vcl/ Change-Id: I05189f8df02568131d59fc44fea904c87733c8c7 2014-12-01fdo#84938: replace EVENT_ constants with enumTobias Madl Change-Id: I8275832d8dae43b374bddd48520d11592e9a6a1f Reviewed-on: https://gerrit.libreoffice.org/13134 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>