Commit graph

1969 commits

Author SHA1 Message Date
Dr. David Alan Gilbert
abfbca2719 tdf#85428: Clip strokes
Clip stroke paths coming from the PDF import.
Similar to my previous patches for fills.

(It's possible we might have to do something clever with cropping
of arrows/etc but not sure yet)

Change-Id: I9e46deac4a722e3ac510f0cc4bdb6b38b67c579e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176952
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-12-05 02:38:54 +01:00
Xisco Fauli
45a7c21ed8 PVS: V560 A part of conditional expression is always true: bSuccess
Since
commit 217ef2ed9b
Author: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Date:   Mon Jan 23 12:32:25 2023 +0900

    pdfimport: refactor pdf and hybrid format detection code

Change-Id: Ib8bd09417eb07bd395b38a04245de30e8abda5a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177408
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-11-27 14:02:00 +01:00
Oromidayo Owolabi
7a7ba9cbee tdf#145614 Convert #define to enum class
Converted #define to enum class

Change-Id: I16195a439643bcf0111c591a829272b5bf70179d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175027
Reviewed-by: Hossein   <hossein@libreoffice.org>
Tested-by: Jenkins
2024-11-12 15:27:34 +01:00
Noel Grandin
5de73f04f3 new loplugin:staticconstexpr
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04 08:51:00 +01:00
Caolán McNamara
7bbe74b2be cid#1555789 COPY_INSTEAD_OF_MOVE
and

cid#1556865 COPY_INSTEAD_OF_MOVE
cid#1556871 COPY_INSTEAD_OF_MOVE
cid#1556939 COPY_INSTEAD_OF_MOVE
cid#1556951 COPY_INSTEAD_OF_MOVE
cid#1556964 COPY_INSTEAD_OF_MOVE
cid#1556966 COPY_INSTEAD_OF_MOVE
cid#1556968 COPY_INSTEAD_OF_MOVE
cid#1556971 COPY_INSTEAD_OF_MOVE
cid#1556989 COPY_INSTEAD_OF_MOVE
cid#1557001 COPY_INSTEAD_OF_MOVE
cid#1557011 COPY_INSTEAD_OF_MOVE
cid#1557032 COPY_INSTEAD_OF_MOVE
cid#1557038 COPY_INSTEAD_OF_MOVE
cid#1557041 COPY_INSTEAD_OF_MOVE
cid#1557055 COPY_INSTEAD_OF_MOVE
cid#1557056 COPY_INSTEAD_OF_MOVE
cid#1557057 COPY_INSTEAD_OF_MOVE
cid#1557065 COPY_INSTEAD_OF_MOVE
cid#1557068 COPY_INSTEAD_OF_MOVE
cid#1557087 COPY_INSTEAD_OF_MOVE
cid#1557090 COPY_INSTEAD_OF_MOVE
cid#1557093 COPY_INSTEAD_OF_MOVE
cid#1557113 COPY_INSTEAD_OF_MOVE
cid#1557122 COPY_INSTEAD_OF_MOVE
cid#1557126 COPY_INSTEAD_OF_MOVE
cid#1557145 COPY_INSTEAD_OF_MOVE
cid#1557151 COPY_INSTEAD_OF_MOVE
cid#1557152 COPY_INSTEAD_OF_MOVE
cid#1557197 COPY_INSTEAD_OF_MOVE
cid#1557216 COPY_INSTEAD_OF_MOVE
cid#1557245 COPY_INSTEAD_OF_MOVE
cid#1557272 COPY_INSTEAD_OF_MOVE
cid#1557310 COPY_INSTEAD_OF_MOVE
cid#1557314 COPY_INSTEAD_OF_MOVE
cid#1557318 COPY_INSTEAD_OF_MOVE
cid#1557333 COPY_INSTEAD_OF_MOVE
cid#1557340 COPY_INSTEAD_OF_MOVE
cid#1557358 COPY_INSTEAD_OF_MOVE
cid#1557359 COPY_INSTEAD_OF_MOVE
cid#1557365 COPY_INSTEAD_OF_MOVE
cid#1557367 COPY_INSTEAD_OF_MOVE
cid#1557395 COPY_INSTEAD_OF_MOVE
cid#1557418 COPY_INSTEAD_OF_MOVE
cid#1557488 COPY_INSTEAD_OF_MOVE
cid#1557493 COPY_INSTEAD_OF_MOVE
cid#1557506 COPY_INSTEAD_OF_MOVE
cid#1557514 COPY_INSTEAD_OF_MOVE
cid#1557528 COPY_INSTEAD_OF_MOVE
cid#1557534 COPY_INSTEAD_OF_MOVE
cid#1557537 COPY_INSTEAD_OF_MOVE
cid#1557562 COPY_INSTEAD_OF_MOVE
cid#1557563 COPY_INSTEAD_OF_MOVE
cid#1557592 COPY_INSTEAD_OF_MOVE
cid#1557608 COPY_INSTEAD_OF_MOVE
cid#1557615 COPY_INSTEAD_OF_MOVE
cid#1557619 COPY_INSTEAD_OF_MOVE
cid#1557637 COPY_INSTEAD_OF_MOVE
cid#1557648 COPY_INSTEAD_OF_MOVE
cid#1557712 COPY_INSTEAD_OF_MOVE
cid#1557750 COPY_INSTEAD_OF_MOVE
cid#1557762 COPY_INSTEAD_OF_MOVE
cid#1557765 COPY_INSTEAD_OF_MOVE

