60 Commits
Author SHA1 Message Date
Andrea Gelmini b2987ad577 Fix typos
Change-Id: I3fbc308fa4c51674e90b27cff704830904a372f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209889
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:25:24 +02:00
Gabor Kelemen 49cb3077fb tdf#146619 Use more forward declarations in include/vcl/outdev.hxx
these were skipped in previous runs, since they contain some code behind #if

After inspecting these, it seems like the removals should not cause trouble.

This also shaves off some 140M input

Change-Id: Ie1f57174dd6fec3ba5b0b91eb0688acdc1a8143d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197494
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-23 21:27:08 +01:00
Gabor Kelemen 66ffc2417b tdf#146619 Run IWYU on cppcanvas/
Change-Id: Ie98b497409e394ac13176d4e1ea8753278698fd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189791
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-08-19 09:48:00 +02:00
Noel Grandin 4977c89e3e BitmapEx->Bitmap in CreateFromCairoSurface
now that Bitmap supports transparency

Change-Id: I8c890db186c1e37ea535ff515633d083fec8d8c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-15 07:22:01 +02:00
Miklos Vajna 819230575d Fix DISPLAY build
Seen:

	error: non-const lvalue reference to type 'Bitmap' cannot bind to a value of unrelated type 'BitmapEx'

on Linux, with DISPLAY set to a non-empty value (X11).

Change-Id: I92102409275a1be748d924bbd551cb805bdf0abf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188492
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-07-29 09:02:55 +02:00
Noel Grandin 11b1557147 convert KernArray from sal_Int32 to double
which allows us to eliminate a bunch of rounding at various layers, and
consequently maintain a lot more precision

