Commit Graph

1085 Commits

Author SHA1 Message Date
Gabor Kelemen
2f85eb7a2d tdf#146619 Recheck include/c* with IWYU
Change-Id: I0cf6f675483bddf82e7347b484a874c71963bfd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156984
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-09-22 09:33:13 +02:00
Andrea Gelmini
802377d604 Fix typo
Change-Id: Idd6b551bdfbbb613703dd948298deed0462097af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156195
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-08-28 14:21:12 +02:00
Noel Grandin
68e7974026 new loplugin:optionalbool
which warns against using the 'operator bool' conversion of
std::optional<bool> which can lead to interesting bugs

The bugs that this plugin have been submitted independantly,
so this change is just using has_value() in relevant places.

Change-Id: I259b837feeecddcb8cd1d7e5db1e85bf505907cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155978
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-28 09:43:40 +02:00
Patrick Luby
e7496f4156 tdf#150610 fix broken rendering of text meta actions
Even when drawing to a VirtualDevice where antialiasing
is disabled, text will still be drawn with some
antialiased pixels on HiDPI displays. So, expand the
size of the VirtualDevice slightly to capture any of
the pixles drawn past the edges of the destination
bounds.

Change-Id: Ibcba8234708d8784c12f984289ec0a8fcad6694e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156098
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-08-27 23:11:29 +02:00
Noel Grandin
81994cb2b8 Convert internal vcl bitmap formats transparency->alpha (II)
(Second attempt at landing this)

Image formats and graphics APIs use alpha, not transparency,
so change our internal formats and data structures to work directly
with alpha, so we don't need to modify data before we push it to
graphics APIs.

Add a couple of new Color constants to make the intention
of the vcl code clearer.

