Commit Graph

70 Commits

Author SHA1 Message Date
Julien Nabet
2a65bf32ec Revert "Typo: iff->if"
This reverts commit cf92da3d6e.

iff can mean "if and only if" so not a typo
2015-06-23 20:42:27 +02:00
Julien Nabet
cf92da3d6e Typo: iff->if
Change-Id: I3fc60856b5a56e71d70b55c89323be074bdec3b3
2015-06-23 20:30:11 +02:00
Mox Soini
0c87f8bf42 Cleanup crossplatform cairo
Mac / Win cairo is not built / used, this cairo code can be removed to
reduce code bloat.

4th Revised version with Android fixes

Change-Id: I6e56850f535ca13b77839b7d67e227c5f39d388e
Reviewed-on: https://gerrit.libreoffice.org/16218
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-06-11 08:35:09 +00:00
Noel Grandin
ab377324bb convert DrawMode to scoped enum
Change-Id: Ie4a7705cc3d042d08178e562a2c2ffaf0be3810f
2015-06-04 08:30:24 +02:00
Julien Nabet
c2690669d2 Remove include stdio (part6)
Change-Id: I4dde46c81b36b318710e32c8f420dff8d9c2e655
Reviewed-on: https://gerrit.libreoffice.org/15879
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-05-23 18:00:49 +00:00
Julien Nabet
817fefa5a2 Typo: impemented->implemented
Change-Id: Ifa031a872bd618c41b0fbb2e0fd5a17e0f7b0a53
2015-03-23 21:43:30 +01:00
Caolán McNamara
05ad682e73 SvpSalGraphics::drawRect needs to adjust the rect bounds for line drawing
like X11SalGraphicsImpl::drawRect does

now the focus borders in the layouts pane of impress update correctly
as the border is added/removed as you pass the mouse over them with
the gtk3 plugin

Change-Id: I1f03065049c2aee2e3c28e7a16777e9b06e34c6e
2015-03-23 16:35:59 +00:00
Caolán McNamara
e510a208b0 move cairo helpers to vcl and make per-plug
Change-Id: I4de4d5c3a191784598e93a8cf70e45a3f59ae857
Reviewed-on: https://gerrit.libreoffice.org/14907
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-23 11:42:28 +00:00
Caolán McNamara
6c80674942 reorganize resizing surfaces logic
the only case where we don't just create a new surface is the X11 case

Change-Id: I98a3c8f227e208ac9db969ed7711e293fb237c2e
Reviewed-on: https://gerrit.libreoffice.org/14902
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-19 13:17:46 +00:00
Caolán McNamara
6ef1cb0c57 move the cairo resize hack into vcl
Change-Id: I41868da3901d9c3fff69c11da467952176e58f09
Reviewed-on: https://gerrit.libreoffice.org/14897
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-19 00:34:30 +00:00
Caolán McNamara
3d49571225 revert work in progress
Change-Id: I1387b0ed7b2d8bb9df801c03cf59efc9c0e1cfd3
2015-03-18 17:43:03 +00:00
Caolán McNamara
2beb8b2e6a more thinking
Change-Id: Ie349bd35b1fc92b77cc15f51eb886a1c9c92cbe1
2015-03-18 17:24:04 +00:00
Caolán McNamara
dce032e3ac thinking
Change-Id: Ib1a086bed7f70e244db2a0bd32819560c6949d51
2015-03-18 17:24:04 +00:00
Caolán McNamara
f59345721b move the cairo resize hack into vcl
Change-Id: Ifd1817a28f4fb7ddcc85447fd3388fd0efd86476
2015-03-18 17:24:03 +00:00
Caolán McNamara
34dc97c791 move IsCairoWorking to vclplug level and rename
Change-Id: Id31de932afa61df6933d61ddba971f5d7060f0c1
2015-03-18 12:32:30 +00:00
Caolán McNamara
3fde719130 the clipping must be against the original device
seeing as the clipping replaces the old clipping and doesn't
further subset the clipping

and presumably, the same must be true for "unclipping"
the device

This nearly killed me to debug and is a crucial bit to make the gtk3 thing work
right.

Change-Id: I21629ef7c8a19b720d05d4e4938f40d4776bee76
2015-03-11 16:02:49 +00:00
Caolán McNamara
997654c21d make SvpSalGraphics::getBitmap more readable
Change-Id: I4eb896813d6cec49bf5f1c8ac2ee8fafc06fbf52
2015-03-10 12:02:04 +00:00
Caolán McNamara
662f88b0b0 I don't think we should clip when using getBitmap
this solves the bug of icons in the standard toolbar
under gtk3 of getting rendered with a black background
on first render