Change-Id: I10db1910627e04a26e25836c05ad5c2707abd18b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175696
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-27 20:19:12 +01:00
Arnaud VERSINI
b48dab459a sdext replace OUStringLiteral with new OUString literal
Change-Id: I3f2730024fa3cd81c38927d495cdff9c608bddbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169358
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2024-10-26 20:33:38 +02:00
Caolán McNamara
2bafc7384b cid#1545605 COPY_INSTEAD_OF_MOVE
and

cid#1545841 COPY_INSTEAD_OF_MOVE
cid#1554682 COPY_INSTEAD_OF_MOVE
cid#1554686 COPY_INSTEAD_OF_MOVE
cid#1554715 COPY_INSTEAD_OF_MOVE
cid#1554750 COPY_INSTEAD_OF_MOVE
cid#1554759 COPY_INSTEAD_OF_MOVE
cid#1554770 COPY_INSTEAD_OF_MOVE
cid#1554779 COPY_INSTEAD_OF_MOVE
cid#1554794 COPY_INSTEAD_OF_MOVE
cid#1554800 COPY_INSTEAD_OF_MOVE
cid#1554826 COPY_INSTEAD_OF_MOVE
cid#1554836 COPY_INSTEAD_OF_MOVE
cid#1554862 COPY_INSTEAD_OF_MOVE
cid#1554865 COPY_INSTEAD_OF_MOVE
cid#1554872 COPY_INSTEAD_OF_MOVE
cid#1554883 COPY_INSTEAD_OF_MOVE
cid#1554906 COPY_INSTEAD_OF_MOVE
cid#1554921 COPY_INSTEAD_OF_MOVE
cid#1554926 COPY_INSTEAD_OF_MOVE
cid#1554946 COPY_INSTEAD_OF_MOVE
cid#1554956 COPY_INSTEAD_OF_MOVE
cid#1554970 COPY_INSTEAD_OF_MOVE
cid#1554986 COPY_INSTEAD_OF_MOVE
cid#1554991 COPY_INSTEAD_OF_MOVE
cid#1555013 COPY_INSTEAD_OF_MOVE
cid#1555037 COPY_INSTEAD_OF_MOVE
cid#1555050 COPY_INSTEAD_OF_MOVE
cid#1555057 COPY_INSTEAD_OF_MOVE
cid#1555066 COPY_INSTEAD_OF_MOVE
cid#1555067 COPY_INSTEAD_OF_MOVE
cid#1555083 COPY_INSTEAD_OF_MOVE
cid#1555097 COPY_INSTEAD_OF_MOVE
cid#1555135 COPY_INSTEAD_OF_MOVE
cid#1555140 COPY_INSTEAD_OF_MOVE
cid#1555146 COPY_INSTEAD_OF_MOVE
cid#1555148 COPY_INSTEAD_OF_MOVE
cid#1555149 COPY_INSTEAD_OF_MOVE
cid#1555155 COPY_INSTEAD_OF_MOVE
cid#1555157 COPY_INSTEAD_OF_MOVE
cid#1555168 COPY_INSTEAD_OF_MOVE
cid#1555195 COPY_INSTEAD_OF_MOVE
cid#1555196 COPY_INSTEAD_OF_MOVE
cid#1555237 COPY_INSTEAD_OF_MOVE