Notes
(*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask
to more accurately reflect the requirements of the
CGImageCreateWithMask function seems to fix some
tests.

(*) The vcl code does not properly support gradients
with transparency. So the previous code was wrong, and this
change is going to result in slightly different wrongness.

Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-25 08:38:12 +02:00
Noel Grandin
13d7184351 make tools::Poly*gon single-arg constructors explicit
which will help avoid ambiguity in method calls in an upcoming patch

Change-Id: Ic7607ac7d95559e0942a84fb3226cfdd6ade22bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154146
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-06 20:28:05 +02:00
Khaled Hosny
558892a77d CppunitTest_cppcanvas_test: clang-format
Change-Id: Id6497a9dd275ec4e782bcb58b90a27ef569764fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153266
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-19 20:46:36 +02:00
Khaled Hosny
5dfaecfd87 tdf#155810: Add test
Change-Id: I7cea421778335e8d5dd344dd04efdba843945383
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153264
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-19 20:46:25 +02:00
Khaled Hosny
1f7a367f0d CppunitTest_cppcanvas_test: generalize testComposite
Make it pass without cairo canvas.

Change-Id: I81dd5d21bde6d1e09c2e8eeea75d05ddf1793d91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153263
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-19 20:46:13 +02:00
Khaled Hosny
fc72d1d0c6 CppunitTest_cppcanvas_test: enable even if cairo canvas is not
I want to add more tests to it.

Change-Id: Ibadfbafbaa6d6b1cfc1f9aa3761a04de2e2c1f09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153262
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-19 20:46:03 +02:00
Khaled Hosny
cf69509628 CppunitTest_cppcanvas_test: use CPPUNIT_TEST_FIXTURE()
Change-Id: I736e67530643a0949e3078a873ba3105f359ed1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153261
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-19 20:45:42 +02:00
Khaled Hosny
68a4f005bc tdf#155810: Pass Kashida insertion positions through canvas
This was missed in:

commit 3901e029bd
Author: Khaled Hosny <khaled@aliftype.com>
Date:   Mon Aug 8 22:08:37 2022 +0200

    tdf#104921: Cleanup Kashida insertion logic

The width adjustment passed through, but Kashida insertion positions
didn’t, leaving gaps in place of Kashidas when canvas is used
(apparently canvas is only used for slideshow).

Change-Id: I25ff30f10cc46a5c87bda2f3936df26b2fc926b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153234
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-18 22:01:53 +02:00
Noel Grandin
c7dfec21b4 remove some misleading typedefs
Change-Id: I8016c42c3ff8d1cf03c276ebbb68ae7872cd43fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153119
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-15 18:14:39 +02:00
Armin Le Grand (allotropia)
dccd82b5ac MCGR: Reduce diverse GradientStyle enums to single UNO API one
Change-Id: Ie0cd26a308a75ddead9451c53e874a39cc6eeb63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150705
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-04-21 15:03:14 +02:00
Noel Grandin
6ca077ee71 no need to allocate Gradient separately
it is only one pointer big

Change-Id: I21afdeb8015c658c7b9d5db24bceeb8e43694272
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148038
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-01 13:07:33 +00:00
Noel Grandin
00659bcdbb improve readability of VirtualDevice constructor
(a) It is not obvious what DeviceFormat::DEFAULT means
(b) There are two parameters (each with two states), but only really 2
possible overall states

So
(1) use more useful names
(2) combine the two parameters into one enum

Change-Id: Ic0595b39e032cc9e019b88326389d055b977da00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-07 10:19:32 +00:00
Noel Grandin
21734247d5 drop internal support for 1-bit images
on modern hardware, these are less efficient than regular alpha
channels.

Also, this greatly simplies the range of stuff that vcl needs to deal
with, which will make the upcoming transparency->alpha patch easier to
deal with.

Enhance vcl::CreateFromData to convert incoming 1-bit data to 8-bit
image.

Change-Id: I35829da750029fe373d0d2911a669d10bab6ad23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145321
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-12 06:52:42 +00:00
Noel Grandin
cfb2a587bc rename BitmapEx::GetAlpha to GetAlphaMask
to ease the reading of code related to an upcoming patch to convert
transparency to alpha, since there is already a GetAlpha in Color.

Change-Id: I1af0f8f6dd94acfe4673c8556c7aff6c20da3f7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145209
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-11 08:57:13 +00:00
Caolán McNamara
f9395a123e tdf#152094 retain more accuracy from RefDevMode::MSO1
do it like this to avoid adding another mapmode and to keep things
"the same" as much as possible

Change-Id: I1965aa545646f2d27b950d6335b2f608c3e4e04b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143475
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-02 15:20:07 +00:00
Miklos Vajna
c130063895 Remove some unused includes
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from
UnoApiTest.

Change-Id: Ifba307353a11a14e033a230a291314bee86b51c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143190
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-24 08:09:53 +01:00
Xisco Fauli
248be1fe7d UnoApiTest: simplify code by using tempfile member
SwModelTestBase does the same. this will help to make
SwModelTestBase inherit from UnoApiTest

Change-Id: If1c824cf92f0e8b70253e4d5fdeddcaa521d4632
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142287
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-08 11:54:22 +01:00
Xisco Fauli
331a013ee3 UnoApiTest: factor out common code
Change-Id: Ia8874d65ea8d7eb26d10b18e37ba2bac1a7d756b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141730
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-24 18:05:04 +02:00
Xisco Fauli
89c732913d test: merge CalcUnoApiTest and UnoApiTest into one
Change-Id: I24ec4c2c1c6d83865ef78a6460cde68cef84fdb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141638
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-21 21:23:37 +02:00
Tomaž Vajngerl
c747486335 basegfx: replace typedef with a class B2DSize based on Size2D
Change-Id: Id8b3c2bcf0bf4be5aba2812b0edda479bc20c6a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139683
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-09-11 17:16:59 +02:00
Stephan Bergmann
91ba9654ba Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxx
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit.  (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx.  The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now.  Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)

Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18 17:10:19 +02:00
offtkp
48eb565e2e Replace old png writer in emfplus.cxx
Change-Id: Ibdc550e55d73ed71def6e5aef129520ab2062eeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136936
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-19 13:05:23 +02:00
Caolán McNamara
8b6c8e624b cid#1504592 Big parameter passed by value
and

cid#1504665 Big parameter passed by value
cid#1505368 Big parameter passed by value

revert the clang-tidy modernize-pass-by-value changes that coverity
warns about

Change-Id: Id92fdc8d1caeed9eaf7ff1e9e745938e5a971a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135803
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-14 11:37:16 +02:00
Andrea Gelmini
4199a1d0da Remove duplicated include
Change-Id: Ie59fb3c87bf614dce7288337ab270a31645ee845
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135351
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2022-06-03 14:14:40 +02:00
Noel Grandin
859e0acc39 clang-tidy modernize-pass-by-value in cppcanvas
Change-Id: I01e638c468f0941e042a839f73801a3ae3cb022a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135310
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02 17:43:27 +02:00
Pragat Pandya
6abc09926c tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I54257e87da0cd66da59d820c7960c3e4b020fda3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134027
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Tested-by: Jenkins
2022-05-09 20:42:03 +02:00
Gabor Kelemen
840b4eb2f3 Recheck modules [a-c]* with IWYU
See tdf#42949 for motivation

Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-13 08:26:15 +01:00
Chris Sherlock
22f52db0be vcl: migrate AddGradientActions() from OutputDevice to Gradient
Change-Id: I815fb3ce366c93b81f60d19eeed906dc7288708a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127030
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-05 05:42:32 +01:00
Noel Grandin
0c50bf65ef use comphelper::WeakComponentImplHelper in MtfRenderer
Change-Id: I54812a5db5d69a158b93ea1b89db47eb6f996ba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127523
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-27 07:35:06 +01:00
Stephan Bergmann
db3a61cd95 Generally determine Rdb content from gb_*_set_componentfile calls
...instead of by listing the content somewhat redundantly in the Rdb_*.mk
files, to avoid duplication of logic for components that are only built
conditionally (and thus should only be included conditionally in the
corresponding Rdb).  To achieve that, add an "rdb" parameter to
gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros
that internally call gb_ComponentTarget_ComponentTarget), which is used to make
the appropriate gb_Rdb_add_component call internally from within
gb_ComponentTarget_ComponentTarget.  (As a special case,
gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that
has already been done by the corresponding gb_Library_set_componentfile call, so
allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to
support that special case.)