Change-Id: I73bae4cd0b9f38c9e9caef8019d773d42b5e8f10
2015-03-10 12:02:04 +00:00
Tor Lillqvist
52d39d9e7f Fix compilation for iOS
Change-Id: I9b7dc689cfef11aa6f33868884a9a25607502d1d
2015-02-28 10:35:58 +02:00
Caolán McNamara
dd179370e0 seperate headless textrendering into its own class
and forward calls to it from the SvpGraphics

Change-Id: I6d1fbc8919596d5f47661b3471570fcb7e14bc3e
2015-02-27 13:51:06 +00:00
Caolán McNamara
46ce83541b Restore "Use the cairo-compatible basebmp surface for headless"
as it now works again after ancient emf import bug is fixed by

commit 5e5b90c128
Date:   Thu Feb 26 13:47:58 2015 +0000
    in BITFIELDS mode (3) there are *3* pal entries not 12

and two writer qa tests adapted to test for the actual pixel color vs the
underlying pixel data

This reverts commit 3c4f7704e0.

Change-Id: Id94f98f9c620c90fda097fa97fc34c9ee957c483
2015-02-26 20:59:24 +00:00
Stephan Bergmann
3c4f7704e0 Revert "Use the cairo-compatible basebmp surface for headless"
This reverts commit a785df6a5f plus follow-up
3594c9ce1c "presumably destroy flushes" and
b5b19508da "WaE: -Werror=unused-variable," as it
triggered the assert(nLen <= 8) in ColorMask::ImplCalcMaskShift
(include/vcl/salbtype.hxx) in various tests.

Change-Id: Ic5433522fcd9b8cc7c4e82704cebe7d9bbcea586
2015-02-26 13:58:22 +01:00
Caolán McNamara
a785df6a5f Use the cairo-compatible basebmp surface for headless
That way the conversion from basebmp to cairo becomes unnecessary on blitting
the thing onto a cairo surface for gtk3 and opens a route to using cairo, e.g.
especially for text, to render to basebmp surfaces.

Change-Id: I1d11f503410af9c92a97018e9ee20045412b157e
2015-02-25 17:06:15 +00:00
Markus Mohrhard
7514dc3424 move the iOS SalGraphics code back into the OSX one
Conflicts:
	vcl/inc/headless/svpgdi.hxx

Change-Id: I4cd9163bcbb8cdee21e5bce3303894923c4238d6
2014-11-30 05:16:11 +01:00
Louis-Francis Ratté-Boulianne
4b6feefa51 vcl: Add support for backend-dependent blending of bitmaps (mask and alpha)
Change-Id: Iba64eb42965c86ca5655b9a105ef3f397e033ecf
2014-11-22 20:14:16 +01:00
Michael Meeks
578fd01ee9 basebmp: accelerated method to create a clipping device.
This was some staggering proportion of tiled rendering documents
with complex clipping; it seems 'clear' is not what memset is for
1bit clip masks.

Change-Id: I9142ffb7d7016603feb7782d6f03b9992b9494e3
2014-10-14 12:04:13 -03:00
Michael Meeks
6ba7f47de3 vcl: whitespace cleanup.
Change-Id: I0e61ecfc32f13bba0fa992689604c8b79e6139e9
2014-10-11 20:49:58 +01:00
Noel Grandin
8dbde0845a fdo#82577: Handle Region
Put the VCL Region class in the vcl namespace. Avoids clash with the X11
Region typedef.

Change-Id: I6e008111df7cf37121fbc3eaabd44a8306338291
2014-09-30 09:58:23 +02:00
Caolán McNamara
f52b92f1c5 m_aDevice may be null
Change-Id: I21f394c1a2f91a18af8eb46ed9be3c2f786fe1ef
2014-08-27 09:32:30 +01:00
Marcos Paulo de Souza
7e2b9fa213 Remove some useless tools/debug.hxx includes
Also remove the tools/solar.h included from tools/debug.hxx. The include of solar.h
header was necessary in some cases because of a macro or a typedef that was needed.

Change-Id: Ia6e15d5c2571c58c9e9138b0d0a7f08ae88053c9
Reviewed-on: https://gerrit.libreoffice.org/11075
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2014-08-22 16:33:18 -05:00
Caolán McNamara
947edda987 m_aDevice may be null
Change-Id: Ibd4666bd185198e0702a498d5648f1e4d5580e11
2014-08-13 11:58:01 +01:00
Andrzej Hunt
4302794277 svp clipping again: Rectangle dimensions don't map directly to B2IBox.
This is the same as in 80f3211a7a.

