summaryrefslogtreecommitdiff
path: root/vcl/unx/generic
AgeCommit message (Collapse)Author
2024-03-02Use SAL_WNODEPRECATED_DECLARATIONS_(PUSH|POP)Mike Kaganski
Change-Id: I2810d22e8f5e1c81647b9e9b15519de65939630a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163895 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-16vcl: GCC12 says fclose() causes -Werror=use-after-free on any use of FILE*Michael Stahl
In file included from vcl/inc/unx/cpdmgr.hxx:34, from vcl/unx/generic/printer/cpdmgr.cxx:25: In member function ‘size_t psp::FPtrHash::operator()(const FILE*) const’, inlined from ‘std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code>::__hash_code std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code>::_M_hash_code(const _Key&) const [with _Key = _IO_FILE*; _Value = std::pair<_IO_FILE* const, rtl::OString>; _ExtractKey = std::__detail::_Select1st; _Hash = psp::FPtrHash; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; bool __cache_hash_code = true]’ at /usr/include/c++/12/bits/hashtable_policy.h:1268:18, inlined from ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::size_type std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_M_erase(std::true_type, const key_type&) [with _Key = _IO_FILE*; _Value = std::pair<_IO_FILE* const, rtl::OString>; _Alloc = std::allocator<std::pair<_IO_FILE* const, rtl::OString> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<_IO_FILE*>; _Hash = psp::FPtrHash; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]’ at /usr/include/c++/12/bits/hashtable.h:2358:43, inlined from ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::size_type std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::erase(const key_type&) [with _Key = _IO_FILE*; _Value = std::pair<_IO_FILE* const, rtl::OString>; _Alloc = std::allocator<std::pair<_IO_FILE* const, rtl::OString> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<_IO_FILE*>; _Hash = psp::FPtrHash; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]’ at /usr/include/c++/12/bits/hashtable.h:971:24, inlined from ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::erase(const key_type&) [with _Key = _IO_FILE*; _Tp = rtl::OString; _Hash = psp::FPtrHash; _Pred = std::equal_to<_IO_FILE*>; _Alloc = std::allocator<std::pair<_IO_FILE* const, rtl::OString> >]’ at /usr/include/c++/12/bits/unordered_map.h:763:26, inlined from ‘virtual bool psp::CPDManager::endSpool(const rtl::OUString&, const rtl::OUString&, FILE*, const psp::JobData&, bool, const rtl::OUString&)’ at vcl/unx/generic/printer/cpdmgr.cxx:725:28: vcl/inc/unx/cupsmgr.hxx:35:43: error: pointer may be used after ‘int fclose(FILE*)’ [-Werror=use-after-free] 35 | { return reinterpret_cast<size_t>(pPtr); } | ^ vcl/unx/generic/printer/cpdmgr.cxx: In member function ‘virtual bool psp::CPDManager::endSpool(const rtl::OUString&, const rtl::OUString&, FILE*, const psp::JobData&, bool, const rtl::OUString&)’: vcl/unx/generic/printer/cpdmgr.cxx:695:15: note: call to ‘int fclose(FILE*)’ here 695 | fclose( pFile ); | ~~~~~~^~~~~~~~~ Change-Id: Ib035f2287649dcf9a2d37bda85ebcf52c6c51aaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134739 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 02ebfb8ed6175934a1985786e6816ecef1bd59f8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134632 Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit aedb674394960a294535f35d19f7ae532ee5d35a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135488 Tested-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-16cid#1473818 Use after freeCaolán McNamara
Change-Id: Idd74e0debd12e42ff97d79b56e76cde6fd98aa2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112745 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 236f3a8e60e05147a37f294774b0c07d40aff36f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125234 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-25Avoid -Werror=nonnull with glibc-headers-x86-2.32-1.fc33.noarchStephan Bergmann
...on Fedora 33: > ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx: In function ‘void Preedit_InsertText(preedit_text_t*, XIMText*, int)’: > ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx:149:34: error: argument 1 is null but the corresponding size argument 3 value is 1024 [-Werror=nonnull] > 149 | size_t nBytes = wcstombs ( nullptr, pWCString, 1024 /* don't care */); > | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from ~/gcc/trunk/inst/include/c++/11.0.0/cstdlib:75, > from ~/lo/core/include/sal/log.hxx:15, > from ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx:25: > /usr/include/stdlib.h:937:15: note: in a call to function ‘size_t wcstombs(char*, const wchar_t*, size_t)’ declared with attribute ‘access (write_only, 1, 3)’ > 937 | extern size_t wcstombs (char *__restrict __s, > | ^~~~~~~~ (Allowing the first argument to wcstombs to be null, and in which case the third argument is ignored, is a POSIX extension.) Change-Id: Ic078623643010b7539bc5bc1b498f18977ae77ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103473 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 782d160458d319c6c77fffa4c003c519afffaa17)
2020-09-07rhbz#1875377 if sort order is equivalent keep order fontconfig presentsCaolán McNamara
there are two fonts in fedora 32/33 for regular Cantarell /usr/share/fonts/cantarell/Cantarell-Regular.otf and /usr/share/fonts/cantarell/Cantarell-VF.otf where VF is the Variable Font version. The Cantarell-Regular ones has a CFF table and export to pdf creates a font subset that works perfectly fine. The VF one does not have a CFF table and the fallback case doesn't work for pdf export. Both have the same version, use a stable sort to retain their relative order that fontconfig presents so we use the Cantarell-Regular version we would see if we didn't sort by version at all. Change-Id: I750006b980810fc59e0a152d42ae17f29f46e3b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101971 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-05-19tdf#133053 reset after clear so avoid later assertCaolán McNamara
Change-Id: Ib2b637c8a6d5af04256bfd9631e43d334343b610 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94265 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 773b8e3cc1340e6f5bfc364f0705344b744edd8d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94273 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-01-23Related tdf#126459: fix crash in presenter console using gen vclplugKatarina Behrens
A slide with video is needed to reproduce Regression from commit ac87cfdf263d2abd97b32857534d0f749b7c4479, 'toolkit' and 'platform' bits were never set (bc irrelevant) in gen vclplug but now if not set, values mapping to 0 (Gtk3, Wayland) will be used and things go down the drain in avmedia/gstplayer then Just between us girls, nobody in their right mind would use gen vclplug for presentation, but crash is not nice so let's fix this Change-Id: If318ab93897f9f4854f7316e630c35aaec2480fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87185 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 13bc1ec30c5adf05ff987c25634b845bab7bc4ae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87237 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-11-19tdf#128434 correctly release fonts in destructorsJan-Marek Glogowski
This adds ReleaseFonts() calls to all destructors of SalGraphics and TextRenderImpl derivated classes, which implement SetFont. During destruction a base class can't call into derivated classes, as these are already destructed, so we have to spread these calls manually. Change-Id: Ia57db04f7df665e5205212ce512119e2f60e3379 Reviewed-on: https://gerrit.libreoffice.org/82967 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit f8e1f8652255cadd80a991aa3e059ee631b333b8) Reviewed-on: https://gerrit.libreoffice.org/83149
2019-11-19tdf#128434 try garbage collect ImplFontCache fontsJan-Marek Glogowski
Instead of changing the harfbuzz caching, for this use case it's enough to queue all per-OutputDevice fonts for garbage collection (GC), which are managed by the OutputDevices ImplFontCache. So just try to GC all the fonts in the ImplFontCache destructor. There is no point keeping these LogicalFontInstances alive, after the OutputDevice font cache is destroyed, as these fonts aren't shared and can't be accessed later. But the main problem is still some correct accounting of harfbuzz resources and eventual even the Freetype ones, so this cleanup would not really be needed. AFAI can tell, this plugs the remaining per-document leaks of the PDF generation, except for a 72 byte basic listener leak from: basic::ImplRepository::impl_createManagerForModel(...) basicmanagerrepository.cxx:480 Change-Id: I3155be59a2bdcd85e01f6f048b990db04d88c94f Reviewed-on: https://gerrit.libreoffice.org/82968 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit e6aac0b637d583d3cfb893276f813ff5aa1ade17) Reviewed-on: https://gerrit.libreoffice.org/83148
2019-11-19Move static aFontFileList into GlyphCacheJan-Marek Glogowski
GlyphCache is already a global in the unix SalData class, so we can drop one more global static variable. and the FontFile map values aren't shared, so just use std::unique_ptr, like the two other maps, which form the GlyphCache class. While at it finalize the classes and hide their constructors. Change-Id: Iaac8cd9905e9b4025707a17f62d8961ccfa5d0fb Reviewed-on: https://gerrit.libreoffice.org/82966 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 578f97b4b2d06d3d5d5db7fd70066ba8ca665abc) Reviewed-on: https://gerrit.libreoffice.org/83147
2019-11-15tdf#123734 Prepend "Custom." for values of custom PPD optionsMichael Weghorn
CUPS supports using custom options in PPDs, which go beyond what is specified in the PPD specification, s. doc at at [1]. [2] mentions that the "Custom." prefix is needed when specifying custom page sizes: > When Custom is listed for the PageSize option, you can specify custom > media sizes using one of the following forms: > > lp -o media=Custom.WIDTHxLENGTH filename > lp -o media=Custom.WIDTHxLENGTHin filename > lp -o media=Custom.WIDTHxLENGTHcm filename > lp -o media=Custom.WIDTHxLENGTHmm filename While I did not find any explicit documentation that the same is true for CUPS-specific custom options, this is apparently the case. (The "CustomPageSize" keyword is expclicitly specified in the PPD specification [3], section 5.16 "Custom Page Sizes" and thus not a CUPS-specific custom option.) This can be seen e.g. by the fact that after setting the default value for a PPD option to such a custom value, the corresponding entry in the PPD does get the "Custom." prefix, e.g. *DefaultPassword: Custom.12345 for the sample PPD from tdf#123734. For more details, s.a. the discussion on the similar bug report for Gtk+ at [4], where e.g. comment 0 says: > According to the cups people, the value should have been > "Custom.ThisIsAtest" in this case. Without the "Custom." part, > this is not used by the cups filters. Therefore, add the "Custom." prefix for custom options, but don't show them in the UI. [1] https://www.cups.org/doc/spec-ppd.html#OPTIONS [2] https://www.cups.org/doc/options.html [3] https://web.archive.org/web/20161017222612/http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf [4] https://bugzilla.gnome.org/show_bug.cgi?id=543520 Change-Id: I570d8b55212c6fc33405460f11d152e86cedb0f9 Reviewed-on: https://gerrit.libreoffice.org/82722 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 3c825bcc483d24bc408f7438d966c79a1f5b084c) Reviewed-on: https://gerrit.libreoffice.org/82746
2019-11-13Related tdf#128717: Drop "<ignore>" value for duplex and paper trayMichael Weghorn
Drop the artificial extra value "<ignore>" for the duplex and paper tray options in the "Properties..." dialog used in the print dialog on Linux. Those extra values were introduced in commit a9f8d75e6c54b40845fc198019788ff6b568aaf5 ("Administration utility for Unix PS-Print Environment") in 2001. The two corresponding comboboxes are greyed out if there are no PPD options "Duplex" and/or "InputSlot". And if there are valid values for these options, one of those is preselected. I see no use in allowing to explicitly setting the value to "<ignore>". Not passing any value explicitly to CUPS will cause the default option to be used anyway. Having an additional option for Duplex is also inconsistent with the (revamped) main print dialog, where that additional value is not offered for the duplex option, i.e. the "Properties" dialog offers more choices than the main print dialog. Change-Id: Id9d20a061e51921e601d53d74aa8079fe3c59aca Reviewed-on: https://gerrit.libreoffice.org/82527 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-11-06loplugin:indentation find broken if statementsNoel Grandin
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03loplugin:stringaddNoel Grandin
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-25tdf#42949 Fix IWYU warnings in vcl/unx/gtk3 and gtk3_kde5/Gabor Kelemen
Also recheck vcl/source after recent reworks and f-u-i updates. Some new blacklist entries were needed for keeping existing fw declarations in headers. Add blacklist entries for removals causing no-pch build failures that were reverted in: a3b03ba1316b1ec0a9b0a3b45b96dc0a49aa9f1f 75d924db95559cff5f699bad8fe34bb0aeac0ff6 b57052ec2bbe548ca495a32b4bfce1d1c71caf33 Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I71227806288b68ef2a2cd56244899fd56bd0db8d Reviewed-on: https://gerrit.libreoffice.org/81163 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-24Introduce OStringCharStephan Bergmann
...similar to OUStringChar, to be used in string concatenation expressions. And enable the corresponding loplugin:stringadd check, and fix its findings. Change-Id: I35ebb2253ba82bda6c98ae6ebd2ad4f27cf9abf9 Reviewed-on: https://gerrit.libreoffice.org/81456 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-19loplugin:unusedfieldsNoel Grandin
Change-Id: I7dd5fc3d53df63fd2ee2caa71586f0f5e13f187e Reviewed-on: https://gerrit.libreoffice.org/81078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18cid#1454633 silence Uncaught exceptionCaolán McNamara
Change-Id: I136ebda75377f5d0391483ddc2ab9f05a01c85d9 Reviewed-on: https://gerrit.libreoffice.org/81032 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-11simplify "a = a +" to "a +="Noel Grandin
mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-09name all Notebooks 'tabcontrol'Caolán McNamara
Change-Id: I5159ed77c2b3ba2f06e381a738a49dbe17a6a4dd Reviewed-on: https://gerrit.libreoffice.org/80542 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-06SystemEnvData::nSize is no longer read and can be removedStephan Bergmann
...since 5926b22b5dc33490d23d594b129eb8a70b94ffb0 "The SystemEnvData passed into the canvas factories appears to be unused". (And the user-provided SvpSalObject ctor can be removed, at which point the use in SvpSalInstance::CreateObject should be written without "()" to avoid loplugin:subtlezeroinit. Change-Id: I4392fa2d697b29c814d7b577a7b1f8c984c05e70 Reviewed-on: https://gerrit.libreoffice.org/80298 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-04Related: tdf#127529 make it harder to misunderstand this VirtualDevice ctorCaolán McNamara
Change-Id: I250bc68da118a994a2e0ff8ab9eb11112827756d Reviewed-on: https://gerrit.libreoffice.org/80158 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-04loplugin:unusedmethodsNoel Grandin
Change-Id: Idd98dc9e1090a6b09124c80eed5a878e5e966cfc Reviewed-on: https://gerrit.libreoffice.org/80182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-04loplugin:singlevalfieldsNoel Grandin
Change-Id: Ic74b400f0b929b4c57ad70d0b0936983a3d46360 Reviewed-on: https://gerrit.libreoffice.org/80154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-03loplugin:unusedmethodsNoel Grandin
Change-Id: I9790d053248ae6bd58ecc026c774014c4e5e04aa Reviewed-on: https://gerrit.libreoffice.org/80115 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-03loplugin:unusedfieldsNoel Grandin
and filter out the weld fields, since we're not touching them yet Change-Id: I3cc23c46d2650f13cb29c7d381687939d23e2882 Reviewed-on: https://gerrit.libreoffice.org/80104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-02loplugin:stringadd in vclNoel Grandin
Change-Id: I21154abe6992418ff2541e5913a0aae0c2c1912c Reviewed-on: https://gerrit.libreoffice.org/79987 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-02tdf#127858 Assertion when trying to edit a form (gen backend)Noel Grandin
regression from commit 78b9dac2ee77bf6efc1298962cbeca284db5b00a remove internal use of 16-bit packed formats we are trying to create a 32-bit image in drawinglayer::primitive2d::createDefaultCross_3x3 Change-Id: Iaf19326b1e2c11c5d535dd8f317086bebbaaebec Reviewed-on: https://gerrit.libreoffice.org/79948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26loplugin:virtualdead in vclNoel Grandin
Change-Id: I54cacce6d843f41f220ac5350868bd6d70dbc6b4 Reviewed-on: https://gerrit.libreoffice.org/79585 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26remove internal use of 16-bit packed formatsNoel Grandin
none of our supported hardware uses these any more Change-Id: Ic95d6df619a05df0bec1f5870596cb2bb3bcc6cb Reviewed-on: https://gerrit.libreoffice.org/79476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-19improve and enable loplugin:fragiledestructorNoel Grandin
Where the problem was benign and the class was not extended, I marked the class as final. Where the problem was benign and the class was extended, I marked the relevant callee methods as final. Other cases were excluded in the plugin. Change-Id: Idb762fb2206af4e8b534aa35ff77f8368c7909bc Reviewed-on: https://gerrit.libreoffice.org/79089 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-18remove unused crc functionality from ZCodecNoel Grandin
Change-Id: I3e57e815b538ad5749b4bab3d4ef8e295cbe116b Reviewed-on: https://gerrit.libreoffice.org/79098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-16tdf#42949 Fix IWYU warnings in vcl/unx/generic/*Gabor Kelemen
Also recheck vcl/inc/unx/* Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6e91c51892063b0ae6fe571753c4924f2481f3c2 Reviewed-on: https://gerrit.libreoffice.org/78618 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-09-11Check for EMOJI content only on ICU 57 and newerTomáš Chvátal
The older ICU does not have the logic to work with there as it is feature of the new icu only: http://bugs.icu-project.org/trac/ticket/11802 Change-Id: Icd21be1e20b7cb988e94d107406a4f81d00116a7 Reviewed-on: https://gerrit.libreoffice.org/78811 Tested-by: Jenkins Reviewed-by: Tomáš Chvátal <tchvatal@suse.com>
2019-09-06use unique_ptr in CreatePrintGraphicsNoel Grandin
Change-Id: Ib9ca0173f3b5bb090ae71f8622fef717a47e8a2b Reviewed-on: https://gerrit.libreoffice.org/78704 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-06Resolves: tdf#125461 32bit XImage is not premultipliedCaolán McNamara
regressions since... commit 86ea64f216819696cd86d1926aff0a138ace2baf Date: Fri Feb 15 13:14:32 2019 +0100 Support for native 32bit Bitmap in VCL and SVP (cairo) backend 32bit cairo data is premultiplied with alpha but not so 32bit XImages which don't have alpha at all, so restore the pre-change 32bit accessors, which effectively ignore their alpha channel, beside the post-change ones and toggle which one to use depending on the back end capability Change-Id: Ibfec18b4ddb6e93ab19e44e7127e7a16982e2f49 Reviewed-on: https://gerrit.libreoffice.org/78665 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-06Fixing '....' and '..'Andrea Gelmini
Change-Id: I926069d6c1f2712e5020d930f7ff6c62fd00e912 Reviewed-on: https://gerrit.libreoffice.org/78667 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-05Merge GetFontCodeRanges() into GetFontCharMap()Khaled Hosny
Change-Id: I61d8edf0be492c1c06274c11ac5d2e65415525a9 Reviewed-on: https://gerrit.libreoffice.org/78638 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2019-09-05Remove effectively dead codeKhaled Hosny
We dropped support for non-SFNT fonts for a while now. Change-Id: Iaa2ea308effa7328bd84240cf29fc3fd117d418a Reviewed-on: https://gerrit.libreoffice.org/78637 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2019-09-04Related: rhbz#1648281 improve fontconfig fallback for emojisCaolán McNamara
disregard text language for emoji and tag with und-zsye to get fontconfig to give us the default emoji font Change-Id: I8f94b0c41dea3204c9db77b96ad8f0d98bae2239 Reviewed-on: https://gerrit.libreoffice.org/78600 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-04tdf#127189 FreeType <= 2.8 will fail to render stretched horizontal brace...Caolán McNamara
glyphs in starmath at a fairly low stretch ratio. The failure will set CAIRO_STATUS_FREETYPE_ERROR on the surface which cannot be cleared, so all further painting to the surface fails. This appears fixed in 2.9 with https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=91015cb41d8f56777f93394f5a60914bc0c0f330 "Improve complex rendering at high ppem" Change-Id: I8cbf8347ccd29beda4057b14f2e68678f6030bf4 Reviewed-on: https://gerrit.libreoffice.org/78587 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-04tdf#118314 Code clean up on imestatuswindowSzabolcs Toth
Change-Id: I8bc5a73a91f28fcfd22ef716e9cf87d53997b1ad Reviewed-on: https://gerrit.libreoffice.org/77337 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: László Németh <nemeth@numbertext.org>
2019-09-03Make Noto Color Emoji font work on LinuxKhaled Hosny
Noto Color Emoji is a bitmap color font, Cairo knows how to scale such fonts and FontConfig will identify them as scalable but not outline fonts, so change the FontConfig checks to checks for scalability. Make sft.cxx:doOpenTTFont() accept non-outline fonts, the text will not show in PDF but that is not worse than the status quo. Change-Id: I756c718296d2c43e3165cd2f07b11bbb981318d3 Reviewed-on: https://gerrit.libreoffice.org/78218 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2019-09-0366537 was an issuezilla bugCaolán McNamara
Change-Id: I17f55b445823a62f2396c4d5a30041c55bd87494 Reviewed-on: https://gerrit.libreoffice.org/78563 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-01Fix '..'Andrea Gelmini
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for ".." instead of "..." between words. It passed "make check" on Linux. Change-Id: I144d8061fca9f545c762941551e59dffdd3650e8 Reviewed-on: https://gerrit.libreoffice.org/78357 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-08-27Consolidate ImplCalcLineSpacing()Khaled Hosny
Move getting UPEM and font tables to the functions and use HarfBuzz API to get them. In the future we might stop reading the tables ourselves and use HarfBuzz metrics API instead. Change-Id: I3f4511628fd33200bae94cdcd96479ba3e6d2fba Reviewed-on: https://gerrit.libreoffice.org/78081 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>