summaryrefslogtreecommitdiff
path: root/extensions
AgeCommit message (Collapse)AuthorFilesLines
2017-07-18Change nonsense non-const Date* GetNullDate() to const Date&Eike Rathke1-2/+2
* first, a non-const Date* may leave the impression that one could change the NullDate through the pointer, which is only partly successful; luckily no one did that * second, there is always a NullDate so checking for nullptr is superfluous * third, the pointer was dereferenced (maybe after a check) everywhere to obtain the NullDate, luckily.. Change-Id: I3c3a788ba0336596ac6bde4c96e77a0cdb7a4a95
2017-07-17loplugin:oncevar: extensions (clang-cl)Stephan Bergmann1-2/+2
Change-Id: Id82847d72a106976339fd64685a9029900a862bd
2017-07-13use more OUString::operator== in dbaccess..filterNoel Grandin7-9/+9
Change-Id: Ib7b4f2b2403ce766a7db2f6ffc118468e7677776 Reviewed-on: https://gerrit.libreoffice.org/39889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13loplugin:oncevar: empty strings: extensionsStephan Bergmann1-2/+1
Change-Id: I83fe6f3a918cef2da0085858b63ef86005a61619
2017-07-11use more range-for on uno::SequenceNoel Grandin1-8/+6
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10Add quotation marks around placeholderAdolfo Jayme Barrientos1-1/+1
Change-Id: Id38ecd4c506d785b090d16917341e3e89e81f4c8
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin4-5/+5
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07remove nullptr checks on STL search result iteratorsJochen Nitschke1-1/+1
results are in the range of first_iterator to last_iterator. If one of those is nullptr the algorithm would fail anyway. This removes some impossible checks in sw/source/core/unocore/unochart.cxx: SwChartDataProvider::detectArguments. A sorted range still holds the same values and has the same length as the original range. Replacing raw pointers eases reading this code. Change-Id: If96bd11e9167488346a57e9e08507ac42338d3cd Reviewed-on: https://gerrit.libreoffice.org/39683 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07C++11 remove std::binary_function bases from functorsJochen Nitschke5-18/+4
std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use OString::operator== in preference to ::equalsNoel Grandin2-3/+3
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf Reviewed-on: https://gerrit.libreoffice.org/39646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use more begin()/end() for SequenceNoel Grandin6-33/+19
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
2017-07-05new loplugin unnecessaryparenNoel Grandin2-2/+2
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05loplugin:casttovoid (clang-cl): extensionsStephan Bergmann2-4/+2
Change-Id: I91eeddd37a745592a9aa0f0827f65db257e1dfad
2017-07-04tdf#105831 Add Donate entry on Help menuOlivier1-0/+2
The full implementation depends on infra Task #2179 https://redmine.documentfoundation.org/issues/2179 revision1: change to https, per demand of #2179 Removed ellipsis Code changed as suggested Change call to pass BCP47 string, with language as fallback. task #2179 will be reviewed accordingly. Change-Id: I573542da0f394d7128faab0106df852d622c98b3 Reviewed-on: https://gerrit.libreoffice.org/34693 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-07-04tdf#96505 Get rid of cargo cult "long" integer literalsJens Carl4-11/+11
Remove "long" integer literals in extensions/ Change-Id: I2eb5daa178ec9adcaddb999bad410aff0e94220c Reviewed-on: https://gerrit.libreoffice.org/39149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-04loplugin:unusedfields in editengNoel Grandin3-32/+2
Change-Id: I9806d87028a11a8103c35004c87b5098ca591409 Reviewed-on: https://gerrit.libreoffice.org/39495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03use begin()/end() when working with SequenceNoel Grandin3-6/+5
Change-Id: Icf9da6a24d72c073338f6fbb513d7250b3898015 Reviewed-on: https://gerrit.libreoffice.org/39469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03loplugin:oncevar (clang-cl): extensionsStephan Bergmann4-35/+17
Change-Id: I70cac146d09f015db3f7889f3cdd46c00c45c41a
2017-07-03loplugin:sallogareas (clang-cl)Stephan Bergmann1-1/+1
Change-Id: I0da74386a01c9a2db6436c9cd30aac204eb2ce73
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke6-15/+11
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-02loplugin:casttovoid: extensionsStephan Bergmann13-29/+7
Change-Id: I5922341e0bb74da854307e6cb0a004395f3e8851
2017-06-30hresult1 is unusedStephan Bergmann1-5/+1
...since ffa37355709b95c5b8951f3a46e2b7952eee84d2 "extensions: remove code specific to oleautobridge2" Change-Id: I13042dcf071e510fc5e51627562e35f5c9f1de54
2017-06-30loplugin:oncevarStephan Bergmann1-1/+3
Change-Id: I3c292591aa178b05d8c9aae51031c7a9fd6817a4
2017-06-29loplugin:oncevarStephan Bergmann1-3/+3
Change-Id: I0e1e6f5214aeafc62d29cd25c40ba1c6848ca5e9
2017-06-29loplugin:oncevarStephan Bergmann1-2/+1
Change-Id: I4efa87035436e5f2f5c2b636a2b93954d61704f3
2017-06-26extensions: remove COMPMOD preprocessor definesJochen Nitschke20-46/+34
COMPMOD_RESPREFIX=abp was unused ever since initial commit in 2001. COMPMOD_NAMESPACE was used to set the namespace name qualifier of the helper in componentmodule.hxx to the extension's namespace name. I don't see why this is necessary as the helper is always compiled in a separate extension library. Change-Id: I287607008db3dc0ebc32731536747a921c91807d Reviewed-on: https://gerrit.libreoffice.org/39184 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-26s/catched/caughtNoel Grandin2-2/+2
Change-Id: I7ea6977a9749e86f8058b78cdb91cd2c62da8264 Reviewed-on: https://gerrit.libreoffice.org/39164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23simplify some string handling in tracing callsNoel Grandin1-4/+1
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3 Reviewed-on: https://gerrit.libreoffice.org/39159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23loplugin:oncevar editeng..extensionsNoel Grandin7-34/+15
Change-Id: I3a63e3e3b873ef8a2d708d39be084124a6ad1346 Reviewed-on: https://gerrit.libreoffice.org/39153 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-19Make SfxItemSet ranges correct by construction: Fix static casesStephan Bergmann1-3/+5
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx (which in turn needed a small addition to compilerplugins/clang/check.hxx). Enable svl::detail::validGap check for the static case, but keep it disabled for now for the dynamic case. Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke7-9/+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-3/+2
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-16Profiling API: add ProfileZonesLászló Németh1-0/+2
Change-Id: Ie5669bd75d9b4be047d98402cb69ac313ab618df Reviewed-on: https://gerrit.libreoffice.org/38787 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-14use ERRCODE_NONE instead of 0Noel Grandin2-4/+4
peeling off a small chunk of my ErrCode strong_int conversion Change-Id: Idc89e8496083beed7608cba705cd981139eb7111 Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12cleanup unused css/frame/* includesJochen Nitschke7-11/+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-10coverity#1405937 rework to silence Uncaught exceptionCaolán McNamara2-15/+8
Change-Id: I89be5a53b5282130fd399a17ebe1a03ea75009e5
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara1-1/+1
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-05Fix typosAndrea Gelmini1-1/+1
Change-Id: I9eb05432732a04e816946fbb13001df100a31f73 Reviewed-on: https://gerrit.libreoffice.org/38395 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-03cleanup unused css/inspection/ and css/reportdesign includesJochen Nitschke1-1/+0
Change-Id: I123522dc1df439898dab13c2259e4116e330ad99 Reviewed-on: https://gerrit.libreoffice.org/38367 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02Improved loplugin:redundantcast static_cast handling: extensionsStephan Bergmann3-29/+29
Change-Id: I4320d9631977ed21245fc934368600c4c91668df
2017-05-31Remove some unnecessary scaffolding around SAL_WARN callsStephan Bergmann1-1/+0
Change-Id: Iaec105d85a283ad15fdca6ffc5cf3d2ec5acac18
2017-05-30remove duplicate 'using namespace'Jochen Nitschke1-2/+0
Change-Id: I7f8828f677cfb588135ff75c03ffb75895773440 Reviewed-on: https://gerrit.libreoffice.org/38201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-29remove some unnecessary OString constructor callsNoel Grandin1-4/+4
Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7 Reviewed-on: https://gerrit.libreoffice.org/38130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin7-68/+24
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-22Resolves: tdf#107981 SID_FM_CTL_PROPERTIES colorbox needs a 'default' entryCaolán McNamara1-28/+8
we don't need MakeHexStr either, the colorbox will do that on its own Change-Id: Ifad523092c0f15cd51d0d829790c0cec1c96bb53 Reviewed-on: https://gerrit.libreoffice.org/37898 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-20Translate German comments and debug strings (leftovers in e... dirs)Johnny_M6-7/+7
Translates all (leftovers) found using a custom regex, in directories not shown by /bin/find-german-comments and beginning with "e". Additionally, following is translated: - A help string in /extensions/test/ole/EventListenerSample/EventListener/EventListener.idl Change-Id: Iff521ae1c4a616ed5a4ca79641a5cee6f380bee0 Reviewed-on: https://gerrit.libreoffice.org/37836 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-20cleanup unused css/script/ includesJochen Nitschke4-15/+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: extensionsStephan Bergmann6-11/+11
Change-Id: I6abf8ec16f39db9226efa7e2c7f82644da100c81
2017-05-19make string translation loading more uniformCaolán McNamara26-95/+90
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-16drop extensions workbenCaolán McNamara8-2631/+0
Change-Id: I799d1edae8408fe12e642aed447961a626283852