Change-Id: Ibb981da064b4fc97fd865be2decabd8798de7380
Reviewed-on: https://gerrit.libreoffice.org/10186
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2014-07-10 09:44:40 +00:00
Andrzej Hunt
80f3211a7a svp clipping: Rectangle dimensions don't map directly to B2IBox.
Previously the clip region would end up being 1 pixel smaller in both
directions than the requested area -- B2IBox considers the bottom-right
point to NOT be included in its area, whereas Rectangle considers the
bottom-right point to be the last point WITHIN its area.

(This is equivalent to the Rectangle's getWidth/GetWidth differentiation.)

This is noticeable e.g. with tiled rendering, where images spanning
a tile boundary are clipped to paint only the region within a given
tile -- however previously they would be clipped by an additional pixel
in each direciton, resulting in an empty border along the bottom-right
edge.

Change-Id: I0ef3098959defc5c82719155c130aa904c04b6b1
2014-07-07 10:38:22 +02:00
Tor Lillqvist
50bf123ddb Kill superfluous vertical whitespace
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9
2014-04-02 16:54:18 +03:00
Tor Lillqvist
628b07cfc0 Seems we don't need any basebmp stuff in AquaSalGraphics on iOS
No repeatable visible differences in TiledLibreOffice for my test
docs.

Probably we should unify the iOS vcl code even harder with the OS X
code, get rid of the last remains of the pre-tiled-rendering basebmp
bitmap-based stuff.

Change-Id: I2484585d3d0ef5ce758d0a654717d23464464c1a
2014-03-26 10:15:42 +02:00
Tor Lillqvist
1d9561f56c Fix a few problems in the iOS vcl code
We don't need the headless SvpSalBitmap code after all on iOS, so
bypass all of svpbmp.cxx for iOS.

I accidentally had left duplicates for some AquaSalGraphics methods in
headless/svpgdi.cxx in addition to the ones in
quartz/salgdicommon.cxx. This is obviously bogus, the linker just
picks the ones that come first in the archive.

(Remember the ugly "#define SvpSalGraphics AquaSalGraphics" trick, so
for instance SvpSalGraphics::setClipRegion actuall is
AquaSalGraphics::setClipRegion.)

It's the Quartz ones we want, as since the switch to tiled rendering
the iOS vcl code is supposed to work much more like the OS X
one. (There is still some significant refactoring to do
there. Possibly no "headless" code needs to be used at all for iOS.)

A couple of functions moved from salgdiutils.cxx (which isn't compiled
for iOS) to salgdicommon.cxx.

The SetState() function now gets used also on iOS, and to properly
undo its CG context stacking I pop it in SetVirDevGraphics() when the
virtual device is being destroyed.

This fixed the rendering of some simple shapes that use overlapping
and transparency, but not that of the "monster" SmartArts.

Change-Id: I2bfaa4129e3641dbdd1dd240c1d07f9bdcfea1b8
2014-03-24 14:47:08 +02:00
Tor Lillqvist
bff2ddbbfb Hack on the iOS vcl code
Attempt to make some more complex documents render OK.

Stop using SvpSalVirtualDevice on iOS. Use AquaSalVirtualDevice in all
cases. Do use a CGLayer (the AquaSalVirtualDevice::mxLayer field)
after all, like on OS X.

Change-Id: I7f7dc00c526453786cc871fd88dfb73517b15c39
2014-03-10 17:37:43 +02:00
Chris Sherlock
81afed113d Removed unnecessary comment decorations from VCL sources
Conflicts:
	vcl/headless/svpgdi.cxx
	vcl/source/app/dbggui.cxx
	vcl/source/app/help.cxx
	vcl/source/app/idlemgr.cxx
	vcl/source/app/settings.cxx
	vcl/source/app/stdtext.cxx
	vcl/source/app/svdata.cxx
	vcl/source/app/svmain.cxx
	vcl/source/control/fixed.cxx
	vcl/source/control/ilstbox.cxx
	vcl/source/control/spinbtn.cxx
	vcl/source/filter/sgfbram.cxx
	vcl/source/filter/sgvmain.cxx
	vcl/source/filter/sgvtext.cxx
	vcl/source/filter/wmf/emfwr.hxx
	vcl/source/filter/wmf/winmtf.hxx
	vcl/source/filter/wmf/wmfwr.hxx
	vcl/source/fontsubset/cff.cxx
	vcl/source/fontsubset/fontsubset.cxx
	vcl/source/fontsubset/xlat.cxx

Change-Id: Ifc4fa21e552a8b031645eb883bdc23563eebb602
Reviewed-on: https://gerrit.libreoffice.org/8357
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 05:48:00 -06:00
Alexander Wilms
d9f0af83b7 Remove visual noise from vcl
Conflicts:
	vcl/source/app/settings.cxx
	vcl/source/window/dockmgr.cxx
	vcl/source/window/dockwin.cxx
	vcl/source/window/floatwin.cxx
	vcl/source/window/toolbox2.cxx

Change-Id: Ie67681549a76e77064b09d4b5bf80fe4c6010341
Reviewed-on: https://gerrit.libreoffice.org/8339
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 04:56:16 -06:00
Stephan Bergmann
e8f8f24c84 vcl: sal_Bool -> bool
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e
2014-02-21 12:53:51 +01:00
tsahi glik
772c3a2024 fix duplicated symbols on ios salgraphics 2014-02-14 14:25:24 -08:00
Tor Lillqvist
48969eb444 Move SvpSalGraphics::SetVirDevGraphics() for iOS out of the header for clarity
Change-Id: I88c0ed27a492b57a0258a7ec211109a9e2552b99
2014-01-17 00:17:02 +02:00
Herbert Dürr
5033fa376f Resolves: #i123840# normalize SalGraphics point count argument types...
to sal_uInt32

The old mixture of sal_uInt32, ULONG, sal_uLong, sal_uIntPtr gets
consolidated. 4e9 points are more than enough for a SalGraphics.

(cherry picked from commit 03f5dce97331acc1a5e832f956d711a5dc0aac0e)

Conflicts:
	vcl/aqua/source/gdi/salgdi.cxx
	vcl/generic/print/genpspgraphics.cxx
	vcl/inc/os2/salgdi.h
	vcl/inc/quartz/salgdi.h
	vcl/inc/salgdi.hxx
	vcl/os2/source/gdi/salgdi.cxx
	vcl/os2/source/gdi/salgdi2.cxx
	vcl/source/gdi/salgdilayout.cxx
	vcl/unx/generic/gdi/salgdi.cxx
	vcl/unx/headless/svpgdi.hxx
	vcl/unx/headless/svppspgraphics.cxx
	vcl/unx/headless/svppspgraphics.hxx

Change-Id: Iddf806256c7e5403158635e3f5f0049e9382500f
2013-12-31 10:45:02 +00:00
Tor Lillqvist
6265876ae9 iOS tiled rendering work
Possibly quite broken intermediate commit. But anyway, now it is
possible to render the tile diretly to a CGContext. Can be seen in
the MobileLibreOffice app when build in the Debug_tile_tester
configuration. See touch_lo_draw_tile() in viewsh.cxx. Unfortunately
the old plain LibreOffice test app is now broken, though, and
displays nothing at all.

This refactoring and hacking in vcl was done in a quite ugly fashion,
with ifdefs etc. But trust me, I did try, several times, for many
days, to get where I wanted in an elegant and clean fashion. But doing
it cleanly meant not being able to actually build it for days while
trying to figure ut which bits go where and which class should be
split into what base and derived class(es), and it was too much for my
limited brain capacity. I just couldn't juggle all the vcl class
structure in my head, especially as I don't have any good
understanding of the general design of it all.

Change-Id: Ia59d6a9cce15a63e63f94e8d8574bef21993fb1f
2013-12-14 01:42:02 +02:00
Stephan Bergmann
3a1bc7da82 Assert has become somewhat redundant
...with d8dbf1b5db "Turn basebmp::Format into a
proper enum" demonstrating that nDeviceFmt should only take on values enumerated
at basebmp::Format.

Change-Id: I9f5fe2b3d403a8fc50a286b40b9e1bc74079e2cb
2013-08-12 10:20:30 +02:00
Stephan Bergmann
d8dbf1b5db Turn basebmp::Format into a proper enum
Change-Id: I4067c5039c7b5c74a1c144721dd7260de54dd2bf
2013-07-12 14:41:35 +02:00
Armin Le Grand
9bb96049ad Resolves: #i121534# Reintegrating changes for rotated bitmap support
(cherry picked from commit b2cc0de3fc9adee90787ca760e86869f9255b380)

Conflicts:
	canvas/source/vcl/spritecanvashelper.cxx
	drawinglayer/Library_drawinglayer.mk
	drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
	drawinglayer/source/processor2d/vclhelperbitmaprender.hxx
	drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx
	drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx
	drawinglayer/source/processor2d/vclprocessor2d.cxx
	officecfg/registry/schema/org/openoffice/Office/Draw.xcs
	svx/source/svdraw/svdograf.cxx
	vcl/aqua/source/gdi/salgdi.cxx
	vcl/inc/aqua/salgdi.h
	vcl/inc/os2/salgdi.h
	vcl/inc/salgdi.hxx
	vcl/inc/unx/pspgraphics.h
	vcl/inc/vcl/bitmapex.hxx
	vcl/inc/vcl/outdev.hxx
	vcl/inc/vcl/salbtype.hxx
	vcl/os2/source/gdi/salgdi2.cxx
	vcl/source/gdi/bitmapex.cxx
	vcl/source/gdi/outdev2.cxx
	vcl/source/gdi/salgdilayout.cxx
	vcl/source/gdi/salmisc.cxx
	vcl/unx/generic/gdi/pspgraphics.cxx
	vcl/unx/generic/gdi/salgdi2.cxx
	vcl/unx/headless/svpgdi.cxx
	vcl/unx/headless/svpgdi.hxx
	vcl/unx/headless/svppspgraphics.cxx
	vcl/unx/headless/svppspgraphics.hxx
	vcl/win/source/gdi/salbmp.cxx
	vcl/win/source/gdi/salgdi.cxx
	vcl/win/source/gdi/salgdi3.cxx
	vcl/win/source/gdi/salgdi_gdiplus.cxx
	vcl/win/source/gdi/winlayout.cxx

Change-Id: I871d1d107b019758f3913e5eb63bc9bc0ba403fd

Do not name unused arguments to prevent compiler warnings.

(cherry picked from commit f3118889a0cd941f193e9b6557c0792015d77a34)

Change-Id: I482d1f96d695c7bf9912ec464bb39e7fdd14adef

Related: #i121534# fix graphite-enabled windows build

(cherry picked from commit c90a6ca92b1239d01a2892e15488e4a183a88b1a)

Conflicts:
	vcl/win/source/gdi/winlayout.cxx

Change-Id: I95fd41ad6f7187f34ba9474674a471fb4fc65314
2013-06-14 16:00:13 +01:00
Julien Nabet
f52a86b459 cppcheck: fix several Prefer prefix ++/-- operators
Change-Id: Ie8ce0ebb9ec979575657a89ebbfe4d01142b04e5
2013-06-13 22:11:36 +02:00
Stephan Bergmann
7142090557 Remove dead code related to unused WITH_SVP_LISTENING
Change-Id: I8a12d0ea18a60541d9a11db26cc417a190443ff4
2013-06-13 09:49:36 +02:00
Armin Le Grand
e717d1dcce Resolves: #i121237# Rework/Cleanup of Region code...
due to missing complete support for B2DPolygon class

(cherry picked from commit cab10eeb7878edf224a004fd7640bd4adf8d3c51)

Conflicts:
	cppcanvas/source/mtfrenderer/implrenderer.cxx
	svx/source/sdr/overlay/overlaymanagerbuffered.cxx
	svx/source/svdraw/svdpntv.cxx
	vcl/aqua/source/gdi/salgdi.cxx
	vcl/inc/region.h
	vcl/inc/unx/gtk/gtkgdi.hxx
	vcl/inc/vcl/regband.hxx
	vcl/inc/vcl/region.hxx
	vcl/os2/source/gdi/salgdi.cxx
	vcl/source/gdi/bmpacc3.cxx
	vcl/source/gdi/outdev2.cxx
	vcl/source/gdi/outmap.cxx
	vcl/source/gdi/regband.cxx
	vcl/source/gdi/region.cxx
	vcl/source/window/window.cxx
	vcl/unx/generic/gdi/pspgraphics.cxx
	vcl/unx/headless/svpgdi.cxx
	vcl/unx/headless/svppspgraphics.cxx
	vcl/win/source/gdi/salgdi.cxx

Change-Id: Iee9a66ff431c3cecb7603e445147b67715de0f7d

Remove unused variable to prevent compiler warning

(cherry picked from commit 0ac65ccf079e3e22ac23cbe7ae546504c863c31f)

Change-Id: Icbcaa9d576a7e560d96debc7360bdbe9090b3fd3

Wrong comparison with bool corrected

(cherry picked from commit 612cefdcf6176b6bb847ce899d89af40ef313a90)

Change-Id: I1cf5de6734b588f78d8e870ba7b7860634b461ce
2013-06-12 14:31:10 +01:00