summaryrefslogtreecommitdiffstats
path: root/comphelper
Commit message (Collapse)AuthorAgeFilesLines
* comphelper: fix MSVC 2015 build by removing pointless catchlbenes2016-08-011-11/+1
| | | | | | | | | In C++11 the destructors are implicitly noexcept. Change-Id: I37e78e39bcc19dfbc81a781a5b353e49f09ae942 Reviewed-on: https://gerrit.libreoffice.org/27708 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#100726: Improve readability of OUString concatenationnadith2016-08-013-6/+3
| | | | | | | | | this bug fixed in the modules between canvas - cppu Change-Id: I2022b022897dafde20251352376e3facdb9b8d75 Reviewed-on: https://gerrit.libreoffice.org/27663 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* comphelper,vcl: let DeInitVCL() join some AsyncEventNotifier threadsMichael Stahl2016-07-291-7/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | comphelper::AsyncEventNotifier is an amazing class that dispatches events in separate threads, no doubt implemented during times of exuberant optimism about the tractability of shared-state multi-threading. Unfortunately the authors forgot to think about how all those awesome threads will be joined, so if they are somehow blocked, then it may well happen that the events are dispatched when the main thread is already in DeInitVCL, and the objects required for the dispatching already smell somewhat funny. This happens quite reproducibly when changing dbaccess' ModelMethodGuard to lock the SolarMutex too, then CppunitTest_dbaccess_RowSetClones crashes in DeInitVCL() because one AsyncEventNotifier thread was blocked until then by SolarMutexGuard, and this test never Yields once its document is loaded. Try to fix this by joining the "DocumentEventNotifier" threads from DeInitVCL() itself. Since there's no rtl::WeakReference to go with rtl::Reference, refactor the AsyncEventNotifier and create a new AsyncEventNotifierAutoJoin that has to be used with std::shared_ptr and std::weak_ptr. Change-Id: I50a0749795acb04b0776e543f7125767b697ea35 Reviewed-on: https://gerrit.libreoffice.org/27581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* change from a 2 min dbgutil failure to a 3 minCaolán McNamara2016-07-271-2/+2
| | | | | | to try and align with the crashtesting timeout Change-Id: Ife3a4a3d63bbb9d9d5b612675e3728900262bf6c
* improve passstuffbyref return analysisNoel Grandin2016-07-274-7/+7
| | | | | | | Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* fix buildCaolán McNamara2016-07-181-1/+1
| | | | Change-Id: I90d6826e4544fd39120982f80d41e237a5edbab6
* -Werror=enum-compareNoel Grandin2016-07-181-1/+1
| | | | Change-Id: I6bb2c9bcefd9dbb0efd262b1462625a157d11e6f
* remove some now unnecessary debug traceNoel Grandin2016-07-181-5/+0
| | | | Change-Id: I15fef941c5a9c9d7627ca22029a95c8e6928ee20
* add tagging to ThreadTasks so we don't need more one poolNoel Grandin2016-07-181-10/+139
| | | | | | | | | | | | | | | If more than one place in the code submits tasks to the shared pool, then waitTillDone() becomes unreliable. Add a tagging mechanism, so different callsites can wait on different sets of tasks. Also try to protect our worker threads against exceptions from the thread tasks code. Change-Id: Idde664ab50008d31a2dd73910bb22f50e62ae22f Reviewed-on: https://gerrit.libreoffice.org/27042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Implement XServiceInfo for com.sun.star.comp.MemoryStreamMatúš Kukan2016-07-091-4/+23
| | | | Change-Id: Ie5499d2ac4aac67dc73fdc58958443b8060c4139
* tdf#74608 Constructor function for MemoryStreamYeliz Taneroğlu2016-07-094-27/+8
| | | | Change-Id: I5b0667c4c2808913cde686afa7315ef2319b4d49
* loplugin:redundantcast: redundant static_casts in comphelperStephan Bergmann2016-07-081-2/+2
| | | | Change-Id: I6112c3cc40383d00ea134bdc650e457f942e0dcf
* loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann2016-07-073-4/+4
| | | | Change-Id: I11d6467a35fb9e32cc0608549bd323b1f6683b9f
* remove comphelper::string::removeNoel Grandin2016-07-041-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>
* Improve readability of OUString concatanation in OStorageHelperMuhammet Kara2016-06-281-10/+10
| | | | | | | | | | It is more readable and more efficient as a bonus. See: https://goo.gl/jsVAwy: Change-Id: I5cc22276fc385a381d64e00f20d6d2b302ea587f Reviewed-on: https://gerrit.libreoffice.org/26720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:singlevalfields in comphelperNoel Grandin2016-06-242-27/+4
| | | | | | | Change-Id: I22711d226a266dc00c32beff54398a55c4c9691a Reviewed-on: https://gerrit.libreoffice.org/26599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:singlevalfields in ucbhelperNoel Grandin2016-06-242-8/+0
| | | | | | | Change-Id: I738bda6e6e161fb5ea96bd496a21ccf72680cd7f Reviewed-on: https://gerrit.libreoffice.org/26604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Clean up uses of Any::getValue() in comphelperStephan Bergmann2016-06-203-13/+18
| | | | Change-Id: I433cca20fb29c6b6ede934edcb2e200f15b060f2
* loplugin:salbool: Implicit conversions from non-Boolean fundamental typesStephan Bergmann2016-06-191-2/+2
| | | | Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
* LOK: tile rendering regression fixAshod Nakashian2016-06-191-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Calc fast rendering requires us to offset the are being rendered and shift all bitmaps accordingly. This however is breaking Impress rendering since the offseting logic is common (in svx and vcl). This adds new API to enable or disable this local rendering (as opposed to rendering a full document as was previously done. The new flag is then set by Calc to enable the offseting logic in isolation without affecting other applications. In one case isolation was achieved by checking the MapModeUnit. Change-Id: Ia0aadfc3f6df7c1a891b97dc731f5897414c9420 Reviewed-on: https://gerrit.libreoffice.org/26367 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 60fdcda65bad242f99895cb453182578250fbdea) Reviewed-on: https://gerrit.libreoffice.org/26378 Tested-by: Jenkins <ci@libreoffice.org>
* add comphelper::string::splitMarkus Mohrhard2016-06-182-9/+32
| | | | Change-Id: Iccc989a786e8e7b8dca1996b635248d7bf7fc5d8
* uitest: this is obviously wrongMarkus Mohrhard2016-06-181-1/+1
| | | | Change-Id: I48be9d1daeff83913909f57bf972ca171367a2b0
* Simplify OPropertyContainerHelper::registerPropertyNoMember's _pInitialValueStephan Bergmann2016-06-172-9/+9
| | | | Change-Id: Ibfb27b3eded45e2646dada37ce3663f427985ae9
* comphelper lok: remove the g_bViewCallback globalMiklos Vajna2016-06-171-12/+0
| | | | | | | | | | | | | Its purpose was to allow incrementally migrate all callers of SdrModel::libreOfficeKitCallback() to use SfxViewShell::libreOfficeKitViewCallback() (which allows notifying only the currently active or all views) instead. That is done by now, so it can go. Change-Id: I521bbbe5c638dfd844ebf025153459a37362d3c3 Reviewed-on: https://gerrit.libreoffice.org/26413 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* comphelper: enable LibreOfficeKit::isViewCallback() by defaultMiklos Vajna2016-06-161-1/+1
| | | | | | | | | | This requires porting the sw/sd/sc_tiledrendering test code to the new internal API, as only the public LOK API is unchanged. Change-Id: Ic6a2f96421da4a16bdee7d0cbb3f6e35bc6ddff9 Reviewed-on: https://gerrit.libreoffice.org/26379 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* Expect fewer than MAX_CONCURRENCY threads in test (2)Ashod Nakashian2016-06-161-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>
* Expect fewer than MAX_CONCURRENCY threads in testAshod Nakashian2016-06-161-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>
* tdf#98955 hardware_concurrency not ideal for thread poolsAshod Nakashian2016-06-154-2/+110
| | | | | | | | | | | | | | | | | | | | | | 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>
* tdf#94698 cleanup Makefiles. Get rid of udkapi and offapiGleb Mishchenko2016-06-093-12/+3
| | | | | | | | | | | | | | | | | | | | This patch changes occurences in makefiles from $(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \ udkapi \ offapi \ )) to $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config)) (corrected instead of abandon, jani) Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e Reviewed-on: https://gerrit.libreoffice.org/23426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
* remove some manual ref-countingNoel Grandin2016-06-061-14/+8
| | | | | | | | | | | | | triggered when I noticed a class doing acquire() in the constructor and then release() in the destructor. found mostly by git grep -n -B5 -e '->release()' Change-Id: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f Reviewed-on: https://gerrit.libreoffice.org/25806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#89329: use unique_ptr for pImpl in accimplaccessXisco Fauli2016-06-031-2/+1
| | | | | | | Change-Id: Ib10088b5669695dd5e288fe043ad72056a34b1e4 Reviewed-on: https://gerrit.libreoffice.org/25745 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#89329: use unique_ptr for pImpl in embeddedobjectcontainerXisco Fauli2016-06-031-4/+3
| | | | | | | Change-Id: I679555e2eb51e2b9660bb035a08d8da8b1687cab Reviewed-on: https://gerrit.libreoffice.org/25747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#89329: use unique_ptr for pImpl in propertysetinfoXisco Fauli2016-06-021-12/+11
| | | | | | | Change-Id: I8df0ed4d7c7df27f570ad09936f17941c30aae91 Reviewed-on: https://gerrit.libreoffice.org/25749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#89329: use unique_ptr for pImpl in propertysethelperXisco Fauli2016-06-021-15/+14
| | | | | | | Change-Id: I5891fe7c298b4b3409ac6579ed167a4e0183c89a Reviewed-on: https://gerrit.libreoffice.org/25748 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#89329: use unique_ptr for pImpl in componentmoduleXisco Fauli2016-06-021-14/+0
| | | | | | | Change-Id: Ida8e271b1dd755289371e457a7c83657b8a84f99 Reviewed-on: https://gerrit.libreoffice.org/25746 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#89329: use unique_ptr for pImpl in accessiblecontexthelperXisco Fauli2016-06-011-5/+1
| | | | | | | Change-Id: Ib78ee2f1faa4f9430e08bfbd0cfb0863da7d6dcb Reviewed-on: https://gerrit.libreoffice.org/25744 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* teach refcounting clang plugin about uno::ReferenceNoel Grandin2016-05-311-1/+1
| | | | | | | | | | | | | | uno::Reference is only allowed to used with classes that have a ::static_type member. So convert all those places to rtl::Reference. Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and uno::Reference to make this a little smoother? Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3 Reviewed-on: https://gerrit.libreoffice.org/25516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* comphelper: fix the comphelp.componentMichael Stahl2016-05-261-1/+1
| | | | | | Amazingly doesn't break anything, it ends up as &gt; in services.rdb Change-Id: Ide718c7fac28af57cb452aa6ab75d58d91b40a0f
* tdf#74608 Constructor functions for OPropertyBagSteven Guo2016-05-265-41/+12
| | | | | | | | | Added constructor function for OPropertyBag in /comphelper/source/property/. Change-Id: I28d6aa5c6fa2aa4324cf4ac61c5f2e3ab0a5e14a Reviewed-on: https://gerrit.libreoffice.org/23541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* loplugin:unusedmethodsNoel Grandin2016-05-261-29/+0
| | | | | | | Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda Reviewed-on: https://gerrit.libreoffice.org/25431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Revert "remove some manual ref-counting"Noel Grandin2016-05-241-8/+14
| | | | | | | until I have a better understanding of the UNO reference counting. This reverts commit 111de438ea3e512a541281dc0716cc728ea8d152.
* remove some manual ref-countingNoel Grandin2016-05-241-14/+8
| | | | | | | | | | | | | triggered when I noticed a class doing acquire() in the constructor and then release() in the destructor. found mostly by git grep -n -B5 -e '->release()' Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f Reviewed-on: https://gerrit.libreoffice.org/25363 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* clang-tidy misc-unused-alias-declsNoel Grandin2016-05-191-2/+0
| | | | | | | Change-Id: Iabde7a84b9c2758e0d2b2ffe0fb99fcfa51ff124 Reviewed-on: https://gerrit.libreoffice.org/25075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* update unusedmethods plugin to deal with constructorsNoel Grandin2016-05-182-18/+0
| | | | | | | | | | and fix the operator< implementations in some of the other plugins too. Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035 Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* clang-tidy modernize-make-sharedNoel Grandin2016-05-181-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>
* conver CHAR to scoped enumNoel Grandin2016-05-161-73/+79
| | | | | | | Change-Id: Ie7f22c6986a0973e6d50bbd1fe9c10f6b478a2db Reviewed-on: https://gerrit.libreoffice.org/24984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* use Any constructor instead of temporariesNoel Grandin2016-05-042-6/+2
| | | | Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
* Iteration must not start at the endSeraphime Kirkovski2016-04-291-1/+1
| | | | | | | Change-Id: I2aebcc909aa9222fc1881e57bbc844025a154e84 Reviewed-on: https://gerrit.libreoffice.org/24497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
* -Werror,-WvarargsStephan Bergmann2016-04-271-9/+5
| | | | | | | | | "passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]" just replace the variadic function with one taking an initializer list Change-Id: Ied3dfe835dcebef48cf35374ec4d8835f98e6779
* loplugin:simplifyboolStephan Bergmann2016-04-261-1/+1
| | | | Change-Id: Ie3662271f57df724329cb5fa52881479890277f9