summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)AuthorFilesLines
2017-01-16tdf#97597: Ensure that each parsing thread has its own buffer.Kohei Yoshida1-12/+34
(cherry picked from commit 4ae705d02df0ddf75b97d0e94add6994626f487e) Change-Id: I93077f954a49b3922930e4fc86c80228be0f4dd2 Reviewed-on: https://gerrit.libreoffice.org/33069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2016-10-04comphelper: move setTiledPainting() from SfxViewShellMiklos Vajna1-0/+12
And make it a static one. The primary point of that member function is to prevent invalidations during paint, and since multiple views are allowed, it wasn't extended to filter out invalidations from all views, not just from the current one. (Same goes for other callback types.) (cherry picked from commit 59e38e946f19ab59370f8e52370b7a7b861cc558) Conflicts: include/sfx2/viewsh.hxx sfx2/source/view/viewsh.cxx Change-Id: I23e6b2c2ff94227f2b72c481148b2d8279ae2905
2016-09-29LOK: conditionally include part number in invalidation payloadMiklos Vajna1-5/+5
Since desktop/ code queues, compresses and only emits callbacks on idle, it's possible that two invalidations are in the queue, and there was a setPart() call between them. In this case it's impossible to tell what part the invalidation was sent for. Fix this by conditionally including the part number in the invalidation payload. It's off by default, a new feature flag is added to request this behavior. gtktiledviewer enables this feature flag by default, though just to show the part number in the debug output. Android doesn't enable it. (cherry picked from commit d5263c2c564c88e3dafe4c1ab8d3d9c1c48ede73) Conflicts: desktop/qa/desktop_lib/test_desktop_lib.cxx Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4
2016-09-16LOK: tile rendering regression fixAshod Nakashian1-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> (cherry picked from commit c337011d2052ec3ddb80e61bcc4b0574b4e898ba)
2016-07-20comphelper lok: remove the g_bViewCallback globalMiklos Vajna1-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> (cherry picked from commit 5b5706f41f97998785e1e7ad356580772da80c42)
2016-07-20comphelper: enable LibreOfficeKit::isViewCallback() by defaultMiklos Vajna1-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. Reviewed-on: https://gerrit.libreoffice.org/26379 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5bf3ae663a2189e37959235cda8c6a4051e10a1a) Change-Id: Ic6a2f96421da4a16bdee7d0cbb3f6e35bc6ddff9
2016-07-20use Any constructor instead of temporariesNoel Grandin1-3/+1
(cherry picked from commit 58a32075ca4f457f570af75aef368dd6c389aca7) Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-07-20new loplugin rangedforcopy - use reference in range based forAndrzej Hunt1-1/+1
Inspired by 6e6ae9803796b120e95f6e89575e03c5fd0ed3c2 Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01 Reviewed-on: https://gerrit.libreoffice.org/20190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 9d0b06e9f728d01a2d2908e1e56cb4220cd414d5)
2016-07-12Remove excess newlinesChris Sherlock31-95/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> (cherry picked from commit a238b1f8d304bf1e2ffb357937f3ec888ee8ac89) Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
2016-07-12update unusedmethods plugin to deal with constructorsNoel Grandin2-21/+6
and fix the operator< implementations in some of the other plugins too. Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 2c8fe2e737b84ecd3dbac36a4fe6bd061bbd3bae) Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
2016-07-12update loplugin stylepolice to check local pointers varsNoel Grandin1-4/+4
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit e8fd5a07eca70912ddee45aaa34d434809b59fb7) Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
2016-06-26tdf#98955 hardware_concurrency not ideal for thread poolsAshod Nakashian4-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. Reviewed-on: https://gerrit.libreoffice.org/26254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 60e75fb276778459f6055360646d879b8c615d83) Change-Id: I3332e393a88a5ed436316fa712ed920a4b37f4af Reviewed-on: https://gerrit.libreoffice.org/26394 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 197c1dacd5725db8ab2faf0aa9b39a2655eb4940)
2016-05-02Iteration must not start at the endSeraphime Kirkovski1-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> (cherry picked from commit 7739bd5f54606603b9b8199f2cb12c4a1cb86b4f) Reviewed-on: https://gerrit.libreoffice.org/24587 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2016-01-18tdf#97108: SwDocShell of clipboard document has no base URLMichael Stahl1-1/+2
... which triggers this assert; have to downgrade it to SAL_INFO. The startsWith("0x") check is obsolete anyway since commit 0f02bc189b6e89ca2e62d4bd6a2f407a9fd4ec3b. Change-Id: If47bc4496852ff85ba1bbeb4205ffc16be0782de (cherry picked from commit bd5834005872d005c3129405c6ab2d6d2bdce19d) Reviewed-on: https://gerrit.libreoffice.org/21467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-15sw: set a BaseURL when copying embedded objectsMichael Stahl1-1/+2
Turns out that SfxObjectShell::CreateShellID() will produce the SfxMedium's base URL if it exists, so EmbeddedObjectContainer::CopyAndGetEmbeddedObject() already has parameters, sw just needs to set them. Change-Id: I36cedfde4e7c2e25c43c66a30d8ca572f099ad69 (cherry picked from commit e4a06fc983fd6a94a6138503c3fc94b567bc3a68)
2015-12-15fix missing BaseURL when loading embedded objectsMichael Stahl1-6/+18
When the object is edited in the UI, the m_xClient is set to a SfxInPlaceClient and the DocumentBaseURL is retrieved from it. But if the object is not edited, it will be loaded during export via the API and without a m_xClient; in this case the DocumentBaseURL must have been set previously to be available during import. There appears to be no way to get the URL of the document via the API while it is being imported; SfxBaseModel's m_sURL is unfortunately only initialized from SfxObjectShell::FinishedLoading(). During ODF import, the SvXMLEmbeddedObjectHelper creates the embedded object, so let's make it pass in the parent's BaseURL. The "DefaultParentBaseURL" parameter already exists but was unused previously. Change-Id: I3d1ed29b3a2c0e77ec606a1d09f7bc07e7860733 (cherry picked from commit b0fc09daf1086423a9bd457d9a2c043e7ff41451)
2015-11-24loplugin:unusedfields in include/comphelper,include/editengNoel Grandin1-1/+1
Change-Id: I619c2cf1765df97159fc52ee84e0e9e8d16a22fe
2015-11-20Seems more natural to pass a homogenous list by initializer_listStephan Bergmann2-50/+14
...than by template parameter pack (even if that requires using ServiceDecl*, as initializer_list cannot take reference types) Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
2015-11-20loplugin:unusedfields in comphelperNoel Grandin1-3/+0
Change-Id: I2e410c973af2eb443fee8fe787920bf6bc205d95
2015-11-20loplugin:sallogareasStephan Bergmann1-1/+1
Change-Id: Ib1f06cb5f925535858bc14aab6f59ad7fd2a3a8d
2015-11-20add mapKeysToSequence/mapValuesToSequence methods to comphelperNoel Grandin4-33/+7
and use them Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec Reviewed-on: https://gerrit.libreoffice.org/20055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-19use comphelper::containerToSequenceNoel Grandin1-3/+2
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-15Fast PCH generator and optimized PCH filesAshod Nakashian1-177/+118
Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-15use initialiser for Sequence<OUString>Noel Grandin5-10/+5
replaced using: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\); .*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g" Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9 Reviewed-on: https://gerrit.libreoffice.org/19969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15use initialiser syntax for Sequence<OUString>Noel Grandin3-6/+3
replaced using the script: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence< OUString > (\w+)\(1\); .*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g" Change-Id: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-12Namespace cleanup and disambiguationAshod Nakashian2-51/+50
Change-Id: Ib6d2f8b4e71436c3a7c26bdfc9847152ebaf0739 Reviewed-on: https://gerrit.libreoffice.org/19900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann33-118/+118
Change-Id: Ibd0e6ae5e3243464b2484a009f2b4781bdaac471
2015-11-09new loplugin: oncevarNoel Grandin1-12/+6
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09Cleanup two unused boost/bind includes in comphelper.Mario J. Rugiero2-2/+0
Change-Id: I8bfbbc82be3a91d7227ff76fc6eb570c1155dd4f Reviewed-on: https://gerrit.libreoffice.org/19844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann2-7/+7
Change-Id: I779e46c9c0db80485d213117028896a7e5b9e943
2015-11-05java: make inner classes static where possibleNoel Grandin1-2/+2
Change-Id: Icc6444ad15d9f4b50858d8c1b1d3adeaeac40926
2015-11-04yyyyyNoel Grandin4-11/+7
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-03lok: Introduce LOK_CALLBACK_UNO_COMMAND_RESULT callback.Jan Holesovsky1-2/+7
Posting of the .uno:Something commands is asynchronous. To be able to find out when eg. .uno:Save finished, this commit introduces a callback that fires when that happens. To be able to receive such a notification, the appropriate postUnoCommand() must be called with 'true' as the parameter for bNotifyWhenFinished (defaults to 'false'). Change-Id: I254939ebc8ea5f309ae39686dcaaeddd5148b0c9
2015-11-02Assume this shall be conditional on DBG_UTILStephan Bergmann1-2/+2
...and not that MSVC-special _DEBUG Change-Id: I927f1d49dcbb24fd8fb91032ded6215390c97d79
2015-10-30use uno::Reference::set method instead of assignmentNoel Grandin10-31/+27
Change-Id: I080668f86f0ab8b3bba857ee21411f907ae285c4
2015-10-30UNO: no need to use OUString constructor when calling createInstanceNoel Grandin4-5/+5
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526 Reviewed-on: https://gerrit.libreoffice.org/19682 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-29Initialize Sequence<beans::NamedValue> from initializer_listsNoel Grandin1-13/+11
Change-Id: I216dcbd983dcf3df79df9fda371b93114540a9d8
2015-10-27loplugin:unusedmethodsNoel Grandin1-14/+0
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861 Reviewed-on: https://gerrit.libreoffice.org/19231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-26remove extra spaces around ::Noel Grandin1-1/+1
just makes it harder to grep for methods Change-Id: I0925db2f9284972fcf7e1e3adf90cbe21f69eb15
2015-10-25tdf#39440: fix several warnings reported by cppcheckSerge Krot1-2/+1
Change-Id: I560d28b7cc67740c6479494d0e5aa62d2ac6ffae Reviewed-on: https://gerrit.libreoffice.org/19587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-10-23Remove obsolete version map filesStephan Bergmann1-24/+0
Change-Id: Ic179264fe306bb2bca9797f10e26c0224fb1dd00
2015-10-20Rename some "document name" params to "document URL"Stephan Bergmann2-5/+5
...to match reality, cf. 7660e4dcecfb19ad8e9e21e5fe53637bd1b9dc6c "tdf#89694 Password dialog for opening OOXML shows url-encoded path" Change-Id: I9fdd204494374770186347e92aa0bd6e7093ffaa
2015-10-18cppcheck:noExplicitConstructorNoel Grandin1-1/+1
Change-Id: I2b68ba9e8caf7971efbba094ef060e72541bdccf Reviewed-on: https://gerrit.libreoffice.org/19426 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann21-232/+232
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-1/+1
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-09Hold the SolarMutex while updating properties; thanks to sberg.Michael Meeks1-0/+7
Change-Id: Id9dc4c7e083da2a8d44c7295a8b605de81bca1ef Reviewed-on: https://gerrit.libreoffice.org/19272 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-09Move SolarMutex down from tools to comphelper/ to make life easier.Michael Meeks1-3/+22
Change-Id: I7dd21f30daa27e5de2848eb16aee9a610dd629d5 Reviewed-on: https://gerrit.libreoffice.org/19271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-09Create a wrapper to make listening for configmgr changes easy.Michael Meeks1-0/+51
Change-Id: Ib58d04f9e046e604b24e0e338796a7a60aa1d6fd Reviewed-on: https://gerrit.libreoffice.org/19253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-08comphelper: add string::join()Miklos Vajna1-0/+11
If there is a need for it, this could be extended later to work with uno sequences and/or OUStrings as well. Change-Id: Id0af8b1755c8e4b668720563d10a052337e1b2c9
2015-10-07loplugin:mergeclassesNoel Grandin1-37/+18
Change-Id: Ia3b63df5e8752690e3350f8a13445a096a839952