993 Commits

Author SHA1 Message Date
Noel Grandin
b5699cd01b convert BmpConversion to scoped enum
and drop unused 4BIT_TRANS and 1BIT_MATRIX enumerators

Also fix a bug in x11::convertBitmapDepth where we were incorrectly
passing BmpConversion enumeratirs to ReduceColors

Change-Id: I903c6866750e46ee752e10a17c05fcaaf6b11242
Reviewed-on: https://gerrit.libreoffice.org/34062
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09 08:42:06 +00:00
Noel Grandin
0681a6ee28 more SAL_WARN_UNUSED
Change-Id: Idf44fe0302b4504c443f083e527b63b2461ada85
2017-01-31 14:05:11 +02:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
   Foo(OUString("xxx"), 1)

Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 08:56:20 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Noel Grandin
1d7c589d50 loplugin: unnecessary destructor cppcanvas..filter
Change-Id: I009cdd60869a67d210edf879ddb451663a7b8676
Reviewed-on: https://gerrit.libreoffice.org/33491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-24 11:02:35 +00:00
Jan-Marek Glogowski
9e51007039 tdf#97087 GDB pretty print the Scheduler task list
In addition to the GDB pretty printer, this annotates a lot more
Timers and Idles.

Change-Id: I5b93fab02161b23bb753e65ef92643a04fb0789c
2017-01-17 16:08:46 +01:00
Noel Grandin
cc15806b52 convert BasePrimitive2D::get2DDecomposition to use a visitor
which lets us avoid constructing the decomposition when we are only
interesting in the bounding box, e.g. for hit testing

Change-Id: Icd8d430b75d207063f1db70e5a0822d5d82a7d00
Reviewed-on: https://gerrit.libreoffice.org/30835
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-22 06:44:08 +00:00
Khaled Hosny
d538d3d841 This fallback code makes no sense any more
Ito probably made sense only with bitmap fonts which we no longer
support, and if we don’t need the fallback for printer devices then we
don’t need it on screen either (that whole printer/screen distinction
needs to die someday).

Change-Id: Icf77cd70f0f1b2c186a3c856900295caba72e903
Reviewed-on: https://gerrit.libreoffice.org/31914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-14 00:28:15 +00:00
Khaled Hosny
9db5cfc889 Drop ComplexDisabled flags that does nothing
There is no such thing as simple text layout in this brave new world.

Change-Id: I641b7efa5ec8fdd9839c291e7f2fdb736361ef1e
Reviewed-on: https://gerrit.libreoffice.org/31824
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-11 00:26:54 +00:00
Mark Page
d08db164dc Change Read/Write access to Scoped Read/Write access
Change-Id: Idbe8e393b64f2a151e20c1851d7c14fa161acf97
Reviewed-on: https://gerrit.libreoffice.org/31635
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06 18:17:56 +00:00
Mark Page
13e7764826 Use std::unique_ptr for AnimationEntry
Change-Id: Ia089be3677adadb4250003b78b7c6bc15ab8bc42
Reviewed-on: https://gerrit.libreoffice.org/31631
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06 09:23:55 +00:00
Noel Grandin
70f05aa69a convert PolyStyle to scoped enum
Change-Id: Ia35fdbb5e40888db9558988ac069741b31721f0e
Reviewed-on: https://gerrit.libreoffice.org/31633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06 05:31:18 +00:00
Stephan Bergmann
7aeeb77c7b loplugin:unnecessaryoverride (dtors) in drawinglayer
Change-Id: Ib259cc2431b1703da40921c0f12679159d83ab0c
2016-12-05 09:05:21 +01:00
Caolán McNamara
2d2329f441 coverity#1371200 Missing move assignment operator
adjust things to not need one

Change-Id: I1079f50d8813f86c4828be602687b4cbffe61415
2016-12-02 10:58:04 +00:00
Noel Grandin
e6ffb539ee loplugin:vclwidgets check for assigning from VclPt<T> to T*
Inspired by a recent bug report where we were assigning the result
of VclPtr<T>::Create to a raw pointer.

