summaryrefslogtreecommitdiff
path: root/include/comphelper
AgeCommit message (Collapse)Author
2017-11-15lokdialog: Dialog invalidation supportPranav Kant
For now, just invalidate the whole dialog whenever any of the controls in the dialog get invalidated. Since during dialog painting, many such invalidations are triggered, don't listen to them when we are painting. Change-Id: Ia8fc12cf9469691d60e91ef770d687e5ff01a7ef
2017-07-20comphelper: Allow initializer lists for Sequences of NamedValues.Jan Holesovsky
This is particularly useful for creation of sequences that are later unwrapped using comphelper::SequenceAsHashMap. Eg. uno::Sequence<uno::Any> aArguments(comphelper::InitAnySequence( { {"SomethingNamed", uno::makeAny(true)}, })); Reference<XExporter> xExporter(aFactory->createInstanceWithArguments(..., aArguments), UNO_QUERY); and in the implementation: comphelper::SequenceAsHashMap aArgumentsMap(rArguments); mbSomething = aArgumentsMap.getUnpackedValueOrDefault("SomethingNamed", false); Change-Id: Ib1135078a99ca08f50bf51184f2ec7d13f5e6b4d Reviewed-on: https://gerrit.libreoffice.org/40194 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-04-04sw: 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 (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)
2017-02-17lok: New feature flag to turn off tiled annotationsPranav Kant
Change-Id: Ie418642242ada98d4a41f30bb6cefcd57f398ef0 Reviewed-on: https://gerrit.libreoffice.org/33472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 75d8b305bbc1c2377f23361ecd64816a350baa4c)
2017-01-16tdf#97597: Ensure that each parsing thread has its own buffer.Kohei Yoshida
(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> Reviewed-on: https://gerrit.libreoffice.org/33176 Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-01-10tdf#104830, need an own termination listener for lib objectsMarkus Mohrhard
The destruction of the SwDLL object happens already through the normal termination listener but the other termination listeners might still depend on it. Also the outstanding events might need the SwDLL instance to be still around. This makes the destruction of the instance explicit and at a time when it should be safe. We should use the same code for calc, impress, math and base as well. Change-Id: I50b8f30426f5a4a54e362e748fe962839abca73e Reviewed-on: https://gerrit.libreoffice.org/32926 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-12-06SafeModeDialog: Add option to reset bundled extension registrationSamuel Mehrbrodt
Change-Id: Ic83ada7cc76142852643cefa60b4fc9286e0756a Reviewed-on: https://gerrit.libreoffice.org/31694 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 4a4c4d3768eab66c14e9e444e33bca0acb60981e) Reviewed-on: https://gerrit.libreoffice.org/31703
2016-12-06SafeModeDialog: Rename to match realitySamuel Mehrbrodt
This doesn't remove shared&bundled extensions, but resets the registration database from shared extensions. Change-Id: I9f198fc7b771fd3bd31547008fd8d006a6d1b5d5 Reviewed-on: https://gerrit.libreoffice.org/31693 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit a3597a3f370175d0c06887e6691cbfa045937ad4) Reviewed-on: https://gerrit.libreoffice.org/31702
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-11-21introduce getValue(sKey) for SequenceAsHashMapJochen Nitschke
returns the plain value (Any) if it exists, else return an empty Any replaces some getUnpackedValueOrDefault calls in sw where is was not clear if the unpacked value exsisted or was default needed for removal of Any-to-Any template specialisations Change-Id: I618da7a7174143f5edef48e47e7aa1b6a52845e1 Reviewed-on: https://gerrit.libreoffice.org/30114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-10make comphelper::sequenceToContainer a little smarterNoel Grandin
so we don't have to specify the source type Change-Id: I4106705a39874a8043f0f294a11374404d6cfc3a Reviewed-on: https://gerrit.libreoffice.org/30713 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10loplugin:expandablemethods in comphelper..cppuhelperNoel Grandin
Change-Id: I9d5487af4729bd3ee4f6450092e4b77f74a12e6d Reviewed-on: https://gerrit.libreoffice.org/30717 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09make comphelper::containerToSequence a little smarterNoel Grandin
So we don't have to specify the source and destination type as often. Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624 Reviewed-on: https://gerrit.libreoffice.org/30700 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08loplugin:unnecessaryvirtual in comphelper..formsNoel Grandin
Change-Id: Iabe292e68cb84b97f207061347ed6a30309dc9fd Reviewed-on: https://gerrit.libreoffice.org/30679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-05We have exactly the same file as include/unotools/ZipPackageHelper.hxx.Jan Holesovsky
Change-Id: I2cc545c50a8ae936e73ff23a200f350809ab8335
2016-11-03SafeModeDialog: Allow to create zip file from profileSamuel Mehrbrodt
Change-Id: I4296d1cf5058be359ffed46745673cf26eba3375 Reviewed-on: https://gerrit.libreoffice.org/30479 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-01SafeModeDialog: Add link to user profileSamuel Mehrbrodt
Change-Id: I0096b3d7db51e28eb58c7209109c30b73b382478 Reviewed-on: https://gerrit.libreoffice.org/30448 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-01safemode: Add option to disable H/W accelerationSamuel Mehrbrodt
Change-Id: Ic6751717c14d317b5a4bc64c4fd1cf2b2f5efabf Reviewed-on: https://gerrit.libreoffice.org/30112 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-01Omit the default comparatorTakeshi Abe
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0 Reviewed-on: https://gerrit.libreoffice.org/30319 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-27Remove bogus comments about ~IPropertyArrayHelper not being virtualStephan Bergmann
...which isn't true at least ever since b525a3115f54576017a576ff842dede5e2e3545d "initial import", but got copy/pasted all over the place Change-Id: I47d3d8a594aef3ac3736d7176ae964a118821014
2016-10-26coverity#1374269 Uncaught exceptionCaolán McNamara
Change-Id: Ib3a876ea6463396784062bd53bfedff177818498
2016-10-23Fix typosAndrea Gelmini
Change-Id: Ib7b17f85c7b6a1937c3f6e1617ceec58074643b4 Reviewed-on: https://gerrit.libreoffice.org/30040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-21profilesafe: Added more specific optionsArmin Le Grand
For Extensions there is the possibility to not only decide enable/disable state for User ones, but also to deinstall user or all extensions, added these options to the dialog and the functionality. Also unified customization name schema to have just one source of strings to avoid errors in the future. Small fix in tryPop_extensionInfo Change-Id: I39acbe9a052ffd4cb78b496f24e5b583136c565a Reviewed-on: https://gerrit.libreoffice.org/30100 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-10-21loplugin:expandablemethodds in include/basic..comphelperNoel Grandin
Change-Id: I1aa9c12e8839325a9fd98530abc89a3d586ff62e Reviewed-on: https://gerrit.libreoffice.org/30120 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-20No need for an explicit specializtion of convertFastPropertyValue<bool>Stephan Bergmann
Change-Id: I7b5799ed67b8d5da6cb3e6c4e7c76f05a2ec3853
2016-10-19profilesafe: Deeper integration with SafeModeArmin Le Grand
Added deeper integration by saving at SaveMode content of user dir completely to a user/SafeMode dir, including the whole stack of pack files. Repair happens in that safe directory, so that the user dir is resetted to default when re-started in SafeMode. All changes (including complete deletion) are played back to the user config at first restart with disabled SafeMode Change-Id: I5114c7d5d04582be62090707bc9b97afa55fc1f1 Reviewed-on: https://gerrit.libreoffice.org/30003 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-10-16clang-cl loplugin: comphelperStephan Bergmann
Change-Id: Icde27eeeb21e9049630028e81af10edc1ba8ae04 Reviewed-on: https://gerrit.libreoffice.org/29876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-14profilesafe: Adapted to UIArmin Le Grand
Adaptions to UI, added more modes what the user can do in SafeMode. Adapted locations to write pack information and added places where to enter SafeMode. Implemented basically all five possible user choices Change-Id: Ic5324a8f77ab434309e840949c3803e65a75c538 Reviewed-on: https://gerrit.libreoffice.org/29785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-10-13profilesafe: extended to three modesArmin Le Grand
Saving configuration is now extended to three basic modes, from just saving registrymodifiications to adding user-defined config stuff to saving all information in the user profile, additionally configuration information for Extensions is saved. Added configuration entries for this and tested saving/restoring. Change-Id: I79b09c37617803bf656826f76a7e3db79cda49ac Reviewed-on: https://gerrit.libreoffice.org/29770 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-10-12profilesafe: Multiple adaptionsArmin Le Grand
Added own directory in User config to where the saved content is written and taken from, adapted to also handle ExtensionConfiguration, changed point for creating backups of configuration to doShutdown, create no configuration when a restart is triggered (untested configuration) Change-Id: Id7a96195b765842c31cacf81cc08d2965a205281 Reviewed-on: https://gerrit.libreoffice.org/29729 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-10-11profilesafe: Add values for SecureUserConfigfeature/profilesafemodeArmin Le Grand
Added default values for SecureUserConfig values to soffice.ini/rc which enable the mechanism, enable by default and set a maximum of three backups file in packed form. Added more handy flag for easy decision to add compressed/uncompressed. Change-Id: I5a624c09fec4e4278314e13fc5f693ac085d5e61
2016-10-11profilesafe: Collect copies in single *.pack fileArmin Le Grand
Enhanced helper classes for BackupFileHelper to allow writing a stack of rescued last valid configuration files to a single file package. Added configuration values for enabling this and defining the number of entries, added max entry limitation. Using FileSize and CRC32 now to dectect if config file did change. To make this work I added sorting to writing the configuration so that with no change the same configuration file is written. Use std::vector for better mem performance for sorting, defined static const for buffer size of manipulation, prepare inflate/deflate usages. Fixes to setPos, warnings Change-Id: Ib286e2a3f25b0085a1e3ae4f50c9ff1ff3a5dcf5
2016-10-11profilesafe: Enhancements to BackupFileHelperArmin Le Grand
Added helper class to allow easy creation/deployment of backups of a file. It works like a 'stack' of backups, supports easy add/remove/delete of last entry (LIFO). Added some work top allow opening dialogs in DeInit under linux. Change-Id: Idacec97ec2f097af9bd22a8a67b410c7677d17f1
2016-10-11profilesafe: Initial creation of BackupFileHelperArmin Le Grand
Added helper class to allow easy creation/deployment of backups of a file (here: registrymodifications). It works like a 'stack' of backups, supports easy push/pop of backed-up versions. Change-Id: Ie19e1209534f23a3dbd6106a5ca13b24b8fefe4d
2016-10-04comphelper: move setTiledPainting() from SfxViewShellMiklos Vajna
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.) Change-Id: I23e6b2c2ff94227f2b72c481148b2d8279ae2905
2016-10-03Fix typosAndrea Gelmini
Change-Id: I7000efdb7276053c16de992fa8f9a4e614ecb3e2 Reviewed-on: https://gerrit.libreoffice.org/29434 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-29LOK: conditionally include part number in invalidation payloadMiklos Vajna
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. Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4
2016-09-20Remove obsolete workaround for SUNPRO 5 compilerStephan Bergmann
...copy/pasted into three more places Change-Id: I6661244d0248af509cd867fc3e8c451551068a78
2016-09-14loplugin:constantparam in chart2..connectivityNoel Grandin
Change-Id: Ic9e1bd36a11c7148fa7595a2b6c6de9bd7a8653d Reviewed-on: https://gerrit.libreoffice.org/28834 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-09-05sal_Bool -> boolStephan Bergmann
Change-Id: I0d491db88b181de63fcfb2e45a02571f272b6bfe
2016-09-01coverity#1372386 Uncaught exceptionCaolán McNamara
Change-Id: Ic1fd5486e6b26718086d2f062459f11c00f244d2
2016-08-29cid#1371187 Missing move assignment operatorNoel Grandin
Change-Id: Ib0b51a029adcb0b703aa975b6c5fc02a8b21ed63
2016-08-25new loplugin: countusersofdefaultparamsNoel Grandin
Change-Id: I79e2c690f3e664c14af12cf763dd5a8ac20d6b04 Reviewed-on: https://gerrit.libreoffice.org/28353 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-05Fix certificate validation interactionGiuseppe Castagno
This enables the certificate validation when StillReadWriteInteraction::StillReadWriteInteraction interaction handler is used. Certificate validation is needed for Web/WebDAV files. Change-Id: I38cba9fc8b586953477d7df02acfcc8347603220 Reviewed-on: https://gerrit.libreoffice.org/27914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-07-29comphelper,vcl: let DeInitVCL() join some AsyncEventNotifier threadsMichael Stahl
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>
2016-07-27improve passstuffbyref return analysisNoel Grandin
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-18add tagging to ThreadTasks so we don't need more one poolNoel Grandin
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>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann
Change-Id: I11d6467a35fb9e32cc0608549bd323b1f6683b9f
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>