Age | Commit message (Collapse) | Author |
|
Starting in macOS Sonoma, a warning is printed at launch that complains
that -[NSApplicationDelegate applicationSupportsSecureRestorableState:]
is not implemented so implement that selector.
Change-Id: Idfb62c271af5256270361efdd458f2ef9ea4c40b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173882
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
|
|
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
|
|
...(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>
|
|
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>
|
|
The Windows implementation of the SalFrame::EndExtTextInput() method commits or discards the native input method session. It appears that most macOS applications discard the uncommitted text when cancelling a session so always commit the uncommitted text. This change also commits any uncommitted text and cancels the native input method session whenever a window loses focus like in Safari, Firefox, and Excel.
Note: if there is any marked text, SalEvent::EndExtTextInput may leave the cursor hidden so commit the marked range to force the cursor to be visible.
Dispatching SalEvent::EndExtTextInput in SalFrame::EndExtTextInput() creates some other related native input method handling bugs that have also been fixed in this patch:
- Whenever a SalEvent::EndExtTextInput event is dispatched, cancel the native input method session so that the native input context's state is in sync with LibreOffice's internal state. The only exceptions are in [SalFrameView insertText:replacementRange:] or [SalFrameView setMarkedText:selectedRange:replacementRange:] because when these two selectors commit text, the native input method session has already been cancelled and calling [SalFrameView endExtTextInput] will cause repeated text insertions from the native macOS Character Viewer dialog to overwrite previous insertions.
- Highlight all characters in the selected range. Normally uncommitted text is underlined but when an item is selected in the native input method popup or selecting a subblock of uncommitted text using the left or right arrow keys, the selection range is set and the selected range is either highlighted like in Excel or is bold underlined like in Safari. Highlighting the selected range was chosen because highlighting was used in LibreOffice 7.4.x and using bold and double underlines can get clipped making the selection range indistinguishable from the rest of the uncommitted text.
- The fix for ooo#106901 always returns a zero length range if [self markedRange] called outside of mbInKeyInput. If a zero length range is returned, macOS won't call [self firstRectForCharacterRange:actualRange:] for any newly appended uncommitted text and the native input method popup will appear in the bottom left corner of the screen. So, [self markedRange] now returns the marked range if is valid.
- Commit uncommitted text before dispatching menu item selections and key shortcuts. In certain cases such as selecting the Insert > Comment menu item or pressing Command-Option-C in a Writer document while there is uncommitted text will call AquaSalFrame::EndExtTextInput() which will dispatch a SalEvent::EndExtTextInput event. Writer's handler for that event will delete the uncommitted text and then insert the committed text but LibreOffice will crash when deleting the uncommitted text because deletion of the text also removes and deletes the newly inserted comment.
Change-Id: I4ff4682aeef7d42ce26059aa76f971a68128833c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143619
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I2273d79d2703ebd7a021bdca1737f5fb9fa9bc32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143284
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I9004aaef7b2d526ad99b316b78733671a785c847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124328
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I881627313221081f72f8421c91417e4c111cfd97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123708
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ic43e02576454e3ee174304db350659dd113a1d5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idb183e0ee9cccf0e4da16ff984ccf9b57eea0f9e
Reviewed-on: https://gerrit.libreoffice.org/77273
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
This restores the nested NSApplicationMain and default run loop
usage. Without it the Java AWT integration will start its own
event loop, effectively blocking any non-system event processing.
Reproducible via "Tools - Macros - Organize Macros - BeanShell...
- LibreOffice Macros - HelloWorld - helloworld.bsh - Edit".
The blocking can be prevented by overriding NSApplication::run and
running our own event loop using Application::Execute. But this
still doesn't show the Java AWT editor window and I couldn't find
any information how to fix this.
Since OSX now is a VCL plugin, this can't restore the old hook
mechanism, but instead adds a new function to SalInstance.
SalInstance initialization happens at InitVCL() start just a
little bit later in the call stack.
Somehow NSApplicationMain manages to run the Java VM in an extra
thread, so it doesn't block the main loop. Probably this could
also be handled by LO starting the JVM as a thread.
Further information for an implementation eventually can be found
in the "Technical Note TN2147" "JNI Development on Mac OS X."
Change-Id: I04a0c2bf7949571f1b678ada9ab3592e0fe30c1f
Regression-from: 925e2edb6f3f8fffcff9eddb31ed18bc77e2a690
Reviewed-on: https://gerrit.libreoffice.org/65836
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Setting an undefined property is a hard error, even though we check for
the property first. Using message notation instead reduces this to a
warning, and allows the build to continue on systems without
allowsAutomaticWindowTabbing.
Change-Id: I572d8900fdeca16c733d541084d64385891733c1
Reviewed-on: https://gerrit.libreoffice.org/63526
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
|
|
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Allows to drop all the special SVMain handling introduced for
MacOSX. This way LO can also be build via SSH, because gengal
won't abort / fail because of the missing window system.
Currently this just implements the global menu. I don't know
what else is missing. Eventually we want to reimplement the
Cocoa debug option forwarding (NSAccessibilityDebugLogLevel).
Change-Id: I359c46fd03e2436a8a37fd211e59e4e305f8aba0
Reviewed-on: https://gerrit.libreoffice.org/60571
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Instead, never participate in the macOS system full-screen mode. There
is just too much complexity involved, and the way LibreOffice works
really isn't prepared for the concept of windows having the option
from a system point of view to being full-screenable or not.
This means that the green bubble in window title bars changes from
being a (system) full-screen toggle to being a maximize/restore
toggle. Sure, the "maximize" concept also probably can be confused
with LibreOffice's own full-screen concept.
For instance, the Start Centre window is not expecting to be made
full-screen. Still, when you from the Start Centre open a Writer
document, it is the *same* window that is re-used as the Writer
window, and then suddenly should be prepared to handle going
full-screen.
Also, it is up to each separate kind of document window whether it can
be made full-screen (from the LibreOffice point of view) or not.
Writer windows can, but Impress windows can't, for example. The
View>Full Screen menu entry is added separately each case.
Maybe I will come back to this mess later, or not. Anybody else is
welcome to have a go, too, of course.
This reverts commit 4b42fd7e9516fbbd8a92d97680524f32dd260fb2.
Change-Id: I6983481cbd30c0e5190c450483b1246006c80632
Reviewed-on: https://gerrit.libreoffice.org/55049
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
|
|
Sure, it is just a workaround, but a very effective workaround.
Change-Id: Id0daff048a27dae5cf8fb5e0e949c5b21e03fc86
Reviewed-on: https://gerrit.libreoffice.org/54924
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Cmd-W works just fine without any special handling at this low level,
as far as I can see.
Change-Id: Ib00964553984b7aeec89d9fab9fc425c08de910a
Reviewed-on: https://gerrit.libreoffice.org/54917
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Can happen at least when LibreOffice is started from the command line
using the 'open' command line and passed a file name.
Change-Id: I93145974a56e124550579cae8fd69ccb4a7d3bda
Reviewed-on: https://gerrit.libreoffice.org/54758
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Also tdf#76476, and probably more.
Make it so that when a window is in full-screen mode from
LibreOffice's point of view, it is also full-screen from the system's
point of view, and vice versa.
All three ways to enter and leave full-screen mode can now be used
with the same end result: The Ctrl-Cmd-F shortcut, the "View > Full
Screen" menu entry, and the green bubble on the title bar.
Don't disable/deactivate/etc menus while in full-screen mode. The menu
auto-hides so there is no harm in having it function normally.
Don't display the floating toolbar with a single "Full Screen" button
in it as the way to leave full-screen mode. Instead, the same three
ways that can be used to enter full-screen mode work to leave it, too.
Sadly I could not figure out a way to set a window properly to
full-screen at the point where a document window is created and set to
be the same size as that kind of document window was the previous time
it was open in LibreOffice. Thus don't save state for full-screen
windows as we can't properly restore them. At least not for macOS. It
is not good to just restore them as non-full-screened but still at the
size they had when full-screen.
One irritating glitch remains, and I was unable to fix that properly:
I now prevent closing the document window that is in full-screen mode.
Otherwise, if it is closed, the full-screen mode remains even if no
window is open there; the desktop is completely black. Moving the
cursor to the top edge, the LibreOffice menu is there, though. I tried
to fix that but with no fully satisfying result. (Some attempts even
lead to crashes, so just disabling closing is better than crashing at
least.)
Change-Id: Id909077ef9de9f19d48c8b9ad10d748a65b2417f
Reviewed-on: https://gerrit.libreoffice.org/54760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Causes the updated aAppEventList to be handled right away, and not
only when the next ten-second timed fires.
Change-Id: Idbcc67f13c8ea69cc08b6c5f832d4461579d5dc6
Reviewed-on: https://gerrit.libreoffice.org/54643
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
... when it's hidden.
Change-Id: I7930afb8124dd552843512cd30bce4d82ade0c70
Reviewed-on: https://gerrit.libreoffice.org/49399
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
|
|
Based on https://codereview.chromium.org/2325313002/
Change-Id: I8838449d57b1d1b010491a405c87645d38199fdf
Reviewed-on: https://gerrit.libreoffice.org/48330
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some
more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More
loplugin:cstylecast"
Change-Id: Iff4877e8a42804c952c48c13332caf0a83c92870
Reviewed-on: https://gerrit.libreoffice.org/48216
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I4382a45dcffb32c7c001ee722ac1deccb2b01c2d
|
|
Replace a lot of duplicated case code with macros.
Some minor constifications of function parameters.
I restrained from shorten the SAL_MSG_* via preprocessor concat,
so a grep will still find the whole names.
Change-Id: If1f2477fc8817b4ae7816e807154e35004bb4da9
Reviewed-on: https://gerrit.libreoffice.org/43531
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: Ia00af1b79ac30ca00345f52a1981d3bfc1620f76
|
|
In the same spirit as the Windows commit
7c52d86f7b05fe7e0178f6d98a12a531b88a32ff.
Change-Id: Ic45803c0715723b6f57c9f6a0c731edd559aa92c
Reviewed-on: https://gerrit.libreoffice.org/42932
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Merges the various SalUserEvent structs and their handling into
a single class. This includes a common SalFrame* hash map, as all
backends use such a map to verify alive SalFrames.
It also reverts the "FIXME: lousy workaround" for i#90083, which
was part of commit d6f7c94e5c27ba02ff5c3229760c9808cc9b5bea.
At least on my current OSX box application based window switching
"just works" "out of the box", even without the code.
Change-Id: I188b567e44fd79c162b2d9cabbd771d1f66c7dc4
Reviewed-on: https://gerrit.libreoffice.org/42845
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: Iaa9c0aea3ea1a239e378bd714ba335f91bb1faf3
Reviewed-on: https://gerrit.libreoffice.org/41194
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
|
|
As all other backends, this runs the LO main loop just via the
OSX main loop.
Change-Id: Ie7562444951e16ff58edcaf6409f32809314c2fa
|
|
ImplImageTree was used outside of VCL which is not consistent with
the name and the header also contains a lot of implementation
detail. This separates the implementation to ImplImageTree and
the public interface and singleton to ImageTree only.
Change-Id: I3a26444f0f6971a6b1d83472e9cef19c93192d3e
Reviewed-on: https://gerrit.libreoffice.org/32134
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
...for now
Change-Id: I64a0a8f6a006d75b6f82d7aae570aef414984a78
|
|
Change-Id: Ie65951d5fd1e155e3d3b36d4725792fb95fb9a52
Reviewed-on: https://gerrit.libreoffice.org/25608
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I4e605e7acfe9d4fe409d32f20880b4c0e85a0ea7
|
|
Change-Id: I77b30f28ae5a6fad360d7cada9acfaa9c324408b
Reviewed-on: https://gerrit.libreoffice.org/22216
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: I90a955eb3e485723bb81e7164edcf60f7b0e94c7
|
|
...which uses the logic already available in VCL's ImplImageTree to locate the
image zip files and find fallbacks for incomplete themes and for localized
images.
Change-Id: Ic1c15fcacb6596a27a2b051093232902202bf472
|
|
Change-Id: Ic3f7fddcea36c18ffe43c4c633d415f596a58cbc
Reviewed-on: https://gerrit.libreoffice.org/19094
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I81990df584255f4a286cd078bcf15917c00ad504
Reviewed-on: https://gerrit.libreoffice.org/17687
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
LibreOffice.app on Mac, eventually call NSApplicationMain()
which never return.. so the sal_detail_deinitialize()
call intented by SAL_IMPLEMENT_MAIN*() is bypassed.
This will attempt to call it, as late as possible in the NSApplication
lifecycle.
Change-Id: I5cb63bfaeafb784a0fee356ff843b332d8e31932
Reviewed-on: https://gerrit.libreoffice.org/15684
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I2051f54b0b031dcab4918c8c187ed434842ffdd4
Reviewed-on: https://gerrit.libreoffice.org/11104
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: Id5c17212031b6710f38413c833c0df2b33f42475
|
|
delaying the initial event prevents complaints from OSX>=10.7's "windows
restore" feature to recur infinitely. Apparently OSX cleans things up for us
just before we get the applicationDidFinishLaunching() callback.
(cherry picked from commit 0f3712ff654c740f3593b9580f34cdfe21ac3250)
Conflicts:
vcl/osx/salinst.cxx
Change-Id: I0f1d59f03ffe4efc7c9a73fa881151fa06af5424
|
|
to AppleRemoteController
having a MainController class in the global namespace of an application with
gazillions of MVC patterns is not a good idea. Renaming it to better match
its scope (i.e. the Apple Remote) cleans this up.
(cherry picked from commit 8ef3836059ca613d125f66e6bad21c83200dadad)
Conflicts:
apple_remote/source/RemoteMainController.m
include/apple_remote/RemoteMainController.h
vcl/inc/osx/saldata.hxx
vcl/osx/saldata.cxx
vcl/osx/salinst.cxx
vcl/osx/vclnsapp.mm
Change-Id: I1f252ac51ef65966a48ee03b2cd3519f98d57383
|
|
(cherry picked from commit 677d987b931c509c4240840c4f21ccad2b518b12)
Conflicts:
vcl/aqua/source/a11y/aqua11ywrapperrow.mm
vcl/inc/aqua/aquavcltypes.h
vcl/inc/quartz/salgdi.h
vcl/osx/DropTarget.cxx
vcl/osx/salframe.cxx
vcl/osx/salinst.cxx
vcl/osx/salmenu.cxx
vcl/osx/vclnsapp.mm
Change-Id: I30d72e7caa1269982d176bc4d3baf604d5e7a84b
|
|
Now with the ATSUI code gone is a good time for some
re-organisation. Get rid of "aqua" in file names and the separate
"coretext" folders. CoreText is all we use now for OS X (and has
always been so for iOS), so no need for a "coretext" folder, we can
keep the CoreText-using code under "quartz". Keep OS X -specific code
in "osx". Ditto for headers.
Keep "Aqua" as part of class names for now, though.
This is also preparation for planned further unification between OS X
and iOS code.
Change-Id: Ic60bd73fea4ab98183e7c8a09c7d3f66b9a34223
|