summaryrefslogtreecommitdiff
path: root/comphelper/qa
AgeCommit message (Collapse)Author
2017-05-04Replace all OUString("") with OUString()Arnaud Versini
Change-Id: Ie14c4d76cb61cfbe0410103adfc1afc8ade0f3e0 Reviewed-on: https://gerrit.libreoffice.org/37146 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-29add test for MD5 hashingMarkus Mohrhard
Change-Id: If13f6d800b857cc6d581ef7800beb0f25b3f5a37 Reviewed-on: https://gerrit.libreoffice.org/36793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-28loplugin:cppunitassertequals: comphelperStephan Bergmann
Change-Id: Ice8310b60d8bd2930bc00110f88f77565d33341b
2017-04-21add test for generic digest classMarkus Mohrhard
Change-Id: Ibe3f033ebec5f832eee7420013c7083ab224e65e Reviewed-on: https://gerrit.libreoffice.org/36791 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-14update cppunit to 1.14.0Markus Mohrhard
Change-Id: I95fa42f4ef0580734b605df859c1660b29adb8b2 Reviewed-on: https://gerrit.libreoffice.org/36499 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-31This only wants to check for Windows in general?Stephan Bergmann
Change-Id: I0578e046b8d97b076ca638912740d548453a9a04 Reviewed-on: https://gerrit.libreoffice.org/35916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-29sw: plain-text ASCII export: filter out all CH_TXT_ATR_*Michael Stahl
These control characters are Writer implementation details and should not be available via public interfaces. This filter is also used by SwXTextRange::getString(). Change-Id: If656ee3d451dbefe2f7a905e8b63a44cdb787809
2017-03-25Fix typosAndrea Gelmini
Change-Id: If92860597a44ee79b513d255ce3f21112485a97e Reviewed-on: https://gerrit.libreoffice.org/35617 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-26loplugin:loopvartoosmallStephan Bergmann
Change-Id: Iedfb57f97a15b17a68a5de8e5efd9ba196864964
2017-02-21loplugin:subtlezeroinit: comphelperStephan Bergmann
Change-Id: I6b97583d9bdc0d0f8c059d0fbc9e3f41f822bf3b
2017-02-02unnecessary use of OUStringBuffer in throwing exceptionsNoel Grandin
Change-Id: Iec1473264426f19c31e72260dfce9494389e474f Reviewed-on: https://gerrit.libreoffice.org/33788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-28loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-07tdf#88206 replace cppu::WeakImplHelper* miscJochen Nitschke
also edited two examples in canvas comments Change-Id: Iac82b462168f869f995c33bb2c639f3dbe09cbd5 Reviewed-on: https://gerrit.libreoffice.org/31715 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-21Delete the "Any-to-Any" template specializations for LIBO_INTERNAL_ONLYStephan Bergmann
i.e., css::uno::Any function template specializations Any::has<Any>() const Any::get(Any const &) const operator >>=(Any const &, Any &) operator <<=(Any &, Any const &) that don't make much sense (the first is always true, the rest can be replaced with operator =, which additionally supports move semantics). For 3rd-party compatibility, do this only for LIBO_INTERNAL_ONLY, however. However, some generic template code did benefit from operator >>= working also for Any, so make up for that with a new (LIBO_INTERNAL_ONLY, given that operator >>= still covers if fine for !LIBO_INTERNAL_ONLY) fromAny, complementing the existing toAny. Change-Id: I8b1b5f803f0b909808159916366d53c948206a88 Reviewed-on: https://gerrit.libreoffice.org/30022 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
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-08-30Let OUStringLiteral1 take its arg as ctor arg, not template argStephan Bergmann
...which makes it more flexible, can now also be used on non-const arguments. The drawback of the argument no longer being a compile-time constant is remedied by making the ctor constexpr. Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
2016-08-29Adapt loplugin:stringconstant to improved OUStringLiteral1Stephan Bergmann
Change-Id: Ibc5128df8bcf8cb5f2f09551c0de6dfdb46bdee0 Reviewed-on: https://gerrit.libreoffice.org/28447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-10comphelper: fix loplugin:cppunitassertequals warningsMiklos Vajna
Change-Id: If042462d8f250dbe2e1be278b7524dab243b08e8 Reviewed-on: https://gerrit.libreoffice.org/28012 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-04remove comphelper::string::removeNoel Grandin
and replace it with OUString/OString::replaceAll Change-Id: I37b1c3b51251dfd9d749d6f1060c75b3a93d7f1a Reviewed-on: https://gerrit.libreoffice.org/26850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-18add comphelper::string::splitMarkus Mohrhard
Change-Id: Iccc989a786e8e7b8dca1996b635248d7bf7fc5d8
2016-06-16Expect fewer than MAX_CONCURRENCY threads in test (2)Ashod Nakashian
Change-Id: I895ae4dea12e66fcbd0f4635c6ba5915d0431187 Reviewed-on: https://gerrit.libreoffice.org/26346 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-16Expect fewer than MAX_CONCURRENCY threads in testAshod Nakashian
Change-Id: I4346b6d79b46bccb5b79e27744c3cf80aa88fc9a Reviewed-on: https://gerrit.libreoffice.org/26344 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-15tdf#98955 hardware_concurrency not ideal for thread poolsAshod Nakashian
A new static member getPreferredConcurrency added to comphelper::ThreadPool to return a configurable max number of threads. By default the new function returns the hardware_concurrency value provided by std::thread. When MAX_CONCURRENCY envar is defined, the return value is limited to whatever is set there. Three call-sites that used std::thread::hardware_concurrency have been replaced with getPreferredConcurrency. Unittests added to cover the functionality of the new member. Unittests are capped to 4 threads. Change-Id: I3332e393a88a5ed436316fa712ed920a4b37f4af Reviewed-on: https://gerrit.libreoffice.org/26254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-24convert HighlighterLanguage to scoped enumNoel Grandin
Change-Id: Ibf0871601e52ea4fa49e9622176431943c55abdd
2016-02-24convert TokenTypes to scoped enumNoel Grandin
Change-Id: I17c0a616dd6cf48a22896b6cd6b0df157d1f9a9f
2016-02-08loplugin:unusedmethodsNoel Grandin
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-25cleanup OInterfaceContainer2 unit testsNoel Grandin
remove unused code and actually hook up the tests in testifcontainer.cxx Change-Id: I9694ebe44f1e8eed3d72373d62424345f899c8e6
2016-01-25loplugin:overrideStephan Bergmann
Change-Id: I9a67ed46a67be521d00ed2368b4820737dcb15e5
2016-01-25loplugin:cstylecastStephan Bergmann
Change-Id: Ie2aeedac1b3fd90d6302be6e5917e99a782d76c7
2016-01-25InterfaceContainer2 with vector instead of SequenceNoel Grandin
create an InterfaceContainer2 class to replace InterfaceContainer. It uses a std::vector instead of a Sequence for the mutable listener list, which provides far better performance. Switch all our internal use-sites to the new class. Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2016-01-07Fix typosAndrea Gelmini
Change-Id: I90b04b8eda6fc3d530c9db72052720cbe9de0343 Reviewed-on: https://gerrit.libreoffice.org/21197 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-20Seems more natural to pass a homogenous list by initializer_listStephan Bergmann
...than by template parameter pack (even if that requires using ServiceDecl*, as initializer_list cannot take reference types) Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
2015-11-05java: make inner classes static where possibleNoel Grandin
Change-Id: Icc6444ad15d9f4b50858d8c1b1d3adeaeac40926
2015-10-23Remove obsolete version map filesStephan Bergmann
Change-Id: Ic179264fe306bb2bca9797f10e26c0224fb1dd00
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-06tdf#94228 comphelper: replace BOOST_PPDaniel Robertson
Replace BOOST_PP macros in comphelper with variadic templates. The client interface should not change. However, there are a few side effects due to this change. The most important being 1) There is no longer a maximum number of service declarations limmited by default at 12 for unwrapArgs and component_getFactoryHelper. 2) component_getFactoryHelper now terminates early as soon as pRet is not a null pointer. Change-Id: I016fd208d0e80f91d8669fff29d58b6189e946d3 Reviewed-on: https://gerrit.libreoffice.org/18891 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-08-21Remove demonstrated-useless comphelper::compareStephan Bergmann
Change-Id: Ifd1b38afb963255b76f0d821eb46e4c6a972128a
2015-08-21Demonstrate comphelper::compare is uselessStephan Bergmann
Change-Id: I03de2d02f4814bf3425f7278ec91ed1e3b4ce1a0
2015-07-20tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
with the variadic variants, for comphelper. This also includes extra changes in other modules required accordingly. Change-Id: Id1537f46f1c90f760a0d8987a6dafa0e1da03b8f Reviewed-on: https://gerrit.libreoffice.org/16929 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-16Fix typosAndrea Gelmini
Change-Id: Id8c7cf460cba5af89891c470e1aaa61b227d356e Reviewed-on: https://gerrit.libreoffice.org/16310 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-01-02Remove unnecessary comphelper::string::getTokenStephan Bergmann
Change-Id: I49192637121441b9a1980350b9bb32cd995d4386
2014-12-11java: reduce visibility of fields and methodsNoel Grandin
found by PMD Change-Id: Id6737916b68ccbdbdeec5d314747a38410923ac6 Reviewed-on: https://gerrit.libreoffice.org/13409 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-10java: simplify the getMSF() methodsNoel Grandin
Change-Id: Ib459799f4a3224f8c9683ac4b6cf37982d2077a3 Reviewed-on: https://gerrit.libreoffice.org/13406 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-10java: remove some comment noiseNoel Grandin
Change-Id: I4d15a0e606f468346bc5d2f43af2e14bcc758e13 Reviewed-on: https://gerrit.libreoffice.org/13405 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-14Some more compareVersionStrings() testsTor Lillqvist
Change-Id: I5b9dc45352afd63dae4c3952d9647e6e3ec98ef4
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-11Add a function to compare version number stringsTor Lillqvist
Change-Id: I88d3d9040f70e84752ade19001a699f60e9e7636
2014-08-20java: remove modifiers implied by the contextNoel Grandin
found by PMD Change-Id: I04cbf986ddbcffff987784f381b8a9f52f1b3f31
2014-08-20java: remove unnecessary return statementsNoel Grandin
found by PMD Change-Id: I3d150421948d17eaed34fac2b1a212da34288d1a