1643 Commits

Author SHA1 Message Date
Michael Meeks
aa68c99d88 tdf#104126 - comphelper thread-pool, use reliable std::condition_variable.
The existing osl::Condition is an API and reliability disaster area.

Change-Id: I3be84e1c6a83e58c43c40c9c8720790d923a6694
Reviewed-on: https://gerrit.libreoffice.org/31163
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-12-01 18:44:08 +00:00
Stephan Bergmann
d36b3bcb7e Fix race in ThreadTaskTag
Assume T0 calls ThreadPool::pushTask twice, then ThreadPool::waitUntilDone:

T0 calls ThreadTaskTag::onTaskPushed:
  mnTasksWorking = 1, maTasksComplete.reset

T1 runs the 1st task to completion and calls ThreadTaskTag::onTaskWorkerDone:
  mnTasksWorking = 0; suspended...

T0 calls ThreadTaskTag::onTaskPushed:
  mnTaskWorking = 1, maTasksComplete.reset

T1 continues in the call to ThreadTaskTag::onTaskWorkerDone:
  ..., maTasksComplete.set

T0 calls ThreadTaskTag::waitUntilDone and immediately returns

T2 only now starts to run the 2nd task

Change-Id: Ic29101a4791fca2a1a4d54b559f10ff706e8a20d
2016-12-01 12:35:36 +01:00
Stephan Bergmann
f8e3e523e2 Rewrite some (trivial) assignments inside if/while conditions: comphelper
Change-Id: I8361f62199f45dbced45e5d4a4d5eeddf1c42d67
2016-11-29 17:21:47 +01:00
Stephan Bergmann
0c59e2ddd6 loplugin:unnecessaryoverride (dtors) in comphelper
Change-Id: I13ebc4efa7f8bd0d3732ed65e397c710ae65d14e
2016-11-28 14:14:04 +01:00
Noel Grandin
5c2c2d8dc4 loplugin:expandablemethods in comphelper..cppuhelper
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-10 06:51:53 +00:00
Michael Stahl
24063ec94b comphelper: also bump PDBKDF2 count for password-to-modify
The password-to-modify misfeature does not actually provide any
security, but it may induce users to re-use passwords, so at least make
it harder to crack the passwords.

Change-Id: I0adf0e8e11b222fc469013e17a2695bd7122ad01
2016-11-09 19:07:34 +01:00
Noel Grandin
389999abdb make comphelper::containerToSequence a little smarter
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-09 07:48:18 +00:00
Noel Grandin
c123c528bf loplugin:unnecessaryvirtual in comphelper..forms
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-08 06:57:57 +00:00
Samuel Mehrbrodt
e509c22863 SafeModeDialog: Allow to create zip file from profile
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-03 12:19:16 +00:00
Samuel Mehrbrodt
69de2b4772 SafeModeDialog: Add link to user profile
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-01 14:58:25 +00:00
Samuel Mehrbrodt
1161de521e safemode: Add option to disable H/W acceleration
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-01 14:54:04 +00:00
Takeshi Abe
cb90f0976d Omit the default comparator
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0
Reviewed-on: https://gerrit.libreoffice.org/30319
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-11-01 04:11:44 +00:00
Caolán McNamara
ae68c27457 coverity#1374269 Uncaught exception
Change-Id: Ib3a876ea6463396784062bd53bfedff177818498
2016-10-26 09:56:30 +01:00
Andrea Gelmini
525311b0d6 Fix typos
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-23 17:17:01 +00:00
Julien Nabet
6af27d245a Typos in comments
Change-Id: I6450d3862a67c2a9275a569a8ee3c29262124409
Reviewed-on: https://gerrit.libreoffice.org/30162
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-10-22 18:03:52 +00:00
Armin Le Grand
8dcad50137 profilesafe: Make sure no recursive saving happens
Change-Id: Idd57a948fcaaf23614ca1a92051a50b86e4bb0c5
Reviewed-on: https://gerrit.libreoffice.org/30145
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-10-21 17:39:23 +00:00
Armin Le Grand
d1b3a33d99 profilesafe: Added more specific options
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-21 13:31:29 +00:00
Noel Grandin
5a5731cd05 loplugin:expandablemethodds in include/basic..comphelper
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-21 09:57:38 +00:00
Thorsten Behrens
ff84b8a242 coverity#1374089: Unchecked return value
Change-Id: Ied4e80db512000471b5aa215beeef1277121fe12
2016-10-21 00:54:46 +02:00
Stephan Bergmann
4fb9926ebc Blind fix for "error: chosen constructor is explicit in copy-initialization"
...on linux_clang_dbgutil_64 build

Change-Id: I00022749ce12df459ce22333593daa2eb6503fd7
2016-10-20 13:23:20 +02:00
Tor Lillqvist
e23f54d417 Fix odd compilation error with Clang 3.8.0
Fix "default initialization of an object of const type 'const
ExtensionInfoEntryVector' (aka 'const vector<(anonymous
namespace)::ExtensionInfoEntry>') without a user-provided default
constructor".

Change-Id: I97013ed4660459a3f4c1b8b5b7cc302ba3ff914d
2016-10-20 10:40:30 +03:00
Armin Le Grand
8c4fdffb20 profilesafe: added xml read/modify to restore
To be able to restore the last saved state of enabled/disabled
extensions it is necessary in SafeMode to get and set that states
without XExtensionManager, so the configuration xml files have
to be accessed. Added this change

