summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-10-18tdf#143148 Use pragma once in vcl/source/editHemant Kumar Singh
Change-Id: I62be40614baf489433a53f19397737031d1f217b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141509 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-10-18xs:short->xs:intCaolán McNamara
Change-Id: Ie725e9eb523097ee6a5e159e45c29e0f16a72fcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141474 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-17vcl: extract variable and rename Animation::mnPos to mnFrameIndexChris Sherlock
Change-Id: I889a33718da0984bd9230a9b93fe90403272888b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76415 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-10-17vcl: extract Animation function PopulateRenderers()Chris Sherlock
Change-Id: I6e490d13ee23faf4536c930264f71354382a08d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76410 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-10-15tdf#151522 add Accessibility::HighContrastCaolán McNamara
0 Automatic, do what the system says 1 Disable 2 Enable Forcing Disable/Enable won't have (much of) an effect on the widgetry, but will affect how document content is rendered where typically content color is mapped to fore/back ground color. Change-Id: I71a2dcf8bc334080414a01691f942a5b7de7b84a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139753 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-15tdf#151522 drop Accessibility::AutoDetectSystemHCCaolán McNamara
which doesn't preclude having a different option to force it on/off against the system HighContrast mode setting. Change-Id: Iab9f7f501ac5fd7bb865d07b30b6fad9f1f6809c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141386 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-15ofz: bump sc-rtf and html max lengthsCaolán McNamara
Change-Id: Idd605931d7637d2fc4d1ca878c4ddc6eca9af87b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141419 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-15tdf#123234: Fix subsetting CFF deprecated endcharKhaled Hosny
Type 2 “endchar” operator can take 4 extra arguments and act like Type 1 “seac” operator. Although this is documented as deprecated, the fonts in the bug report use it. Detect the presence of the extra arguments and output a “seac” operator for them. Change-Id: Ic24ec8fda586c82612f0cc13f2f31585d40ad9c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139908 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-15vcl: test generating ellipsesChris Sherlock
Change-Id: Ic985bd9bbee4319243c01fff6dffa46e860581a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-14vcl: Remove recently unused GetMirroredChar()Khaled Hosny
Unused since: commit 69e9925ded584113e52f84ef0ed7c224079fa061 Author: Kevin Suo <suokunlong@126.com> Date: Tue Oct 11 10:04:16 2022 +0800 sdext.pdfimport: resolves tdf#104597: RTL script text runs are reversed Change-Id: I0d144d326a4f947a3453fdfb05fccb32a1e6e24e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141384 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-14ofz#51830 TimeoutCaolán McNamara
Change-Id: I934db0f86b118d4bb7876f162060ef75595fcef7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141376 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-14ofz#52353 Out-of-memory with ultrathick linesCaolán McNamara
Change-Id: Id907795a0e8f7646462edd510dfbc62ad2c26617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141368 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-14tdf#143148: Use pragma once instead of include guardsEmmanuel Peter
Change-Id: Idf9f5b604bc60d7f1bacdd0001ce252aaeb7835a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141334 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-10-14Resolves: tdf#151468 honour tiff resolution fieldsCaolán McNamara
Change-Id: I57d996f49c6ae7e60991ff53eae867144b56d89d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141345 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-14ofz#52337 Direct-leakCaolán McNamara
cairo starts leaking things when a surface is in an error state Change-Id: I0be0d9f8e3c8938073cec1aa765ab82826ceb6d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141335 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-14vcl: followup 'vcl: extract function CreateAnimationDataItems'Chris Sherlock
Change-Id: I25d2057477dae952e2ded966cf2f7feedf6d90f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141341 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-10-13tdf#151352 crash closing form while TOTD dialog is displayedNoel Grandin
regression from commit 8d485ec0cd35ee1ae7684f2b6ca96c0f0c6f9dac Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Sat May 29 08:34:28 2021 +0200 IsDisposed->isDisposed in vcl/../window Change-Id: I51889f2451f03797f5b89019e6df32a64acda707 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141292 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-13tdf#150622 use high contrast selection fg/bg colors for text selectionCaolán McNamara
with SettingsForSelection SettingsText -> HighlightTextColor SettingsFill -> HighlightColor SettingsLine -> HighlightColor Change-Id: Iaac5834ce0f8b3f1b89376711b564773cfd0bfe3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141287 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-13drop newly unused StyleSettings::GetFontColorCaolán McNamara
Change-Id: Icd20283207e9ac0392d11d74553d7c607330dbe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140895 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-13tdf#151385 Only trigger mnemonics in dialogs when alt key is pressedSamuel Mehrbrodt
Change-Id: I884afad38c64bd53fe4917418ed627f9c0674554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141022 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-10-12use WindowTextColor as the fg for high contrastCaolán McNamara
No platform sets TextColor away from its default of black and we're using WindowColor as the bg for high contrast, so we need to use something suitable for use on WindowColor. MSDN docs state COLOR_WINDOWTEXT for HighContrast if using COLOR_WINDOW. Change-Id: Icdd3cf6d76da7eb544f08619717689b44ab1fd38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141247 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-12new uno command uno:Translate with deepl apiMert Tumer
New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140624 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-10-12use unique_ptr for SystemFontList, fix leakNoel Grandin
Using unique_ptr here fixes a leak, which in turn was hiding the fact that we don't manage the lifecycle of CTFontDescriptor in CoreTextFontFace properly Change-Id: I2ade5fae9a40ad0ebb10538488018941f3f285c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140916 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-12vcl: extract function CreateAnimationDataItemsChris Sherlock
Change-Id: Ifc245b570d82d2fcbcd2cbb83cbd43664b228bf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76409 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-10-12vcl: Animation does not need to be friend of AnimationRendererChris Sherlock
Change-Id: I76441d55d62b63d380417554cd236e7e3cf882e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-10-12only interested in genuinely bizarely thick linesCaolán McNamara
Change-Id: I107a46cc11127910f28977b88152c41e8b6c6467 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141239 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-11loplugin:unreffunStephan Bergmann
...after the last use of that RawFontData got removed in 112d07027c4484dd571519911596d11eae897524 "vcl: Use PhysicalFontFace::GetRawFontData() for font embedding" Change-Id: Id85eb39b6fd946da132d53ba937032f3c58b061d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141225 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-11Don't convert OUString to char* to get OUString in the endMike Kaganski
Which by the way fixes the mismatch between converting _sAppName to OString as UTF-8 in SplashScreen::SetScreenBitmap, and converting pName to OUString as ASCII in Application::LoadBrandBitmap. Change-Id: I2082f92693ca9633b64411dd668befaa30e978d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141202 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-11loplugin:loopvartoosmallStephan Bergmann
> /Users/stephan/lo/core/vcl/quartz/ctfonts.cxx:255:33: error: loop index type 'unsigned int' is narrower than length type 'CFIndex' (aka 'long') [loplugin:loopvartoosmall] > for (auto i = 0u; i < nTags; i++) > ~~^~~~~~~ (and whatever the motivation in d7083fe6dd383ac4144fbe53e300bc3d34f26ef6 "tdf#72456: Support font embedding on macOS" to use an unsigned 0u here) Change-Id: I6a96dd2b2146c27d68a8a53daf3c2fe1f744738d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141201 Reviewed-by: خالد حسني <khaled@aliftype.com> Tested-by: Jenkins
2022-10-09vcl: pAnimView to pRenderer (clarify variable name)Chris Sherlock
Change-Id: I909aa5f3b2dd1c62d4fb1f8eb3ea0f5a2e4d7ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136434 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins
2022-10-09ofz#51852 Out-of-memoryCaolán McNamara
Change-Id: I945bb7d7ed90e8f5f4c085b4527f1ec7a4c08eae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141126 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-08tdf#124672 for hicontrast white/black bg select either Sifr vs Sifr DarkCaolán McNamara
Change-Id: I63d789d90bfad9fe57ceee2011797f611a2ac8cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141091 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-08tdf#151387 Fix regression cause by tdf#149279Jim Raykowski
The gtk_tree_view_expand_to_path function not only expands all parent rows of path as necessary but also expands the children of the row of the path. This explains the difference seen between gtk3inst and salinst when a collapsed row is scrolled to. gtk3inst expands the collapsed row, salinst does not. The enhancement patch for tdf#149279 removed the gtk_tree_view_expand_to_path function from gtk_tree_view_scroll_to_row. This caused a regression in the styles tree. To fix the regression this patch reverts the removed gtk_tree_view_expand_to_path functions. To make the enhancement patch behave the same for gtk3 and sal, the scroll to row is collapsed after scrolling if that was it's state before. Change-Id: I3c3975a3f258c6c432eb866a1c712299e2faf5be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141048 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-10-07Related: tdf#98067 get high contrast hover/default button text color rightCaolán McNamara
Normal and high contrast themes seem to behave differently (in Windows 10) to play more directly with themes than the usual ui try: Press Windows Key + R and paste: shell:::{ED834ED6-4B5A-4bfe-8F11-A626DCB6A921} -Microsoft.Personalization\pageColorization High Contrast themes seem different to the others, with a high contrast theme set then its possible to customize the colors, otherwise not. Playing with 'Selected Text' it seems that this is the color used for the active/hover button text color with a high contrast theme. Change-Id: I561616fce6a6f6d781e4881bfdf8ba0abedcd75c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141051 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-07Related: tdf#98067 do RollOver for Edit as well as SpinButtonCaolán McNamara
Change-Id: I058cc965a9b0d85e5491191e2ac712c01f700043 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141086 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-07Related: tdf#98067 use EP_EDITBORDER_NOSCROLL for EditsCaolán McNamara
which gives a border which indicates if the Edit has focus or not. In High Contrast Black this is a bright yellow and I see it in notepad and visual studio, so lets do that too. MultilineEdit left alone for now Change-Id: I6785e3cdef7d563509a3a6ea8617ab5f89602a6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141085 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-07vcl: test OutputDevice::GetTextBreak()Chris Sherlock
Change-Id: I1618d268ca7495d4aae1bde1a43be6bcf8811869 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140630 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-10-07tdf#98067 get menu readable in windows high contrast modeCaolán McNamara
possibly a problem since: commit 9c5a22d19708eae17ad9880422bd03e81ea48c5d Date: Thu Jun 21 17:55:53 2012 +0200 aero toolbar: Extend the drawing of the toolbar to the menubar area. Change-Id: If76be9bf09a19992dafedf16d7e577acf1bc500d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141034 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-06Fix typoAndrea Gelmini
Change-Id: I9bbb8b60a7056832a6526ec1f6bb9a81736381b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141030 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-10-06gtk4: need a SolarMutexGuard hereCaolán McNamara
Change-Id: Ia63e1d9f0c53df37f76a4125639084753b5e010c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141020 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-06Related: tdf#150706 don't warn about already enabled LISTBOX_FILTER_LABELCaolán McNamara
Change-Id: I31173693145d4121735c93f2a72126e743bd0c2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141010 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-06Related: tdf#150706 don't warn about missing LISTBOX_FILTER_LABELCaolán McNamara
which is not unexpected for gtk where we don't use that label Change-Id: Ieed1a6498cc9f40cbf6546f996f723ec9cd3aba9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141005 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-06Related: tdf#150706 add OK and CANCEL to known controlsCaolán McNamara
which results that we can rename "Save" to "Export" in pdf export dialog Change-Id: I8186a9ea3d18bfb383b07ba54f2fd7a5cd71e7b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141004 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-06pdfium: drop not needed annot.patch.1Miklos Vajna
If FORM_OnAfterLoadPage() is called, then FPDFAnnot_GetFontSize() can do what we need. Change-Id: I8aa3acbbda5c040f30b28db36f8b3332115b50e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140997 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-10-05tdf#151350: Fix extraneous gaps before marksKhaled Hosny
After latest changes we no longer need HarfBuzz buffer level MONOTONE_CHARACTERS (which was needed to allow us to address individual combining marks). With the default cluster level, combining marks get the same cluster as their base and so we need not do any thing special. I had to update testTdf139627 because this results in using ActualText spans in the PDF, and PDFium support for them is lacking. Change-Id: I0011072330fdbf409c30ff781fd3beaceae400f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140994 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-05Resolves: tdf#151351 rework flat button renderingCaolán McNamara
Change-Id: Idf98c5bb96e5646e25b1ccd70b3774c7de479d18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140979 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-05Related: tdf#151351 kf5 pressed flat toggle buttons not visually depressedCaolán McNamara
Change-Id: I3ab2ec91f3317dbd5a7e011e5b81d0a5141b1348 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140978 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>