Change-Id: I90531c19c28dca77fe99c72efdfc0972c311da98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175377
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-22 11:56:02 +02:00
Caolán McNamara
6fe9c3fb37 cid#1633260 COPY_INSTEAD_OF_MOVE
and

cid#1633259 COPY_INSTEAD_OF_MOVE

Change-Id: I3148eddfa78e0dbdeb8ff4f1a6391420e8a635d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175176
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-19 14:49:55 +02:00
Dr. David Alan Gilbert
af801eafd6 tdf#148526 sdext,pdfimport: Write clipToStrokePath
'clipToStrokePath' is a variant of 'clip' it sets up a clip
to a path that's been stroked with whatever width the current
pen is.  Now that we have all the rest of the code in, we can
start using it.

This fixes the white blobs on page 3 of tdf#148526 which
are clipped radial fills.  It has a separate problem with
text corruption which this doesn't fix.

It also fixes the geometry of the top left square in:
   https://gitlab.freedesktop.org/poppler/poppler/-/issues/178
(although it still has colour problems with that test case)

Change-Id: Ibe2c56927b45d44e90cfa2934fc905034a50e9c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172927
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins
2024-10-18 15:31:42 +02:00
Dr. David Alan Gilbert
b4faa1775d tdf#148526 sdext,pdfimport: clipToStrokePath: Set line join
Set the line join type from our GC.

Change-Id: I8f64ae032930e46028cd49efefb05af06d4866d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172926
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-18 00:50:20 +02:00
Dr. David Alan Gilbert
84cc3180c8 tdf#148526 sdext,pdfimport: rendering::PathJoinType to B2DLineJoin
Pdfimport is one of the few none render pieces of code to use
css::rendering::PathJoinType, switch to using basegfx::B2DLineJoin
instead.
Use that type consistently instead of throwing in sal_Int8's with it.

Change-Id: Ie1384a06558925c796ce6c83b458b4c150bcecc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172925
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-18 00:50:06 +02:00
Dr. David Alan Gilbert
53d5b3119f tdf#148526 sdext,pdfimport: Expand path to contour
Poppler's 'ClipToStroke' call wants to clip to a paths rendered
shape, i.e. with line thickness and possibly other attributes.

Use get2DDecomposition to do that.

Change-Id: I3ca54621dcb859520504e5c7d6cd41106f5c34d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172924
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins
2024-10-18 00:49:42 +02:00
Dr. David Alan Gilbert
a61eff73a1 tdf#148526 sdext,pdfimport: Parse clipToStrokePath
Parse the soon to be created clipToStrokePath command and route
it through the tree code.

Change-Id: I8fa17457ffd062e91983b6ed80bd64259aa7114e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172923
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-17 20:49:00 +02:00
Mike Kaganski
a6a6921123 Use good old string literals in assertXPath and friends
These are only sent to an external API expecting char*-like strings,
or for comparison. Having every assertXPath having three of _[ou]str
is too much syntactic noise, making the unit tests almost unreadable.

Change-Id: Ic004a36ea75e7bfe0b96f405c40f926a957b51cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174416
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-10-05 10:06:44 +02:00
Dr. David Alan Gilbert
aec41175e8 tdf#162887 sdext.pdfimport: Fix tilingPatternFill crash
regression from
  commit 8ac5f40b33
  Author: Dr. David Alan Gilbert <dave@treblig.org>
  tdf#113050 sdext.pdfimport: Write the tiling pattern image

The logo in the test file in tdf#159115 appears to be a tiling pattern
fill where the fill is actually rendered text (instead of just an image)
and this triggers splash to try and look at it's font code (even though
I've already got EnableFreeType off) and that was initialised by
startDoc which I'd failed to call.  Call it.

Note this doesn't fix tdf#159115, which originally had 4 copies of the
logo, the current state is it has one unrendered white blob, but lets
get rid of the crash first.

Change-Id: I4e3f29cedcb8aefbb5adf96f696bf08457fbd58a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173139
Tested-by: Hossein   <hossein@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2024-09-27 15:59:14 +02:00
Dr. David Alan Gilbert
b416c5b8e3 tdf#101611, tdf#108813, tdf#86211, sdext,pdfimport: Clip fills
The pdf processor carefully records clip paths, but does very little
with them.  It's currently just used in the recently added
tiling pattern fill.