Change-Id: I911dedd7c041c1d67396c082e5695346ea689acb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175814
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-31 12:10:52 +01:00
Noel Grandin 04d3831914 loplugin:ostr in cppcanvas
Change-Id: I59c10b0d82297157a87cb366be69c8e757638c20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167257
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-07 12:53:11 +02:00
Mike Kaganski a01a642ebb UnoApiTest::loadFromURL -> UnoApiTest::loadFromFile
The old name was misleading (it doesn't take an URL, but a filename);
also, now it's easier to grep for it - doesn't get mixed with
vcl::graphic::loadFromURL.

Change-Id: Ib88d2194200a6a54d2326971e0306ba39f0c7025
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161578
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-03 07:51:28 +01:00
Noel Grandin a214ac6774 simplify and modernise ScopedBitmapAccess
(*) Make all of it use a "Scoped" paradigm
(*) pass by value, no need to allocate on heap
(*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods.
(*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places.

Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-07 09:32:14 +01:00
Stephan Bergmann e0c33ec15f loplugin:ostr: automatic rewrite
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2023-10-07 00:47:20 +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
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
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 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
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
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 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 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
Noel c7483d48df drop operator bool and operator! from Bitmap and BitmapEx
IRC chat:
<quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap
  has the same problem as Graphic and the reason why you dropped that
  commit 7334034ae9
  "drop Graphic::operator bool"
<noelgrandin> quikee[m], hmmm, good point
<noelgrandin> maybe I should just drop both operator bool and
  operator! in favor of IsEmpty
<quikee[m]> noelgrandin: I don't remember what the problem is I just
  remembered we dropped it Graphic :) sure, dropping everything for
  IsEmpty is probably the best

Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-28 10:26:06 +02:00
Ilmari Lauhakangas 86c943b15d Cleanups after vcl/bitmapaccess.hxx splitting
Change-Id: I5a24fb984ba6fbfc2b316420d5ffa372f35ce061
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108318
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-12-26 21:00:52 +01:00
Muhammet Kara f99e765cb3 clang-format c*,d*,e* with under 5-percent lines of change
Files which could become clang-format conformant with
under 5-percent lines of change relative to the total
count of lines in the file are found by using bin/find-clang-format.py,
and fixed with /opt/lo/bin/clang-format -i <path-of-the-file>

There will be follow-up patches to fix all 'under-5-percent' files.

Change-Id: I06087a1385ca9da6a28d36ea4c0d2e40bdbf8f03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88774
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-16 14:10:11 +01:00
Gabor Kelemen 977c993353 tdf#42949 Fix IWYU warnings in cppcanvas/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I3e6b35acf6266157d4cf634e2143e6e19a73102a
Reviewed-on: https://gerrit.libreoffice.org/81813
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-31 11:29:44 +01:00
Julien Nabet e748bd232b Fix emfplus.cxx cppcanvas/qa
/home/julien/lo/libreoffice/cppcanvas/qa/extras/emfplus/emfplus.cxx: In member function ‘void testFdo77229::TestBody()’:
/home/julien/lo/libreoffice/cppcanvas/qa/extras/emfplus/emfplus.cxx:79:46: error: ‘class BitmapColor’ has no member named ‘GetColor’; did you mean ‘getBColor’?
     Color aColor(pAccess->GetPixel(142, 140).GetColor());
                                              ^~~~~~~~
                                              getBColor

Change-Id: I7db2e678ddfadcbd55b3cb87613eeecb79d12ad5
Reviewed-on: https://gerrit.libreoffice.org/72253
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jenkins
2019-05-13 22:48:33 +02:00
Caolán McNamara fbc038cc4f an uno -> a uno
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d
Reviewed-on: https://gerrit.libreoffice.org/72105
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10 14:50:59 +02:00
Noel Grandin 725a1f514c loplugin:sequentialassign in comphelper..cui
Change-Id: I1a08f3684b785e31535adcfb4220ded267a77c3b
Reviewed-on: https://gerrit.libreoffice.org/70643
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-12 15:33:02 +02:00
Miklos Vajna e44c31d68b CppunitTest_cppcanvas_emfplus: use CPPUNIT_TEST_FIXTURE()
Change-Id: I1d6a2b5d2b34dfd3356650a14cc853d00afbdda9
Reviewed-on: https://gerrit.libreoffice.org/67476
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-07 09:01:25 +01:00
Gabor Kelemen 8067be0721 tdf#42949 Fix IWYU warnings in include/vcl/[f-h]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ice2eb8c5994bf2ccb88972332ca4a1d3ed41752a
Reviewed-on: https://gerrit.libreoffice.org/63826
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-27 10:35:30 +01:00
Jochen Nitschke 9401c7c28a remove unused processfactory.hxx includes
and fix fallout

Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee
Reviewed-on: https://gerrit.libreoffice.org/52206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-01 12:11:26 +02:00
Chris Sherlock 01e470f0ab vcl: remove BitmapColor Color() operator
BitmapColor has a Color() operator. However, this is confusing and
tends to hide that the two classes aren't the same. I have converted this
to GetColor().

Change-Id: I0be2dcb3fc420e7be9c8d04330e7a3fe69a5412a
Reviewed-on: https://gerrit.libreoffice.org/48245
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-05 09:00:54 +01:00
Miklos Vajna f3e840541a tdf#42949 Fix some Include What You Use warnings
Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33
Reviewed-on: https://gerrit.libreoffice.org/46946
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-12-22 10:49:55 +01:00
Caolán McNamara 63eddc5d79 aliasing(?) gives a ever so slightly different color on hidpi
e.g. without hidpi this could probably be reproduced with
export SAL_USE_VCLPLUGIN=gtk3
export GDK_BACKEND=x11
export GDK_SCALE=2
and CppunitTest_cppcanvas_emfplus fails with 0x00ff00 instead of 0x00fe00

Change-Id: I1ecd7dce7703ed50fe396e007424a3ec4252d063
2017-05-16 09:15:44 +01:00
Caolán McNamara 3d213b3dc5 make SfxGetpApp just get and move GetOrCreate to the periphery
Change-Id: If3b22635e46dbccf0fad101f51bb653cbbcd3a32
Reviewed-on: https://gerrit.libreoffice.org/34957
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-08 09:56:07 +00:00
Stephan Bergmann 3aaf523d68 Dispose Window when done
Change-Id: I6b67d12174c3caa0a4bf230d87421f5768a331f8
2016-12-22 10:22:21 +01:00
Stephan Bergmann ef3a9951e0 loplugin:unnecessaryoverride (dtors) in cppcanvas
Change-Id: I4f6f6e36a965b5c01ffd51b1710fa8cc57d497fa
2016-11-28 14:14:53 +01:00
Stephan Bergmann 91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "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
Chris Sherlock 88730cdae3 vcl: bmpacc.hxx -> bitmapaccess.hxx
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-02-06 21:04:09 +11:00
Stephan Bergmann b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Caolán McNamara 3a00aaef2a boost->std
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0
Reviewed-on: https://gerrit.libreoffice.org/18670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-18 07:59:14 +00:00
Michael Meeks 4ff758fea1 Manual cleanup of misc. issues.
Change-Id: Ib0b9b17010f7c1b0814b48f6fb0144e5296418df
2015-04-10 13:40:40 +01:00
Michael Meeks 5d133eb621 first half of non-scriptable, Instance constructor conversion.
Change-Id: If73bb41bfa805e22609748f25971724b4778edb3
2015-04-10 13:27:16 +01:00
Michael Meeks d7930771b8 boost references are unhealty for VclPtr.
Change-Id: I7ce41ecff1eee4cb45f685a0f4dddb31225ac542
2015-04-10 11:02:08 +01:00
Caolán McNamara 3744d8506e boost->std
Change-Id: I8371b942d915f777a29ca01cd0aed674db0ca853
2015-02-17 16:24:05 +00:00
Noel Grandin 7f8f277b94 fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-07 11:20:44 +02:00
Michael Meeks 19866932cc emfplus: re-work and cleanup unit test
Change-Id: I484331c4dd5feedf8587530912bb65556c1689c0
2014-11-16 14:32:12 +01:00
Miklos Vajna 949b6ef2e9 cppcanvas: CPPCANVAS_DEBUG_EMFPLUS_DUMP_TO is expected to be UTF-8
Change-Id: I95101bed2e2d0f87027f2d80e5e7e23f59b3e159
2014-11-09 18:07:05 +01:00