summaryrefslogtreecommitdiff
path: root/include/vcl/virdev.hxx
AgeCommit message (Collapse)Author
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-10-21loplugin:expandablemethodds in include/vclNoel Grandin
Change-Id: I9ff378d9c7c9a221599c0a84df638b3acf8f069f Reviewed-on: https://gerrit.libreoffice.org/30121 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "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-01convert RefDevMode to scoped enumNoel Grandin
and fix the bForceZeroExtleadBug TODO Change-Id: Iac9295c6ce31112d69a870e3a229823eb1e9a4f2
2016-02-26loplugin:unuseddefaultparams in /include/vclNoel Grandin
Change-Id: I36daccd90bfa6ba0ee8b9e76bff2bd8494155a04 Reviewed-on: https://gerrit.libreoffice.org/22710 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-26vcl: actually that shared_array was a scamMichael Stahl
The only things passed as buffers there were null pointers and shared_arrays that had the deletion explicitly disabled with a struct NoDelete, so it's sufficient to just pass a pointer. Change-Id: I68d618782aa654242048516d2e910b8136b16e2d
2016-01-26vcl: convert boost::shared_array to std::shared_ptrMichael Stahl
Change-Id: I9d0ad886c4c6e1c8496eb6129b22d327ca0968eb
2016-01-18basebmp now only used from vcl/headless codeCaolán McNamara
Change-Id: I068d404431d3565f6ad5741edbd3693225824a4d
2016-01-08vcl: fix Doxygen parameter nameChris Sherlock
Change-Id: I64566aa7dcd3c50e083180945d08039dd89364b3
2015-12-07last arg of SetOutputSizePixelScaleOffsetAndBuffer no longer usedCaolán McNamara
Change-Id: I65e7e82e46c5751617b00a39df47d864b29b6ce1 Reviewed-on: https://gerrit.libreoffice.org/20441 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-23VirtualDevices either match another device depth, or are 1 bitCaolán McNamara
cairo can therefore always render to a svp virtual device with need for a fallback Change-Id: I5d03ae541820389e26f7448444444be009fb28a4
2015-11-23establish that Virtual Devices either match Physical Device depth or ...Caolán McNamara
are 1 or (rarely) 8 bit and lock that down. Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
2015-11-16use cairo-compatible top-down direction virtual devices everywhereCaolán McNamara
that way we can use cairo to text render etc onto our basebmp-backed headless/gtk3 virtual devices Change-Id: I91002b610b72a4fe1d2094a57c5cb1b6b5d69cb1 Reviewed-on: https://gerrit.libreoffice.org/19957 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-01desktop, vcl: support transparency in VirtualDevices with user-provided memoryMiklos Vajna
Change-Id: I65c31995c02a644aa436aecd065255fab38045e4
2015-07-10loplugin:unusedmethods vcl(part2)Noel Grandin
Change-Id: I12356b3fdce68282a30cae2b270b02e46558860a Reviewed-on: https://gerrit.libreoffice.org/16847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-08loplugin:unusedmethods vclNoel Grandin
Change-Id: I98b88ca3369a2c888fd63796e39d42376d513002
2015-04-10start wrapping OutputDevice in VclPtrNoel Grandin
Change-Id: If3ecbb0599b50d50ce6b3997ca7892200c332ffe
2015-04-10vcl: fix virtual device lifecycle.Michael Meeks
Also remove an over-optimistic assert & ref-holding in dispose piece. Change-Id: I6ce6abb666c8143502fc450a26e1ba2aac787455
2015-02-07loplugin:deletedspecialStephan Bergmann
Change-Id: I9ea64443350ed2e1341b99270fa8b29189f07eb2
2015-01-20remove wrong commentMarkus Mohrhard
Looking into the code we handle more cases correctly so remove this misleading comment. Change-Id: Id738bb8af312dfce97560a43122a81a6708f64d3
2014-12-11Related: fdo#87242 init VirtualDevice with size of surfaceCaolán McNamara
otherwise vcl's clipping doesn't work quite right when the render text with vcl apis fallback is used. Manually forced in my case, but it should happen in practice with vertical text, so if there is a bug about vertical text not appearing in slideshows then this is part of the fix for that. Windows and Mac remain unchanged as initialized with 1, 1. If the same problem affects those platforms then they'll need to be adjusted to remember their height/widths from the ctor and those values plugged in here instead Change-Id: I2f82f0db0cf446d7db21f0a7ee4f8c15c7ebdb42
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba. Conflicts: cui/source/tabpages/transfrm.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx tools/source/generic/rational.cxx Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e. Conflicts: svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-16fdo#84854 it seems long is not enough on 32 bitDavid Tardon
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-09fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca
* Added rational util functions used by Fraction class not available in the boost::rational class. * Replaced usage of Fraction by boost::rational<long> * Removed code that relies on: 1. fraction.IsValid() -- rational only allow valid values, ie denominator() != 0 2. rational.denominator() == 0 -- always false 3. rational.denominator() < 0 -- always false but implementation detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation * Simplified code that relies on: 1. rational.denominator() != 0 -- always true * BUGS EXIST because Fraction allows the creation of invalid values but boost::rational throws the exception boost::bad_rational Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9 Reviewed-on: https://gerrit.libreoffice.org/11551 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-09-30fdo#82577: Handle RegionNoel Grandin
Put the VCL Region class in the vcl namespace. Avoids clash with the X11 Region typedef. Change-Id: I6e008111df7cf37121fbc3eaabd44a8306338291
2014-06-25Allow passing in external buffers to svp's VirtualDevice.Andrzej Hunt
We also want to be able to set whether or not the buffers should be painted to top down, so add that parameter as necessary (default seems to be false, however e.g. gtk requires this to be true, i.e. needed for tiled rendering). Change-Id: Id98882e4c7f62508ae5a976c0d8df743460a4ab2
2014-06-25Return a bitmap buffer for tiled rendering from LibLO.Andrzej Hunt
We still need some way of managing the buffers properly rather than just keeping a static reference to the last buffer that was rendered. Change-Id: I17940c758948aa9418f4e0216ecd253d128cd04f
2014-04-25VCL: Rename ImplReleaseGraphics to ReleaseGraphics, change to protectedChris Sherlock
Change-Id: Iff4198fdd51db787461b897f2d9d8b7640dbf772
2014-04-25OutputDevice::AcquireGraphics should be protected, not publicChris Sherlock
Change-Id: I1aacc4a908798fda24de6b6f09b58dcf5d392e70
2014-04-23Rename VCL's ImplInitGraphics to AcquireGraphicsChris Sherlock
Turns out, we don't try to initialize a graphics context, much less *acquire* one. e.g. Window instances can have many frames (subwindows), of which one some are really being used at any time so we try to "steal" one of the graphics contexts from the frame to use ourself, later on that frame will steal it from someone else, etc. Change-Id: I66d5dbb7015301bc2d2be51627061c91e1f2ee5d
2014-04-20fdo#74702 Only VirtualDevice should handle the Word ext lead bugChris Sherlock
In #i60945# it was discovered that Unix's leading external font spacing causes problems with the display of documents. Therefore, the reference device implemented a workaround, which was to set the spacing to zero. However, the reference device is a VirtualDevice, so it should really be handled there, not in OutputDevice. I have added a new protected function to OutputDevice, GetFontExtLead() that handles this. Change-Id: I1b84ee7d9f7ae96841b441b52705e67c8115ae5c
2014-03-31fdo#74702 New abstract function UsePolyPolygonForComplexGradient()Chris Sherlock
A new protected abstract function has been introduced only for complex gradients. As it stands, we currently need to work out if we should use a PolyPolygon or a Polygon because, as the comments say: // Determine if we output via Polygon or PolyPolygon // For all rasteroperations other then Overpaint always use // PolyPolygon, as we will get wrong results if we output multiple // times on top of each other. // Also for printers always use PolyPolygon, as not all printers // can print polygons on top of each other. Interestingly, the next line is either wrong or expressed badly, because the check uses PolyPolygons when a VirtualDevice is in use: // Also virtual devices are excluded, as some drivers are too slow. Therefore, I've removed that comment as it seems rather misleading. Change-Id: Ic496284cb2be8e7e2d348eae76aeeec994e1029c Reviewed-on: https://gerrit.libreoffice.org/8802 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-03-29I realy think these should be virtualCaolán McNamara
Change-Id: Ie95ab47d0252d21391e51116ca5e2c424fba1b59
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-26Fix merge conflictsStephan Bergmann
Change-Id: I6e099911afec9c4086f620b45656880135decff0
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-25Fix to commit 03568b2e2405fc44435b95720f3680ab1daea836Chris Sherlock
During a rebase I accidentally removed the VirtualDevice::EnableRTL(). Also taking the opportunity to make the function virtual in window.hxx. Change-Id: Ic239d8dc131dfcc6b049c30d2fad4d2d12059059 Reviewed-on: https://gerrit.libreoffice.org/8745 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-03-25fdo#74702 Move GetBitCount() and GetAlphaBitCount into correct classesChris Sherlock
GetBitCount() works differently for VirtualDevices. GetAlphaBitCount() is really only used by VirtualDevice, so moved functionality from OutputDevice to VirtualDevice. Change-Id: Ic00e32f1fa385542bcce8c9475f0ea5eb9a077f9 Reviewed-on: https://gerrit.libreoffice.org/8722 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-03-25fdo#74702 Moved EnableRTL() logic to specific classes where appropriateChris Sherlock
OutputDevice::EnableRTL() is a bit of a mess. It uses a runtime variable to see if it is using a VirtualDevice, and it uses a dynamic_cast to see if the object is a Window or a Control! I have made it virtual and moved the knowledge of class specific functionality from OutputDevice to VirtualDevice, Window and Control as needed. OutputDevice::EnableRTL() functionality is then called. Also: small formatting change to outdev.hxx, also included a note that WindowImpl is a pimpl in window.hxx. Change-Id: I44b66601c4457fb2e0bbc1014fb7acf8f6942f80 Reviewed-on: https://gerrit.libreoffice.org/8721 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-03-21fdo#74702 Moved ImplReleaseGraphics into correct classesChris Sherlock
Made OutputDevice::ImplReleaseGraphics a pure virtual function, then implemented function in Printer, Window and VirtualDevice. The reason was that OutputDevice was checking to see if it was a Printer, Window or VirtualDevice that was calling on it in an if statement, very uncool :-) Now I let the classes themselves do the work. There is some common functionality, which is to release the fonts. I have put this into a protected OutputDevice function, ImplReleaseFonts. Change-Id: Id41db2119d4022ea2fc7855158ca9f610af3c85c Reviewed-on: https://gerrit.libreoffice.org/8548 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-03-12Spelling fix: suportedTor Lillqvist
Change-Id: I3b67edd5ba4541a65cb0916abea6db1362c32afd
2014-03-11fdo#74702 Moved ImplInitGraphics into correct classesChris Sherlock
Currently we check to see what type of class is being used. This really violates the Single Responsibility Principle, and tightly couples the code to OutputDevice. The responsibility for initializing graphics should be done by Printer, VirtualDevice and Window. Please note: to get this working, I've had to make Printer a friend class of VirtualDevice. I'm not entirely happy about this, I'll need to revisit this later when I look at Printer in more detail. For now, this is a hack to allow me to seperate out this function. Change-Id: I9d5946c22fa70670a4f85bf338b4209499d0aa54 Reviewed-on: https://gerrit.libreoffice.org/8528 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-21vcl: sal_Bool -> boolStephan Bergmann
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e
2014-02-05Doxygen warnings correctedChris Sherlock
* Doxygen spits out a lot of warnings about not being able to find match function signatures, etc. This is because in some headers we have a using namespace statement, in others it gets confused between ::Window and Window (!). * Wrong use of tags: + Lots of @seealso - should be @see + Wrong usage of @overload - corrected with the right function signature + HTML tags that doxygen doesn't recognize removed Change-Id: I1c2eed941619b8764dbfcfc5ab38027518cdf261
2014-02-04Revert "Doxygen warnings corrected"Caolán McNamara
This reverts commit ff8036df5c5575503dc30d255dfbe99cc637c510. multiple build failures with namespace collisions etc Change-Id: Ie8ac08feff518af3584a26957f07a60d95932c76 Reviewed-on: https://gerrit.libreoffice.org/7855 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-04Doxygen warnings correctedChris Sherlock
* Doxygen spits out a lot of warnings about not being able to find match function signatures, etc. This is because in some headers we have a using namespace statement, in others it gets confused between ::Window and Window (!). * Wrong use of tags: + Lots of @seealso - should be @see + Wrong usage of @overload - corrected with the right function signature + HTML tags that doxygen doesn't recognize removed Conflicts: include/vcl/toolbox.hxx Change-Id: I687f45e426280d411ef3cb6d8d5993a829f2f324 Reviewed-on: https://gerrit.libreoffice.org/7725 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>