summaryrefslogtreecommitdiff
path: root/basctl
AgeCommit message (Collapse)AuthorFilesLines
2017-07-02loplugin:casttovoid: basctlStephan Bergmann10-18/+7
Change-Id: I3a8222d39ed02fc048dab1dc6f8dd0ac48857b3e
2017-06-28ChooseMacro rMacroDesc parameter is unusedStephan Bergmann4-11/+8
...ever since 49751c87652bdd9de8aeca244b4644811f4b0956 "INTEGRATION: CWS tbe11" Change-Id: I038616f5e69bbf1fa04c2fff3ca63e381549aa89
2017-06-23loplugin:unusedfields in accessibility..comphelperNoel Grandin2-8/+1
Change-Id: Ifb68d65fc3e48dd80e3ff2b7a4124468fdda1695 Reviewed-on: https://gerrit.libreoffice.org/39137 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21s/ERRCODE_SBX_OK/ERRCODE_NONENoel Grandin1-2/+2
adds no value Change-Id: Iedf7a6a7be28fed4059b576312890be8cbb980d7 Reviewed-on: https://gerrit.libreoffice.org/39056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21convert ErrCode to strong typedefNoel Grandin1-2/+2
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20loplugin:oncevar accessibility..basicNoel Grandin6-20/+10
Change-Id: I8fb41b658ef0f6ad1774ea897eace3dc9bb12de6 Reviewed-on: https://gerrit.libreoffice.org/38969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke1-1/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-16Make SfxItemSet ranges correct by constructionStephan Bergmann1-1/+1
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT) that each individual range has an upper bound not smaller than its lower bound. Arguably, all SfxItemSet instances should fulfill the stronger guarantees required and checked by MergeRange. And in many cases the ranges are statically known, so that the checking can happen at compile time. Therefore, replace the two SfxItemSet ctors taking explicit ranges with two other ctors that actually do proper checking. The (templated) overload taking an svl::Items struct should be used in all cases where the range values are statically known at compile time, while the overload taking a std::initializer_list<Pair> is for the remaining cases (that can only do runtime checking via assert). Most of those latter cases are simple cases with a single range covering a single item, but a few are more complex. (At least some of the uses of the existing SfxItemSet overload taking a const sal_uInt16* pWhichPairTable can probably also be strengthened, but that is left for another day.) This commit is the first in a series of two. Apart from the manual changes to compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and svl/source/items/itemset.cxx, it only consists of automatic rewriting of the relevant SfxItemSet ctor calls (plus a few required manual fixes, see next). But it does not yet check that the individual ranges are properly sorted (see the TODO in svl::detail::validGap). That check will be enabled, and the ensuing manual fixes will be made in a follow-up commit, to reduce the likelyhood of accidents. There were three cases of necessary manual intervention: * sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in braced-init-list syntax now, so needs explicit narrowing conversion to sal_uInt16. * In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually. * In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx, sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx, sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx, some comments had to be put back (see "TODO: the replaced range can contain relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx). A few uses of the variadic form erroneously used nullptr instead of 0 for termination. But this should have been harmless even if promoted std::nullptr_t is larger than promoted sal_uInt16, assuming that the part of the nullptr value that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly, some uses made the harmless error of using 0L instead of 0. Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35 Reviewed-on: https://gerrit.libreoffice.org/38861 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-15replace SbxError typedef with ErrCodeNoel Grandin1-2/+2
part of a larger patch to convert ErrCode to strong_int Change-Id: Ia56e5d6d8c4217d6f258e2113d20ce737977892f Reviewed-on: https://gerrit.libreoffice.org/38813 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-13Use unique_ptr for SfxPrinter::pOptionsStephan Bergmann1-1/+4
Change-Id: I46be77225c0323f8b7f293de9c022f0de6f425b7
2017-06-12cleanup unused css/frame/* includesJochen Nitschke1-1/+0
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12Remove VCLExternalSolarLock and IMutex.Arnaud Versini4-10/+4
Next step is to remove OContextEntryGuard. Change-Id: I9460fb67fba6f3bfb3c809b730c33f38d225a64e Reviewed-on: https://gerrit.libreoffice.org/38411 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05Remove all allocation of VCLExternalSolarLock.Arnaud Versini4-10/+8
This patch is graciously offered by Arnaud Versini. Change-Id: I3ed5e1758d09542a2ca0533e3f4a6ceb2dbb6346 Reviewed-on: https://gerrit.libreoffice.org/38404 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-31disambiguate dual use of toolbar idsCaolán McNamara2-6/+0
for toolbar title string resource and identifier (for config) Change-Id: I2657c3cbb586a62d8075db7cb43cc064b2030f28 Reviewed-on: https://gerrit.libreoffice.org/38274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-30teach redundantcast plugin about functional castsNoel Grandin1-2/+1
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-27Revert "deleted variable bAdd because it does not make sense"Julien Nabet1-4/+9
This reverts commit d0c0ebbcabb67b8dfd130cf4e9e666bba229f846. + fix bAdd logic Change-Id: Iefa70e31c5747db1a881b1036e3d8a8995785603 Reviewed-on: https://gerrit.libreoffice.org/38072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-05-26deleted variable bAdd because it does not make sensetagezi1-8/+4
Change-Id: Ib65c38c7e99ff4667c021240a1412c8f57f53cbe Reviewed-on: https://gerrit.libreoffice.org/38050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-05-25tdf#91913 Saving line numbering into settingtagezi1-10/+13
It saves setting of the line numbering for next start Now the line numbering is enabled by default Change-Id: Ib658d417882996eb843fed9b236496fe2fb42166 Reviewed-on: https://gerrit.libreoffice.org/38013 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-05-23remove VCLExternalSolarLock* members from ..Jochen Nitschke4-12/+2
.. classes with OAccessibleContextHelper base. Change-Id: I3187e88bf485e78fb78550870a87db29d958dbc0 Reviewed-on: https://gerrit.libreoffice.org/37948 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-05-23The menu items are moved according to a general design concepttagezi1-2/+2
Close item was moved to up the first section of File menu GoToLine item was moved from View menu to Edit menu under Find&Replace Change-Id: I2d2561848917c2e6f22baf92030c7b5d147a56bb Reviewed-on: https://gerrit.libreoffice.org/37937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-05-20cleanup unused css/script/ includesJochen Nitschke2-3/+0
but keep exception includes in headers for now Change-Id: I826828675a2d14b906e57068cbced2e790e12bce Reviewed-on: https://gerrit.libreoffice.org/37846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19loplugin:stringcopy: basctlStephan Bergmann1-2/+2
Change-Id: I81e5cb61e1f09cdc8d07efc2fd07e6ba79fdc488
2017-05-19make string translation loading more uniformCaolán McNamara1-1/+1
change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-19loplugin:comparisonwithconstant in accessibility..basegfxNoel Grandin1-1/+1
re-running this plugin on these modules now that sberg has improved the plugin. Change-Id: I1818b1fa540cf62b81219a4f3ed2dcae8ff0e838 Reviewed-on: https://gerrit.libreoffice.org/37805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-17drop IDE_RESSTRCaolán McNamara20-111/+106
Change-Id: Iee1479d472d224bdf19890bbac29d9eeb4e3d00d
2017-05-16Remove unused mpVirtDev (vcl/textview)Julien Nabet2-3/+0
Unused since commit 72edb6967f245f0c99c6a61e0ce8d0a245600cba "loplugin:unusedmethods in vcl" + remove useless EraseVirtualDevice Change-Id: I1b932bb49e9f84e3ddb5c3ab69b3d1b3131233e2 Reviewed-on: https://gerrit.libreoffice.org/37685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-16loplugin:comparisonwithconstant in basctlNoel Grandin4-9/+9
Change-Id: I0ac895e279e4feb47345e73ecef0d5ee1909c031 Reviewed-on: https://gerrit.libreoffice.org/37668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-15Translate German comments and debug strings (leftovers in dirs a... to c...)Johnny_M5-6/+6
Translates all (leftovers) found using a custom regex, in directories not shown by /bin/find-german-comments and beginning with "a" to "c". Change-Id: I3b0152ee78ad80a29d714cbd98bf888f31be4763 Reviewed-on: https://gerrit.libreoffice.org/37573 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-05-15remove some unnecessary lockingNoel Grandin2-6/+0
Change-Id: I7da9e82930d3fe8f927c495aeca270b8bb5cf65c Reviewed-on: https://gerrit.libreoffice.org/37602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12convert SdrLayerId to strong_intNoel Grandin2-2/+2
Also - rename SetOfByte to SdrLayerIDSet - add asserts in SdrLayerAdmin::GetUniqueLayerID so that we don't allocate overlapping SdrLayerID values - add a new constant SDRLAYERPOS_NOTFOUND to be returned from SdrLayerAdmin::GetLayerPos Change-Id: I3bb3489f9338e3d02c4040bcbd811744699941c8 Reviewed-on: https://gerrit.libreoffice.org/37467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-07Fix typosAndrea Gelmini1-1/+1
To complete commit 076758857a98 Change-Id: I6424109e3aee8a3236e40168bdd98c725a7afafb Reviewed-on: https://gerrit.libreoffice.org/37306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-07revert OSL_ASSERT changesChris Sherlock1-2/+2
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert basctl module away from OSL_ASSERT to assertChris Sherlock1-2/+2
Change-Id: I68d18d6c6261c964c6d364b2d492b23b508883cc
2017-05-05loplugin:checkunusedparams in svx(part3)Noel Grandin1-2/+2
Change-Id: I4b9b749565750acc7f674957fd619870b0e29237 Reviewed-on: https://gerrit.libreoffice.org/37240 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-03remove empty namespacesJochen Nitschke1-5/+0
Change-Id: I3eae0ecc1ffc5500d3c55abc6554822f5432a50a Reviewed-on: https://gerrit.libreoffice.org/37173 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02loplugin:checkunusedparams in basctl and basicNoel Grandin10-28/+21
Change-Id: I077ce96aed3c79045d5e8438109a8b1690ff1218 Reviewed-on: https://gerrit.libreoffice.org/37062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-30untranslated strings are just stringsCaolán McNamara5-173/+94
Change-Id: Ic7247a6d0e702572ca304bb048bfabfafcbf7505
2017-04-25remove bitmaps from .src filesCaolán McNamara8-116/+61
and into includeable .hlst files, add them to postprocess/CustomTarget_images.mk to continue only including used bitmaps in icon-theme zips Change-Id: I5c24c3eca93a9c4101bcdcacb0e4b2712133968e Reviewed-on: https://gerrit.libreoffice.org/36941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-25errinf.hxx moved out of tools and into vcl moduleChris Sherlock1-1/+1
ErrorInfo has a hard depency on VCL, yet is in the tools package. It is more appropriate to have it reside in the VCL module. Change-Id: Ica54a46c3a7f86cf0331ed7245234bea69c05650 Reviewed-on: https://gerrit.libreoffice.org/36839 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock5-0/+5
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25loplugin:checkunusedparams in vclNoel Grandin1-1/+1
Change-Id: I26661684e634aa15a18f78442de15c9db832f319 Reviewed-on: https://gerrit.libreoffice.org/36886 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-24BASIC: Call OUString() instead of OUString("");Arnaud Versini1-1/+1
Change-Id: Ie68d48a5dd0fd3593054e853f179db9a4be03b24 Reviewed-on: https://gerrit.libreoffice.org/36831 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky2-2/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-20loplugin:unusedmethodsNoel Grandin1-1/+0
Change-Id: Ib7a9b1b0802ca751da258065e89b412b090bb672 Reviewed-on: https://gerrit.libreoffice.org/36718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19clang-tidy readability-simplify-boolean-expr in accessibility..cuiNoel Grandin1-3/+1
Change-Id: Iae27da322c6ede592e6b268fb2210d3525ed22cc Reviewed-on: https://gerrit.libreoffice.org/36677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-12can use gb_CppunitTest_use_configuration and still access .ui filesCaolán McNamara1-2/+1
after... commit 506cab1a01b0481d0831a7a692a26dc5a5b55e91 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Apr 12 16:14:10 2017 +0100 take the .ui files from $BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR Change-Id: I9cffdc092206c038da32a32a2cfe629e68b5c258 Change-Id: I906d16037cdf0b9203a4120cb1a5e9846a5c7b7f Reviewed-on: https://gerrit.libreoffice.org/36482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-06loplugin:redundantcast find cstyle double castsNoel Grandin1-4/+4
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8 Reviewed-on: https://gerrit.libreoffice.org/36187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05teach constantparam plugin to find always on and always off bitmask valuesNoel Grandin1-1/+1
Change-Id: If56a483494bd3d7feb3fa67c01000dddd0d34421 Reviewed-on: https://gerrit.libreoffice.org/36085 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05loplugin:constantparam part2Noel Grandin2-5/+3
Change-Id: I7ec4c946be52a6b56aee908426f95ecacc7b0746 Reviewed-on: https://gerrit.libreoffice.org/36072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna19-66/+66
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>