summaryrefslogtreecommitdiff
path: root/include/tools/link.hxx
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>
2019-12-04Use SAL_STRINGIFYStephan Bergmann
Change-Id: I2bfc35ee72ab0a27902aa8382ccb6b6dce9126be Reviewed-on: https://gerrit.libreoffice.org/84406 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-05Link: support tracing link source and targetAshod Nakashian
By adding a couple of members to Link, we are now able to trace the target function name and the file:line where the Link instance in question was created (provided the LINK macro is used). This gives the invaluable ability to track down the source of a Link instance in the debugger, provided we have enabled this feature, which is enabled in DBG_UTIL automatically, unless explicitly enabled. Of course it is also possible to judiciously add LOG/fprintf statements to chase this info, if not outright track all links, if so we wish, by dumping from Link::Call, or at construction time of Link. Change-Id: Iab1dce31a179d28aaa1f20228e9e0405973b5e9b Reviewed-on: https://gerrit.libreoffice.org/73478 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-12-13sal_uIntPtr->char* in LinkNoel Grandin
Change-Id: I02bad98458ae0c41b4bbc1b4ec79f3f935d4beaa Reviewed-on: https://gerrit.libreoffice.org/46348 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29loplugin:unusedmethodsNoel Grandin
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0 Reviewed-on: https://gerrit.libreoffice.org/35834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17Change Idle to be a Timer subclassJan-Marek Glogowski
Drops a lot of duplicated code, as Idle is just a convenience class for instant, mostly low priority timers. Change-Id: I847592e92e86d15ab1cab168bf0e667322e48048
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-07-08Prepare for loplugin:redundantcast checking for redundant static_castsStephan Bergmann
Change-Id: Id113c4e99e74c40b577841e3486aea295bbd0310
2016-07-08LinkParamNone can be complete but uninstantiatableStephan Bergmann
Change-Id: I39bd23cd95ff97c6aeb00c9b02901ad6262767c1 Reviewed-on: https://gerrit.libreoffice.org/27031 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-15loplugin:unusedmethods unused return value in include/toolsNoel Grandin
Change-Id: I77a6a46ca20cb41ed73050185fb2064a1bbf2009 Reviewed-on: https://gerrit.libreoffice.org/21485 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-22fix Link::operator<Noel Grandin
so that it is consistent with operator== Change-Id: Ie4c68a1f02d8c298fe99e42c5854f89db79bf3bc
2015-10-21remove untyped Link<>Noel Grandin
Change-Id: I809f9e10309ceadda0a82c3818277323b34ec61b Reviewed-on: https://gerrit.libreoffice.org/19491 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-10convert Link<> to typed, and introduce LinkParamNoneNoel Grandin
as a marker type for unused Link#Call(T) param Change-Id: Ife9149052a52b27fefd4f810309a5004a0f1771b
2015-05-18SAL_WARN_UNUSED LinkStephan Bergmann
Change-Id: I646677611e46a7e33e977a5afeea9bf831b28733
2015-05-10No more need for EMPTYARG in C++11Stephan Bergmann
Change-Id: I8a6abc563fa80a801d1907100d0b1138d260c36e
2015-05-10NOINSTANCE is implied now in IMPL_STATIC_LINK...Stephan Bergmann
Change-Id: Ifb032457d6c1b279c4183282ef2b271c706dd71a
2015-05-10Remove newly unused IMPL_STATIC_LINK[_TYPED]Stephan Bergmann
Change-Id: Ic12cced5b90f413ca1cac943874c7e7f9ad57f1a
2015-05-08PostUserEvent - instrument to allow holding a VclPtr reference.Michael Meeks
This helps avoid things dying during emission in a robust manner. Bit of an unpleasant 3rd optional parameter; better names appreciated. Change-Id: I27571823f9d96caef1d07602785a02390d3a3591
2015-04-30IMPL_LINK_NOARG_TYPED is more useful with a non-void* ArgTypeStephan Bergmann
...as it will be used to implement a function that needs to be compatiblie with some specific Link<Arg,Ret> type. Change-Id: Ieabd0ee499850a304e0c6e625953532be47ac784
2015-04-30Fix Link<T, void>::CallStephan Bergmann
Change-Id: Id85f33eab2767961f24688fffac84416b1cb22d8
2015-04-30No need for LINK vs LINK_TYPED distinctionStephan Bergmann
(fully qualify ::tools::detail::makeLink to avoid clashes with namespace basegfx::tools) Change-Id: I52818d0a47c78f1af7673ff91eb6517bc0820655
2015-04-30Missing param nameStephan Bergmann
Change-Id: I1fd2e76c098d0bffb446a1b2133d3392bfbb3de7
2015-04-30All-inline template should not be TOOLS_DLLPUBLIC, keep MSVC happyStephan Bergmann
Change-Id: Ib03c6ba0eac9400eba89674ca92f638baf65b203
2015-04-30Gradually typed LinkStephan Bergmann
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-29Clean up tools/link.hxxStephan Bergmann
Change-Id: I44e4abb228394f99109f7d7e005cfeb26e4b95c1
2015-04-29Remove unnecessary IMPL_LINK[_NOARG]_INLINE_START/ENDStephan Bergmann
...just use IMPL_LINK[_NOARG] and let the compiler decide what to inline Change-Id: I63ec5116df7e79093ebf31193f8c674f1351c0e6
2015-04-29Remove unnecessary IMPL_LINK_INLINE macroStephan Bergmann
Change-Id: I81cbec049b98d2d2619b0480e0cf54bd1d7b6718
2015-04-29Remove unnecessary STATIC_LINK macroStephan Bergmann
Change-Id: I4788824667c8e0d1d4e0717b7ae7737bb0fd2c90
2015-03-29Remove redundant C-style castStephan Bergmann
Change-Id: I1785b47bf24f6be55f7ee346c9972ffa12cd138b
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
Change-Id: Ife048a705e899870a8b1d9987b109d5c0cd80599
2015-01-08Properly change Link class to use sal_IntPtr instead of longStephan Bergmann
...follow-up to 4e41227dd6af52ec562d10efcb365defba6bd36e "mingw64: change Link class to use sal_IntPtr instead of long;" should make obsolete <https://gerrit.libreoffice.org/#/c/13659/> "Signed/Unsigned mismatch on x86_64 platform on windows" Change-Id: I9fcc947bb96e104816c2820cb338fc34c528bae0
2014-10-24loplugin: cstylecastNoel Grandin
Change-Id: Ia0f5f0d0efbe4693aba347bff32cd694117251fe
2014-09-23loplugin: cstylecast, update PTR_CAST macro to use static_castNoel Grandin
I introduce a template method into the PTR_CAST machinery to maintain constness. There is now a FIXME in sd/../docshell.cxx because I needed to use a dynamic_cast there to work around the games it appears to be playing with OLE in-place activation. Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
2014-06-30Make sure IMPL_STATIC_LINK's type matches Link::pFunc's typeStephan Bergmann
...to avoid -fsanitize=function warnings in Link::Call. Change-Id: I837b35bd3052716fbb41bf4f893961257d1f9b2c
2013-11-09fdo#65108 inter-module includes <> include/toolsNorbert Thiebaud
Change-Id: I5f44f041e465230d10d562e8bd6f141848465e07
2013-10-23fixincludeguards.sh: include/{toolkit,tools}Thomas Arnhold
Change-Id: I5572c320431222be2405f8c2dc8adeafe4f3828b
2013-06-30Clean String and sal_Bool in toolsNorbert Thiebaud
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655 Reviewed-on: https://gerrit.libreoffice.org/4627 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-06-10mingw64: change Link class to use sal_IntPtr instead of longFridrich Štrba
Change-Id: I2b78c7b714ff064f2f1b8a8eb161e5e2ae121eee
2013-04-23execute move of global headersBjoern Michaelsen
see https://gerrit.libreoffice.org/#/c/3367/ and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a