Commit Graph

460 Commits

Author SHA1 Message Date
Caolán McNamara
b184a8734f Resolves: tdf#49253 set an initial mask background
the gif in question has gif disposal mode "previous" set
on the first frame

Change-Id: I5234b0bd810af9e8e858dabac373fc4651dbb52e
Reviewed-on: https://gerrit.libreoffice.org/43613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-24 18:20:26 +02:00
Stephan Bergmann
957e6c7968 loplugin:includeform: drawinglayer
Change-Id: I52693e59a37e36fa0bb21732efe90af84fe6d6c6
2017-10-23 22:46:09 +02:00
Noel Grandin
ead920a48a loplugin:redundantcast handle dynamic_cast
Change-Id: I7855c76e820efce96778b1c19ec71dffcc4b4abb
Reviewed-on: https://gerrit.libreoffice.org/43621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-21 15:44:11 +02:00
Noel Grandin
ce301dadcb convert GfxLink::IsEqual to operator==
exactly one use site

Change-Id: Id0a75d46c459be213e81b47aa6c1194c87aec848
Reviewed-on: https://gerrit.libreoffice.org/42891
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-29 08:52:34 +02:00
Tor Lillqvist
8e7897588d Rename the basegfx::tools namespace to basegfx::utils
Reduce potential confusion with the global tools namespace. Will
hopefully make it possible to remove the annoying initial :: when
referring to the global tools namespace. Unless we have even more
tools subnamespaces somewhere.

Thorsten said it was OK.

Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996
Reviewed-on: https://gerrit.libreoffice.org/42644
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-09-26 14:18:41 +02:00
Mike Kaganski
bb406680ce Put definition of _CRT_RAND_S into bin/update_pch
so it doesn't get removed again from sal/inc/pch/precompiled_sal.hxx
(see commit 4af9612f2b).

Also make necessary changes to some of the files that start to fail
building after running bin/update_pch.sh, so that the patch is
self-contained and leaves the tree in fully functional state.

tools namespace had to be prepended with :: to disambiguate from
drawinglayer::tools

vcl/inc/window.h includes were amended, because ExtTextInputAttr is
from vcl/commandevent.hxx, and enum class ShowTrackFlags is from
vcl/window.hxx

Change-Id: I47179622350754cba2f95d26a1bafd3dfbbc935b
Reviewed-on: https://gerrit.libreoffice.org/42559
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22 20:52:34 +02:00
Tor Lillqvist
632edfabe8 <drawinglayer/tools/converters.hxx> can be internal to drawinglayer
And while moving it, get rid of the 'drawinglyer::tools' subnamespace.
Less potential confusion with the global 'tools' namespace.

Change-Id: Iab3c25be0cec7f3d182228d122837e9f2ac9a529
Reviewed-on: https://gerrit.libreoffice.org/42619
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2017-09-22 11:04:46 +02:00
Andrea Gelmini
894115b573 Fix typos
Change-Id: I78653129638b25f16e0816b6fff11e02100c85e7
Reviewed-on: https://gerrit.libreoffice.org/42321
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-09-15 20:33:52 +02:00
Armin Le Grand
ab65fe804c borderline: Extended decompose
Decompose of BorderLinePrimitive2D extended to take care
of non-perpendicular line endings for matching. Improved
matching, one error in calc fixed

Change-Id: I869a75385711b58e6725daba0f22be8a98158ad9
2017-09-15 12:58:04 +02:00
Armin Le Grand
16fd7af90a borderline: extended the expand logic
Extended and checked the expand logic for creating
the line extends. Now creating quite the right lines,
will need to check some speccial cases. Also some
cleanups.

Change-Id: I3a3bd4d23c7017ecd873147df2d93af61de39fa6
2017-09-15 12:58:04 +02:00
Armin Le Grand
1f02af4dbd borderline: Added merge BorderLinePrimitive2D
Added BorderLinePrimitive2D merges for Writer and fixes.
2017-09-15 12:58:04 +02:00
Armin Le Grand
53599a9a18 borderline: merge redefined, mirrored Styles
Redefined merge of BorderlinePrimitives, removed old Writer
stuff for it. Also added support for handling Styles mirrored
for extension calculations.
2017-09-15 12:58:04 +02:00
Armin Le Grand
98ceb50c0a borderline: Adapted BorderLinePrimitive2D and usages
Big changes to BorderLinePrimitive2D and BorderLine, freeing
it from one/three entries, going to a free definition using
gaps with width but without color. Adapted usages and creation,
not yet tested much