As a consequence, we also need to change various methods that were
returning newly created Window subclasses via raw pointer, to
instead return those via VclPtr

Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b
Reviewed-on: https://gerrit.libreoffice.org/31318
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-29 06:45:42 +00:00
Noel Grandin
78b4a1fb01 update vclwidget loplugin to find ref-dropping assigment
Look for places where we are accidentally assigning a returned-by-value
VclPtr<T> to a T*, which generally ends up in a use-after-free.

Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9
Reviewed-on: https://gerrit.libreoffice.org/30749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 06:55:41 +00:00
Noel Grandin
30e39e4793 loplugin:expandablemethods in drawinglayer..editeng
Change-Id: Ic7fe13651e18b4eec90ef3fd8d7aab81197e0f39
Reviewed-on: https://gerrit.libreoffice.org/30707
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 10:34:31 +00:00
Noel Grandin
57998f642d some small simplifications to decompose methods
Change-Id: I9ad8c68c1f0c72d0f985d6c0a3167a775d481a2c
Reviewed-on: https://gerrit.libreoffice.org/30696
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 06:20:39 +00:00
Andras Timar
29ddf52adf typo fix: ressource -> resource
Change-Id: Id8d1c01b17e711a057a9f3f20e1d0f955b2ea6c8
Reviewed-on: https://gerrit.libreoffice.org/30690
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-11-08 12:21:31 +00:00
Noel Grandin
f2beebbfe7 reduce copying when decomposing drawinglayer primitives
instead of returning a Primitive2DContainer from each method which we
are then going to immediately append to another container, pass down a
single container by reference which we can append to

Change-Id: I0f28a499d2ec54f7111a7044c30099767aa079e1
Reviewed-on: https://gerrit.libreoffice.org/30258
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 10:40:57 +00:00
Michael Stahl
f9028f1945 vcl: improve accounting of SVG images in graphics cache
The problem is that the graphics cache only counts the size of the SVG
text, which is stored in SvgData::maSvgDataArray.  However the
SvgData::maSequence may use a lot more memory, as it may contain
de-compressed bitmaps that are stored as base64-encoded PNGs in the SVG
text.

For example icon-themes/galaxy/brand/flat_logo.svg is 812 Ko but contains
60 Mo of bitmaps.

This may cause excessive memory usage and failure to export documents
due to OOM; according to valgrind massif, the bitmap buffers use 90% of
the heap.

Add a new interface com::sun::util::XAccounting, and implement
it in drawinglayer BasePrimitive2D.  VCL SvgData can't access
drawinglayer via C++ directly so this looks like the best approach.

Change-Id: I5a7c3147733e23473c1decabed24c1f79d951c7d
Reviewed-on: https://gerrit.libreoffice.org/30669
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-11-07 18:52:22 +00:00
Rosen
8ae33b1652 tdf#96505 Get rid of cargo cult "long" integer literals
fixed all long integer literals in file

Change-Id: Ib557d88d4e4f17d5c334c92d611d002fe163f2f6
Reviewed-on: https://gerrit.libreoffice.org/29235
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-10-25 07:14:26 +00:00
Noel Grandin
e4cb0742c8 loplugin:expandablemethodds in include/connectivity..drawinglayer
Change-Id: Ic58f86422ef8f1e2bb655157850e214fc3a1a9b4
Reviewed-on: https://gerrit.libreoffice.org/30136
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-23 12:09:33 +00:00
Noel Grandin
ef637a1c4e loplugin:expandablemethodds in dbaccess..drawinglayer
Change-Id: Iee9143999f5c94040dadd378006f2a429ca0edb5
Reviewed-on: https://gerrit.libreoffice.org/30012
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 06:30:48 +00:00
Noel Grandin
62223f9a8a loplugin:unnecessaryoverride
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae
Reviewed-on: https://gerrit.libreoffice.org/29656
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13 06:47:44 +00:00
Noel Grandin
5c84f40ea2 loplugin:constantfunction
update the plugin similarly to
    commit 3ee3b36ae0c064fb5c81268d8d63444309d1b970
    Author: Stephan Bergmann <sbergman@redhat.com>
    Date:   Fri Oct 7 12:05:49 2016 +0200
    loplugin:staticmethods: Don't be fooled by decls starting with macros

Change-Id: I98ac3216d5acf89a49a26feb089ae2fd34e6e510
Reviewed-on: https://gerrit.libreoffice.org/29665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-11 06:15:21 +00:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Andrea Gelmini
943919692e Fix typos
Change-Id: I8374d6d08f4eb4ae2821e213371c615b92d7e9ab
Reviewed-on: https://gerrit.libreoffice.org/29432
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01 19:02:02 +00:00
Caolán McNamara
17f912c5bb Resolves: tdf#101433 reset RasterOpMode on cached virtual device before reuse
Change-Id: I178aa499b080b0b684d41fdd4115a6398f944c43
2016-09-29 14:17:26 +01:00
Noel Grandin
96e9ffa647 loplogin:singlevalfields in include/
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc
Reviewed-on: https://gerrit.libreoffice.org/28931
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16 06:19:38 +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
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
Noel Grandin
6dd4905a7a loplugin:constantparam in dbaccess..editeng
Change-Id: I1d0dc3d89933d86cd229e503b350fccc1523dedc
Reviewed-on: https://gerrit.libreoffice.org/28833
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-13 06:14:41 +00:00
Noel Grandin
1256980239 convert GradientStyle to scoped enum
Change-Id: Ib740da708612df7a5f4b8c82262b9b1bd436604d
2016-09-05 08:21:46 +02:00
Noel Grandin
933c0679d6 convert HatchStyle to scoped enum
Change-Id: Ibef51ae5ae135ae584791959ec3f7bf78c50e2a8
2016-09-05 08:21:46 +02:00
Noel Grandin
65ca57a447 convert LineStyle to scoped enum
Change-Id: I30cfa5a0649b806604c443f55683d1f2a430983d
2016-09-05 08:21:46 +02:00
Noel Grandin
a881fd7e66 convert RasterOp to scoped enum
Change-Id: I136423c105316c9b5b18e64d04a248fd7ac5590b
2016-09-05 08:21:46 +02:00
Noel Grandin
a53e6e2b3c convert RefDevMode to scoped enum
and fix the bForceZeroExtleadBug TODO