Change-Id: I00fe5795598427e7c08be0d3dd54bef68d038e24
Reviewed-on: https://gerrit.libreoffice.org/30062
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-10-19 22:41:12 +00:00
Caolán McNamara
724f2b20d8 coverity#1373663 Untrusted loop bound
Change-Id: Iabad14f8fc35656015b98693dd327a41aeaf63c7
2016-10-19 15:07:14 +01:00
Armin Le Grand
0f5d4da2b4 profilesafe: Deeper integration with SafeMode
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-19 10:50:11 +00:00
Jochen Nitschke
930f0242a1 replace <<= with assign for <<= with rhs Any
queryAggregation and queryInterface return Any

Change-Id: Ib8e3e742bd66f7419cad583988b247bb628f7b4a
Reviewed-on: https://gerrit.libreoffice.org/29912
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-19 05:28:29 +00:00
Stephan Bergmann
3b02c40a40 clang-cl loplugin: comphelper
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-16 14:19:27 +00:00
Armin Le Grand
a1b7231a33 profilesafe: Adapted to UI
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-14 10:37:30 +00:00
Caolán McNamara
482f626179 coverity#1373663 consider backupfilehelper byte twiddling as untainted
Change-Id: I13f7c3df20b3c9f81a9519b4bb84f556a8f4db7e
2016-10-14 09:13:19 +01:00
Armin Le Grand
5f55b7d00a profilesafe: extended to three modes
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-13 14:43:37 +00:00
Armin Le Grand
5f1a338d54 profilesafe: Multiple adaptions
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-12 14:08:55 +00:00
Stephan Bergmann
8576c51453 Missing include
Change-Id: I5abde663d639278bcc8374da6b5772b58a9b7a75
2016-10-12 10:55:53 +02:00
Armin Le Grand
35ec8253ad profilesafe: Add values for SecureUserConfig
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-11 13:56:22 +02:00
Armin Le Grand
2da3bb5c36 profilesafe: Added zip deflate/inflate
Stack of files can now deflate/inflate using zip
library, unfortunately have to use direct due to
Deflater/Inflater not being available, had to add
linking against zip.lib. Checked compressed and
uncompressed creation/usage of backup stack. Also
warnings and clang errors corrected.

Change-Id: Ieb059baeea323bb48ec5b1cf6b8df09da97cfb93
2016-10-11 13:56:22 +02:00
Armin Le Grand
7db23b6346 profilesafe: Collect copies in single *.pack file
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-11 13:56:22 +02:00
Armin Le Grand
9fa4eff9be profilesafe: Enhancements to BackupFileHelper
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-11 13:56:22 +02:00
Armin Le Grand
ed646dc595 profilesafe: Initial creation of BackupFileHelper
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-11 13:56:22 +02:00
Miklos Vajna
59e38e946f comphelper: move setTiledPainting() from SfxViewShell
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-04 14:34:57 +02:00
Miklos Vajna
d5263c2c56 LOK: conditionally include part number in invalidation payload
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-29 12:53:02 +02:00
Noel Grandin
1e49e33c26 loplugin:constantparam in chart2..connectivity
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-14 06:40:30 +00:00
Stephan Bergmann
a53808c0ed loplugin:dllprivate
Change-Id: I1fe70a39c50aba8b84c117653185fc37dbbfeab0
2016-09-13 22:26:22 +02:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
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-13 13:19:22 +02:00
Tor Lillqvist
714de95ec5 Remove nonsense comments: // bitfield
Surely the actual bitfield syntax is enough to tell the code reader
that it is a bitfield.

Change-Id: Ic9552e01b19c8b34b2a17db56b9ff63e7c7de926
2016-09-13 11:09:06 +03:00
Caolán McNamara
a6bc2ace5f coverity#1372386 Uncaught exception
Change-Id: Ic1fd5486e6b26718086d2f062459f11c00f244d2
2016-09-01 10:40:14 +01:00
Noel Grandin
83c0f29341 cid#1371187 Missing move assignment operator
Change-Id: Ib0b51a029adcb0b703aa975b6c5fc02a8b21ed63
2016-08-29 09:23:46 +02:00
Rosen
308d541ed5 tdf88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
Change-Id: I7a07552fb7f7c6dc66178be5db249007da49eb40
Reviewed-on: https://gerrit.libreoffice.org/28280
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-22 06:31:40 +00:00
Caolán McNamara
4819843bad coverity#1371448 Uninitialized pointer field
Change-Id: Iedfa017dffa4681a9d698108b5dbc7388637c611
2016-08-18 21:08:40 +01:00
Noel Grandin
127f70d66a new loplugin to check for static OUStrings
that are better declared as OUStringLiteral

Change-Id: Ifb5d9a12bb31a68641940bec16971a8181a46567
Reviewed-on: https://gerrit.libreoffice.org/27377
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-16 06:30:09 +00:00
Giuseppe Castagno
ecba128020 Fix certificate validation interaction
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-08-05 18:12:50 +00:00
lbenes
a4a71214d6 comphelper: fix MSVC 2015 build by removing pointless catch
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>
2016-08-01 06:30:12 +00:00
nadith
efef273e2c tdf#100726: Improve readability of OUString concatenation
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>
2016-08-01 06:12:30 +00:00