summaryrefslogtreecommitdiff
path: root/vcl/inc/win
AgeCommit message (Collapse)Author
2024-09-26tdf#160837 win: Move UpdateFrameGeometry to WinSalFrameMichael Weghorn
Turn the previously static helper function UpdateFrameGeometry into a WinSalFrame method. It requires write access to the maGeometry member, which is currently still, but soon no longer public. Change-Id: Ief0dfee6061a5ea4e8ce497f1605b7c46c6e40c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173959 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-26tdf#160837 win: Move SetMaximizedFrameGeometry to WinSalFrameMichael Weghorn
Turn the previously static helper function SetMaximizedFrameGeometry into a WinSalFrame method. It requires write access to the maGeometry member, which is currently still, but soon no longer public. Change-Id: Iceef8a5366e6f4f5bf2163011651ee99ee908b2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173958 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-17Support for non-AA text on WindowsMike Kaganski
In commit 3ecd8f19a91ed7141304a2080fb11612b5ff30b3 (vcl cairo text renderer: support non-AA text, 2018-07-26) and its follow-up commit e6538f5bdd876911ea30f84a6512c03908e620fd (tdf#118966 vcl: add a flag to determine if AA of fonts is used from the system, 2018-07-28), non-antialiased text got supported in bitmap export using cairo. This change makes that support available on Windiws, including Skia. Change-Id: I1fae726539347f826e2d62246d35315e7954cf83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171967 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-08-02tdf#162259: correctly handle font width on WindowsMike Kaganski
Unlike other platforms, on Windows, the font width is not relative to font height, but to average width of font's glyphs. This is mentioned in LogicalFontInstance::GetScale. 1. In VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D, when calculating the correction for width / height (introduced in commit cc3663bbaed4f65d64154e5f9abb51a5f622f710, 2024-04-20), the already applied X scale is now calculated using unscaled font's width. 2. Commit 8557ea84c9336ba8061246f1f46ddb6e02f413a1 (Exclude getHScale from DirectWrite font rendering, 2024-04-08) was effectively reverted, because I was wrong assuming that the code there was unnecessary. 3. Commit 2092df2a9044f1c2ae4379f48a3201e5867575a8 (tdf#161154: pass "scaling is done externally" information down the stack, 2024-05-18) was also reverted. Change-Id: I8cff39b67a6efd380f7807f5655f401bdb62cc3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171382 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-07-25tdf#85677: Add support for Windows touch gestures (panning,zooming)Tibor Nagy
Change-Id: Ib0243889621663ddb9b6789ede7643d54f06041e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170988 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
2024-07-17vcl: support for Windows ITaskbarList3 interfaceVasily Melenchuk
And a demo implementation for these features as a taskbar window will become red once LO is displaying any error message. Change-Id: Ifc04026c699059da2e457de2c69e7363e756109c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166740 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-04-11Use COMReference in D2DWriteTextOutRendererMike Kaganski
... and simplify the related code. Change-Id: Idaef7c9d725273e202948158e45ded7e7a2f85a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165985 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-08Exclude getHScale from DirectWrite font renderingMike Kaganski
... and drop it, since it's unused now. Unkike with Skia, where the ratio produces a visible effect, in DirectWrite the effect seems cancelled by transformations. Yet, it produced computational instability, noticable in small vertical text. Change-Id: I2f3b20913075d1338dc75c5a04c9cc0ef29c75ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165877 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-29Simplify and drop unused methodMike Kaganski
Change-Id: Ie987bce2bb25232d54a4a83631c609ad6dba7213 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165467 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-04vcl: interface for WinAPI FlashWindow() functionVasily Melenchuk
To improve LibreOffice UX it will be great to have possibility to signal user on some event did happen, but without capuring focus and bringing LO to foreground, like it is happenings sometimes. It can be annoying. For example, if dialog window is opening slowly and user did switch to another application, this is used to inform user that there are some updates in LO window: dialog finally alive. There are somewhat confusing implementation of this feature: VCL dialog window became visible and actual Windows window should use ::FlashWindow() are very different in hierarchies, so it is somewhat challenging to find window to flash or even decide shoud we flash window or not. Change-Id: I6ca6706d2dda8902aea273ebe6e318ec9bf4beda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158472 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-02-23tdf#159793 Save printer paper tray in RTF and DOCXOliver Specht
Saves the paper tray id as w:paperSrc w:first and w:other in docx and \binfsxn and \binsxn in RTF Change-Id: I79004f54aba3b6609d7921afacf815726f7f2678 Change-Id: Ie3c11fffa6a133250b7db69b4e845bccaa8e2280 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163654 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-02-10Drop obsolete handling of wheel mouseMike Kaganski
Change-Id: I9958e69c953563285577f5cdea220371af4848d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163213 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-10Simplify a bitMike Kaganski
Use existing rtl_ustr_ascii_compareIgnoreAsciiCase, instead of inventing an own local comparison function. And standardize on WM_SETTINGCHANGE, which is the same as WM_WININICHANGE. Change-Id: Ifaf1f73066edf7d553174b529be5aa55179ae92e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163212 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-19tdf#159254 import paper bin/paper source from rtf/docx filesOliver Specht
Imports \binfsxn and \binsxn from RTF and w:paperSrc from docx files and applies paper tray to the page style if the printer supports the imported tray value. Works only on Windows. Change-Id: Ie1170c58f7114f0dbf6bdd2721d4e077886cbe16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162236 Tested-by: Jenkins Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-11-19tdf#143148: Use pragma once instead of include guards in vcl/inc/winTaichi Haradaguchi
Change-Id: I57db27a6cbd45ec9f1ae666a3b8da23bbf5c20de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159649 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-08-17Drop defines obsoleted by Windows 7 baselineMike Kaganski
I.e., those that are guarded in Windows headers by stuff like #if(_WIN32_WINNT >= 0x0600) #if(WINVER >= 0x0501) Change-Id: If9ab06663b2c9f511549823f14c8bc759a30a74c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155751 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-08-09Use _beginthreadex instead of CreateThreadMike Kaganski
The documentation for ExitThread [1] has this comment: A thread in an executable that calls the C run-time library (CRT) should use the _beginthreadex and _endthreadex functions for thread management rather than CreateThread and ExitThread; this requires the use of the multithreaded version of the CRT. If a thread created using CreateThread calls the CRT, the CRT may terminate the process in low-memory conditions. Since ~all our code uses CRT, be safe and use _beginthreadex. [1] https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread Change-Id: If3e566592e921b00240e08aa759d8cdbc421d44b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155513 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin
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-31all drawPolyPolygon variants return true nowCaolán McNamara
since: commit 4998de76ed1da4039e30718941d50d6f1dfe4f82 Date: Sun Jul 30 07:40:48 2023 +0000 tdf#156230: Drop freshly unused GenPspGfxBackend Change-Id: I7fc2a068f807777ed392c5d58772d130bf7f51c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155076 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-25tdf#155414 win a11y: Honor system setting to disable animationsMichael Weghorn
Use `SPI_GETCLIENTAREAANIMATION`, the "client area animation parameter [that] indicates whether the user wants to disable animations in UI elements" [1] to determine whether animations should be disabled. The parameter can be set in Windows, as documented in MDN docs for the "prefers-reduced-motion" CSS media feature [2]: > * In Windows 10: Settings > Ease of Access > Display > Show animations in Windows. > * In Windows 11: Settings > Accessibility > Visual Effects > Animation Effects On top of commit 9d68c794d67259a38de1465090f6f1e7fb588d62 Author: Patrick Luby <plubius@neooffice.org> Date: Fri Jul 21 19:55:02 2023 -0400 tdf#155414 include system "reduce animation" preferences , this implements the Windows equivalent of what that change does for macOS. [1] https://learn.microsoft.com/en-us/windows/win32/winauto/client-area-animation [2] https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion Change-Id: I1485cd7dc97b7d93abdeab78ec330874f2a5cb98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154889 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-07-23vcl: Use HarfBuzz to get glyph bounding rectangleKhaled Hosny
For consistent cross-platform results that also matches our glyph advances since platform functions might be using hints which we don’t use. Change-Id: I4aebd3e7c5f460dff584f5eba74f7a11bab0f9b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154388 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-10Drop unused WinFontInstance scaleKhaled Hosny
Unsed since: commit 7cb3e475f2fb0162c7290414509de4fb8fe57e30 Author: Jan-Marek Glogowski <glogow@fbihome.de> Date: Thu Sep 6 14:04:25 2018 +0200 WIN add SalGraphics* to WinFontInstance Change-Id: I7d14f2efce04c919cffee612b09833810ff3f78b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154240 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-03Rename ImplFontMetricData -> FontMetricDataKhaled Hosny
Change-Id: I0f8753a5ef1865f4ea0431125e74d0f52aa1c396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153868 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-04-17loplugin:nullptrStephan Bergmann
Change-Id: Ibe555b1362e4a7a016d99449abca8354777c5bc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150479 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-14add a way to resolve if dark mode (explicit or auto) is activeCaolán McNamara
Change-Id: Ie0d4e0c3cd5d19cf6337ec79d30ae7c877cffd82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150394 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-13no need to allocate these separatelyNoel Grandin
Change-Id: Icc24e0aaf1762e5b318b8364dd9fdb496edfb77c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150279 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12mpMouseLeaveTimer has been deadNoel Grandin
ever since it was added in commit 8229967979d96bd01e63e2954b7af35a57d9e08c Date: Thu Sep 20 15:23:39 2007 +0000 INTEGRATION: CWS os2port01 (1.2.2); FILE ADDED 2006/11/29 14:34:20 ydario 1.2.2.1: Initial OS/2 import. Change-Id: Ic1bbf9f9167f9a7146f3c7d18b6fdb69c1f44e0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12use more unique_ptr in SalDataNoel Grandin
Change-Id: Ib6e5131bff38b55b2dbf0805b63ca3554c5ee349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29tdf#149805 tdf#151677 tdf#152217 tdf#154043 tdf#153458 tdf#153800 Revert ↵Michael Weghorn
"VCL expect ... correct frame size for native menubars" This reverts commit afc828b9833b7a612369e95606ba56d41ef2c369 Date: Sat May 28 23:47:21 2022 +0200 VCL expect correct frame size for native menubars ... and renove the wrong framesize hack in the Qt backend because it caused several regressions and unfortunately the commit also doesn't fix all of the bugs mentioned in its commit message (while some previous patch sets of the change did address more, yet had other issues, s.a. the discussion in the commit's Gerrit change [1]). While e.g. the drag and drop issues reported in tdf#153458 and tdf#153800 could be fixed by translating the event position using `mapToParent()` (as is done in `QtWidget::fillSalAbstractMouseEvent` with the above commit in place), I currently don't see how to address the other issues and the overall direction of the change is not fully clear to me at this point. (There are also other pending changes in the relation change still pending in Gerrit that would presumably need more work/analysis.) After all, it seems the best way forward to revert the commit for now. This also reverts the follow-up commit commit 25da92004038c03c0feedf373e8038e7ee3e0c37 Date: Thu Jul 21 11:33:02 2022 +0200 Make JunitTest_toolkit_unoapi_1 succeed again on macOS that fixed a test failure introduced by the above commit. Luckily, there seem to be no follow-up commits that depend on this and the commits can be reverted cleanly without the need to resolve any conflicts manually. This reverts commit 25da92004038c03c0feedf373e8038e7ee3e0c37. This reverts commit afc828b9833b7a612369e95606ba56d41ef2c369. [1] https://gerrit.libreoffice.org/c/core/+/135082 Change-Id: I4c099ad7de8cbbad10da391ede4770d8c748fbde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149495 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-02-08tdf#153229 add a switch to override honoring system dark modeCaolán McNamara
Change-Id: Iafb6182e05dc65d20d0809476ee58908f7426d39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146597 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-01tdf#143148 Use pragma once instead of include guardsanfanite396
Change-Id: I49ee5a87b2a0fb093095de74ab039ebdd91762fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146461 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2023-01-12tdf#152994 only query dark mode in Windows >= 10.0.18362Caolán McNamara
Change-Id: I8d8bd368d9d1ee38dac96dd369484ec74ce4835a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145414 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-21No need for bool return value hereNoel Grandin
all of the implementations of this method return true. Change-Id: I6dc02499af1809110edd482a48d9f6d5d42ead19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-01Avoid dynamic cross casts to WinSalGraphicsImplBaseStephan Bergmann
Change-Id: I1102c5525f47d3e07cadc602dd55f7b78118a709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143535 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-24-Werror,-Wunused-private-fieldStephan Bergmann
...after a80239ede3236c84d7a05d0fbc0f299811fee6c0 "vcl: move creating DWFontFace to WinFontFace" Change-Id: Idb913ff524d9a2f462e521eeb7bcfad57d388455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143230 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-20vcl: fix artificial bold and italic on WindowsKhaled Hosny
Move creating DWFontFace to WinFontInstance so that it get proper font synthesis settings. Regression from: commit a80239ede3236c84d7a05d0fbc0f299811fee6c0 Author: Khaled Hosny <khaled@aliftype.com> Date: Sat Nov 19 03:03:15 2022 +0200 vcl: move creating DWFontFace to WinFontFace Change-Id: Ifba947d8908a37972d723028258500b10ec24cd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142982 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-19vcl: use std::optional in PhysicalFontFaceKhaled Hosny
Otherwise when a font does not, say, support variations or color palettes, we keep querying the font each time they are requested. Change-Id: I3a41bc73dd814b25af3a8b5b009632ecf7ef27ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142963 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-19vcl: add WinFontFace::GetVariations()Khaled Hosny
This makes font variation settings to be applied to glyph advances and text layout, not only glyph shapes. The sw-extra.h file is needed because we target Windows 7 and the interfaces we want to use are only exposed for Windows 10. File copied from: https://hg.mozilla.org/mozilla-central/file/704f09a557a4dfc9057f1672b711789f64f74a82/gfx/2d/dw-extra.h Change-Id: I7bbb4c3f2b70274754f844fedb0c4329c8f649a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142347 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-19vcl: make WinFontFace finalKhaled Hosny
Change-Id: Ie64c155c8dc4d2a4819d4f60999cbb8355687d86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142958 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-19vcl: move creating DWFontFace to WinFontFaceKhaled Hosny
Change-Id: Ie0e94787d962eaec7753ae50d548ad8655dbc209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142957 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-19vcl: move creating DWriteFactory to a centeral placeKhaled Hosny
We already have code in two places to create it, and I will need it in yet another place. Change-Id: I12dee85347a3894045c345b0ec9d5e02c493c218 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142956 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-19vcl: remove unused D2DWriteTextOutRenderer codeKhaled Hosny
Change-Id: I873d13e3a230c2679daea2080a102d89003c90c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142955 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-12vcl: remove unused WinFontFace() private membersKhaled Hosny
Change-Id: I0f7f9f03064a63f7c27346fd679e4cb436633cd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142638 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-09give main thread on Windows a nameNoel Grandin
to make it easier to find in profilers and debuggers Change-Id: I8ce3ee0b89ca8498683367c2b39176edc571137b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-01Fix ambiguous member lookup (clang-cl)Stephan Bergmann
> vcl/win/gdi/salbmp.cxx(179,9): error: member 'getSystemDependentData' found in multiple base classes of different types > getSystemDependentData<SystemDependentData_GdiPlusBitmap>()); > ^ > vcl/inc\salbmp.hxx(138,24): note: member found by ambiguous name lookup > std::shared_ptr<T> getSystemDependentData() const > ^ > include\basegfx/utils/systemdependentdata.hxx(107,39): note: member found by ambiguous name lookup > SystemDependentData_SharedPtr getSystemDependentData(size_t hash_code) const; > ^ > vcl/win/gdi/salbmp.cxx(217,9): error: member 'addOrReplaceSystemDependentData' found in multiple base classes of different types > addOrReplaceSystemDependentData<SystemDependentData_GdiPlusBitmap>( > ^ > vcl/inc\salbmp.hxx(147,24): note: member found by ambiguous name lookup > std::shared_ptr<T> addOrReplaceSystemDependentData(Args&&... args) const > ^ > include\basegfx/utils/systemdependentdata.hxx(106,14): note: member found by ambiguous name lookup > void addOrReplaceSystemDependentData(SystemDependentData_SharedPtr& rData); > ^ Change-Id: I8b8d034e4e3a0bcd4462f3b28246b219632960ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142089 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-18Move access to SystemDependentDataHolder to Bitmap (2)Armin Le Grand (allotropia)
I was too positive thinking that SalBitmap would be fine, but it's locked to vcl. To be able to add system-dependent BitmapBuffering I move the access to Bitmap now. This is no functional change, but offers the same access as e.g. B2DPolygon/B2DPolyPolygon offer already. Also cleaned up usage/access to SystemDependentDataManager which removes quite some code in constructors and makes things easier in general. Change-Id: I2baa40a12479fab0fe66063a018f058c6b8f5597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141507 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-10-17Move access to SystemDependentDataHolder to SalBitmapArmin Le Grand (allotropia)
To be able to buffer BitmapData which is created based on Bitmap class data, move the access to basegfx::SystemDependentDataHolder from classes where it was used until now (WinSalBitmap and SvpSalBitmap) up to SalBitmap which is accessible outside vcl. This is a reorder plus a virtual access method to detect/access that helper layer, no functional change. It will be needed for system-dependent renderers when they want to use that standard buffering e.g. already used in the headless & windows backends. Change-Id: Ib30e7b98e722b977bb0c87ad253e3ffc1841e87e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141456 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-10-13tdf#120326: properly prevent Windows from entering power savingMike Kaganski
The previous call to SystemParametersInfoW with SPI_SETSCREENSAVEACTIVE only prevented screen saver from running (which is not often used these days), but screen was still turned off (and power saving was started). Despite SetThreadExecutionState documentation [1] claims that it does not stop the screen saver from executing, my experiments show that it does (on my Windows 10). So just use it, because it is designed exactly for this task (documentation discusses the presentation applications). [1] https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate Change-Id: I6eced8f0a7c17211a0b68851a40227eed9a22b1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141289 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-01vcl: Use PhysicalFontFace::GetRawFontData() for font embeddingKhaled Hosny
Change-Id: I6f7c4508f7cef022eaf65a998cb242078d3771c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140826 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-17tdf#143148 use pragma once instead of include guardsU-LAPTOP-06BFT6KB\Client
Change-Id: I413382bfe1edc9c9827af338cfbbd17262e839ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140083 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>