479 Commits

Author SHA1 Message Date
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
Andrea Gelmini
c7114b66bd Fix typos
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-10-03 08:59:34 +00: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
Stephan Bergmann
07339d03af Remove obsolete workaround for SUNPRO 5 compiler
...copy/pasted into three more places

Change-Id: I6661244d0248af509cd867fc3e8c451551068a78
2016-09-20 07:55:10 +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
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
Stephan Bergmann
4e933ea84e sal_Bool -> bool
Change-Id: I0d491db88b181de63fcfb2e45a02571f272b6bfe
2016-09-05 17:55:36 +02: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
Noel Grandin
b8064bdf7f new loplugin: countusersofdefaultparams
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-25 06:37:42 +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
Michael Stahl
a2095b1514 comphelper,vcl: let DeInitVCL() join some AsyncEventNotifier threads
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-29 10:05:47 +00:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
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-27 06:48:25 +00:00
Noel Grandin
76ad32bec8 add tagging to ThreadTasks so we don't need more one pool
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-18 06:49:09 +00:00
Stephan Bergmann
a291c8fbaa loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I11d6467a35fb9e32cc0608549bd323b1f6683b9f
2016-07-07 18:59:55 +02:00
Noel Grandin
7855ea4830 remove comphelper::string::remove
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-07-04 06:49:52 +00:00
Noel Grandin
cd71034b26 comphelper::OBaseMutex -> cppu::BaseMutex
convert usage of deprecated class, and remove the old class

Change-Id: I19fb9271090d19e5531622b58492e1a848d306e2
Reviewed-on: https://gerrit.libreoffice.org/26843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04 06:49:07 +00:00
Noel Grandin
c144288abe loplugin:singlevalfields in comphelper
Change-Id: I22711d226a266dc00c32beff54398a55c4c9691a
Reviewed-on: https://gerrit.libreoffice.org/26599
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-24 08:41:01 +00:00
Stephan Bergmann
ed49818ab0 Clean up OContainerListenerAdapter
* elide OContainerListenerAdapter_BASE
* no need for protected members

Change-Id: I70095dadc4b1f42f04c8ea76b2236bf99a226da9
2016-06-24 10:29:48 +02:00
Stephan Bergmann
92712332f3 Restrict tryPropertyValueEnum to enum types
Change-Id: I54a6fdc341185fe4bdb9cc7d1b1a1feb0737bf47
2016-06-20 18:21:27 +02:00
Stephan Bergmann
033517b4e6 Remove unused includes
Change-Id: I25bb67449c8c572075d354e62b1c731e95655b4f
2016-06-20 18:18:45 +02:00
Stephan Bergmann
50a0473e82 Clean up uses of Any::getValue() in comphelper
Change-Id: I433cca20fb29c6b6ede934edcb2e200f15b060f2
2016-06-20 11:43:37 +02:00
Ashod Nakashian
c337011d20 LOK: tile rendering regression fix
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>
2016-06-19 16:30:59 +00:00
Markus Mohrhard
0d4dcf3800 add comphelper::string::split
Change-Id: Iccc989a786e8e7b8dca1996b635248d7bf7fc5d8
2016-06-18 17:02:08 +02:00
Stephan Bergmann
bb1e59d596 Simplify OPropertyContainerHelper::registerPropertyNoMember's _pInitialValue
Change-Id: Ibfb27b3eded45e2646dada37ce3663f427985ae9
2016-06-17 19:40:58 +02:00
Miklos Vajna
5b5706f41f comphelper lok: remove the g_bViewCallback global
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>
2016-06-17 12:47:46 +00:00
Ashod Nakashian
60e75fb276 tdf#98955 hardware_concurrency not ideal for thread pools
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:🧵: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-06-15 21:28:47 +00:00
Stephan Bergmann
d0bc637426 Normalize on using @throws instead of @raise[s]
...as the former is used almost exclusively

Change-Id: I38ff11cd0d5125534550df99dd427666011c3b7b
2016-06-06 17:07:35 +02:00
Noel Grandin
0323253a7c remove some manual ref-counting
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>
2016-06-06 07:01:34 +00:00
Tor Lillqvist
4aee1237a5 Strip also a CR if there (and there seems to be such)
Sad that it took so long for me to notice.

