When a window enters LibreOffice's internal full screen mode,
the vcl code will hide the macOS menubar. However, if the
window is also in native full screen mode, macOS will force
the menubar to be visible.
While the vcl code already partially handles this case by
disabling all menu items when in LibreOffice's internal full
screen mode, the problem is that any submenus that were not
displayed before setting the menubar to null will show all
menu items with no title.
A simple way to reproduce this bug is to open a new Writer
or Calc document and do the following:
- Switch the window to LibreOffice's internal full screen
mode by manually selecting the View > Full Screen menu
item (the bug does not occur if its key shortcut is
pressed)
- Switch the window to native full screen mode
- Click on the menubar and note that many of the submenus
are displayed with menu items, but none of the menu items
have a title
So, we need to keep the menubar visible and rely on the vcl
code to disable all menu items.
Change-Id: I97fc63a8cd028c029a71899090185bc09d4aa492
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183508
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Jenkins
UNO commands may optionally rotate or mirror their icons depending on
context (usually based on writing direction). This approach is an easy
way to provide large numbers of such context-sensitive icons, but
suffers from serious drawbacks in certain cases. For example, icons
which contain asymmetrical symbols or text will be obviously mirrored,
and icon themes which use shading will appear inconsistent next to
non-transformed icons from the same theme.
This code change lets icon themes provide specialized graphics for the
left-right-top-bottom text direction. Such specializations are available
for any command which specifies COMMAND_PROPERTY_MIRROR.
Direction-specialized versions should be placed in the `cmd/rltb`
directory within the icon theme.
Localized specializations may also be nested inside that directory. For
example, icons in `cmd/rltb/en` will be used for English in RTL context.
Change-Id: Ic7a8cf3a6657a171e92123413d1c47e621f1bddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182761
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
found by a little plugin I created.
Plugin parked into store/ folder because it needs hand-holding
when run.
Change-Id: I2b4da7378f0becbc5f020ac9e78cd765aa0119b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181768
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Instead of letting the implementations set for
Formatter::m_aInputHdl via Formatter::SetInputHdl
always retrieve the current text and parse
that one, pass the text to convert as a parameter
instead.
Introduce a new struct Formatter::ParseResult
so that both, the state (which describes whether
parsing was successful and/or a handler was set)
and the value can still be returned at the same time.
(Link/The handlers only supports a single param. So far,
the state was returned by the function result and
the value was returned via an out param, but the
single param is now used for an input param to pass the
text.)
Make it the responsibility of Formatter::ImplGetValue
to pass the current text instead of having the handlers
read it themselves.
Rename the members accordingly:
* Formatter::m_aInputHdl -> Formatter:m_aParseTextHdl
* Formatter::SetInputHdl -> Formatter::SetParseTextHdl
This is similar to
Change-Id: I6b3fbccc89b89446a1ea367a80aeed3a7b583298
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Feb 18 20:29:20 2025 +0100
tdf#130857 Let Formatter:m_aOutputHdl convert double to text
(but for the conversion the other way around) and
commit 15ad64a412
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Sat Feb 15 11:22:54 2025 +0100
tdf#130857 weld: Let SpinButton input hdl only parse value from string
(which is a similar change, but in weld::SpinButton).
No change in behavior is intended by this change
by itself.
The primary motivation is to allow reusing the
logic to convert a string to a value in order
to implement QtDoubleSpinBox::valueFromText
for QtInstanceFormattedSpinButton.
Change-Id: If6837409aadbe9cc37fdbb4c0650f5e1305229f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181942
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
So far, the Formatter:m_aOutputHdl output handler set via
Formatter::SetOutputHdl did not receive any parameter
and had the responsibility to set the text based on
the current value, i.e. first retrieve the current
value, then convert it to a text representation, and
then set that text in the formatter.
Change semantics so that the method instead receives
the (double) value to format as a parameter and
returns the formatted string.
Passing the current value as a double and using the
returned string to update the text is now the responsibility
of the only caller, Formatter::ImplSetValue.
Adjust the naming accordingly:
* Formatter:m_aOutputHdl -> Formatter::m_aFormatValueHdl
* Formatter::SetOutputHdl -> Formatter::SetFormatValueHdl
This is similar to the change done elsewhere in
commit 76396a371e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Sat Feb 15 13:44:50 2025 +0100
tdf#130857 weld: Abstract from "input"/"output" SpinButton signals
(and changes referenced from its commit message)
and is one step towards supporting value <-> text
conversion in QtInstanceFormattedSpinButton as well.
No change in behavior is intended by this commit.
Change-Id: I6b3fbccc89b89446a1ea367a80aeed3a7b583298
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181911
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch the param for the out param in Formatter:m_aInputHdl
from sal_Int64* to double* and adjust the methods/Links
that get set via Formatter::SetInputHdl.
Formatter itself otherwise already uses double for its
value (and min/max, etc.), so using double here as well
is consistent with that.
It also matches what SalInstanceSpinButton, one of the
classes that uses Formatter internally does since
Change-Id: I31bc2b95b46bae8174388cddc9a383ed61e6763e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Feb 17 13:10:16 2025 +0100
tdf#130857 Pass double values to/from weld::SpinButton subclasses
Formatter:m_aInputHdl gets used in Formatter::ImplGetValue
to convert text into a number. While Formatter:m_aInputHdl
was returning sal_Int64 so far, that was already converted
to a double value there anyways, depending on the number
of digits (s. call to `GetDecimalDigits()`), with basically
the same logic that the weld::SpinButton base class
does it by now since the above commit (while SalInstanceSpinButton
was implementing the logic previously.)
Notes on the methods/Links that are being passed via
Formatter::SetInputHdl:
* SpinfieldControl::ParseInputHdl already had a double value
that it was multiplying by the same factor that
Formatter::ImplGetValue was earlier then dividing by,
so the multiplication there can simply be dropped.
* SalInstanceSpinButton now uses weld::convert_value_to_double
to get a double value as needed.
In an upcoming step, weld::SpinButton::parse_text will
be adjusted to also use double right away, as another
step to let its subclasses use double directly.
(Preparing for this was the main motivation for this commit.)
* LongCurrencyFormatter can have decimals and now does the
division previously done in Formatter::ImplGetValue
to achieve the same result as previously.
* DateFormatter and TimeFormatter both use values that don't have
any decimals, so the conversion should already
have been a no-op (dividing by 1) and therefore doesn't
need to be added elswhere.
In case anything was missed in a handler here, adding a
division by
weld::SpinButton::Power10(m_xWidget->GetFormatter().GetDecimalDigits())
as was previously done in Formatter::ImplGetValue
should likely fix the issue.
Change-Id: Ibc297928f76ac1dab0080c36cef44ddddefab7b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181804
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Before, it only listened to ParaStyle, or CharStyle, etc. obtained
in MapFamilyToCommand; and that meant, that its actual command was
".uno:StyleApply?...", but StyleApply state was ignored. This meant
that all respective items under "Style" menu were enabled in read-
only mode, where StyleApply itself was inactive.
Listen to both. When StyleApply is disabled, that takes priority.
Change-Id: Ic087ba6fc6fe6d45b8c8ecc35494734cd8765bd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177971
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Move helpers to convert between the Rectangle, Point and Size
classes in vcl and in css::awt from VCLUnoHelper (in the toolkit module)
to vcl::unohelper (in the vcl module), for reuse in vcl in upcoming
commits.
Change-Id: I7b11c8a6b8c843a01ce25b1e4c0fb1869ad1e6ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177816
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(make from 5 existing only one)
Much of what makes up this patch is adapted from existing code that is
used to organize and select macros and to assign macros to shortcut
keys. Comments in the patch say where code is borrowed from.
Known issues:
+ Scripting framework library rename for BeanShell, Java, and JavaScript
always returns fail when there are no macro entries in the library even
though it actually succeeds. The same thing happens using
SvxScriptOrgDialog::renameEntry.
+ Deleting Basic macros from the Macro Manager dialog is not implemented
yet.
Change-Id: If4da04549f8b39675910cbbd1f94dd9a6b73c31a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176254
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
So the setting fetched at ctor time for UserInstallation (and
BRAND_BASE_DIR) may no longer be true, so expanding variables based
on those earlier seen values results in unwanted paths.
add XInitialization to SubstitutePathVariables (like done for
PathSettings) to allow reiniting these explicitly once.
Change-Id: Ia930ea71cb09adc91d6d47ee047c44b24222e8a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175961
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 410f6b50eb44276b1d2095c844244ef4d0ddefaa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177109
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
we can just take a "const &".
(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)
Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
And drop unneeded solar mutex locks, that were used when the menu
implementation was accessed directly.
Change-Id: I06d3d872343fdd6204b4e8bbd8bcec67c17fdbe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176199
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
When an optimized build of this branch is compiled on Silicon Mac,
a dynamic_cast from com.sun.star.awt.XPopupMenu to VCLXPopupMenu
will fail.
The pointer being casted has not been deleted and is an undeleted
instance yet dynamic_cast fails. However, a dynamic_cast to
VCLXPopupMenu's superclass VCLXMenu succeeds so cast to that class
instead.
Change-Id: Ie9ab79df109eece46351545a71325d1e37bde94d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175992
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
No longer use a "Accessibility"/"EnableATToolSupport"
VCL setting to control/report whether support for
assistive technology is (or should be) enabled,
which was primarily used on Windows.
As described in previous commit
Change-Id: I32624b830d39d08510e4731edd06fd7a77642c50
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Oct 28 21:12:48 2024 +0100
win a11y: Drop "Enable AT Tool support" from options UI
, that setting got automatically enabled when an assistive
technology was active on Windows, and never got reset to
"false" automatically, so AT support would be enabled
next time LO starts as well.
Instead of persisting this via a setting, enable the
Windows a11y bridge if and when a WM_GETOBJECT message
is received only, see `ImplHandleGetObject` (where this
was already done earlier) and no longer alternatively
start the a11y bridge in Desktop::Main when the mentioned
setting is enabled.
Drop MiscSettings::SetEnableATToolSupport altogether.
Adjust MiscSettings::GetEnableATToolSupport to no longer
read a setting, but return `true` if the AT bridge
has been activated (or a SAL_ACCESSIBILITY_ENABLED
environment variable is set, as was already checked
before).
This already returns `true` when called from
MenuBarManager::FillMenuManager when starting
LO while the NVDA screen reader is running.
With this in place, the a11y bridge on Windows
should now become active whenever an AT requests
information (by sending a WM_GETOBJECT message),
but not otherwise, and restarting LO will result
in the a11y bridge no longer being active unless
AT requests information again.
Change-Id: I42f0059cecd43205690d958a875d3c17ff9a197b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175795
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
presentation in slideshow mode, only the presentation should be visible.
The user should not see any intermediate loading processes or windows,
providing a seamless transition directly to the presentation content.
After closing the opened presentation, the running presentation should receive focus.
Change-Id: Idc24de3d38523f044d7969f1eacb05c6bae91b83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175706
Tested-by: Jenkins
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>