Change-Id: Iac9295c6ce31112d69a870e3a229823eb1e9a4f2
2016-09-01 11:05:21 +02:00
Stephan Bergmann
269b58a046 Missing operator definition
Change-Id: I39d3b68ca317a4a259b77532efc0897fc89a6fe9
2016-08-25 14:19:41 +02:00
Noel Grandin
b9ab0dd3e5 cid#1371276 Missing move assignment operator
also cid#1371234, cid#1371249, cid#1371208,
cid#1371250, cid#1371258, cid#1371266, cid#1371257,
cid#1371221

Change-Id: I18d952887b684e1999d003cec0f668789c851b52
2016-08-25 13:34:46 +02:00
Noel Grandin
3d8154789b cid#1371277 Missing move assignment operator
Change-Id: Ic737733f5951d5b21660a12a7a01202bd9bc303c
2016-08-25 13:14:46 +02:00
Noel Grandin
cff0edb0b8 cid#1371284 Missing move assignment operator
Change-Id: I84d4cfe58f9659b468a1fd62b7974fcdbf0bb1f3
2016-08-25 13:03:47 +02:00
Noel Grandin
877dfa3783 cid#1371288 Missing move assignment operator
Change-Id: I5181c76f558e1806de01f21422c715cc93f3cb3d
2016-08-25 12:58:57 +02:00
Noel Grandin
37ffcb1ce7 fix windows build, doesn't like default move methods
Change-Id: I6e756a11aa07722ff18ed13219b780f3db3bc4a0
2016-08-25 12:30:35 +02:00
Noel Grandin
9fda8f5ad6 fix move operator= and add move constructors
followup to:
  19828cc0 "cid#1371315 Missing move assignment operator"
and
  0e748707 "cid#1371320 Missing move assignment operator"

Change-Id: Id2479fef41cf8d98eef9246f3a86e6c9289c3d58
2016-08-25 12:05:59 +02:00
Noel Grandin
065913d8aa cid#1371309 Missing move assignment operator
Change-Id: Ic00f39793f0341820ccce912f4350644a90104c5
2016-08-25 11:51:03 +02:00
Noel Grandin
19828cc01f cid#1371315 Missing move assignment operator
Change-Id: I9da0ffe856a0a40094c1c553bb2c5e05d8d3ef5d
2016-08-25 11:41:30 +02:00
Jochen Nitschke
fcd222d8cc remove dead code in drawinglayer
static bools were probably used for debugging proposes
and should not be in master
introduced in commits:
 9f6018ec1472d7e4f2f26b300d8c00b09fda1fe8
 ddcf9b9ff2caaffcc59d250b2d7f50ca3ab20330
 d45ddb6d03846b0c576eeee062342962aa131bc0
 7a652a2b2ab5e0d37e32185c8c5fac3af482bb76 and
 70e3eb2c1762fb1ca097cf671e3c7ce3d0dfd1b7

Change-Id: Ided2bf923696cd9fc537f1cb4fedd1a7d4b7c5cd
Reviewed-on: https://gerrit.libreoffice.org/26880
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-08-03 12:17:58 +00:00
Caolán McNamara
fedd856894 Resolves: tdf#101067 put SolarMutexGuard back in again
commit 4f27ff917237be96eec897d4af90a3379be904c6
Author: Tor Lillqvist <tml@iki.fi>
Date:   Mon Jul 29 18:24:23 2013 +0300

    Avoid SolarMutex assertion in a dbgutil build when exiting Impress

put in a SolarMutex in that ImpTimedRefDev dtor for what sounds like
just this problem

commit 9f0766917a4fb1bc8fe1786c3b46132dd63c1c66
Author: Armin Le Grand <Armin.Le.Grand@cib.de>
Date:   Fri Jul 1 14:40:00 2016 +0200

    tdf#50613 add support to load charts asynchronously

took it out again, to presumably move it into TextLayouterDevice
but we destroy this thing asyncronously outside of TextLayouterDevice
so lets put it back in again

Change-Id: If801a701701a3d87fce2f76bc22bb3184b46743a
2016-07-22 11:55:36 +01: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