Change-Id: I14b8a61930bb0b2dd1c5e9cce2a6c3e375dcb6ed
2016-06-03 11:00:40 +03:00
Xisco Fauli
2d2971090b tdf#89329: use unique_ptr for pImpl in accimplaccess
Change-Id: Ib10088b5669695dd5e288fe043ad72056a34b1e4
Reviewed-on: https://gerrit.libreoffice.org/25745
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03 06:49:46 +00:00
Xisco Fauli
e88107c055 tdf#89329: use unique_ptr for pImpl in embeddedobjectcontainer
Change-Id: I679555e2eb51e2b9660bb035a08d8da8b1687cab
Reviewed-on: https://gerrit.libreoffice.org/25747
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03 06:16:52 +00:00
Xisco Fauli
7693c22829 tdf#89329: use unique_ptr for pImpl in propertysetinfo
Change-Id: I8df0ed4d7c7df27f570ad09936f17941c30aae91
Reviewed-on: https://gerrit.libreoffice.org/25749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-02 06:40:34 +00:00
Xisco Fauli
c37ce6c3c5 tdf#89329: use unique_ptr for pImpl in propertysethelper
Change-Id: I5891fe7c298b4b3409ac6579ed167a4e0183c89a
Reviewed-on: https://gerrit.libreoffice.org/25748
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-02 06:36:30 +00:00
Xisco Fauli
e0f60043cc tdf#89329: use unique_ptr for pImpl in componentmodule
Change-Id: Ida8e271b1dd755289371e457a7c83657b8a84f99
Reviewed-on: https://gerrit.libreoffice.org/25746
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-02 06:33:14 +00:00
Stephan Bergmann
5d78d488fd Can use boost::make_optional
...reportedly available since Boost 1.34, and configure.ac checks for at least
Boost 1.47.

Change-Id: I07952de220f1eee5f91ad83a1965420eb6b09ada
2016-06-01 17:19:49 +02:00
Xisco Fauli
619a41940f tdf#89329: use unique_ptr for pImpl in accessiblecontexthelper
Change-Id: Ib78ee2f1faa4f9430e08bfbd0cfb0863da7d6dcb
Reviewed-on: https://gerrit.libreoffice.org/25744
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-01 09:58:17 +00:00
Stephan Bergmann
6cf436799c More comphelper/extract.hxx clean up
Change-Id: I36c1ebea58bcd32b65a48d3447c106aeecdac230
2016-05-31 08:47:05 +02:00
Stephan Bergmann
00a45faf5e Fix int2enum
* The data argument to the Any ctor call needs to point at sal_Int32, not int.

* All calls to int2enum guarantee that rType is an enum type, so assert that.

Change-Id: I0ccd498420638fee80aeeccc93d9c1e3309f83b0
2016-05-30 18:31:43 +02:00
Noel Grandin
74713b34a3 loplugin:unusedmethods
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda
Reviewed-on: https://gerrit.libreoffice.org/25431
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26 07:50:33 +00:00
Andrea Gelmini
2af018e4dd Fix typos
Change-Id: I860cc4aa04b4e5cd1437b2f24176ee2ccdec3266
Reviewed-on: https://gerrit.libreoffice.org/25420
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25 09:50:55 +00:00
Noel Grandin
95d20a3799 Revert "remove some manual ref-counting"
until I have a better understanding of the UNO reference
counting.

This reverts commit 111de438ea3e512a541281dc0716cc728ea8d152.
2016-05-24 11:02:42 +02:00
Noel Grandin
111de438ea remove some manual ref-counting
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>
2016-05-24 06:54:06 +00:00
Noel Grandin
2c8fe2e737 update unusedmethods plugin to deal with constructors
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>
2016-05-18 10:03:44 +00:00
Michael Stahl
98f759bec1 sdext: replace boost::bind
MSVC 2013 with non-debug runtime requires an additional assignment operator
in OUStringBufferAppender.

Change-Id: Ic93fc8d6b1d4760f0eb89e34beb1fcb18e783f73
Reviewed-on: https://gerrit.libreoffice.org/24980
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-13 21:22:08 +00:00
Andrea Gelmini
3742748699 Fix typos
Change-Id: I1c1894fcf533291b34a662b6efb96dcfa75b92b3
Reviewed-on: https://gerrit.libreoffice.org/24760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-10 19:13:31 +00:00
Stephan Bergmann
d916619658 No need to explicitly delete ctor the compiler wouldn't implicitly declare
Change-Id: Idd0e764765bd76e1f6a2d8ec6e18ebac27b91ec6
2016-05-04 14:24:47 +02:00
Stephan Bergmann
6e70103da0 While at it, delete Any functions on sal_Bool*
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of
sal_Bool across the code base

Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-05-04 11:59:23 +02:00
Jochen Nitschke
12c222a3ae C++11: disable ctors with delete in include/
replace the old declare and don't implement pattern
with C++11 delete keyword
no need to hide this design choice behind access restrictions

Change-Id: I7e8430a07189aa48514a4613c3a8c2950b230f49
Reviewed-on: https://gerrit.libreoffice.org/24495
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-03 20:12:22 +00:00