Change-Id: Ic1255a790401901c3166d200205bc23322b37185
2017-09-15 12:58:03 +02:00
Armin Le Grand
fe14ddf250 borderline: Abstraction of BorderLinePrimitive
As preparation for more detailed definition of BorderLine
primitives I have adapted the BorderLine definition to
work with motre possibilities to define the LineStartEnd
definitions in a BorderLineExtend class. That one is
flexible to hold all kinds of definitions - from none to
all four possible extends (Start/End, Left/Right of vector)
Cleanup of DiagStyle and others: DiagStyle is not needed
anymore due to no longer using angles calculated, but
being based on vectors defining the geometry. Also cleaned
up quite a bit of no longer needed calculation stuff for
the control.
2017-09-15 12:58:03 +02:00
Armin Le Grand
41c704a8d6 tdf#111853 Added TextFillColor to operator==
TextFillColor was added to TextSimplePortionPrimitive2D, but not added to
TextSimplePortionPrimitive2D::operator==, so when this changed it was not
detected. Added this.
Also added was bFilled and nWidthToFill, all defaulted. This is not accessible
for TextDecoratedPortionPrimitive2D and seems to be some special solution
just for one special case in DrawPortionInfo, only used from Outliner::DrawingTab,
so I am not sure if that change to the central TextSimplePortionPrimitive2D is
good and should stay

Change-Id: Ief8da74a8b66281e47c4c8a47131125e30b90e7d
Reviewed-on: https://gerrit.libreoffice.org/42188
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Tested-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2017-09-12 13:26:40 +02:00
Noel Grandin
3428bd5fa3 clang-tidy modernize-use-emplace in d*
Change-Id: I79ac90faf24b4c741545e411dbaea7826c2df531
Reviewed-on: https://gerrit.libreoffice.org/42150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11 09:44:12 +02:00
Noel Grandin
eea6d3951b loplugin:unnecessaryparen
look for  statements like

    return (function());

Change-Id: I906cf2183489f87225b99b987caca67e39b26cc3
Reviewed-on: https://gerrit.libreoffice.org/41260
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-18 08:49:37 +02:00
Noel Grandin
2e8acde112 remove UL/L suffixes from integer constants on the RHS of expressions
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
Reviewed-on: https://gerrit.libreoffice.org/41237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 11:25:21 +02:00
Noel Grandin
ff1f6a5fc2 remove UL/L suffixes from integer constants in initialiser/call expressions
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300
Reviewed-on: https://gerrit.libreoffice.org/41214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 08:14:31 +02:00
Noel Grandin
3dcf6dfcee remove unnecessary use of 'this->'
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4
Reviewed-on: https://gerrit.libreoffice.org/40671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 13:45:36 +02:00
Armin Le Grand
d62d07b3d2 Corrected HitTest for layouted text
For text layouted using EditEngine the HitTest in SVX is
identifying Field like URLs. Thus ist is better to use the
anyways more precise primitives for HitTest (rotation/shear/
mirror, ...). This was necessary since the former mechanism
which used a combination of primitive-beased HitTest and then
using an Outliner to get the position/content of the Field
landed on different positions e.g. when the layout needed to
use multiple lines for the contained URL, but there could
be more cases found.
Adapted the text decompositon, the primitive HitTest and
the TextHirearchyFieldPrimitive2D accordingly.

Change-Id: Ice559e20d02547fdcfcf9783e7cc5481706aab03
Reviewed-on: https://gerrit.libreoffice.org/40591
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2017-07-31 21:26:03 +02:00
Armin Le Grand
f62c654591 borderline: corrections for calc and writer
Made corrections/finetuning for Calc and Writer.
Had to remove some former code which tried to do
corrections.

Change-Id: Id9fc687b9a709d250faaad76c37ecfda8d8feb9b
2017-07-28 18:09:10 +02:00
Armin Le Grand
5e061435a7 borderline: Simplified BorderLinePrimitive
Overhauled BorderLinePrimitive to use two constructors
offering using one or three edge definitions for
construction to better refrlect possibilities. Adapted
usages. Better processing, less memory. Preparation
for using more decent LineExtend values (four per line
needed)

