summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2021-02-18loplugin:referencecasting (macOS)Stephan Bergmann
Change-Id: I99470067a34fab9fbc2ea53d2f8a634240f0d223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111127 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-18disable-pch fixNoel Grandin
Change-Id: I1200bf7818be7f8142d0a5282d6cf2ef5993d3fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-18loplugin:referencecasting add check for new rtl::Reference operatorNoel
rtl::Reference now has a conversion operator to uno::Reference, so look for places where we can simplify the code and use that. Change-Id: Ic81db50d670bed5e875300577d4bf5f3599cc2c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-18Fix an OUString constructionStephan Bergmann
...introduced with 9d161857f1d4afcb772b477455797a2da0e47a9b "tdf#127471 correct EMF/WMF im/export for scaled font" Change-Id: I2b807e102ca7f71a61794f511dee302c7e509026 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111095 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-18pdfium: eliminate FPDF_PAGE from public headerMiklos Vajna
Change-Id: I8cfe55b4b23441f7b5c3b748903137a145cc00bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111085 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-18vcl: move def. of peekGraphicFormat into GraphicFormatDetectorTomaž Vajngerl
Change-Id: I3b89009324f21b54ccf00f16eb47f9967a6b4e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111091 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-18vcl: condense the description and rename the peek format functionTomaž Vajngerl
remove "Imp" from ImpPeekGraphicFormat function name and condense the description of the function. Change-Id: Ie7cc42645318c0035f082ae68087ca3c7077d365 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111090 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-18vcl: clean-up code used for loading of external graphic filtersTomaž Vajngerl
All graphic filters have been moved into vcl, so there is no need to load an external library that contained graphic filters, so this code can be removed. Change-Id: Iac4f8dd78464e142f50837a55edd2d25720b8c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111061 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-18Move GIF writer from filter module into VCLTomaž Vajngerl
Change-Id: I8db3ca0f7953b44791bda47534220902931fab8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111023 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17ofz#31021 Stack-buffer-overflowCaolán McNamara
Conditional jump or move depends on uninitialised value(s) at 0x483CB98: strlen (vg_replace_strmem.c:459) by 0x49B4CA3: int rtl::str::getLength<char>(char const*) (strtmpl.hxx:65) by 0x49B7232: void rtl::str::newFromStr<_rtl_String>(_rtl_String**, rtl::str::STRCODE_DATA<_rtl_String>::type const*) (strtmpl.hxx:1344) by 0x49B470C: rtl_string_newFromStr (string.cxx:611) by 0x6059266: rtl::OString::OString<char [18]>(char (&) [18], rtl::libreoffice_internal::NonConstCharArrayDetector<char [18], rtl::libreoffice_internal::Dummy>::Type) (string.hxx:275) by 0x6058B5E: vcl::GraphicFormatDetector::checkTGA() (GraphicFormatDetector.cxx:525) since... commit 48d655fe12bc2c4c42d6c88b8a43fade1614ee2a Date: Mon Feb 15 16:25:56 2021 +0900 vcl: Detect TGA graphic by inspecting the file footer Change-Id: I52641ac541d5631e16fc271c35d6a671acb75c93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-17Move DXF reader from filter module into VCLTomaž Vajngerl
Change-Id: If1a933256401c1a971f581d1b389ca06fd77eaae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111022 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17tdf#127471 correct EMF/WMF im/export for scaled fontArmin Le Grand (Allotropia)
If FontScaling is used, system-dependent data is held at vcl::Font Width(). Already if not scaled, we have three definitions: Width is zero, Width is equal to Height (unx) or - on Windows - Width equals avgFontWidth. If used it is W!=H where on unx Width equals Height multiplied with the scale factor. On Windows, this is Width multiplied with the only there existing avgFontWidth. Unfortunately that is ex/imported (since ever) undetected to EMF/WMF thus making EMF/WMF files containing FontScaling system-dependent - on which system was LO running when creating the file? The error can be seen when loading such a EMF/WMF on the vice-versa system, the FontScale is very ugly and wrong. Since EMF/WMF *are* Windows-specific formats the Windows-like definition is the correct one. This change makes all other systems export that now, and adapt on import to their system- specific definition (assuming coming from Windows). As can be seen, the difficulty is that these adaptions are necessary on non-Windows plattforms, but these do not have that avgFontWidth available. Thus I made a deep-dive investigation and multiple experiments to create a as similar as possible value to apply the needed calculations. For details and discussion refer to the bug description. Change-Id: I983fb6d882e2e8fccf9c8460f01509201d8157f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111000 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-02-17pdfium: eliminate FPDF_SIGNATURE from public headerMiklos Vajna
Change-Id: I9c8297c69ca359d861c8506e41c069692331eb8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111005 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-17Move PBM,PPM reader from filter module into VCLTomaž Vajngerl
Change-Id: I1ce998575f8d204045fabea184e80e71308a16b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111019 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17Move PCD reader from filter module into VCLTomaž Vajngerl
Change-Id: Icd23d1343f5231c09dd8197943ca472f4b573bfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111018 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17Move PSD reader from filter module into VCLTomaž Vajngerl
Change-Id: I53b11be6e9eb0013f017b2da5745ff525ca79c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111017 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17Move EPS reader and writer from filter module into VCLTomaž Vajngerl
Change-Id: I1646f72d6a1db176e4520f8f64321646a26f054e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111016 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17Move RAS and PCX reader from filter module into VCLTomaž Vajngerl
Change-Id: Id846abf257b598489a59ebf9b62b19840a950322 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111015 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17Move MET reader from filter module into VCLTomaž Vajngerl
Change-Id: I478ef775bc73349094f88012ceb57b1712a27f55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111012 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17Move PICT reader from filter module into VCLTomaž Vajngerl
Change-Id: I6d3a28769ff3bffa3970a4ab6ab2384bb0aebbca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111011 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17Move TGA reader from filter module into VCLTomaž Vajngerl
Change-Id: I0fea5d6e75c6bfd05ea91ed7b92aaacfcc5ec177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111010 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-17vcl: add TIF case to GraphicDescriptorTestTomaž Vajngerl
Change-Id: I2e2724fda545e67777c1101b33cc10483f73b3a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111009 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-16WB_HYPHENATION is newly unusedCaolán McNamara
Change-Id: If1fd94b1a0f572fb1bc40f2098079408c9916ce1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110999 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-16pdfium: add a FPDF_GetLastError() wrapperMiklos Vajna
And also an enum class for its return values. Change-Id: I9a001386831b2230a397194df3cf3b331d5242ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110952 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-16vcl: add test to load graphic of some less common formatsTomaž Vajngerl
Change-Id: Id23d2fc7a57d264b4fda2a2f2c39ab2cbc7cd477 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110897 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-15Qt don't fallthrough in inputMethodQueryJan-Marek Glogowski
So my initiak code had a single case with fallthrough to the default, but that is totally bogus for multiple cases. I honestly have no idea, if that ever was correct. I also don't know, if simply returning an empty QVariant is the correct error handling, but the fallthroughs were definitly wrong. Change-Id: I1880a960164eccbb6a5a3832c4ae9aaeda065d43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110946 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-02-15tdf#140207 Qt downscale the ExtTextInputPosJan-Marek Glogowski
Qt reports the unscaled pixel values to the IM, so simply divide all values reported by SalEvent::ExtTextInputPos by the window's scale factor. This correctly positions the IM window on a scaled LO window. Change-Id: Ia639ee3e5fc0e47f7017896b34730bbda7f06a16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110945 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-02-15tdf#119931 Fix accessibility warningshomeboy445
Change-Id: I897cc51f6c338e82896591d79b6e167f27189122 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110801 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-15use GetPopupParent for editeng transient dialogsCaolán McNamara
Change-Id: Ie799643b68ea41b4c4d0d0493755d09d3983d9e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110934 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-15vcl: Detect TGA graphic by inspecting the file footerTomaž Vajngerl
Works only with TGA ver.2 files. Change-Id: I0378a1e03e238cd444175035768cccf491480191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110898 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-15vcl: split-up GraphicFilter::Import into per-format methodsTomaž Vajngerl
Change-Id: Idb5f120f47b4374fc709413a615baa606cd9b165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110896 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-15tdf#140414 add getting mouse pos to EditViewCallbacksCaolán McNamara
Change-Id: I09172e0cb24f5c45d2837cf2f2fc7cc4baa456a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110932 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-14Move unit conversion code to o3tl, and unify on that in more placesMike Kaganski
This also allows to easily add more units, both of length and for other unit categories. The conversion for "Line" unit (312 twip) is questionable. Corresponding entries in aImplFactor in vcl/source/control/field.cxx were inconsistent (45/11 in; 10/13 pc; 156/10 pt). They were added without explanation in commit c85db626029fd8a5e0dfcb312937279df32339a0. I haven't found a spec of the unit (https://en.wikipedia.org/wiki/Line_(unit) is not specific). I used the definition based on "by pt", "by mm/100", "by char" (they all were consistent); "by pc" seems inverted; "by twip" was half as much. This accepted conversion makes unit test for tdf#79236 pass. Change-Id: Iae5a21d915fa8e934a1f47f8ba9f6df03b79a9fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110839 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-12weld impress annotation windowCaolán McNamara
Change-Id: Idc89f4e382392103d373b6a84edaae10abd56056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110650 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-12avoid auto-hiding disabled menu entries with cut/copy/paste idents tooCaolán McNamara
Change-Id: I549027b496c4c1ee14cd5d9f19f77748600e99db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110822 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-12don't split menu ids at ':'Caolán McNamara
Change-Id: I2453b1867ffe5b9a2fe6659f2893911ba2fa5543 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110820 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-12when there is label and icon align label to left and don't expand iconCaolán McNamara
Change-Id: I158b6c40ecb1b1713546cdbce7f7c001b8940b00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110802 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-12always optimize bitmap transform to translate+scale if possible (tdf#138068)Luboš Luňák
Commit 828504974d70111e make OutputDevice::DrawTransformedBitmapEx() always call DrawTransformBitmapExDirect() in preference to explicitly converting to DrawBitmapEx() if the transformation wanted was at most translate+scale, in the hopes that these days the backend implementations work well enough. But it turns out only the Skia backend handles that without loss of performance. So always do the conversion to DrawBitmapEx() if possible. It's so simple that it possibly makes sense to always do this, regardless of the backend. Change-Id: I6eba68e672334c38433f53980f49400499f5d8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110716 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-02-12allow using css::graphic::XGraphic to set menu imageCaolán McNamara
Change-Id: Ice5062f26ea300aec73d5fd849484c8bc4fc43bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110793 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-12pdfium: eliminate FPDF_TEXTPAGE from the public headerMiklos Vajna
All usage goes via the PDFiumTextPage interface now. Change-Id: Ied9d7fc9e1cf91b6a2feca63264993fd77348bed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110792 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-11jsdialog: properly export visibility of tabSzymon Kłos
Change-Id: Ib715633a3c7ed0730349a8dbf7205199eebe89ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110713 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11tdf#139429 Convert Style previews widget to IconViewSzymon Kłos
- this adds labels to easily identify the styles - easier to work with many styles - nice native widget in gtk3 - double click opens the style settings - added Command callback fro iconview Change-Id: I08743515cbd2a4e4bd592d1509e48bbe2a43b129 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110408 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11Related: tdf#139667 allow TabControl tabs to always show tooltipsCaolán McNamara
If one is set, then just show it. The removed restrictions seem to have been added in... commit 85702858a81c72b40f0e7e3ce05e677ffb996da9 Date: Tue Dec 16 16:42:03 2008 +0000 CWS-TOOLING: integrate CWS alf01 fix: #158798# show tooltip if only a image is shown where #158798# is old private bugtracker and referenced public #i95201# add: images for tab items has no mention of the restrictions Change-Id: Ia11952700fb212397bf0c0228666a1545817ce8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110757 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-11ImplGetTabRect(ImplTabItem*) variant always returns 0 with default argsCaolán McNamara
so TabControl::GetPageId(const Point& rPos) doesn't work since... commit 6540912ae1a570fd8c2318f77b757e07b87c0707 Date: Sun Jun 16 21:41:31 2019 +0000 VCL merge most of NotebookbarTabControlBase Change-Id: Ia99911e753dbe2bb22dc892c6bddc0392fab97a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110728 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-11make win32 variant AnyInput() not deliver events (tdf#140293)Luboš Luňák
Win32 API PeekMessage() actually may deliver events, despite what the name may suggest, even with PM_NOREMOVE argument. That means this is problematic for use in AnyInput(), as that function should just check the event queue but not do anything with it. Using GetQueueStatus() should solve the problem. See https://lists.freedesktop.org/archives/libreoffice/2021-February/086788.html for further details. Change-Id: I10d3423f89f6f050534625110113dee60959f7a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110718 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-02-11pdfium: add a FPDFText_GetCharBox() wrapperMiklos Vajna
Which was the last public use of PDFiumTextPage::getPointer(). Change-Id: If3339f09ba38a3f10b19fe85cded718c913eb067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110750 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-11support setting tooltip for tabpagesCaolán McNamara
doesn't actually have an effect in practice yet though Change-Id: I1d88f4b1c8caa44ad542f9666d86449c078ff93c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110727 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-11Remove unneeded breaksAndrea Gelmini
Extending this: https://gerrit.libreoffice.org/c/core/+/110512 Change-Id: I1066aac690fe297a557352266f3405ae29ed4593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110522 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-10Resolves: tdf#140225 remove action when item is removed from GtkSalMenuCaolán McNamara
and we have previously ensured that all items are removed by Menu::dispose before GtkSalMenu dtor is called Change-Id: Id91cfb96a16dfa7c55bb8bc6676cb7921ec8dd37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110704 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-10Related: tdf#140225 when clearing pItemList, keep SalMenu in syncCaolán McNamara
with their removal during menu teardown Change-Id: Ic5555372112c5717cbc39c38c6172344e807deb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>