Most Rdb_*.mk files are thus mostly empty now.  One exception is
i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as
needed during the build in CustomTarget_i18npool/localedata.

1c9a40299d "gbuild: create services.rdb from built
components" had already tried to do something similar (in addition to other
things) under a new --enable-services-rdb-from-build option.  However, that
approach had four drawbacks that this approach here addresses (and which thus
partly reverts 1c9a40299d):

1  Rdb_services shall not contain the component files of all libraries that are
built.  While that commit filtered out the component files that go into
Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files
that go into others like Rdb_postgresql-sdbc
(connectivity/Rdb_postgresql-sdbc.mk).

2  The code added by that commit to Makefile.gbuild codified the knowledge that
there is an Rdb_services, which is brittle.

3  The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge
(for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle.

4  Introducing an --enable-services-rdb-from-build option needlessly provided
two different ways how the content of Rdb_services is assembled.

The changes done here would leave --enable-services-rdb-from-build as a
misnomer, as it no longer controls how Rdb_services is assembled.  I thus
renamed it to --enable-customtarget-components, as that is apparently what it
still does now.

Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-10 08:14:24 +01:00
Stephan Bergmann
ea0d55fa45 Work around two -Werror=implicit-fallthrough=
...that started to crop up with recent GCC 12 trunk (where it expanded
the ENSURE_OR_THROW macro, but apparently didn't take into account that its

>    97 |     if( !(c) ){ \
>       |     ^~

will always be taken in these cases where the c argument is false), and
can easily be avoided by getting rid of those uses of
ENSURE_OR_THROW(false, "...")

(And while at it, move the default case to a more reasonable position in
mtftools.cxx, obsoleting the FALLTHROUGH comment in any case.)

Change-Id: I8189d98b361e6725096d0968f3e0e604fb84e591
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126452
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-06 19:21:47 +01:00
Stephan Bergmann
d519d0a434 Adapt CppunitTest_cppcanvas_emfplus CPPUNIT_TEST_NAME=testFdo77229::TestBody
...to 374e261ad1 "increase maximum document
thumbnail size from 256 to 512" (which wasn't caught by Jenkins due to
bcd243793e "CppunitTest_cppcanvas_emfplus: disable
this in case there is no display to use")

Change-Id: Ibe3dc93401e237c37b4823f0393746b1e8b569bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126424
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-06 16:45:24 +01:00
Mike Kaganski
bc0ab08634 Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversions
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2021-11-19 15:42:03 +01:00
Mike Kaganski
37429f2690 Use M_PI* instead of F_PI*
Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-19 09:59:43 +01:00
Luboš Luňák
b5e701d36e add o3tl::span ctor from std::vector
Makes code simpler, and std::span can be constructed from std::vector
too.

Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
2021-10-31 15:52:02 +01:00
Noel Grandin
bc413e15fa tools::Long->sal_Int32 in the DX arrays
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-30 15:43:23 +02:00
Mike Kaganski
a9d314b57b Prepare for removal of non-const operator[] from Sequence in cppcanvas
Change-Id: I2a16a8ea7776447592e51a23ce21aac0a156735f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124354
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-29 13:15:06 +02:00
Noel Grandin
894b4911ff pass DX array around using o3tl::span instead of pointer
so we get bounds checking in debug mode

Note that I cannot just pass around the std::vectors
involved because there is a place in editeng which
calls with a subset of a vector.

Change-Id: I5088a139593c27bf9cbe5d843ab4b0048ac6d508
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124330
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29 12:38:51 +02:00
Stephan Bergmann
4f5b3e4bd5 In O[U]StringBuffer, make string_view params replacements for OUString ones
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads.  That
way, loplugin:bufferadd and loplugin:stringviewparam found many further
opportunities for simplification (all addressed here).  Some notes:

* There is no longer an implicit conversion from O[U]String to O[U]StringBuffer
(as that goes via user-defined conversions through string_view now), which was
most noticeable in copy initializations like

  OStringBuffer buf = someStr;

that had to be changed to direct initialization,

  OStringBuffer buf(someStr);

But then again, it wasn't too many places that were affected and I think we can
live with that.

* I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to
get them in line with their counterparts taking O[U]String.

* I added an OUStringBuffer::lastIndexOf string_view overload that was missing
(relative to OUStringBuffer::indexOf).

* loplugin:stringconstant needed some addition to keep the
compilerplugins/clang/test/stringconstant.cxx checks related to
OStringBuffer::append and OStringBuffer::insert working.

* loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related
code that had been introduced in 1250aecd71
"loplugin:stringviewparam extend to new.."

Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-11 14:22:22 +02:00
Chris Sherlock
4dd6af856d vcl: rename OutDevState to Stack
I have moved the header file to include/vcl/rendercontext as this will
eventually be part of the RenderContext split from OutputDevice.

State and associated enums have also been moved to the vcl namespace. I
have also moved ComplexTextLayoutFlags into the vcl::text namespace.

Change-Id: I0abbf560e75b45a272854b267e948c240cd69091
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-28 08:20:32 +02:00
Noel Grandin
d4dc6b5cfd use std::vector for fetching DX array data
because I'm trying to track down a related heap corruption, and that is
much easier if the access to the array is checked by the std::vector
debug runtime

Change-Id: Ia665f5cebb7f14d88942e88b4b400ad3c28ef5d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04 08:17:06 +02:00
Noel Grandin
a125236448 clang-tidy:readability-redundant-member-init
Change-Id: I48e6fb31df732805423b89ed91b6e4363a69b668
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121150
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-28 07:43:56 +02:00
Caolán McNamara
88bf1749f1 undo changes to TextAlign
revert commit 8689bd5490
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Thu Jul 29 20:49:29 2021 +0100

    convert TextAlign to scoped enum

lets leave this as it always was

Change-Id: Id4d2a5644974cdd2b0ed6d361d5c52629674d057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120626
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18 12:53:31 +02:00
Caolán McNamara
8689bd5490 convert TextAlign to scoped enum
Change-Id: Id2c466eacb44f0ea6adba75a0ac0be8be8e7ed4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119682
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-30 16:40:56 +02:00
Julien Nabet
46ea7c5d8b Simplify Sequences initializations (cppcanvas)
Change-Id: If2d882060422b4e450de9ddda28d8d5c624c8e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116816
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-08 13:20:39 +02:00
Noel Grandin
9090dc1f3b split OutputDevice from Window
as part of a longer-term goal of doing our
widget rendering only inside a top-level render-
context.

I moved all of the OutputDevice-related code that existed in vcl::Window
into a new subclass of OutputDevice called WindowOutputDevice.

Notes for further work

(*) not sure why we are getting an 1x1 surface in
    SvpSalGraphics::releaseCairoContext, but to fix it I clamp
    the size there

(*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice

(*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code?

Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-17 12:56:51 +02:00