Make the existing solid fills use the clip path.

This resolves 101611, 108813, and helps some
side issues in tdf#155170 In particular, the fish bowl on p.15
now looks about correct, but the fishes are still very, erm, square.

(I think there may be a longer term task to rework the clipping
completely)

Change-Id: Ie48901dbc6070465bac4fdb47b0bbc65a35c5792
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172448
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-29 14:29:47 +02:00
Caolán McNamara
e63da1689d cid#1556026 COPY_INSTEAD_OF_MOVE
and

cid#1556027 COPY_INSTEAD_OF_MOVE
cid#1556030 COPY_INSTEAD_OF_MOVE
cid#1556032 COPY_INSTEAD_OF_MOVE
cid#1556036 COPY_INSTEAD_OF_MOVE
cid#1556049 COPY_INSTEAD_OF_MOVE
cid#1557490 COPY_INSTEAD_OF_MOVE

Change-Id: If694c4d518323a8ae58bb13569f401b2b36cd427
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171704
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-08-09 21:00:59 +02:00
Caolán McNamara
ce18ff2e7d cid#1607356 COPY_INSTEAD_OF_MOVE
and

cid#1607117 COPY_INSTEAD_OF_MOVE
cid#1607089 COPY_INSTEAD_OF_MOVE
cid#1606977 COPY_INSTEAD_OF_MOVE
cid#1606899 COPY_INSTEAD_OF_MOVE
cid#1606785 COPY_INSTEAD_OF_MOVE
cid#1606769 COPY_INSTEAD_OF_MOVE
cid#1606740 COPY_INSTEAD_OF_MOVE
cid#1606738 COPY_INSTEAD_OF_MOVE
cid#1606675 COPY_INSTEAD_OF_MOVE
cid#1606533 COPY_INSTEAD_OF_MOVE
cid#1558100 COPY_INSTEAD_OF_MOVE
cid#1558098 COPY_INSTEAD_OF_MOVE
cid#1558083 COPY_INSTEAD_OF_MOVE
cid#1558077 COPY_INSTEAD_OF_MOVE
cid#1558074 COPY_INSTEAD_OF_MOVE

Change-Id: Ica17dec2c2102ef85283fd883a0a4e64aec307c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171620
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-08-08 13:35:27 +02:00
Caolán McNamara
59768e6051 cid#555593 COPY_INSTEAD_OF_MOVE
and

cid#1555849 COPY_INSTEAD_OF_MOVE
cid#1555936 COPY_INSTEAD_OF_MOVE
cid#1555951 COPY_INSTEAD_OF_MOVE
cid#1555955 COPY_INSTEAD_OF_MOVE
cid#1555960 COPY_INSTEAD_OF_MOVE
cid#1555964 COPY_INSTEAD_OF_MOVE
cid#1555965 COPY_INSTEAD_OF_MOVE
cid#1555975 COPY_INSTEAD_OF_MOVE
cid#1555979 COPY_INSTEAD_OF_MOVE
cid#1555987 COPY_INSTEAD_OF_MOVE
cid#1555990 COPY_INSTEAD_OF_MOVE
cid#1555991 COPY_INSTEAD_OF_MOVE
cid#1556002 COPY_INSTEAD_OF_MOVE
cid#1556008 COPY_INSTEAD_OF_MOVE
cid#1556011 COPY_INSTEAD_OF_MOVE
cid#1556015 COPY_INSTEAD_OF_MOVE
cid#1556017 COPY_INSTEAD_OF_MOVE
cid#1556023 COPY_INSTEAD_OF_MOVE

Change-Id: I8ab99d8e52a1780173a4272c59d408432c29de9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171572
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-06 22:31:35 +02:00
Caolán McNamara
07d3577569 cid#1555417 COPY_INSTEAD_OF_MOVE
and