Change-Id: Iac9d9ae64874fea38fd6e2a04221698481cc0d0e
2017-07-28 17:51:57 +02:00
Armin Le Grand
bc47d7138a borderline: first versionj with line end adaptions
Added usage of defined extensions to the BorderLinePrimitive,
also added a first version to detect all cuts with adjacent
borders and produce the correct extensions, for single and
double lines. Not completely happy with it, but a first
version

Change-Id: I4b12a6cc0a70278bd5c506e9b3b2c5c126930dad
2017-07-28 17:51:56 +02:00
Noel Grandin
b09deb0753 loplugin:constparams handle constructors
had to change the structure of the plugin considerably, was too messy to
structure it to do the calculations on a per-function basis

Change-Id: I4edee7735f726101105c607368124a08dba21086
Reviewed-on: https://gerrit.libreoffice.org/40516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 14:51:56 +02:00
Noel Grandin
2fffaf6f05 loplugin:unusedmethods
Change-Id: Ia874baf21257e5fe41e104211068a2bcc50446eb
Reviewed-on: https://gerrit.libreoffice.org/40391
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25 12:03:50 +02:00
Noel Grandin
08366676c8 loplugin:constparams in drawinglayer
Change-Id: I3111210ae77f67301bb319d5364f77c52e2c4d6d
Reviewed-on: https://gerrit.libreoffice.org/40220
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20 13:21:35 +02:00
brainbreaker
e530689ef6 Clean up android specific template functions defined in std namespace
Change-Id: I2094ee8eec00587f166d96723a02eb5957dbf79b
Reviewed-on: https://gerrit.libreoffice.org/39890
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18 10:14:39 +02:00
Andrea Gelmini
be604957ec Fix typos
Change-Id: I0fec2abc1bed9c0cfcd78d1b0f6daebc335831be
Reviewed-on: https://gerrit.libreoffice.org/39982
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-07-17 19:17:46 +02:00
Armin Le Grand
34a0cb059c emfplus: unified transformations, added test code
More unifications, changed all Map*() methods to use a single
B2DHomMatrix which is created based on former stuff, XForm now
completely replaced. To check, added debug-only code and switches
to the VclPixelProcessor so that visual checks get easy when
using these modes (overlay of both methods with modded colors).
Also resynched to master.

Change-Id: I7b749f90bfde2ec1c2e49ee90ca2ef368da0547e
2017-07-15 11:01:30 +02:00
Armin Le Grand
044dc9fcca emfplus: migrate gdiplus reader to drawinglayer
In the current state interpretation of the GDI+
data is needed in the MetafilePrimitive in the
drawinglayer project. Migrate helper stuff and
reader from cppcanvas to drawinglayer as tooling,
prepare tooling, prepare changing from direct
canvas rendering, isolate and migrate existing
tooling from MetafilePrimitive from reading emf/wmf
to places where it can be commonly used by both,
prepare cange of different graphic statue usages,
start changing XForm to B2DHomMatrix conversions,
...

Change-Id: I2d6954f69464653d111abb316fd9654ad3499c3f
2017-07-15 11:01:30 +02:00
Armin Le Grand
783269e91e emfplus: completed isolation/migration of Emf/Wmf
Decided to keep the migrated/isolated Emf/Wmf reader
which are now hidden behind a Uno Api. Had to re-implement
WMF_EXTERNALHEADER (now WmfExternal, own file/header)
to not break anything. It *seems* to just scale something
and could be done after import, but I could not be sure.
Also needed a callback hook to allow getting the Metafile
out of a MetafilePrimitive in a lower module (vcl relative
to drawinglayer) which is needed as long as primitives
are not completely on Uno Api. Deleted all Emf/Wmf reader
stuff from vcl.

Change-Id: Ic5540defa8ec770728280df4df3f12e1f48cfc3a
2017-07-15 11:01:30 +02:00
Armin Le Grand
83535a28c5 emfplus: create a wmf/emf/emf+ primitive based importer
First steps to organize an importer that can read/interpret
wmf/emf/emf+ and deliver a primitive representation for
the content by parsing it. Use the same mechanisms as
already applied for Svg, so to reuse abilities to keep
original binary data to allow save again and embedding in
files and have an implemented replacement bitmap based
representation. For this, unify the used helper classes
to handle more than just Svg. For 1st try, add test code
and static bool switches

Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
2017-07-15 11:01:29 +02:00
Armin Le Grand
f65cbae894 borderline: correct problems with border display
Borderline display with direct paint and with primitive direct
paint has quite some errors in the current state. Started to
unify usages, check deeper with creation/usage.

