summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2019-07-08tdf#126266 adjust calculations for invisble tabsJan-Marek Glogowski
This skips invisible tabs in many more places and at least fixes the osx bug of the missing tabs of the NBB. It also fixes the multiple highlighted tabs assertion for multiple rows from TabControl::ImplGetItem. I'm quite sure the tab rect calculation for multiple rows still has the wrong height, so there might be minor overlapping. Change-Id: I3a0a06ee73204b98e367563700fce4a49c066c1a Reviewed-on: https://gerrit.libreoffice.org/75230 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-07-08use BitmapEx in ImpCreateShadowObjectCloneNoel Grandin
Change-Id: I7737c8b19dca787eab70b733d07a34a5e5f01c9c Reviewed-on: https://gerrit.libreoffice.org/75208 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-08use BitmapEx in ImpSdrPdfImport::ImportImageNoel Grandin
Change-Id: I80e197ffcda4ebc5d50e611b7a4a5c3fd84fc839 Reviewed-on: https://gerrit.libreoffice.org/75201 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-08vcl: prefix members of MenuBarWindowMiklos Vajna
See tdf#94879 for motivation. Change-Id: I1b84376b550a2b8dd57cc1046077578efbee7bed Reviewed-on: https://gerrit.libreoffice.org/75191 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-07-08Right clicking in text should move the cursorSamuel Mehrbrodt
Currently the cursor stays at the old position when you right click in a different position in the text. This causes some issues, e.g. when you right click on a hyperlink in draw, you don't get the context menu for the link if the cursor is not on the link (see tdf#98575 for related bug). So generally, when right clicking on a piece of text, move the cursor to where the click happened. The new behavior is now matching the behavior of Word, PowerPoint, etc. Change-Id: I5e0ac37b7ac6c859d3056c5b8ed453f97c747360 Reviewed-on: https://gerrit.libreoffice.org/75127 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-07-08Do not support GL blacklisting for Windows versions older than 7Gabor Kelemen
Since we no longer install on such systems anyway Change-Id: Ia3b5c202e1276857c97017bb5a7eb9f087d5626e Reviewed-on: https://gerrit.libreoffice.org/74961 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-06Fix typoAndrea Gelmini
Change-Id: Id8f72781d0338344bc96efb5cf62b67174aa80eb Reviewed-on: https://gerrit.libreoffice.org/75152 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-06simplify and flatten OutDevStateStackNoel Grandin
Change-Id: Ic2ee5c2e122244e11770ab5fb73f65800828439a Reviewed-on: https://gerrit.libreoffice.org/75128 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-06WIN fix some unit tests more generallyJan-Marek Glogowski
Fixes regressed unit test failures from commit 3f7e8ddea89f ("Enable many more unit tests on all archs"). Change-Id: I76a8f7560675b9be3765237f8368d05cff22591d Reviewed-on: https://gerrit.libreoffice.org/75155 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-07-06Constify GlyphItemJan-Marek Glogowski
This hides all the data, which shouldn't change after init. Real const makes a lot of problems for copying, so this is the 2nd option to just add getters for private data. While at it use typed_flags for the GlyphItemFlags. Change-Id: Ic1eeabe2398f6c30080fdd516285b72c620b11be Reviewed-on: https://gerrit.libreoffice.org/75147 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-07-05Enable many more unit tests on all archsJan-Marek Glogowski
This depends on commit "Make font-based unit test depend on instdir fonts, not that it's sure that this really fixes the problem, as its origin is really unknown. It especially enables all the font-based tests I could find on all archs. Same for many more test where I couldn't see any reason they don't work generally. To get rid of even more ifdefs, it moves these from the class to the functions, so there is actually just one needed for any test. As a result some few tests run but do nothing. There is still some problem with embedded fonts on MacOS and with delayed graphics loading on Windows, so these ifdefs are kept. Change-Id: I63f8424e9debda6cbf3e5777c93245e09f8eb0f2 Reviewed-on: https://gerrit.libreoffice.org/74719 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-07-05WIN get embedded font info from EnumFontFamiliesExJan-Marek Glogowski
Instead of some manual decoding of the .fot file, this extracts all the relevant information of the registered font using the default routines already used when enumerating the system fonts. We still have to extract the font family from the .fot file to know the registered family name of the embedded font. And it uses the OSL functions to create the temporary font resource file name and generally adds more SAL_WARNs when some part of the private font registration fails. Change-Id: I5e118bf1f3bc1fb7bbf4c68a383a45892dffaf98 Reviewed-on: https://gerrit.libreoffice.org/75102 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-07-05WIN separate LO shared and embedded fontsJan-Marek Glogowski
This way we can get rid of the embedded fonts without the reqirement to re-process all of LO's shared fonts. Change-Id: I25661a611d43ae05052e5cb9cc21e74ccd06b172 Reviewed-on: https://gerrit.libreoffice.org/75101 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-07-05WIN don't register LO's shared fonts twiceJan-Marek Glogowski
This separates the system registration (AddFontResourceEx) of LO's shared fonts from the later PhysicalFontCollection population using EnumFontFamiliesEx. Calling AddTempDevFont from GetDevFontList creates a new WinFontFaces, but the later EnumFontFamiliesEx also creates WinFontFaces for all registered fonts, resulting in duplicate WinFontFace entries in the PhysicalFontCollection. Also currently the provided WinFontFace from AddTempDevFont is much less accurate, compated to the EnumFontFamiliesEx one. Change-Id: I2cd8af77197429508d0a7112ff98706d7f449659 Reviewed-on: https://gerrit.libreoffice.org/75067 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-07-05flatten and simplify FontMetricNoel Grandin
Change-Id: I9cce47c132345e40d3500ba69178e871d68bf764 Reviewed-on: https://gerrit.libreoffice.org/75130 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-05tdf#121740 improve ppt load time on windows, reduce image swapoutNoel Grandin
Reduces load time of this file by 10%. This logic is here since commit 8ab086b6cc054501bfbf7ef6fa509c393691e860 Date: Mon Sep 18 16:07:07 2000 +0000 initial import and there does not seem to be any good reason to immediately trigger a swapout. Our balancing logic will perform a swapout as necessary. Change-Id: I02592dfd3bde1a00bcca2fcbcd4d38aacc8f3de4 Reviewed-on: https://gerrit.libreoffice.org/75086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-05move the contour-finding code inside vclNoel Grandin
Change-Id: Iac52b72831868a917fc445e970edabc1c2585b55 Reviewed-on: https://gerrit.libreoffice.org/75080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-04vcl lok: pre-load graphic librariesMiklos Vajna
This is needed to be able to load e.g. TIFF files in Online, which does not have code in the chroot since online.git commit ad21717498cc214d5d5d5c0ff378238552137e2f (Avoid copying most code into the chroot jail., 2018-03-10). Change-Id: Ib095191ee690d9da6269878a82b1c6995df50dfa Reviewed-on: https://gerrit.libreoffice.org/75077 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-07-04move some Bitmap replace logic inside vclNoel Grandin
i.e. behind BitmapEx Change-Id: Ibe5a20ffe127acf7fb5bcf6341dcd046371aa761 Reviewed-on: https://gerrit.libreoffice.org/75044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-04move "replace transparency" logic inside vclNoel Grandin
Change-Id: I7e6994ec6bf7f0c7380df36c49d0b05a9d27c673 Reviewed-on: https://gerrit.libreoffice.org/75041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-03tdf#74702: OutputDevice:InitClipRegion followupChris Sherlock
Followup to commit 3a99d7f621036, which did a good job of removing use of GetOutDevType() in OutputDevice initialization. Commit changes ClipRegionIntersectionRectangle() to ClipToDeviceBounds(). ClipRegionIntersectionRectangle() takes a region and clips it, however it breaks the contract in Printer and PDFWriterImpl where it does a noop - any caller on these classes will expect the region to be clipped to an intersecting rectangle. Instead, I have renamed it to ClipToDeviceBounds(), which is what the bClipBounds check shows it is doing in the original code. I have made it return the new clipped region as this seems more logical. I have also moved the comment to a doxygen comment on the function signature in OutputDevice. Change-Id: I64276920bb452839df04c16f0efc3d5581162673 Reviewed-on: https://gerrit.libreoffice.org/74967 Tested-by: Jenkins Reviewed-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-03Remove some unused includesMiklos Vajna
See tdf#42949 for motivation. Change-Id: I89c082d62409b40c8472b865cc60b0d10923c9c1 Reviewed-on: https://gerrit.libreoffice.org/75015 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-02tdf#113448 Export font used for checkbox markThorsten Behrens
Related tdf#93853 make sure we use the opensymbol nice checkmark (0x2713) to compel viewers to use that. Change-Id: Id5028b0d062e0491b1cc9c36e2d9d4e4a7ab14a1 Reviewed-on: https://gerrit.libreoffice.org/74995 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-07-02tdf#113448 don't export any font for radio buttonsThorsten Behrens
Change-Id: Ie84b19a3dfaec32184bb825b7593ec33a5c4145c Reviewed-on: https://gerrit.libreoffice.org/74994 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-07-02tdf#74702: cleans OutputDevice::DrawHatchLine upAdrien Ollier
Change-Id: Ie90e0f75018edee178f1f02056e59b35956c4142 Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/74464 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-02tdf#42949 Fix IWYU warnings in vcl/source/[a-e]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I386e913f9002eed164c26137a0e184993d010b86 Reviewed-on: https://gerrit.libreoffice.org/74090 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-01Improve the looks of a wave line by draw it with bezier curvesTomaž Vajngerl
This adds drawing the wave line (typically used to underline the wrongly spelled words) with bezier curves. Previously the wave lines were drawn with drawing pixels, which didn't look that good, especially on HiDPI display, so the looks of wave lines now is therefor much better. The creation of the wave line as a polygon has been added to the basegfx module, so it can be reused if needed. In addition, everytime we draw the waveline, we have to enable antialiasing, to have a much better quality of the curves. By default the antialiasing is disabled for some reason. This also adds ScopedStates.hxx file which currently includes ScopedAntialiasing, which sets the antialiasing to a certain state for the time the object is in scope, and then sets it back to the original state. Change-Id: I4b866fc5d69725eb7f6f78a1acf4176b1205aa73 Reviewed-on: https://gerrit.libreoffice.org/74810 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-01tdf#74702: cleans OutputDevice::InitClipRegion upAdrien Ollier
Change-Id: I2d6e35c68d1ab99a19b5b2256b1f8fae4d614720 Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/72327 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-01tdf#74702 partial cleanup of OutDevTypeAdrien Ollier
makes OutputDevice::ImplClearFontData clean Change-Id: Iee0683bd4567f85e20d5017b8eaa8a46490678db Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/72084 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-06-30Revert "Rewrite all the logger statements with the new grammar syntax"Xisco Faulí
This reverts commit 624530549f30572cb7fb137cbadecfab9a75fc8c. Change-Id: I4bc0216cc12af637ad291f3ba6af090d1d34f107 Reviewed-on: https://gerrit.libreoffice.org/74916 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-06-29Rewrite all the logger statements with the new grammar syntaxAhmed ElShreif
Finished parts from old logger: 1) UNOCommands 2) StarterCommands 3) UIObjectCommand 4) DialogCommand 5) SpecialCommand Change-Id: Ia521efef0abe1a351b9a4fcabaab6dbf20e8fc89
2019-06-29tdf#125873 Selected border color preview isn't shownNoel Grandin
Regression from commit 319c57d2af5d26d3910db4b02dca145d8881af tdf#120837 File saving at least 5 times slower which made BitmapEx::operator== rely more heavily on Bitmap::operator==, which in turn relies on the platform-specific SalBitmap subclass to calculate a checksum, which was not happening with WinSalBitmap. Consequently, make Bitmap::operator== more robust by returning false if either of the underlying bitmaps cannot generate a checksum Change-Id: Iad8a4ce19544839a6303f0e8d006b138c2d75a31 Reviewed-on: https://gerrit.libreoffice.org/74834 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-28Resolves: tdf#126134 EndDialog on disposed dialogCaolán McNamara
Change-Id: I079fb2bb786b66b843e8e3960643cf2db6387c79 Reviewed-on: https://gerrit.libreoffice.org/74821 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-27protect against never gettting a size setCaolán McNamara
Change-Id: Ie7f40abaa5893bee46d64b85404ee733c0c11f85 Reviewed-on: https://gerrit.libreoffice.org/74797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-27Fix typoAndrea Gelmini
Change-Id: I52a0e3aaed903f48c39c900a085cee3cb5131fca Reviewed-on: https://gerrit.libreoffice.org/74768 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-27weld SwCustomizeAddressBlockDialogCaolán McNamara
a) use EditEngine instead of TextEngine as the former can be hosted in a foreign widget b) use a SfxGrabBagItem to hold the custom pseudo-field info inside the EditEngine c) use a proxy XDropTargetListener/XDropTarget to massage the treelist entry drag source into the textengine drop target destination Change-Id: I6bf1613ed91341c24b77564405f38b5dab0aacd7 Reviewed-on: https://gerrit.libreoffice.org/74699 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-27infinite focus changing in toc biblio pageCaolán McNamara
Change-Id: Ic2e36b8921d329d6f9cd2eb68524ed111f6fda75 Reviewed-on: https://gerrit.libreoffice.org/74754 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-27tdf#125609c10 vcl/button: enforce only one radio selected on initJustin Luth
This patch does not solve the main LO 6.2 problem in bug 125609, but fixes the related problem from comments 10/11. This patch fixes two different scenarios: 1.) Sometimes buttons could fall through the other safety nets and have multiple radio buttons selected in a single group at display time. Since ImplInitStyle can be called multiple times for the same button, ensure that once everything is imported (IsRadioCheckEnabled) that any calls to this double-check that only one button is enabled. First come, first served if by programmer error multiple are marked as IsChecked in the same group. This problem existed pre-LO 6.2, so it had nothing to do with tabstops specifically. 2.) This patch specifically fixes the 6.2 regression with the Grammalecte extension Graphic Options dialog box. In this case Dialog::GrabFocusToFirstControl ended up being treated as a "click" on a tabstopped, unchecked radio, because setting the state never called the SetState/Checked function, but only the Init, and so the uncheckAllOther function never removed any tabstops. Change-Id: I98272d6c81cf582a15c2e6bf04e6ed60da1d9c71 Reviewed-on: https://gerrit.libreoffice.org/74108 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2019-06-26tdf#97925 writer, slow scrolling large RTF documentNoel Grandin
this document appears to have just enough fallback fonts on each page to make the cache useless, so just bump up the size of the cache considerably, since the cache key/values are really small Change-Id: I4983de92f66410fee3f04e1e126b2ddb4ec2cbf9 Reviewed-on: https://gerrit.libreoffice.org/74735 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-26force drag dest to track motionCaolán McNamara
if we configure something to be dropped on, then make it track drags Change-Id: I7beacae7012b8929f9bcfa4c72d713ed04ba576c Reviewed-on: https://gerrit.libreoffice.org/74733 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-25Initialize the font list before querying itJan-Marek Glogowski
And the vcl_fontmetric test must depend on more_fonts. This way there should never be a missing font, so just assert on it. Change-Id: If3b71d7c3e52f1beeda73197c56f5efc6a83dbb4 Reviewed-on: https://gerrit.libreoffice.org/74717 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-06-25tdf#126054 uses after free when menubutton and menu torn down during executionCaolán McNamara
Change-Id: Ib79da121941863421bc12afa27e27cdd7e2e81e3 Reviewed-on: https://gerrit.libreoffice.org/74695 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-25tdf#120873 Qt5 invert checked state on triggerJan-Marek Glogowski
SalMenu's event handling is not really compatible with QAction. LO expects to get something like an activate event, which happens without any menu state update. The item handler will then update the item state, as expected by LO. I'm not sure how this could be implemented in a good way in Qt, so this patch is just a hack. If the item is checkable, we invert its state before handling it. This just works correctly for single items, not radio groups, but it does the trick for this bug. And since setChecked() just emits toggled(), triggered() won't run twice. Maybe someone can come up with a better way using event filters, if ever needed. Change-Id: Ic32d07525ce8f394b83d04f53689d1669ddc9d83 Reviewed-on: https://gerrit.libreoffice.org/74590 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-06-25loplugin: simplifyconstructCaolán McNamara
Change-Id: I57b667384813b0f6d8412da17c83877a9deed5b1
2019-06-25tdf#125892 improve time to export PDF, use int ops for scalingNoel Grandin
The time here is all in the nice rescaling we do these days. Speed it up by using int ops instead of float ops. This takes the time from 5m to 1m30 for me. Change-Id: Ic1dcd9e49eef1894f4a4fdb416015b69c6ef96da Reviewed-on: https://gerrit.libreoffice.org/74689 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25improve loplugin:simplifyconstructNoel Grandin
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25weld HyperLink DialogCaolán McNamara
Change-Id: Ic861b0a593505828a900fe2163125d6f5584a956 Reviewed-on: https://gerrit.libreoffice.org/74634 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-24move SvtIconChoiceCtrl to vclCaolán McNamara
Change-Id: I5ed8af625cb46998649c4f11255d7676a11bdc94 Reviewed-on: https://gerrit.libreoffice.org/74605 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-24Fix typosAndrea Gelmini
Change-Id: I1e173ecd241526b50a8426d75f3aaa13f6ab5c0d Reviewed-on: https://gerrit.libreoffice.org/74622 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-24Qt5 don't assert broken height or widthJan-Marek Glogowski
At least maths element docking window has a floating height of zero. So the original gtk comment about broken values is still true. And the initial SalFrameGeometry is ok, so no need to initialize it. And set default size and position on show, if not explicitly set. Change-Id: Ibe4969a164b50b666745ce010f5100af4b3ff2f6 Reviewed-on: https://gerrit.libreoffice.org/74614 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>