cid#1555423 COPY_INSTEAD_OF_MOVE
cid#1555430 COPY_INSTEAD_OF_MOVE
cid#1555436 COPY_INSTEAD_OF_MOVE
cid#1555440 COPY_INSTEAD_OF_MOVE
cid#1555443 COPY_INSTEAD_OF_MOVE
cid#1555454 COPY_INSTEAD_OF_MOVE
cid#1555459 COPY_INSTEAD_OF_MOVE
cid#1555461 COPY_INSTEAD_OF_MOVE
cid#1555468 COPY_INSTEAD_OF_MOVE
cid#1555477 COPY_INSTEAD_OF_MOVE
cid#1555484 COPY_INSTEAD_OF_MOVE
cid#1555511 COPY_INSTEAD_OF_MOVE
cid#1555515 COPY_INSTEAD_OF_MOVE
cid#1555519 COPY_INSTEAD_OF_MOVE
cid#1555534 COPY_INSTEAD_OF_MOVE
cid#1555537 COPY_INSTEAD_OF_MOVE
cid#1555544 COPY_INSTEAD_OF_MOVE
cid#1555553 COPY_INSTEAD_OF_MOVE
cid#1555559 COPY_INSTEAD_OF_MOVE
cid#1555561 COPY_INSTEAD_OF_MOVE
cid#1555563 COPY_INSTEAD_OF_MOVE
cid#1555564 COPY_INSTEAD_OF_MOVE
cid#1555568 COPY_INSTEAD_OF_MOVE
cid#1555571 COPY_INSTEAD_OF_MOVE
cid#1555580 COPY_INSTEAD_OF_MOVE

Change-Id: Ia42a78bffddc80d0e82144f4db51dc6e4d2e9a1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171237
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-31 09:33:06 +02:00
Caolán McNamara
329e913b0b cid#1556624 COPY_INSTEAD_OF_MOVE
and

cid#1556622 COPY_INSTEAD_OF_MOVE
cid#1556629 COPY_INSTEAD_OF_MOVE
cid#1556632 COPY_INSTEAD_OF_MOVE
cid#1556634 COPY_INSTEAD_OF_MOVE
cid#1556642 COPY_INSTEAD_OF_MOVE
cid#1556644 COPY_INSTEAD_OF_MOVE
cid#1556663 COPY_INSTEAD_OF_MOVE
cid#1556674 COPY_INSTEAD_OF_MOVE
cid#1556682 COPY_INSTEAD_OF_MOVE
cid#1556683 COPY_INSTEAD_OF_MOVE
cid#1556685 COPY_INSTEAD_OF_MOVE
cid#1556694 COPY_INSTEAD_OF_MOVE
cid#1556708 COPY_INSTEAD_OF_MOVE
cid#1556711 COPY_INSTEAD_OF_MOVE
cid#1556712 COPY_INSTEAD_OF_MOVE
cid#1556714 COPY_INSTEAD_OF_MOVE
cid#1556719 COPY_INSTEAD_OF_MOVE
cid#1556727 COPY_INSTEAD_OF_MOVE
cid#1556744 COPY_INSTEAD_OF_MOVE
cid#1556757 COPY_INSTEAD_OF_MOVE
cid#1556782 COPY_INSTEAD_OF_MOVE
cid#1556784 COPY_INSTEAD_OF_MOVE

Change-Id: I5d5bc884cd7351a81c18b35aaf4e304256242988
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171128
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-07-28 18:36:01 +02:00
Caolán McNamara
3dcc288468 cid#1555824 Check of thread-shared field evades lock acquisition
Change-Id: Ic0e8e87138ca86a1618e110516f3d8cef481dec7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170626
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-07-18 11:52:22 +02:00
Caolán McNamara
f03610e970 Resolves: tdf#161965 missing UpdateControlStates on page switch
since:

commit a70ad1568e
Date:   Mon Dec 5 11:44:48 2022 +0000

    Resolves: tdf#121297 weld Presentation Minimizer

Change-Id: Ibe28ba79d958d306440807adec9c5bbb64a8801d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170151
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-11 18:11:48 +02:00
Caolán McNamara
5cc0af1faa cid#1606955 Use of auto that causes a copy
Change-Id: I62bef7596c14174b543b64628cedadc108b75590
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170198
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-09 18:19:10 +02:00
Julien Nabet
74376c7628 READMEs update: presenter console is now in sd instead of sdext
since 02c4386a09 (in 2023)
move presenter console from sdext/ to sd/

