summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/app/saldisp.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-02-06elide some OString temporariesNoel Grandin1-2/+2
Change-Id: I2ecb6af11c95605c84e935b850fe94a1831a1497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163043 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-06tdf#148986 Support XF86Forward / XF86Back key eventsGabor Kelemen1-0/+12
Multimedia keys found on certain presentation clicker devices. Not added to the Customize dialog, as that was not yet asked for. As I have no access to a MAC, did not add support for that in vcl. Inspiration for code taken from commit ca74511985981444dbd72ade7244484c131e36a7 Change-Id: I417e6ba7e79c5f6e774a56ba747803a156d5f50f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160255 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-10-14Add NUMBERSIGN key handler.Gökay Şatır1-0/+7
German keyboard layout has number sign key. Users can print number sign without using modification keys. So this key can be assigned a shortcut. Subscript is assigned to CTRL + NUMBERSIGN. Below PR is used as reference when adding the new key handler: https://gerrit.libreoffice.org/c/core/+/86713 Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I340dc47764e9200d2477f8db740a629f62f48004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 1db8f6d484b884301a7d3673f4d05478e28cd853) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin1-4/+4
to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-21Assume that, if we have X11, it supports XineramaNoel Grandin1-5/+0
By now, Xinerama is old enough that we can use the X11 server supports it Change-Id: Ida95902916697808c611a53274b1f0299fd298b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-30loplugin:unusedmethodsNoel Grandin1-176/+0
Change-Id: I8d3402a69237b665462e04440ad73fe29e2133db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-29loplugin:unusedmethodsNoel Grandin1-104/+0
Change-Id: I95ab7581dec35b113cb657ce8e5ee27c89c73593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-20loplugin:unusedmethodsNoel Grandin1-63/+0
Change-Id: Ief95f111350808f010539bb733a553007d30a9df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152006 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-24tdf#147906 Use std::hypot for Pythagorean additionbuldi1-4/+1
Change-Id: I47611e1bffed814294bd2c7b23b26e1878151464 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149939 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-04-19loplugin::unusedmethodsNoel Grandin1-36/+0
Change-Id: I6a07860edb13588b83345babeb53675aedc43f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-14Related tdf#129547 and tdf#154136: add COLON keyJulien Nabet1-0/+7
Change-Id: I17978dbb100fbfa6f6ddbbbdf96872076bc2a289 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86713 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-01-31loplugin:unusedfieldsNoel Grandin1-17/+0
Change-Id: I6acce1578d21da0ac014410289def3dd500b4de3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146356 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-27Remove support for AIXStephan Bergmann1-1/+1
As discussed in the mailing list thread starting at <https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html> "Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)", the bridge implementation at bridges/source/cpp_uno/gcc3_aix_powerpc is apparently dead and should thus be removed. However, that was the only bridge implementation for AIX, which implies that support for the AIX platform as a whole is dead and should thus be removed. Change-Id: I96de3f7f97d4fd770ff78256f0ea435383688be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-12no more X11SalBitmapCaolán McNamara1-3/+0
Change-Id: I2c721c6058ab17717350742dd4390db0ad74b1f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145293 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-11drop newly unused codeCaolán McNamara1-4/+0
Change-Id: Ida062a08b656d516cededc9307bccfe8d6e16195 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145289 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-06use std::optional for SALCOLOR_NONENoel Grandin1-4/+6
instead of re-using an actual real color value, because it will totally not work when I convert vcl to use alpha instead of transparency Change-Id: I01f043e0b65ffd852989dfe28f2b9d5a43c9c3d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-06tdf#150682 - bad shortcut in french langageNoel Grandin1-0/+7
the = key is } on a french keyboard, so remap the ctrl-alt-= shortcuts to ctrl-alt-} which means the user gets to keep pressing keys in roughly the same physical location for this action, regardless of keyboard Change-Id: I03e251dacc1c19e543182a44ae23fde2a57cfa45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-14VCL drop m_pInstance from *nix SalDataJan-Marek Glogowski1-2/+2
AKA the "*nix SalData untangling" commit. The original plan was to get rid of vcl/inc/saldatabasic.hxx and even SalData for all the *nix backends. But after many backs and forths, reinspecting the code and imagining the resulting code, I decided against that plan. All these variants would have resulted in reinterpret_cast calls, I wanted to prevent. And they would have required larger renames for no benefit. An other, related idea was to include all SalData implementations in the vcl/inc/svdata.hxx header, but that seemed like an include explosion, so was also dropped. I tried to untangling iOS from using GenericUnixSalData, as it doesn't use any of it's features. The new, minimal SalData should be sufficient. I'm leaving the easier drop of mpInstance from the Windows and MacOSX backend as a minimal interesting EasyHack. Change-Id: I5be01c1f42131a7e31cb30899392308e1e2de53b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128402 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-07-26cid#1489523 silence bogus Out-of-bounds accessCaolán McNamara1-1/+1
drop comment referring to no longer used return value Change-Id: I3eca1294edc09fc626a8d62ff031547c2a1a5a72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119502 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin1-7/+8
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-10loplugin:unnecessaryreturn SalX11Display::DispatchNoel Grandin1-8/+8
Change-Id: I270f6538d921ad2116cc29ada3e4543027531764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116974 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-18tdf#104169 - Change mouse cursor to FatCross in calc spreadsheetSarabjot Singh1-0/+3
Added new cursor FatCross to calc. Change mouse cursor to FatCross while hovering over the spreadsheet in calc instead of earlier Arrow. Co-authored-by: Mesut Çifci <mesutcifci97@gmail.com> Change-Id: I672a058cc702eab0cba6ac953534def915766859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114679 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-03-24cid#1474443 Uninitialized scalar variableCaolán McNamara1-2/+2
Change-Id: I346425552d437cfd77dced31efca384d8de7b542 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113019 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-22cid#1473727 Uninitialized scalar fieldCaolán McNamara1-3/+8
Change-Id: Iff6ae0cb0eb849ddc3f52861370b3a198064ea86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112869 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-27tdf#139609 avoid fetching unnecessary xid under gtk3Caolán McNamara1-1/+1
because of the side effects using a bare GtkGrid as m_pSocket in vcl/unx/gtk3/gtk3gtkobject.cxx is perhaps a poor choice, getting its xid causes poor side effects wrt events belonging to its child widgets getting delivered to the SalFrame widget, so duplicate scrolling after showing a opengl slide and/or showing a video and lots of flickering we're (generally at least) not using the xid under gtk3 so don't set it unless it's explicitly asked for. Happily the gtk Player::createPlayerWindow doesn't use its arg[0] xid in any case, so don't bother setting it for that backend. Change-Id: I1c59a607a332635091782c3b49de10647558f301 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109941 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-26use an accessor for SystemEnvData::aWindowCaolán McNamara1-1/+1
with an eye to making it on-demand Change-Id: If6cefd68a336dc6afe23591c857bd71034215b54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109929 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-16make the Color constructors explicitly specify transparencyNoel1-3/+3
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-08remove more no longer needed OpenGL-related codeLuboš Luňák1-33/+0
Change-Id: If7f47cf6dad860e4f8eab68931b72a38a7eda136 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107362 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-10-19use tools::Long in vclNoel1-9/+9
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-06loplugin:const* make some params and methods constNoel1-1/+1
Change-Id: If7fbb25037343e18081a8ee7064840d75e9a45a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104010 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-04loplugin:flatten in vcl/unxNoel Grandin1-77/+77
Change-Id: Ib9df009a51db1ed96c6eea7bda68e288755e7a56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100032 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-23Removed duplicated includeAndrea Gelmini1-1/+0
Change-Id: I839d1414bfd4a6d75b1393f006e770c1c9775d84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92560 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-20tdf#130924 [vcl] replace `*printf`s with `SAL_*` logging macros.Yukio Siraichi1-86/+99
Change-Id: Ie3ec1e1767478bce12eecf7bfee02ed2d45fe58c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92331 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-25make sure only VCL-Skia or VCL-OpenGL is enabled (tdf#131543)Luboš Luňák1-1/+3
The bug is most likely caused by some code checking only the OpenGL setting and doing something, even though the Skia setting takes precedence. So make sure VCL OpenGL is considered disabled if Skia is enabled. Since isVCLOpenGLEnabled() is called right before setting up the X11 visual, which is normally needed by isVCLSkiaEnabled() to get Vulkan info to check blacklisting, this also requires using a temporary Skia Vulkan context using the default X11 visual to avoid the dependency loop. Change-Id: I2d9d9e81ab4ed5021b5f42e3c272dcd10fd32cce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91044 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-03-09improve loplugin:unusedfieldsNoel Grandin1-8/+6
noticed something that wasn't being picked up, wrote some tests, and found an unhandled case in Plugin::getParentFunctionDecl Change-Id: I52b4ea273be6614e197392dfc4d6053bbc1704de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-27initial empty Skia VCL implementationLuboš Luňák1-0/+1
This mostly duplicates OpenGL cases. Pretty much all implementation methods are empty. Change-Id: I333506f56dcc46c3e9405fe8194c172de17c54fd
2019-11-19Rename GlyphCache to FreetypeManagerJan-Marek Glogowski1-1/+1
And while at it remove the unneeded getPlatformGlyphCache abstraction. Change-Id: Id5cad751eda9e6bf177dfb4816280d7c5af7066a Reviewed-on: https://gerrit.libreoffice.org/83125 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-10-04loplugin:singlevalfieldsNoel Grandin1-1/+0
Change-Id: Ic74b400f0b929b4c57ad70d0b0936983a3d46360 Reviewed-on: https://gerrit.libreoffice.org/80154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26remove internal use of 16-bit packed formatsNoel Grandin1-18/+0
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-16tdf#42949 Fix IWYU warnings in vcl/unx/generic/*Gabor Kelemen1-8/+1
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-08-20loplugin:constvars in vclNoel Grandin1-2/+2
Change-Id: Ic454a4d9520992eaecef4b64ec73d49e52ffcc2c Reviewed-on: https://gerrit.libreoffice.org/77828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-13tdf#42949 Fix IWYU warnings in vcl/inc/*Gabor Kelemen1-0/+1
Platform-specific subdirs are left alone: android, ios, osx, quartz, win Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icbb906b7fbc960240c73c56d3dae2a78b06a0f53 Reviewed-on: https://gerrit.libreoffice.org/73754 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-06remove some unnecessary typedef struct... sugarNoel Grandin1-2/+2
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06loplugin:unnecessaryparen improve member expressionNoel Grandin1-2/+2
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741 Reviewed-on: https://gerrit.libreoffice.org/68757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-22convert SalRGB to scoped enumNoel Grandin1-22/+22
and remove unused values Change-Id: Id10c18e832d54a6e530c3fe197b230d2d511d79c Reviewed-on: https://gerrit.libreoffice.org/63739 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19loplugin:staticvar in vclNoel Grandin1-10/+7
Change-Id: I2bdab84dc81e0545aa96542caec213db61765f68 Reviewed-on: https://gerrit.libreoffice.org/61922 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann1-8/+8
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-06Add GlyphCache instance to GenericUnixSalDataJan-Marek Glogowski1-1/+24
This gets rid of some statics and drops some duplicate code: - the X11 based GlyphCache => gone - the svp version of the GlyphCache => gone - the "normal" GlyphCache - the PrintFontManager And while at it move the implementation into its own file gendata.cxx. Change-Id: I9063139c9482f5f37285505f389cf5f32c02426b Reviewed-on: https://gerrit.libreoffice.org/61454 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-09-17New loplugin:externalStephan Bergmann1-8/+8
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>