summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
AgeCommit message (Collapse)Author
2017-02-17lok: refill font list if emptyHenry Castro
After preinit stage the font list is empty when creating documents. Reviewed-on: https://gerrit.libreoffice.org/32108 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Conflicts: sd/source/ui/docshell/docshel4.cxx svtools/source/control/ctrltool.cxx Change-Id: Ia6938d521626f4b4022f0f993e77c017e4932415 Reviewed-on: https://gerrit.libreoffice.org/32796 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com> (cherry picked from commit 0ad4b2570f06aa014f8446757931afa1f2305458)
2016-11-30tdf#103747: Don't re-position images when re-playing a metafile.Jan Holesovsky
I am not sure it's a good idea to re-position them at all; but for the moment don't do that only with the metafiles, as I am not sure what the other consequences could be. Change-Id: I50e50663149f7879ddc86149d92d44cf2d5df40d (cherry picked from commit be5369e7aa426be8b88776f58aaaba1ae926229c)
2016-11-08typo fix: ressource -> resourceAndras Timar
Change-Id: Id8d1c01b17e711a057a9f3f20e1d0f955b2ea6c8 Reviewed-on: https://gerrit.libreoffice.org/30690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-11-05Drop unused Graphite includesKhaled Hosny
Change-Id: Ib5c40931805ef8a484ccb52c5d2b81180f68f0cc
2016-11-04loplugin:unusedmethodsNoel Grandin
Change-Id: Ie1f840c3ec9a2d5888f95cf05e531a8a9464bf2e Reviewed-on: https://gerrit.libreoffice.org/30524 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-29tdf#100164 change scaling unit to precentage for *.5x factorsTomaž Vajngerl
Currently we support DPI scaling by a integer factor. This commit changes that to percentage so we can have scaling factors like 1.5x or 1.25x. This is useful with 2.7k monitors that are in between standard DPI and HiDPI. Thresholding was adjusted to scale to 1.5x when DPI is between 120 and 168 DPI. The old method GetDPIScaleFactor has been changed to return a float value insted of int. Sometimes it is however more accurate to use GetDPIScalePercentage which was added in this commit. Change-Id: Iaecee793ff3d5084d00adeebbcf5d7368c580882 Reviewed-on: https://gerrit.libreoffice.org/30379 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-22crashtesting: assert on converting ooo66538-1.ppt to pdfCaolán McNamara
Change-Id: I6bdb31715a4cb9e895fc169679a7465a8f18fc37
2016-10-15tdf#43740 Do not use UniscribeLayout for CJK Ideograph Variations.Mark Hung
It used to use UniscribeLayout when any Unicode varaiation selector were found, disregard whether it is a Asian or a complex script. However CJK Ideograph Vairations are better layouted by WinSimpleLayout. Just check the case, differ based on the base character of the variation sequence. Change-Id: I4a2ad160a9ab70a6dbc96c301a6a5ad16e140245 Reviewed-on: https://gerrit.libreoffice.org/29619 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-05convert MapUnit to scoped enumNoel Grandin
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-07loplugin:constantparam in vclNoel Grandin
Change-Id: I0cae8e5de1170dec4c82df7f1f5377143a079876 Reviewed-on: https://gerrit.libreoffice.org/28686 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-07loplugin:constantparam in vcl..xmlscriptNoel Grandin
Change-Id: Icf66c08071b154259c9e551342d30331caf2b15a Reviewed-on: https://gerrit.libreoffice.org/28685 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-05convert GradientStyle to scoped enumNoel Grandin
Change-Id: Ib740da708612df7a5f4b8c82262b9b1bd436604d
2016-09-05convert HatchStyle to scoped enumNoel Grandin
Change-Id: Ibef51ae5ae135ae584791959ec3f7bf78c50e2a8
2016-09-05convert LineStyle to scoped enumNoel Grandin
Change-Id: I30cfa5a0649b806604c443f55683d1f2a430983d
2016-09-05convert RasterOp to scoped enumNoel Grandin
Change-Id: I136423c105316c9b5b18e64d04a248fd7ac5590b
2016-09-05convert OutDevSupportType to scoped enumNoel Grandin
Change-Id: I7a1e4448dfff0ea6909149533d228829d980796c
2016-09-02boost::intrusive_ptr->tools::SvRefCaolán McNamara
Change-Id: I4c913dc62efe3f3747e78670f4efb0216d95c4ad Reviewed-on: https://gerrit.libreoffice.org/28585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (vcl)Stephan Bergmann
Change-Id: Ic04f33413713b592c10ebf27c1e3460a44e3794f
2016-07-27loplugin:countusersofdefaultparams in tools..xmlsecurityNoel Grandin
find methods with default params with only zero or one call site Change-Id: Ie5b30f60e9fe00ba1acf0dfc79b005ded46f05a0 Reviewed-on: https://gerrit.libreoffice.org/27512 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-14vcl headless: ignore visibility in GetClientSize()Miklos Vajna
This fixes the missing-invalidation problem outlined in commit 22023b104cd1e024aecc28a6161bea519a584407 (vcl lok: fix missing paints due to zero-sized windows, 2016-07-12) also in Writer, not only in Impress. Starting text edit, doing a change, and ending text edit now results in the expected invalidations. Ignoring visibility seems to be a better fix for the missing paints. This way the headless case doesn't hit the corner cases of 0x0-sized windows. Also, the gtk vclplug's GetClientSize() only returns 0x0 in case the underlying window is disposed or it's minimized, but it does hand out the size before Show() is called, so now the headless backend is in sync with that. Change-Id: I78698cbfce954c8c593d279ab057a87cfbe87260 Reviewed-on: https://gerrit.libreoffice.org/27224 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-13vcl lok: fix missing paints due to zero-sized windowsMiklos Vajna
How to reproduce the problem: open an Impress presentation in gtktiledviewer, create two views. Start editing the text of a shape in one view -> nothing happens in the other view. There is no invalidation in the other view, as sdr::contact::ViewContact::AddViewObjectContact() is not called for either of the views. Editing with a single view only worked as when clicking into the shape, the ViewObjectContact is created. On the desktop, those ViewObjectContacts are created on the first paint of the slide, but in the LOK case the vcl::Window instances had a 0x0 size, so an invalidation didn't result in a paint -> no ViewObjectContact was created -> no LOK invalidation was sent. No testcase, as I didn't manage to write code that actually triggers the failure under cppunit with the fix reverted. Change-Id: If29fcea4258a45f3d6d9aab284445756609fa13c Reviewed-on: https://gerrit.libreoffice.org/27159 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-06tdf#77667 Remove gcc3 workaroundkrishna keshav
where it could handle instantiated objects as parameters Removed objects of 'Point' as 'Point()' can be instantiated as a parameter. Change-Id: Iad2dceed6dfe8bd3cc555758c518620cd975a8fc Reviewed-on: https://gerrit.libreoffice.org/26967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-07-06restore loplugin:vclwidget checking for calling clear() on VclPtr fieldsNoel Grandin
Change-Id: I85eda1c33016c1461d897fc0a3b70457209a7405 Reviewed-on: https://gerrit.libreoffice.org/26806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-05Clarify calculation precedence tdf#39440Muhammet Kara
Use parentheses to clarify the code. Change-Id: I864dc6dacadb5b9ba9dca8e0abd9fa4e6db1eddc Reviewed-on: https://gerrit.libreoffice.org/25677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-27loplugin:singlevalfields in vcl(part2)Noel Grandin
Change-Id: I4782c6f6d3d090ba0f9e29af8afdd7d88aa2d382 Reviewed-on: https://gerrit.libreoffice.org/26598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-24loplugin:singlevalfields in vcl(part1)Noel Grandin
Change-Id: I0031199937cc95793951a070c4b3d8910933e69f Reviewed-on: https://gerrit.libreoffice.org/26595 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-21vcl: fprintf -> SAL_INFOThorsten Behrens
Only touching dbglevel > 0 code here, so clearly only informational.. Change-Id: Id6991c93f971bcc2a8badc809b98870a85322992 Reviewed-on: https://gerrit.libreoffice.org/26531 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-06-19LOK: tile rendering regression fixAshod Nakashian
Calc fast rendering requires us to offset the are being rendered and shift all bitmaps accordingly. This however is breaking Impress rendering since the offseting logic is common (in svx and vcl). This adds new API to enable or disable this local rendering (as opposed to rendering a full document as was previously done. The new flag is then set by Calc to enable the offseting logic in isolation without affecting other applications. In one case isolation was achieved by checking the MapModeUnit. Change-Id: Ia0aadfc3f6df7c1a891b97dc731f5897414c9420 Reviewed-on: https://gerrit.libreoffice.org/26367 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 60fdcda65bad242f99895cb453182578250fbdea) Reviewed-on: https://gerrit.libreoffice.org/26378 Tested-by: Jenkins <ci@libreoffice.org>
2016-06-18plugin:defaultparamsMarkus Mohrhard
Change-Id: Ibeec35b72e6dc81c72a9120ed14ae165e6137d26
2016-06-17LOK: fast tile rendering (graphics and buttons)Ashod Nakashian
Since embedded graphics and buttons use absolute coordinates, we set the origin to be the top-left corner of the tile. This includes the origin + ScrPos (see previous patch). Then, the coordinates of the graphic is shifted by this amount to make sure it renders in its relative position to the tile. This renders embedded graphics and buttons at their correct position, with some limitations. Tiles large enough to cover a graphic object show the graphic object where it should be. However, rendering a relatively small tile doesn't render the graphic. This seems to be an issue with moving the graphic's coordinate at a later stage than the 2D Processor decides what objects intersect with the 'view area' that is rendered. Another issue is that graphs don't render. What they seem to suffer is incorrect scale and a fix coordinates (they show up as tiny thumbnails at the top-left corner and grow in proportion to the real graph when resized). These shall be addressed in a separate patch. Reviewed-on: https://gerrit.libreoffice.org/26204 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 5f01d80f75dc86b393cc2fdb66b94aece964c674) Change-Id: I4b71bf5f2e357d1114d46022bc00905ceed0c2f9 Reviewed-on: https://gerrit.libreoffice.org/26376 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-17convert DBG_ASSERT in vclNoel Grandin
Change-Id: I732fb1a789f90ca7a7f393cc41a6afe84fecf3d3 Reviewed-on: https://gerrit.libreoffice.org/26200 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-13loplugin:vclwidgetsNoel Grandin
Change-Id: I3567c3f9c5fe8374abd81d3f6e9a4a41e6a4c23d
2016-06-12Resolves: tdf#100313 OutputDevice::isDisposed doesn't work anymoreCaolán McNamara
since commit 51fe4d63dfdf0ea24d2fecf75d25cbe607ed1c09 Author: melikeyurtoglu <aysemelikeyurtoglu@gmail.com> Date: Tue May 3 00:34:05 2016 +0300 tdf#97527 vcl: reference-count Menu Change-Id: Ia12434fede69ad247ed67691517437a9ada31acd Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/24596 which created a base-class VclReferenceBase for OutputDevice and Menu and so moved isDisposed from OutputDevice to VclReferenceBase, but *duplicated* the mbDisposed in VclReferenceBase so the bit set by disposeOnce in OutputDevice was a different bit to the bit returned by isDisposed from VclReferenceBase. Which meant that the fix of... commit 26c32cfee9fc9a769adba19f455e4d6c13b6d89d Author: Caolán McNamara <caolanm@redhat.com> Date: Fri Nov 27 16:10:10 2015 +0000 Resolves: rhbz#1283426 using vdevs based on now dead physical devs is unsafe no longer worked. Finish moving the mbDisposed to VclReferenceBase to fix this Change-Id: I9bc1ba3d03f3aae7c3f58eb277176d9521bdb05d
2016-06-12convert DBG_ASSERT(false, to SAL_WARN(Noel Grandin
Change-Id: I400d728c5d99228c5ca52e369037395b4da2af5c Reviewed-on: https://gerrit.libreoffice.org/26187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-10tdf#96099 Remove various smart pointer typedefs in vclMark Page
Change-Id: I4ac1bb25d3d63f150b42d9e1708efc344bbdb6a7 Reviewed-on: https://gerrit.libreoffice.org/26113 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-09tdf#96971 SetXORMode - remove un-needed parametermelikeyurtoglu
Change-Id: I901e5de3e4e25f0cae5c71d6e83fd94459fe7b7e Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/21951 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-03Convert ComplexTextLayoutMode to scoped enumNoel Grandin
Change-Id: I257f8e15fec92f0701235a6fe4b6a2272498c4f1 Reviewed-on: https://gerrit.libreoffice.org/25667 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31Convert ControlType to scoped enumNoel Grandin
Change-Id: Iaa13c3e7030296a97bab144103745867d43b4b19 Reviewed-on: https://gerrit.libreoffice.org/25554 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30Convert FontRelief to scoped enumNoel Grandin
Change-Id: I545c83d742db27f1a004b66e5eb1ef768f62e011 Reviewed-on: https://gerrit.libreoffice.org/25626 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30convert TransparentType to scoped enumNoel Grandin
Change-Id: I25ec59fd41b5aa8741a9e864b5204481a84c3ba6 Reviewed-on: https://gerrit.libreoffice.org/25601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27Related: tdf#87967 valgrind reported invalid reads on 1 pixel wide bitmapCaolán McNamara
Change-Id: Iddd18280c780d8b9f5e11fcc2af80749917192c4
2016-05-25lok: reset the font list when there are no itemsHenry Castro
In the pre-init stage the devices were initialized with no font list, but later the font list is updated. So those devices were not updated. Change-Id: I157d4c7079f9b1252916eb92b512aadb8e77329f Reviewed-on: https://gerrit.libreoffice.org/25419 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-25Convert BMP_FORMAT to scoped enumNoel Grandin
Change-Id: I751ab762b6e6f961e9e73a8a2ca92a3f5a5eb1c8 Reviewed-on: https://gerrit.libreoffice.org/25189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18update vclwidgets loplugin to handle VclReferenceBaseNoel Grandin
Change-Id: I447cdb8c65d880b3c5ff28b35cefdc56ff784852
2016-05-16tdf#97527 vcl: reference-count Menumelikeyurtoglu
Change-Id: Ia12434fede69ad247ed67691517437a9ada31acd Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/24596 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-05-11remove unused return type from SalGraphics::SetFontNoel Grandin
Change-Id: I0ca41130f5e1028a70f1242f7af3366b7c57c572 Reviewed-on: https://gerrit.libreoffice.org/24833 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10Convert SAL_INVERT to scoped enumNoel Grandin
Change-Id: If9f725c791f9d01efba098caed8387f21862fa04 Reviewed-on: https://gerrit.libreoffice.org/24825 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10convert SAL_ROP to scoped enumNoel Grandin
Change-Id: I2c49ec843c0f95e8246cdf9d3185c11e81a3bde3 Reviewed-on: https://gerrit.libreoffice.org/24824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09convert FONT_EMPHASIS_MARK to scoped enumNoel Grandin
Change-Id: I137c78b337e57d3442db08334128e79d186b278f Reviewed-on: https://gerrit.libreoffice.org/24753 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>