Change-Id: Ia88cdf437aa5546b251fa0eb95cde8a6b6c64391
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168347
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-06-02 18:33:01 +02:00
Noel Grandin
07b673a1a6 loplugin:ostr in sdext
Change-Id: I0b67b8c8f9dbdf2fdc8192e22b838c15db960cfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167704
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-16 08:49:45 +02:00
Caolán McNamara
56f7ebbc09 add explicit png build dependency to xpdfimport
src/sfnt/pngshim.c:298: error: undefined reference to 'png_create_read_struct'

Change-Id: Iafb7b685f09347f711b9221362f999b3d48c9bda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167656
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-15 11:42:14 +02:00
Caolán McNamara
db6f4c29ad WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I83952aef1fd44d2b49cbaa2324283c14c83723de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167522
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-12 14:05:24 +02:00
Christian Lohmaier
0c4c84a14b makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo)
…by a simple/static $(gb_CustomTarget_workdir)/foo

The build system has a lot of overly complicated leftovers from when it
was introduced and had not only deal with split repositories but also
had to coexist with another buildsystem. Along with lots of copy'n'paste
along the years the makefiles became hard to grasp for newcomers with
all our calls and evals.
As a first step to streamline that, the macros from TargetLocations that
simply prefix a static path to the argument (and similar of the same
kind) are a natural pick before simplifying the rules themselves/getting
rid of a bunch of eval statements.

Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-05-03 16:06:14 +02:00
Christian Lohmaier
b87da3e940 run gperf via wsl in wsl-as-helper case
also split up the gperf commands when generating sw/generated/tokens.cxx

wsl has trouble appending using shell redirects, so use separate targets
and use cat in the final processing step for tokens.cxx
see also https://github.com/microsoft/WSL/issues/4400

Change-Id: Id7a24d060e9be71113ec2827a389d347456f6522
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166338
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2024-04-26 14:01:51 +02:00
Noel Grandin
6adef53aa9 use more OUString literal
convert some functions which merely create an OUString on the fly
from a char literal to 'constexpr OUString' literals

Change-Id: I617490baf2d976291b324cc991b59cd18f4b242c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166392
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-22 12:10:18 +02:00
Mike Kaganski
65a57e5c7c A small refactor
Change-Id: I299cc7c2850a71ee563824c6361707d894f5ddcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165773
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-04 09:21:49 +02:00
Mike Kaganski
9e47e21712 Drop a bit of redundancy
POPPLER_CHECK_VERSION(0, 23, 0) implies POPPLER_CHECK_VERSION(0, 24, 0)

