summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
AgeCommit message (Collapse)Author
2017-02-10convert Orientation to scoped enumNoel Grandin
and drop unused enumerators Change-Id: I2f42f0f441cf9ce96338d40382acb6d75ea1e1a0 Reviewed-on: https://gerrit.libreoffice.org/34061 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09convert PDFVersion to scoped enumNoel Grandin
Change-Id: I9920f4c9783eb23a41d135e5eacd12805c1b9c2b Reviewed-on: https://gerrit.libreoffice.org/34060 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09convert DestAreaType to scoped enumNoel Grandin
and drop read-only enumerators Change-Id: Ibc4c2a99448a83fc179e2779f8f3e5c8f034ae7b Reviewed-on: https://gerrit.libreoffice.org/34059 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09convert PDFWriter::PageTransition to scoped enumNoel Grandin
and drop some read-only enumerators Change-Id: I96380efec90abe02fa02c3f766f2b6180723da0d Reviewed-on: https://gerrit.libreoffice.org/34058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09Resolves: ofz#576 unexpected exception with invalid fractionCaolán McNamara
Change-Id: I1d653775e88e9fa2ba7b62fce39d52fc21ffe363
2017-02-09convert BmpConversion to scoped enumNoel Grandin
and drop unused 4BIT_TRANS and 1BIT_MATRIX enumerators Also fix a bug in x11::convertBitmapDepth where we were incorrectly passing BmpConversion enumeratirs to ReduceColors Change-Id: I903c6866750e46ee752e10a17c05fcaaf6b11242 Reviewed-on: https://gerrit.libreoffice.org/34062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09convert FontType to scoped enumNoel Grandin
Change-Id: Ieb8f90be8effde5f25bc872784c3ea2177b14bf9 Reviewed-on: https://gerrit.libreoffice.org/34056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09loplugin:unusedenumconstants read-only constants in vcl (2)Noel Grandin
Change-Id: Ia3da23e0ef2fa710403745bd11255ed001516da4 Reviewed-on: https://gerrit.libreoffice.org/34020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08clarify we're not setting a pal index in the maskCaolán McNamara
no logic changed intended, SetPixelIndex expands to this, just want to clarify that this is an alpha value, not an index into a palette Change-Id: Ie9bb188b116adf3eab4e2bb1d6da8badbaead88b
2017-02-08loplugin:unusedenumconstants read-only constants in vclNoel Grandin
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2 Reviewed-on: https://gerrit.libreoffice.org/34018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08use c++11 data()Caolán McNamara
Change-Id: Id111686979d6002d4b4206d18980c38e6260971f
2017-02-08coverity#1400143 Missing move assignment operatorCaolán McNamara
by using a vector and let the defaults kick in Change-Id: I84e6144ab4beeeb316ccb830e7be55e35d942062
2017-02-06vcl: fix inconsistent GraphicsStateUpdateFlags assertsMichael Stahl
(regression from f4826959c1a5b0e6d2849d4240668b2087582848) Change-Id: If530503a667f765c38a6b226bb0627506dbb0900
2017-02-06Add missing #includesStephan Bergmann
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-05sal_uIntPtr to sal_uInt16Matteo Casalin
Change-Id: If463ae457f53a0a8b12cc0748afbc654f54ae3c3
2017-02-03new loplugin:unusedenumconstantsNoel Grandin
These are the simple removals, where it is obviously safe, the more complex ones will come in separate commits Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308 Reviewed-on: https://gerrit.libreoffice.org/33828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02convert BmpCombine to scoped enum and drop unusedNoel Grandin
Change-Id: Ic67474683a25a25e5753777f4bbbeded6ceba414 Reviewed-on: https://gerrit.libreoffice.org/33793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01Need <config_features.h> hereTor Lillqvist
Change-Id: I391554dff6f92d7639d0a391f4b00437c7648a6b
2017-02-01loplugin:useuniqueptr extend to check local varsNoel Grandin
just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01tdf#105461 PDF export: handle text fill colorMiklos Vajna
Text portion level background in Writer text was working already, as Writer paints its background explicitly, and then uses no text fill color in the metafile (that is turned into a PDF later). However, text fill color is used for Writer shape text and also in Impress. The rectangle is not just the text itself, but also the ascent / descent region, this matches the desktop rendering result. Change-Id: I644007ade43a8b9e663890643b826ae12c427ea5 Reviewed-on: https://gerrit.libreoffice.org/33781 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-30vcl: fix MetaTextLine reading, version 2 contains overlineTomaž Vajngerl
Reading MetaTextLine version 2 was reading to meUnderline (twice) and never read to meOverline. This is not consistent with Write where in version 2 we write the content of meOverline. Change-Id: If7911add5845ec3a01365d4ad8b8afaa6b2723dd Reviewed-on: https://gerrit.libreoffice.org/33687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-01-28loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27coverity#1371303 Missing move assignment operatorCaolán McNamara
Change-Id: I0dec3e192f3da895398a8b011c0e7275aab59d73
2017-01-27everything ImplClear clears is managed by their dtors anywayCaolán McNamara
Change-Id: Icafd4a4915d2fb3159b50409e5fc443c58d43d57
2017-01-27Animation dtor will be called anyway, so drop ClearCaolán McNamara
Change-Id: Ifa5a1cf6d782af0bb73ceff10f5a2a2daa4457d4
2017-01-27everything reset by ImplClear is going to be overwritten anywayCaolán McNamara
Change-Id: I94de8723a43d177fdf2caf0d8d3e529200d2e718
2017-01-27we copy the flag for the context in the ctor, but not the contextCaolán McNamara
which is worrying, copy the other missing maSwapInfo too which should be safe to do. in the assignment operator, we don't copy any of those three fields at all, which is inconsistent save and restore the context and context flags on the piece where we overwrite ourself via *this = tempobj Change-Id: I06a7d491f95dcb113a3c705ceeb41f576ab0a514
2017-01-27remove weirdness of ImpGraphic assignment operatorCaolán McNamara
seems to me that this hackery is to avoid the swapfile getting pulled out from underneath it during swapin Change-Id: I6b58d7e31731db8edc4026460beabc667204dcae Reviewed-on: https://gerrit.libreoffice.org/33620 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-27DisableGlyphInjection does nothingKhaled Hosny
Change-Id: Ie97eac46fde075bd74c7adb583b8be979f3af829
2017-01-27move these into the member init listCaolán McNamara
Change-Id: I94a1ea4cb81e2b7383c3e7c56314d08eea754434
2017-01-27ImplClear sets mbSwapOut false, so mbSwapOut is actually always false hereCaolán McNamara
i.e. failure to swap in does not mean that mbSwapOut is true afterwards, and mpSwapFile is discarded. It means the whole thing is thrown away. Change-Id: I73704866d77078c73d053047a7d2ef6499a3e69d
2017-01-27reformat member initializationCaolán McNamara
Change-Id: I6c86da271d01d63ad426d3ac99068a6ad9663705
2017-01-27loplugin: unnecessary destructor vbahelper..vclNoel Grandin
Change-Id: I6b7800d4a456391251168f7923a1ec7a5ca9efc9 Reviewed-on: https://gerrit.libreoffice.org/33577 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(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-25ofz#463 unable to mmapCaolán McNamara
Change-Id: I509faeda019f42bbe7cdc5fc249f2ea2076bb702 Reviewed-on: https://gerrit.libreoffice.org/33519 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-23Change all Idle* LINKs to be Timer*Jan-Marek Glogowski
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles Link in the Timer class. Now there are two possible solution: 1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or 2. split the inheritance of Idle from Timer again to maintain different Link<>s and move all common code into a TimerBase. While the 1st is more correct, the 2nd has a better indicator for Idles. This implements the first solution. And while at it, this also converts all call sites of SetTimeoutHdl and SetIdleHdl to SetInvokeHandler and gets rid of some local Link objects, which are just passed to the SetInvokeHandler call. It also introduces ClearInvokeHandler() and replaces the respective call sites of SetInvokeHandler( Link<Timer *, void>() ). Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-21coverity#1399156 split ImplCreateSwapInfo and ImplClearGraphicsCaolán McNamara
Change-Id: Iab449967c70a55c03c3e6b95de8e7d973cb68089
2017-01-21This does not seem to be neededKhaled Hosny
Change-Id: I3f9a447478062ad4cfbf7bfadfd3fe73523de847
2017-01-21Move these defines to the only file using themKhaled Hosny
Change-Id: Ic3a32f6b420c3822ba96f57292f67f0327b16581
2017-01-19vcl: Fix a small chance of memleaksTakeshi Abe
Change-Id: I4fe286486f9cad57c4220d10367442a51f077f00 Reviewed-on: https://gerrit.libreoffice.org/33294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-01-18Resolves: tdf#98593 buttons in writer show different text at different zoomsCaolán McNamara
The DrawControlText always renders with a reference device positions but we pass in a rectangle which is derived a different way. So, add a GetControlTextRect which operates on the same reference device as DrawControlText so the rectangles match The rectangle is mapped from pixels to logic and back from logic to pixel, so add an argument to store the logic size from GetControlTextRect and re-use it without conversion on the cases where we pass back the original rectangle zooming in/out on the button in writer is now stable wrt text shown at all zoom levels Change-Id: Ic581eca67d0ff265e2753ab8b6c40e8fca7e6ae4 Reviewed-on: https://gerrit.libreoffice.org/33277 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-18Ref...DeviceTextLayout::GetTextArray is only called by Ref...DeviceTextLayoutCaolán McNamara
so set it as private to de-confuse this a little Change-Id: Idde7f78a767227cc2d52e417b6c39d12e1339745
2017-01-18don't need so many bracketsCaolán McNamara
Change-Id: I6488bf57af2e7ae9aadd340dc0ef2467f0ea5111
2017-01-18ofz: reduce scope, check stream, validate nActionsCaolán McNamara
Change-Id: Ie420ad40b0d852708828620cd26c2f746398f5a8
2017-01-18TODO: fix reindentation below if you can accept being blamed by the SCMCaolán McNamara
Change-Id: I853c2a12c7f49b9562d348409726c10d977a6619
2017-01-18pdf export: make FontIdentifier comparison strict weak ordering.Mark Hung
VS Runtime Library debug assertion failed "Expression: invalid operator<" when exporting attachment of tdf#98879 to pdf. The document uses both vertical and vertical fonts. Change-Id: I4a2c519c539c28515cac876298be820cad8b9014 Reviewed-on: https://gerrit.libreoffice.org/33082 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-13new loplugin: useuniqueptr: vclNoel Grandin
Change-Id: Idcbc8655108ff57c06c33bbcabd652387bf3c4ec Reviewed-on: https://gerrit.libreoffice.org/32948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-12make the include of OpenGLHelper.hxx not global hereDouglas Mencken
surround it like in pieces of code which actually uses it Change-Id: Iac993553455248a2d2f999f857b781dbdb37acf5 Reviewed-on: https://gerrit.libreoffice.org/32852 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2017-01-10ofz#395 leak in Bitmap::AcquireWriteAccessCaolán McNamara
Change-Id: Id67f0b8e82e0730eb35a14a6080bfa5b15d365c8