borderline: deep changes to BorderLine

Found basic error in determining the offset values
for BorderLinePrimitive creation, these were not
centered on the lines. Corrected that. This makes
it possible to remove the formally used clipping
which seems to have been used to correct that. Also
allows to go back to a 'normal' decomposition that
creates line primitives as expected. That again can
then be painted quite normally.
Also added view-dependent case to the decomposition
to guarantee a gap of one discrete unit (pixel).
Removed the direct painter, too. Checked and corrected
stroking.

borderline: Adapted previews to primitives

Added code to use the primitive representation in
all dialogs and apps using tables. The edit views
use these mostly, so the preview should do that,
too. Currently missing is a good visualization of
diagonals, but this is also true for edit views.
Checked all apps and table usages to not get worse

borderline: correct line dash visualization

When a dashed line is used, a factor of 10.0 was applied in the
original coded, added that. Also the orientation of vertical
borders was inverted since it was simpler to exchange Start/End,
but this also mirrors the line dash visualisation, corrected that

Change-Id: I4c1b380a76cb37389fab1259a53fb7cc9da982d1
e95e246d5563360617a2a2213e4d5ec7d0e736b9
62369b4de58fb0264aeb710ec6983ceddca5701d
77418cc6c84ebb0632f8c3448976e82ce612d6b6
b4eb28dc86ce05eb89b26517167305b994158ef8
borderline: adapt cppunittest and clang
2017-07-12 21:01:20 +02:00
Stephan Bergmann
7255c15cf5 Improved loplugin:redundantcast static_cast handling: drawinglayer
Change-Id: I286b51f11410aad13bd4544998f0d6b56c854851
2017-06-02 09:37:44 +02:00
Noel Grandin
2ccde70d60 teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30 08:50:31 +02:00
Noel Grandin
db4802de34 loplugin:checkunusedparams in drawinglayer
Change-Id: Ib497b284a80fae69930f226d2e70368cb9e962ef
Reviewed-on: https://gerrit.libreoffice.org/37072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02 08:18:57 +02:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
Caolán McNamara
c8c4c84a5d ofz#947 line dashing is very problematic memory and size wise
Change-Id: I29ed7cd774d3ede077edfe2893c7a9e72b83abad
Reviewed-on: https://gerrit.libreoffice.org/35748
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-27 12:46:15 +00:00
Andrea Gelmini
ddc1429bf3 Fix typos
Change-Id: I85214642167d9c7876fd0fdc2cb7cf8e85765614
Reviewed-on: https://gerrit.libreoffice.org/35627
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 17:11:53 +00:00
Noel Grandin
ed76d1d350 loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23 09:48:10 +00:00
Julien Nabet
7b3825c66e Typos
Change-Id: Id1b96b56b16ebf2d8a99dd6fb64c73906dfd598f
Reviewed-on: https://gerrit.libreoffice.org/35435
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19 19:24:52 +00:00
Noel Grandin
f2a873cd13 convert SvxBorderStyle to scoped enum
and rename to SvxBorderLineStyle

Change-Id: I19e530f162e4ca6290a0ad076e7fe3d5775ae6bc
Reviewed-on: https://gerrit.libreoffice.org/35265
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-17 06:04:30 +00:00
Noel Grandin
7c0e3d0b37 convert GraphicDrawMode to scoped enum
Change-Id: I18eec89c4e1ebb86d64297e7cef4b36bf12df59f
Reviewed-on: https://gerrit.libreoffice.org/35004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-13 08:38:33 +00:00
Stephan Bergmann
19403aef11 loplugin:loopvartoosmall
Change-Id: I06d7d5d7cae13b9b1f62955f53407df8c9001f26
2017-02-26 22:01:46 +01:00
Tor Lillqvist
b57d51e32f Drop :: prefix from std in [de]*/
Change-Id: I3247894fe022dce7f0aa351bd85fefcd7c545dd4
Reviewed-on: https://gerrit.libreoffice.org/34377
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2017-02-17 18:41:19 +00:00
Noel Grandin
c04f7de3d2 remove unused Sentence from BreakupUnit
Change-Id: I324d344a9e9154345b8bd7c8653415cfcbfc26cc
2017-02-16 12:44:34 +02:00
Noel Grandin
0681a6ee28 more SAL_WARN_UNUSED
Change-Id: Idf44fe0302b4504c443f083e527b63b2461ada85
2017-01-31 14:05:11 +02: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