Change-Id: I48f3763ef115719a3e3615623bfb40f7c79b8df4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165772
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-04 09:05:12 +02:00
Mike Kaganski
cc89565130 Related: tdf#160260 Drop xpdfimport.err.pdf, let PDF import return false
The problem was, that upon any error in opening a PDF, out Poppler
wrapper used another bundled document, with a single page with a static
text "This PDF file is encrypted and can't be opened.". That happened
regardless of the nature of the problem (it could be an IO problem, as
in tdf#160260, or other things from Poppler's poppler/ErrorCodes.h).
For automated import (command line or API), it meant that it was not
possible to detect the failure.

This replaces this strange mechanism with a normal error reporting. For
now, a simple "general input/output error" will be reported; but it is
possible to use interaction handler to show details (see comment in
xpdf_ImportFromFile).

Change-Id: I30493118fc5dd0b1c62cae7718acfe95bb4b13b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165771
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-04 08:29:35 +02:00
Mike Kaganski
7b9905df45 tdf#160260: make poppler wrapper executable Unicode-aware on Windows
Change-Id: I76dc31ee14d1794fa73f990e641540ff941c7201
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165735
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-03 22:11:17 +02:00
Gabor Kelemen
3b85fd8a27 tdf#146619 Drop unused 'using namespace' in: sdext/
Change-Id: I8c5012958f6e59ec11c8a7bd52592e30cce4117a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165525
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-31 19:22:57 +02:00
Noel Grandin
02c67183f1 remove leftover PresenterScreen PCH files
Change-Id: I5766d6ec6f6b72800e9350818617881bb61ef042
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165014
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-19 16:33:00 +01:00
Noel Grandin
7840effb1d use more string_view
found by tweaking the stringview loplugin

Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08 07:06:13 +01:00
Dr. David Alan Gilbert
1a7f06f013 sdext.pdfimport: Use std::unique_ptr
as per Noel's suggestion - this also ends up fixing some leaks as well.

Change-Id: Ia6099afc1955c341256ec0de5a0f839c005d9b76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164446
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07 07:04:08 +01:00
Dr. David Alan Gilbert
cf776a6fa6 tdf#113050 sdext.pdfimport: Enable tilingPatternFill
Now we've got everything wired up, turn it on.

Change-Id: I2333e5163493ef0312619f54d2f90ae266fc655b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163575
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:28:48 +01:00
Dr. David Alan Gilbert
81fbaf4bb9 tdf#113050 sdext.pdfimport: Set and write TileWidth/Height
Set the tile width/height from the step size and write it into the
draw:fill-image-width/height properties.

Change-Id: I70d69a6d5e77929bd14282731dd68d3bcafa9c1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163574
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:28:31 +01:00
Dr. David Alan Gilbert
784696e47c tdf#113050 sdext.pdfimport: Add TileWidth and TileHeight fields
We need to scale the tiled image that fills our polygon, so add
width and height fields, we'll fill in and process them in subsequent
patches.

Change-Id: Ib0000066170ccbc0f4a4c971e1d6df72c3f7df14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163573
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:28:08 +01:00
Dr. David Alan Gilbert
4b295b1b77 tdf#113050 sdext.pdfimport: Create the fill-image style and use it
In a poly which is being image filled, we need to create a style
with the actual image definition in the 'Contents'
and then set the (automatically created) name of this in
the prop on the main style.
Also we need to set draw:fill to "bitmap" rather than "solid"

Change-Id: I253704519011e98fd106331ccfb139ad93ef6dee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163572
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:27:48 +01:00
Dr. David Alan Gilbert
9f21f816a1 tdf#113050 sdext.pdfimport: Expose the ImageContainer const
I need the finalisers to be able to read an image, they have
a ref to the processor but not the emitter; so allow the container
to be read via the processor reference.

Change-Id: Ifd3b2af1d456561ad42ae3e7c664f03b2e0c971c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163571
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:26:58 +01:00
Dr. David Alan Gilbert
2bf5664823 tdf#113050 sdext.pdfimport: Add FillImage field to PolyPolyElement
Use -1 to mean the existing solid fill, otherwise it's the ID
of the image to use as the fill.

Change-Id: I596c26145f5285f75af631a3bb7ddf09600982a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163570
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:26:40 +01:00
Dr. David Alan Gilbert
d7e5eae44e tdf#113050 sdext.pdfimport: Add ImageContainer::asBase64EncodedString'
For fill-images we need the image as a string.

Change-Id: I4a8429563b0e19ad977b4e933a0ffee378dab244
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163569
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:26:04 +01:00
Dr. David Alan Gilbert
ff160e93d3 tdf#113050 sdext.pdfimport: In styles wrap 'Contents'
For draw:fill-image we need output like:

<draw:fill-image draw:name="foo">
  <office:binary-data>Base64stuff
  </office:binary-data>
</draw:fill-image

Style's 'Contents' entry, almost does that and is currently
unused; but it doesn't put the tags in.   Adding the tags
manually in the Contents string doesn't work (because it bypasses
something in the Emitter?).

Since it's not currently used, add the office:binary-data
tags for our use.

Change-Id: Idaf11b49bd075bb82116a0578bb4c38790dd0fb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:25:35 +01:00
Dr. David Alan Gilbert
bc5bd022a9 tdf#113050 sdext.pdfimport: In styles Specialise draw:fill-image
Like stroke-dash, draw:fill-image needs the name setting in
the draw:name attribute.

Change-Id: Ib9c888765af8bfb0849f0f1ef15f9774808a1661
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163567
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:25:08 +01:00
Dr. David Alan Gilbert
2350357d5c tdf#113050 sdext.pdfimport: Create poly for tiling pattern
Create a poly for the tiling pattern fill.

Change-Id: Iaeadfe51bed6d4de87f36b3a78145829ea8443e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163566
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:24:48 +01:00
Dr. David Alan Gilbert
4a13e1890e tdf#113050 sdext.pdfimport: Plumb tiling pattern fill to pdfiprocessor
Change-Id: I68459834fd903d31c9b2e57d637265dd67da4f56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163565
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:24:17 +01:00