summaryrefslogtreecommitdiff
path: root/toolkit
AgeCommit message (Collapse)AuthorFilesLines
2017-02-18loplugin:vclwidgets check for assigning from VclPt<T> to T*Noel Grandin4-27/+27
Inspired by a recent bug report where we were assigning the result of VclPtr<T>::Create to a raw pointer. As a consequence, we also need to change various methods that were returning newly created Window subclasses via raw pointer, to instead return those via VclPtr Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b Reviewed-on: https://gerrit.libreoffice.org/31318 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit e6ffb539ee232ea0c679928ff456c1cf97429f63)
2016-11-24tdf#103852 avoid clipboard deadlockTomaž Vajngerl1-2/+1
Deallocate the XTransferable object async using AsyncCallback (that uses Application::PostUserEvent) which executes the callback in a thread-safe way on the main thread. This avoids a deadlock at deallocation so that the XTransferable. Modify AsyncCallback to not hold the SolarMutexGuard because Application::PostUserEvent is considered thread-safe. Document Application::PostUserEvent thread-safety Change-Id: I4237a1cf380e8be66b3eefc393a58bb4853bf4e1 Reviewed-on: https://gerrit.libreoffice.org/31126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit bdd108cd72e630189c360c5327c480c1d64d55b1) Reviewed-on: https://gerrit.libreoffice.org/31167 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-11-18remove some double callsNoel Grandin1-1/+1
found with git grep -P '\W(\w+)\s*\(\s*\W' Change-Id: Ia93f83193959c72dcc15c5c1bf54e805b43f14e5 Reviewed-on: https://gerrit.libreoffice.org/30934 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-13drop useless semicolonsDavid Tardon1-1/+1
Change-Id: I039f8ff491b42ea9c3936bf13922df8095434228
2016-11-11update vclwidget loplugin to find ref-dropping assigmentNoel Grandin10-52/+53
Look for places where we are accidentally assigning a returned-by-value VclPtr<T> to a T*, which generally ends up in a use-after-free. Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9 Reviewed-on: https://gerrit.libreoffice.org/30749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01Omit the default comparatorTakeshi Abe1-1/+1
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0 Reviewed-on: https://gerrit.libreoffice.org/30319 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-31loplugin:oncevar in unoxml..toolkitNoel Grandin1-10/+5
Change-Id: I3b97665908be0a44d24192433bdc9c2bd9008736 Reviewed-on: https://gerrit.libreoffice.org/30431 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26loplugin:expandablemethods in toolkit..toolsNoel Grandin3-10/+4
Change-Id: I7221bf131d28804ee93474b11973bbc066cc2764 Reviewed-on: https://gerrit.libreoffice.org/30268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-18replace <<= with assign for <<= with rhs AnyJochen Nitschke5-21/+21
found by deleting specialization of '<<=' template Change-Id: I253f15177ab20fd3ef9baf4158da8c662cb47e6c Reviewed-on: https://gerrit.libreoffice.org/29956 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-15clang-cl loplugin: toolkitStephan Bergmann1-1/+1
Change-Id: I2f3c1416e1550c511c21ebf609f0f4465e8568cb Reviewed-on: https://gerrit.libreoffice.org/29847 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-13loplugin:unnecessaryoverrideNoel Grandin1-12/+0
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae Reviewed-on: https://gerrit.libreoffice.org/29656 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05[API CHANGE] Remove css::awt::XStyleSettings InfoTextColor and InfoFontCaolán McNamara2-26/+0
Change-Id: I2bee3f52a751ac1ed2b61a1488d6d58c1b36dcba
2016-10-05InfoFont/Color is not used by vcl nowCaolán McNamara1-10/+4
anywhere anyone wanted to Get[Font|Color] give it the Label ones instead. why this is exposed through uno is bewildering, stubbed those out for the moment Change-Id: I7a31d027287436be1c075c76a370047efd010bf3
2016-10-05convert MapUnit to scoped enumNoel Grandin6-45/+45
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann7-16/+16
...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-09-30loplugin:constantparamNoel Grandin1-13/+4
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann12-14/+14
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-07loplugin:constantparam in framework..vbahelperNoel Grandin2-10/+10
Change-Id: I592f73012ae8a4df8488ef04dc0956d9400625bc
2016-09-05convert ScrollType to scoped enumNoel Grandin1-3/+3
Change-Id: I6dd02d4f7df028dada6cfd5d767a6ec1b1c1efe1
2016-09-05convert RasterOp to scoped enumNoel Grandin1-2/+2
Change-Id: I136423c105316c9b5b18e64d04a248fd7ac5590b
2016-09-01std::list<sal_uInt16> -> vectorNoel Grandin8-38/+38
Change-Id: Ic08ac3fcb750ceff1f5b3201d4a3151ad567aa1f
2016-08-03Reduce ENABLE_OPENGL / ENABLE_HEADLESS confusionTor Lillqvist1-1/+1
ENABLE_OPENGL means whether to enable the OpenGL slideshow transition code. It does not mean whether to enable use of OpenGL in general. So rename it to ENABLE_OPENGL_TRANSITIONS while at it. ENABLE_HEADLESS means whether to disable use of X11 and OpenGL on X11 (and Wayland) platforms, I think, meaning Linux and maybe Solaris and the BSDs. Maybe it should be renamed to DISABLE_X11_AND_OPENGL. Change-Id: Ibb30f51646b1bcc477fe691a3fa38c7a1e3944ae
2016-07-27cppcheck: noExplicitConstructorCaolán McNamara1-1/+1
Change-Id: Id0a6cd461b2ba56e3b9b944514f3b0d0eb75cc44
2016-07-27improve passstuffbyref return analysisNoel Grandin1-1/+1
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-12new loplugin fragiledestructorNoel Grandin1-1/+1
fix up a small number of places that it finds Change-Id: Iedc91e141edfb28f727454f698cd2155a7fd5bf4 Reviewed-on: https://gerrit.libreoffice.org/26566 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-08loplugin:redundantcast: redundant static_casts in toolkitStephan Bergmann1-1/+1
Change-Id: Iee61c812384e24a9ac68f1e0ee4ba590838442ca
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann1-1/+1
Change-Id: I89b22238078c00339a06d7023e024e25a4d4e5bd
2016-07-04merge toolkit::NameContainer_Impl with toolkit::ScriptEventContainerNoel Grandin1-12/+13
Change-Id: I14e9401056e31ee9d4ad5945a73ca31969430b4c Reviewed-on: https://gerrit.libreoffice.org/26891 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28loplugin:singlevalfields in variousNoel Grandin1-3/+0
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e Reviewed-on: https://gerrit.libreoffice.org/26738 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-24loplugin:singlevalfields in vcl(part1)Noel Grandin2-6/+4
Change-Id: I0031199937cc95793951a070c4b3d8910933e69f Reviewed-on: https://gerrit.libreoffice.org/26595 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23tdf#97527 - vcl: reference-count MenuNoel Grandin1-5/+5
some places are marked with "dodgy"- need to check those to see what is going on, because they are leaving dangling pointers behind in the Menu class Change-Id: I41d5c7c0fec2f70ce9e3ffdc48cd03d26c0a869b Reviewed-on: https://gerrit.libreoffice.org/26516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-19loplugin:salbool: Implicit conversions from non-Boolean fundamental typesStephan Bergmann1-4/+4
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-06-10Add a pause() method to XToolkitExperimentalTor Lillqvist1-0/+35
Pauses the main thread of LibreOffice for the requested amount of time. Change-Id: I5978a3a9b9561623c698526d8c29695d71df3d03
2016-06-01fix compile error in SelectionDialog (java unit test)Noel Grandin1-1/+1
I suspect that this code is not actually in use anymore Change-Id: I1888c4beec9add7d82e321ad09e1116d1205fbca
2016-05-31tdf#100092: Deterministic scheduling to prevent unpredictable behavior.Jan Holesovsky1-2/+12
Low priority idles can fire more or less randomly, and consequently two consequent runs of LibreOffice differ in the amount of the idles that have been performed during an operation. This commit adds a possibility to turn on a 'deterministic mode' where two subsequent runs of LibreOffice trigger about the same amount of events when they perform the same set of operations. Change-Id: I92566ef4eee20e7d604cfd48f01c4df30c77e653
2016-05-30Convert SelectionMode to scoped enumNoel Grandin1-1/+1
Change-Id: I86c435de3918540cb54a0cb24568e58456c2f9d1 Reviewed-on: https://gerrit.libreoffice.org/25611 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30Convert ImageSet to scoped enumNoel Grandin1-1/+1
Change-Id: I9957435f769957d76e95248914a422e82019e22d Reviewed-on: https://gerrit.libreoffice.org/25604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19Resolve: "TODO(Q1): Make GetSystemData method virtual"Caolán McNamara2-2/+2
and remove the casting silliness, allowing the removal of cairo_cairo.?xx If anything is to go wrong I'd guess it'll be the windows directx stuff. Change-Id: I3e22c07b9c26ade9b27a245fdd8408de540643f4
2016-05-19rename to two GetSystemData methods to find all call-sitesCaolán McNamara2-2/+2
anyplace calling GetSystemChildSystemData on a SystemChildWindow is definitely right anyplace calling GetWindowSystemData on a Window *might* have intended to call GetSystemChildSystemData on a Window casted back to an underlying SystemChildWindow. Change-Id: I7dcf3a50d0b7ed29bc08cfdb15cc0dcb86be8fa7 Reviewed-on: https://gerrit.libreoffice.org/25158 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-18clang-tidy modernize-make-sharedNoel Grandin1-1/+1
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a Reviewed-on: https://gerrit.libreoffice.org/25056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-13clang-tidy modernize-loop-convert in toolkit to uuiNoel Grandin4-16/+15
Change-Id: I805aa1389ef8dde158f0b776d6b59579fa3082e4 Reviewed-on: https://gerrit.libreoffice.org/24921 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann2-2/+2
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10Insert explicit "break" when falling through to empty next caseStephan Bergmann1-1/+3
...which itself only contains a "break" (or nothing at all at the end of the "switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these. Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
2016-05-09convert FONT_EMPHASIS_MARK to scoped enumNoel Grandin1-1/+1
Change-Id: I137c78b337e57d3442db08334128e79d186b278f Reviewed-on: https://gerrit.libreoffice.org/24753 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-04use Any constructor instead of temporariesNoel Grandin4-247/+84
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-04-28teach stylepolice plugin about ref-counted-pointer namingNoel Grandin1-2/+3
Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752 Reviewed-on: https://gerrit.libreoffice.org/24459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-25Some more sal_Bool -> boolStephan Bergmann1-1/+1
Change-Id: Ibb07e8c5b9ef44dac5ce23c590783c1462c532d7
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann18-51/+51
Change-Id: I04d2884dcb81482c5c3450c98cccb36096a126d4
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin9-20/+17
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18clean-up: unused using declarations and includesJochen Nitschke3-5/+0
Searched source for using declarations. Checked if those symbols reappear in the source file, even in comments or dead code but not in #include statements. If they don't reappear, remove the declaration. Remove includes whose symbol got removed. Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0 Reviewed-on: https://gerrit.libreoffice.org/24148 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>