summaryrefslogtreecommitdiff
path: root/vcl/osx
AgeCommit message (Collapse)Author
2024-07-27tdf#162190 handle Command-wPatrick Luby
On macOS, Command-w should attempt to close the key window. Also, pressing Command-m would fail to close the key window due to the same cause as tdf#162010 if the resulting key event was an input method event. Change-Id: I0d90547d7a0833bcc18b36f6d888e1065e91ec57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171086 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins
2024-07-24tdf#162010 match based on key equivalent instead of key eventPatrick Luby
The original fix for tdf#49853 only looked worked in the case when both a key shortcut was pressed and the resulting key event was not an input method event. If either of these conditions weren't true, tdf#49853 would still occur. Since we know which menu item is being triggered, check if this menu item's key equivalent has been set to one of the edit actions. This change basically expands the fix for tdf#49853 to include all cases that trigger a menu item, not just simple key events. Also, the fix for tdf#126638 would also fail when a key shortcut was pressed in a modal window if the resulting key event was an input method event. Change-Id: Iaa2e06affe0e347380a383755684568fcdc26b9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170908 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-07-18tdf#155447 macOS a11y: Report accessibilityIdentifierMichael Weghorn
Implement `accessibilityIdentifier` [1] for macOS/NSAccessibility by retrieving the accessible ID via `XAccessibleContext2::getAccessibleId` if that interface is implemented. This is the macOS equivalent of commit c64b823b74cbd3063d6e87643bd68ea5343b2f54 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Jul 16 13:57:41 2024 +0200 tdf#155447 qt a11y: Report accessible ID [1] https://developer.apple.com/documentation/appkit/nsaccessibilityprotocol/1527792-accessibilityidentifier Change-Id: I43c40f5309467ddb00911297fadb6716500c2dcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170624 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17Use IsRunningUnitTest / IsRunningUITest consistentlyMike Kaganski
The functions are moved to o3tl as inline functions. Change-Id: Ief7d7e292ef15e055ad04ab5707e5e6a2a05b916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170636 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-16use generic clipboard when running UI testsNoel Grandin
rather than the system clipboard, which makes no sense, since then the tests interfere with each other Change-Id: I911e88f5547dfc4f3558b9ed3ef670cef4903420 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170574 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-12tdf#67943 tabs must have radio button role and tab button subrolePatrick Luby
Also, reimplement -[AquaA11yWrapper tabsAttribute] to return children for tab bars. This will cause VoiceOver to announce that the currently selected tab is "X of Y" tabs in the tab bar. Change-Id: I2c3b890fd445c22842b90d60170a71e4e8aa91ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170389 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-10tdf#160427 native menu changes can only be done on the main threadPatrick Luby
Change-Id: I7dbe9913eaa087e143acb95bdae625c69888c3dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170308 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins
2024-07-05Related tdf#161461: break out of loop once data flavor is setPeter Hagen
Change-Id: I37126d2d77a7a80168bd5ab08fa26e8eabfa22cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170055 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-06-25tdf#159175 Do not allocate a CGLayer for each NSWindow when using SkiaPatrick Luby
Skia surfaces can be copied directly to an NSWindow's CGContextRef so disable allocation of a CGLayer for each NSWindow to significantly reduce memory usage when Skia is enabled. Change-Id: I8e3001e4f2ae8dd36156c06db68447c6b1bc67df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169242 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-06-20tdf#161461 stop crashing by retaining NSStringPatrick Luby
OUStringToNSString() returns an autoreleased NSString so it needs to be retained for the life of maOfficeOnlyTypes. Change-Id: Ic3777f818b7cada8e88e97965531fc0a7f2e825c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169284 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-05-31Fix some macOS memory leaks due to overretaining Objective-C objectsPatrick Luby
Change-Id: If826476ad6c6692d22519f4eb0fb45621240fdbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168271 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-31loplugin:fakeboolStephan Bergmann
Change-Id: Ifbb27bf3486a88621f5ca125845e603f9e3925a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168245 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
2024-05-31loplugin:rangedforcopyStephan Bergmann
Change-Id: I743695dde8928e1a742006518e7d6374087d5cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168244 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-05-26Related tdf#158914: fix memory leaks by calling (auto)release selectorsPatrick Luby
Found the following memory leaks using Xcode's Instruments application: 1. Posting an NSAccessibilityUIElementDestroyedNotification notification causes [ AquaA11yWrapper isAccessibilityElement ] to be called on the object so mark the object as disposed before posting the destroyed notification and test for disposed in all of the standard NSAccessibility selectors to prevent any calls to likely disposed C++ accessibility objects. 2. In [ AquaA11yWrapper accessibilityHitTest: ], [ AquaA11yFactory wrapperForAccessibleContext: ] already retains the returned object so retaining it until the next call to this selector can lead to a memory leak when dragging selected cells in Calc to a new location. So autorelease the object so that transient objects stay alive but not past the next clearing of the autorelease pool. 3. [ AquaA11ySelectionWrapper selectedChildrenAttributeForElement: ] is expected to return an autoreleased object. 4. [ AquaA11yFactory wrapperForAccessible: ] is not a getter. It expects the caller to release the returned object. 5. CreateNSString() is not a getter. It expects the caller to release the returned string. Change-Id: I824740d7e3851b0c3e31e2c009860aa822c94222 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168034 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-05-08tdf#160767 skip fix for tdf#155266 when the event hasn't changedPatrick Luby
When scrolling in Writer with automatic spellchecking enabled, the current event never changes because the fix for tdf#155266 causes Writer to get stuck in a loop. So, if the current event has not changed since the last pass through this code, skip the fix for tdf#155266. Change-Id: I97265a7698756c5fb65b6686f6bb77c1caa08862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167298 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins
2024-04-30tdf#130678 draw SVG icons at Retina resolution on macOSPatrick Luby
Also, change the default icon theme on macOS to SVG now that SVG icons support Retina display resolution and the existing PNG icon themes do not. Change-Id: I8c86c316b0db005661759c132ecf7e8667cf30bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166867 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins
2024-04-24[API CHANGE] a11y: Use XAccessible for relation targetsMichael Weghorn
Use a Sequence of XAccessible rather than its base interface XInterface for AccessibleRelation's TargetSet. As the targets are accessible objects as well, anything other than XAccessible doesn't make much sense. Using XAccessible right away makes that clearer and avoids the need to query the XAccessible interface. (The winaccessibility bridge was already using `static_cast`, relying on the fact that the objects are XAccessibles.) The a11y UNO API is not published, so an API change should be unproblematic. Change-Id: I7f08e98d1ec303d5343d9a7954187cdd71495ebc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166586 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-04-17Drop FRound, and use generalized basegfx::froundMike Kaganski
Change-Id: I7447e649dc3ef4e51242f69c7486a3e84e103d2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166159 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-21Drop C/C++ DEBUG macroStephan Bergmann
...(that was defined iff OSL_DEBUG_LEVEL >= 2) and replace its uses with OSL_DEBUG_LEVEL directly Change-Id: I807c15a02cc8ced9852287df0afb4808761d19d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165067 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-24tdf#158124 KEY_DELETE events do not need an ExtTextInput eventPatrick Luby
When using various Japanese input methods, the last event will be a repeating key down event with a single delete character while the Backspace key, Delete key, or Fn-Delete keys are pressed. These key events are now ignored since setting mbTextInputWantsNonRepeatKeyDown to YES for these events will trigger an assert or crash when saving a .docx document. Change-Id: If3762fcf41aa82bf4aa5dc7d1f15c1d282c86f99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163875 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-02-23loplugin:fakeboolStephan Bergmann
Change-Id: I7c33373dab95431b2b9df4565314d64a414375aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163850 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@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-19tdf#126638 dispatch key shortcut events to modal windowsPatrick Luby
While commit 4f907fbe52749265ba4eb7c40ed187b453bb1de9 fixed tdf#126638, it caused the "disallowed action" beep. Some modal windows, such as the native Open and Save dialogs, return NO from -[NSWindow performKeyEquivalent:]. Fortunately, the main menu's -[NSMenu performKeyEquivalent:] is then called so we can catch and redirect any modal window's key shortcut events without triggering the modal window's "disallowed action" beep. Change-Id: Ib1fff68ab159361ceb847881e3a4da4736a33f51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163605 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-02-18tdf#126638 dispatch key shortcut events to modal windowsPatrick Luby
Some modal windows, such as the native Open and Save dialogs, ignore any key shortcut events so use the same existing special dispatching code that -[VCL_NSApplication sendEvent:] uses to dispatch key shortcuts to non-modal, non-LibreOffice windows. Also, disable all menu items when displaying modal windows. For some unknown reason, key shortcuts are dispatched to the main menu instead of the modal window so enable the "autoenabledItems" property instances so that -[SalNSMenuItem validateMenuItem:] will be called before handling a key shortcut and the menu item can be temporarily disabled if a modal window is displayed. Change-Id: I6c06024dd6ed05a4ee83f2b37e29c555b52ef555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163527 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 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-12-27tdf#144124 Detect if ownership has been lostPatrick Luby
The shortcut assumes that lost ownership notifications from the system clipboard will happen elsewhere. They do under normal conditions, but do not when some clipboard managers are running. So, explicitly check ownership to catch such cases. Change-Id: If54ca8c9908650c23c348e08231820ee7c2483e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161337 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-12-26Fix typoAndrea Gelmini
Change-Id: I325079efc51bbefb7612403e4800ca5320b49cec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161334 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-26tdf#135478 Reduce sensitivity of horizontal scrollwheelPatrick Luby
Problem: at least on macOS, swipe events are very precise. So, when swiping at a slight angle off of vertical, swipe events will include a small amount of horizontal movement. Since horizontal swipe units are measured in cell widths, these small amounts of horizontal movement results in shifting many columns to the right or left while swiping almost vertically. So my hacky fix is to reduce the amount of horizontal swipe events to roughly match the "visual distance" of vertical swipe events. The reduction factor is arbitrary but is set to roughly the ratio of default cell width divided by default cell height. This hacky fix isn't a perfect fix, but hopefully it reduces the amount of unexpected horizontal shifting while swiping vertically to a tolerable amount for most users. Note: the potential downside of doing this is that some users might find horizontal swiping to be slower than they are used to. If that becomes an issue for enough users, the reduction factor may need to be lowered to find a good balance point. Lastly, fix the unbalanced rounding of delta X and Y values due to using floor() for macOS native swipe and scroll wheel events. Change-Id: I8c0c9a3aa688e411c47ebb5e7500f3a50f6f673b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161278 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-12-26tdf#151679 Do not push FLAVOR_LINK to macOS general pasteboardPatrick Luby
When copying text from a Writer document and the FLAVOR_LINK flavor is pasted, Writer will edit the copied text in order to create a bookmark for DDE. The problem is that many macOS clipboard managers fetch *all* available flavors that are available in the macOS general pasteboard instead of just one flavor and this triggers the FLAVOR_LINK flavor's unusual editing behavor in Writer every time the user copies Writer text. Users have reported in tdf#1515679 that on macOS, Microsoft Writer, Excel, and PowerPoint do not recognize this flavor like is done on Windows so, in theory, we can just filter out this flavor when adding flavors to the macOS general pasteboard. With this change, the FLAVOR_LINK flavor will still be visible when copying and pasting within a single LibreOffice instance as well as when dragging from LibreOffice to other applications. Change-Id: Ia391398286fa8795ac65b4702a15caf59fb3ae70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161305 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-12-20Related: tdf#155266 stop delaying painting timer while swipingPatrick Luby
After fixing several flushing issues in tdf#155266, scrollbars still will not redraw until swiping has ended or paused when using Skia/Raster or Skia disabled. So, stop the delay by only including NSEventMaskScrollWheel if the current event type is not NSEventTypeScrollWheel. Change-Id: I9348e5a38b4d0fedbf424b92a71eed25280fc21f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161075 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-12-09tdf#158461 eliminate flicker during live resizingPatrick Luby
When using Skia/Metal, the window content will flicker while live resizing a window if we don't send a paint event. Change-Id: Ib3edc497e26e6abfdfd17a34f9269a3eae090805 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160519 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-12-08Revert "Related: tdf#155266 force flush after drawing native scrollbars"libreoffice-24-2-branch-pointPatrick Luby
This reverts commit 5ff701226b00963312cb2a78e77966d012b79c82. Reason for revert: Tester reports no change in behavior after the commit. Change-Id: Ic6d9f4834c7c6e3fae34d132298b335f433df280 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160470 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-12-07Related: tdf#155266 force flush after drawing native scrollbarsPatrick Luby
When scrolling on some Intel Macs either via dragging the scrollbar thumb or via swiping the trackpad with two fingers, final repaint of scrollbars doesn't appear to get flushed to the screen. It appears that scrollbars aren't updated and repainted until after a batch of native scroll events have been dispatched. On slower machines, this lag is long enough that any pending forced flushes have already been done so when the timer that repaints scrollbars finally fires, the repainted scrollbars won't get flushed to the native window until the next normal flush which may not occur until seconds later. Change-Id: Iadef6812cd2495a28347560caae81f604c908b51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160440 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-12-06Related: tdf#155266 skip redisplay of the view when forcing flushPatrick Luby
It appears that calling -[NSView display] overwhelms some Intel Macs so only flush the graphics and skip immediate redisplay of the view. Change-Id: I7a94a1ada35526c5eda1b793f872e206b4c833ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160399 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-11-30Related: tdf#155092 translate Y coordinate for height differencesPatrick Luby
When in live resize, the NSView's height may have changed before the CGLayer has been resized. This causes the CGLayer's content to be drawn just above or below the top left corner of the view so translate the Y coordinate by any difference between the NSView's height and the CGLayer's height. Change-Id: Iac13fa8374977e098f8311c55e182ef5a5ebec30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160131 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-11-27tdf#155092 don't dispatch left mouse up events during live resizingPatrick Luby
Round 2 of trying to fix macOS live resizing. If this is a left mouse up event, dispatching this event will trigger tdf#155092 to occur in the next mouse down event. So do not dispatch this event and push it back onto the front of the event queue so no more events will be dispatched until live resizing ends. Surprisingly, live resizing appears to end in the next mouse down event. Also, reverted parts of commit 54da842381ccb554d3cadc876f23cf183d21bf1a and cleaned up the setting of ImplGetSVData()->mpWinData->mbIsLiveResize. Change-Id: Ie93ed496e1f0e2a1711284ab205c6b245f71647c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159960 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org>
2023-11-23tdf#155092 use tracking areas instead of tracking rectanglesPatrick Luby
Apparently, the older, tracking rectangles selectors cause unexpected window resizing upon the first mouse down after the window has been manually resized so switch to the newer, tracking areas selectors. Also, the NSTrackingInVisibleRect option allows us to create one single tracking area that resizes itself automatically over the lifetime of the view. Note: for some unknown reason, both NSTrackingMouseMoved and NSTrackingAssumeInside are necessary options for this fix to work. Change-Id: I1f771628d872166ff63a52990f671df053d144ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159845 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-19tdf#143148: Use pragma once instead of include guards in vcl/osxTaichi Haradaguchi
Change-Id: I0f6edb1f4ed5310bf0bb7d051852a4c86205431f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159647 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-11-06tdf#155266 force flush after scrollingPatrick Luby
This is the second attempt to force a flush after scrolling. Commit 9c0803edd1f42b2d29115674795c7c674fea1a35 worked on Mac Silicon but not Mac Intel. So, instead of calling [NSApp currentEvent] to determine if scrolling has occurred, mark the AquaSalFrame whenever a scrollwheel or mouse drag event is dispatched so the frame will be flushed in the next AquaSalFrame::Flush() call. Change-Id: I2d0b99d2cd1167e92c7fd89bf53b2f30ab85a165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159003 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-06tdf#155266 revert commit 9c0803edd1f42b2d29115674795c7c674fea1a35Patrick Luby
While commit 9c0803edd1f42b2d29115674795c7c674fea1a35 fixed tdf#155266 on Mac Silicon, it didn't fix that bug on Mac Intel. Change-Id: I4dc9eb3a5da319a0c8f58bcdea5abfc3e4ec4a0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158997 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-06tdf#157518: vcl: add native macOS rendering support for LevelBar controlSarper Akdemir
Uses NSLevelIndicator to render LevelBar control on macOS. Closely follows the existing implementation for ControlType::Progress Change-Id: Ibd38e172b8b6297e6322cfe9d5a1b0a6ef0f0656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158504 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-03tdf#155266 flush when scrolling or draggingPatrick Luby
Delaying flushing until the dispatch level returns to zero causes scrolling via the scrollwheel or mouse drag to appear laggy and jerky. Change-Id: Ib70e7766435baa765dd0d1d704ba2fac87f7fccc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158853 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-03macOS a11y: Drop obsolete TODO to implement spelling error attrMichael Weghorn
Handling for `NSAccessibilityMisspelledTextAttribute` and the newer `NSAccessibilityMarkedMisspelledTextAttribute` [1] has been added in commit db0fa92637a1b2edf26da9917c9dce050ebc8a78 Author: Boris Dušek <me@dusek.me> Date: Sun Aug 11 16:37:48 2013 +0200 fdo#67980 - VoiceOver does not inform about misspelled text and VoiceOver announces misspelled Writer text as such, so drop the obsolete TODO. [1] https://developer.apple.com/documentation/appkit/nsaccessibilitymarkedmisspelledtextattribute Change-Id: Id8ae1ee660e87c06ac7f559b5cdf1b31e22aef90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158840 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-11-01macOS a11y: Don't report (non-)expanded state when not expandableMichael Weghorn
When the a11y object is not expandable, also don't report a true/false value for the expanded state on macOS. Otherwise, the CrossOver screen reader on macOS will explicitly announce "collapsed" for these objects, e.g. when moving focus between paragraphs in Writer (as reported on the a11y mailing list [1]) or between toolbar butons, since `isAccessibilityExpanded` gets called and returns false, so it is assumed that this is an expandable item that is currently not expanded, i.e. it is collapsed. Quoting from the NSAccessibilityProtocol doc [2]: > You can control which accessor methods the assistive app can > use by overriding isAccessibilitySelectorAllowed(_:). > Return true if the assistive app can call the selector; > otherwise, return false." [1] https://listarchives.libreoffice.org/global/accessibility/msg01068.html [2] https://developer.apple.com/documentation/appkit/nsaccessibilityprotocol: Change-Id: Iac9027a598e5793d6bd0da79212d7b07448a4c34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158733 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-29vcl: no raw pointersThorsten Behrens
For ImplJobSetup. Also, check memcmp mem size more properly Change-Id: Idcf20bf1b51bc2508f3d37e018efd18e591a6099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/26648 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-10-28tdf#135586 a11y: Add a new BLOCK_QUOTE a11y roleMichael Weghorn
A block quote role exists in all of WAI-ARIA 1.3 (role "blockquote", [1]), IAccessible2 (`IA2_ROLE_BLOCK_QUOTE`, [2]) and AT-SPI (`ROLE_BLOCK_QUOTE`, [3]). Take over the definition that is the same in WAI-ARIA and IAccessible2: > A section of content that is quoted from another source. The intended use for now is for a Writer paragraph using the "Block Quotation" paragraph style, similar to how the HEADING role is used for paragraphs using a corresponding paragraph style. For gtk3 (ATK) and winaccessibility (IAccessible2), map the new role to the equivalant roles. For macOS and the gtk4 as well as the Qt-based VCL plugins on Linux which currently don't have an equivalent role, fall back to the same role that the PARAGRAPH role is mapped to. This way, the behavior there will remain unchanged once the BLOCK_QUOTE role is used for Writer paragraphs with the corresponding style. In general, treat BLOCK_QUOTE like PARAGRAPH in code applying special handling for the PARAGRAPH role. [1] https://w3c.github.io/aria/#blockquote [2] https://github.com/LinuxA11y/IAccessible2/blob/3d8c7f0b833453f761ded6b12d8be431507bfe0b/api/AccessibleRole.idl#L318 [3] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/7cc4cee53ddbd22631fd110f0e5ce045dec2e411/xml/Accessible.xml#L615-616 Change-Id: I248c183a2e7ec5d6f0a89bf3cb4829bbd8588c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158573 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-27Various -Werror,-Wvla-cxx-extensionStephan Bergmann
...as enabled by default now in recent Clang 18 trunk Change-Id: I59f9bbdf2ce064f170df01e6d7ec2341884ab5e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158563 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20tdf#157565 show tooltip if any parent window is the key windowPatrick Luby
Commit b69db38a38b09e158e8d46d8b717db85860ca874 caused tooltips to fail to appear if their immediate parent window was not the key window. So, look through the parent window's parent windows and, if any of those windows are the kwy window, show the tooltip. Change-Id: Icf1aed1144fdeac03b4b208de8ed8ee2db8ad4a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158212 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-10-14Add NUMBERSIGN key handler.Gökay Şatır
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>