summaryrefslogtreecommitdiff
path: root/comphelper/qa
AgeCommit message (Collapse)AuthorFilesLines
2017-04-04sw: plain-text ASCII export: filter out all CH_TXT_ATR_*Michael Stahl1-0/+22
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 (cherry picked from commit ab4f53eaad0c064d9b2ff1c2cb20560f81ade1f7) Reviewed-on: https://gerrit.libreoffice.org/35862 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 5254a7d1cbf3f62c6664299752d2788bb4f2a0b4)
2016-11-21Delete the "Any-to-Any" template specializations for LIBO_INTERNAL_ONLYStephan Bergmann1-1/+1
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 Bergmann1-1/+1
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 Bergmann1-1/+1
...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 Bergmann1-1/+1
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 Vajna4-42/+42
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 Grandin1-16/+0
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 Mohrhard1-0/+12
Change-Id: Iccc989a786e8e7b8dca1996b635248d7bf7fc5d8
2016-06-16Expect fewer than MAX_CONCURRENCY threads in test (2)Ashod Nakashian1-1/+1
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 Nakashian1-1/+1
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 Nakashian1-0/+55
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 Grandin1-6/+6
Change-Id: Ibf0871601e52ea4fa49e9622176431943c55abdd
2016-02-24convert TokenTypes to scoped enumNoel Grandin1-7/+12
Change-Id: I17c0a616dd6cf48a22896b6cd6b0df157d1f9a9f
2016-02-08loplugin:unusedmethodsNoel Grandin1-57/+0
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 Grandin2-85/+34
remove unused code and actually hook up the tests in testifcontainer.cxx Change-Id: I9694ebe44f1e8eed3d72373d62424345f899c8e6
2016-01-25loplugin:overrideStephan Bergmann1-2/+2
Change-Id: I9a67ed46a67be521d00ed2368b4820737dcb15e5
2016-01-25loplugin:cstylecastStephan Bergmann1-6/+6
Change-Id: Ie2aeedac1b3fd90d6302be6e5917e99a782d76c7
2016-01-25InterfaceContainer2 with vector instead of SequenceNoel Grandin2-0/+357
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 Gelmini1-1/+1
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 Bergmann1-50/+0
...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 Grandin1-2/+2
Change-Id: Icc6444ad15d9f4b50858d8c1b1d3adeaeac40926
2015-10-23Remove obsolete version map filesStephan Bergmann1-24/+0
Change-Id: Ic179264fe306bb2bca9797f10e26c0224fb1dd00
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-27/+27
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-06tdf#94228 comphelper: replace BOOST_PPDaniel Robertson1-0/+234
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 Bergmann1-94/+0
Change-Id: Ifd1b38afb963255b76f0d821eb46e4c6a972128a
2015-08-21Demonstrate comphelper::compare is uselessStephan Bergmann1-0/+94
Change-Id: I03de2d02f4814bf3425f7278ec91ed1e3b4ce1a0
2015-07-20tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe1-3/+3
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 Gelmini1-2/+2
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 Bergmann1-5/+5
Change-Id: I49192637121441b9a1980350b9bb32cd995d4386
2014-12-11java: reduce visibility of fields and methodsNoel Grandin1-1/+1
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 Grandin2-4/+2
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 Grandin2-2/+3
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 Lillqvist1-0/+4
Change-Id: I5b9dc45352afd63dae4c3952d9647e6e3ec98ef4
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava1-1/+1
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 Lillqvist1-0/+40
Change-Id: I88d3d9040f70e84752ade19001a699f60e9e7636
2014-08-20java: remove modifiers implied by the contextNoel Grandin1-1/+1
found by PMD Change-Id: I04cbf986ddbcffff987784f381b8a9f52f1b3f31
2014-08-20java: remove unnecessary return statementsNoel Grandin1-1/+1
found by PMD Change-Id: I3d150421948d17eaed34fac2b1a212da34288d1a
2014-08-19java: use 'Short.valueOf' instead of 'new Short'Noel Grandin1-1/+1
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
2014-08-19java: use 'Long.valueOf' instead of 'new Long'Noel Grandin1-1/+1
Change-Id: If4fff3dd37326fbcdd01b743355a16591d71fa69
2014-08-19java: use 'Integer.valueOf' instead of 'new Integer'Noel Grandin1-1/+1
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
2014-08-19java: use Boolean.valueOf instead of instantiating Boolean objectsNoel Grandin1-1/+1
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
2014-08-05java: remove commented out codeNoel Grandin2-41/+0
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
2014-05-11fix-includes.pl: comphelperThomas Arnhold3-7/+7
Change-Id: I0b4cd8320881b2b1f7984c86e58915217bcd0d5f
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann1-27/+27
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-02-27Remove visual noise from comphelperAlexander Wilms1-3/+3
Change-Id: I7e5512b43240beee05404cff9d49a87d0217ea89 Reviewed-on: https://gerrit.libreoffice.org/8242 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann1-27/+27
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2013-10-28Disambiguate CPPUNIT_ASSERT_EQUAL argumentsStephan Bergmann1-14/+14
Change-Id: Ib32d59522f33bcd2608401b4f3d3529d9dee5642
2013-10-28Fold SyntaxHighlighter::initialize into ctorStephan Bergmann1-19/+7
...which reveals that m_pKeyWords, m_nKeyWordCount members are unused. Change-Id: I55020e892d463f2e40d5bcf71efba92778b317c1
2013-10-28Remove unused SimpleTokenizer_Impl::nLine/nColStephan Bergmann1-6/+6
...which are never read; remove thereby unused parameters from functions. Change-Id: I644d2dc1b2d13ae2f932d04243521eef97e67e3e
2013-10-28Correctly fix "Terminating NUL" fixStephan Bergmann1-8/+82
1cbe2313edda8a04f0fe233b4a29ef4e2485f557 "Terminating NUL at end of its buffer is not considered part of OUString" was a thinko that cut the last character off the last reported HighlightPortion on a line. Change-Id: Idbe74676e85749cd93854293c6f49c7581414562