The page background color of a document likely is white,
so at least the overlay (the second PNG) must be transparent.
[I saw (in Draw) that PRINT-TO-PDF tended to produce a PDF
that would have a transparent background when converted to PNG,
but that EXPORT-TO-PDF from LO would produce a white background
that obviously would fully overlay and obscure the first image.]
(Calc and Writer's export-to-pdf produced a transparent background.)
In any case, it makes sense to try to force both of these
to have a transparent background.
NOTE: It was important to place -transparent before -fuzz,
or else 95% of all colors will be considered white
and turned into transparent.
Change-Id: I26e6081fcd59e82b2aaedb86370bdbcc57b0a24e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175466
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
The ImageMagick package on Windows does not use convert,
but uses magick (which is not used by Linux).
So use a variable to make is simpler
to make it usable under Windows.
Note that cygwin's ImageMagick package does use "convert",
overriding Windows built in disk convert tool.
Change-Id: I658e0eb11400cf9e6c65ab4ba150ed2ab239c94e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175455
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: László Németh <nemeth@numbertext.org>
Apparently, "convert" allows a unix ordering
which doesn't work when using the "magick" alternative under Windows.
The point here is that -composite is an action
for the third image argument,
so it needs to come after the reading in of the source image-sequence.
Change-Id: Ic9345d616c6c62c211c5b7eb359c4019501bef2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175454
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
... if at least one of the sheet names has to be quoted, instead
of 'Sheet1':'Sheet2'!C4:C4 where 'Sheet1':'Sheet2' is more logical
but not understood neither by Excel nor was it by Calc. A single
C4 instead of C4:C4 is more cosmetical.
Accept both forms now when reading OOXML documents to be able to
read back such broken expressions.
Change-Id: I228e458e2e3af387d9f89900fcfc16ab89757bae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175514
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Not sure about the real underlying issue here.
In debug mode, we hit this assert. Changing it from an assert to a "do decrement mnEmptyMark if it would become negative" seems to help.
Change-Id: Ie23a685552d2f8153b67e18f9c0203ecbaad0ede
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174905
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
An editable GtkComboBox has a "has-entry" property of "true"
and an internal GtkEntry child.
Make the QComboBox editable depending on that "has-entry" property.
Mark the QLineEdit object created for the "GtkEntry" for deletion
again, as the QComboBox already has a QLineEdit by itself if it's
editable, and the one created for the internal child would otherwise
be useless and oddly overlap the combobox.
(Seen e.g. with the "Tools" -> "Options" -> "Languages and Locales"
-> "Writing Aids" -> "New" dialog" in a WIP branch where that dialog's
.ui file ("cui/ui/optnewdictionarydialog.ui") was added to the list of
supported files for QtInstanceBuilder. More work is needed
on other aspects still.)
Change-Id: I25ea74c732e60f50035604a4fc75dad50f4cf55f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175531
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
... in the base class BuilderBase, in order to reuse it in
QtBuilder in an upcoming commit.
Change-Id: Ia115804a9d2bf22b47afb94d97109e9495b21cd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175530
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
As can be seen in the
SalInstanceComboBoxWithoutEdit::insert_separator
implementation, -1 for the index means "Insert at the end",
so do likewise.
And also ignore the ID parameter, as QComboBox::insertSeparator
(other than (QComboBox::insertItem) doesn't take a QVariant
for user data.
Change-Id: I98959abf61ec670d78bf341a726b9854127d95e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175528
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Implement methods related to IDs for combobox entries by
handling OUString ID as a QString variant for the user data
of the combobox item.
Change-Id: I57750df203c333aa9dcc99c960c64de5f4ff50d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175527
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Move the `toQString` helper function to
include/vcl/qt/QtUtils.hxx where it can be used from
multiple modules, instead of defining
it twice for both, avmedia (avmedia/source/qt6/QtPlayer.cxx)
and vcl (vcl/inc/qt5/QtTools.hxx).
Change-Id: I7ffe06eaa3aaf3e7c8cc7aa1a4ac41b14db5c20c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175526
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Make use of the `loadQPixmapIcon` helper function introduced
in previous commit
Change-Id: I9f25aa5ca8f00da97d06ecdd164a8fae10e492dd
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Oct 23 23:21:23 2024 +0200
tdf#130857 qt: Move pixmap helper to new include/vcl/qt/QtUtils.hxx
With this commit, the native Qt version of Calc's
"Tool" -> "Goal Seek" dialog looks OK at first glance
(buttons have the icons set) in a WIP branch that adds that
dialog's .ui file ("modules/scalc/ui/goalseekdlg.ui") to the
list of supported files in QtInstanceBuilder::IsUIFileSupported.
(But clicking a button doesn't yet behave the same
way as in the non-welded/VCL version, so more work is needed
before that can actually be enabled.)
Change-Id: Icc83e874a76b7ccd600bd6741a9e02958759f4d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175525
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Introduce include/vcl/qt/QtUtils.hxx as a new header
for Qt-specific utility functions that can be used
in multiple modules, e.g. avmedia and the Qt VCL
plugins in vcl.
This is meant to be used only by code that already
links in Qt.
There's already vcl/inc/qt{5,6}/QtTools.hxx for
helpers needed in vcl only.
Initially, add a `loadQPixmapIcon` helper function
that can be used to retrieve a QPixmap for an icon name
and is extracted from QtPlayer::createMediaPlayerWidget
in avmedia.
It will be reused to implement the
QtInstanceButton::set_from_icon_name logic in an upcoming
commit.
Change-Id: I9f25aa5ca8f00da97d06ecdd164a8fae10e492dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175524
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Align the order in which the focusable widgets (combobox, "Properties"
button) are defined in the .ui (XML) file with the order in which they
should receive focus. While the position in the GtkGrid is defined
by the "left-attach" and "top-attach" packing properties and
QtBuilder evaluates those, the tab order in Qt by default matches
the order in which widgets are created (s. e.g. [1]).
Without this commit in place the "properties" button was constructed
before the "name" combobox (because it was further up in
the .ui file, i.e. the XML parser processed it earlier), resulting
in an unexpected order when using the Tab key to navigate through
the "Tools" -> "Printer Settings" dialog:
From the "Options" button in the button box, focus would jump
to the "Properties" button, and only then to the combobox, and
from there, it would jump to the "Help" button in the button box.
Now, it jumps from the "Options" button to the combobox,
and after selecting the printer there, pressing Tab another
time moves focus to the "Properties" button as expected, which
can be used to open another dialog that allows to change properties
of the previously selected printer.
A potential alternative to adjusting the .ui file could be to
explicitly set the tab order using QWidget::setTabOrder [2]
in QtBuilder.
[1] https://doc.qt.io/qt-6/designer-tab-order.html
[2] https://doc.qt.io/qt-6/qwidget.html#setTabOrder
Change-Id: If3aa014e20b97fe8bb772ef212741af1433b0244
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175523
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Add .ui file of the "File" -> "Printer Settings..." dialog
available e.g. in Writer to list of files supported by
QtInstanceBuilder, so that native Qt widgets are
used for that dialog now when using the qt5/qt6 VCL plugins,
unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS=1 is set.
Change-Id: I7806688102f690faa02fb5e712943d6ae216ff9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175522
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Connect to the QComboBox::currentIndexChanged signal and
call `weld::ComboBox::signal_changed` to notify of that change.
This is in preparation for upcoming
Change-Id: I7806688102f690faa02fb5e712943d6ae216ff9a
Author: Michael Weghorn <m.weghorn@posteo.de>
tdf#130857 qt weld: Declare support for "Printer Settings" dialog
and causes the infos for the printer previously selected
in the combobox in the "File" -> "Printer Settings" dialog
to be shown after selecting a printer other than the initially
selected one in the combobox, then clicking the "Properties"
button in that dialog.
(Without this, properties of the initially selected printer would
always be shown.)
Change-Id: I9a8609e172fd1d6783a86395ff58e64b7cf5c4d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175521
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Implement sorting for combobox entries by adding
a QtInstanceComboBox::m_bSorted member that gets
set to true when QtInstanceComboBox::make_sorted
gets called, and sort entries then and whenever
a new entry gets inserted afterwards.
This is in preparation for upcoming
Change-Id: I7806688102f690faa02fb5e712943d6ae216ff9a
Author: Michael Weghorn <m.weghorn@posteo.de>
tdf#130857 qt weld: Declare support for "Printer Settings" dialog
Change-Id: I54140db4310c7b288fe3be0e73000860410068fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175520
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The case where `pImageSurface` is non-null needs special
handling, and that isn't implemented yet.
(The assert would be triggered for the "File" -> "Printer Settings"
dialog otherwise once declared as supported in an upcoming
commit.)
Change-Id: I1a7d352e24de13417aac28d1d4b514709a8e97d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175519
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Introduce new helper method MenuBarManager::SetAcceleratorKeys
and call that from both places that are setting accelerator
keys, to deduplicate code and simplify future maintenance.
The use in MenuBarManager::FillMenuManager was introduced in
commit 08fe2669a0ed807812d005195b54cc41f092d09a
Author: Rüdiger Timm <rt@openoffice.org>
Date: Fri May 13 06:29:54 2005 +0000
INTEGRATION: CWS tbe22 (1.25.30); FILE MERGED
2005/05/04 14:21:00 tbe 1.25.30.1: #i48612# Opening a menu with GOK shows Tips instead of entries (fixed by CD)
and looks like it was primarily copy-pasted from the
other place.
Change-Id: I2097619740d45260e534ce06f9941337177f1bde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175509
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Move variable/code from the beginning of
MenuBarManager::Activate to where they're actually used,
to increase readability.
Change-Id: I885c6039fd77a023204b60bfc8ef97089d98716a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175508
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This is in preparation of deduplicating code in an upcoming
commit.
(Use `git show --ignore-space-change` to see the "actual
change" more clearly.)
Change-Id: Ibc9b8d8f77c2b2182c359a287eb604a92ed9c4e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175507
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
In Writer's print preview ("File" -> "Print Preview"),
allow zooming in or out using Ctrl + mouse wheel
regardless of whether assistive technology is enabled
(on Windows) or not.
I see no reason to prevent this when AT is active.
This was originally introduced in
commit 70de0c38fd177b3c95837118c5fb35e380c87e90
Author: Jens-Heiner Rechtien <hr@openoffice.org>
Date: Thu Mar 27 14:45:43 2003 +0000
MWS_SRX644: migrate branch mws_srx644 -> HEAD
with a
//#106746# zoom has to be disabled if Accessibility support is switched on
comment, but that unfortunately only refers to a ticket
in the StarDivision internal issue tracker, so the
reasoning from back then remains unclear.
(`git show --ignore-space-change` to see the "actual
change" more clearly)
Change-Id: Iccec17a334dbe19de14cf7889d7f70f0051f152e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175502
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
No longer attempt to write a registry
"SupportAssistiveTechnology" in
"HKEY_CURRENT_USER\Software\LibreOffice\Accessibility\AtToolSupport"
when assistive technology support gets enabled (e.g. because a
screen reader is running) and no longer try to read that registry
key to determine whether or not AT tool support is requested.
While the comment
// Check in the Windows registry if an AT tool wants Accessibility support to
// be activated ..
seems to suggest that this is something requested by an assistive
technology, it looks more like a way to persist whether the a11y
bridge was ever used in LO, as LO itself writes that value.
I don't really see the point, but think it makes much more
sense to enable the a11y bridge if an AT is active
*at the moment*.
In addition, in my Windows 10 setup with LO 24.8 installed, there's no
"HKEY_CURRENT_USER\Software\LibreOffice" in the registry, only a
"HKEY_CURRENT_USER\Software\The Document Foundation\LibreOffice 24.8",
so the code wouldn't have any effect in practice anyway.
Maybe this was necessary at some point in the past
when the Java Access Bridge was still in place, instead
of supporting the platform API via today's MSAA/IAccessible2
bridge
Note that before
commit bfbaeb8192447265bdd78d1be4990947d135eb6e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Oct 18 17:01:43 2024 +0100
tdf#160982 wina11y: Drop extra screen reader check to enable a11y bridge
, the presence or absence of the SPI_GETSCREENREADER param
or a SAL_FORCE_IACCESSIBLE2 environment variable would
additionally have played a role.
Change-Id: I4dddb599eedb4b29c9709fbb41093ef615e60b8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175501
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
V595 The 'pTabWinTmp' pointer was utilized before it was verified against nullptr. Check lines: 496, 499.
Change-Id: Ie263524d6a06adaf7f99555d7aa872e815cab96c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175504
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
* Add new class QtInstanceComboBox as a weld::ComboBox
implementation using a native QComboBox. Implement
some of the most important and straightforward methods
and trigger an assert for all others for now.
* In QtBuilder::makeObject, handle the "GtkComboBoxText"
case and create a QComboBox for that.
* Implement QtInstanceBuilder::weld_combo_box
to return a QtInstanceComboBox instance.
Change-Id: I2ac2d0f55a948ea2f090c81096484e22899ddcbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175443
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Fix layout interoperability during DOCX round-trip by grab-
bagging w:p/w:pPr/w:rPr/w:specVanish, i.e. the style separators.
Note: use FrameInteropGrabBag to select the text frames, which
are inline headings, exporting only their text content (a single
paragraph), and use also ParaInteropGrabBag to export w:specVanish.
Note: specVanish lost completely originally, converting inline
headings to normal paragraphs.
After commit 56588663a0fddc005c12afaa7d3f8874d036875f,
text frames (the workaround for inline heading/ToC/bookmark
support) were exported instead of plain paragraphs, which were
broken at least in LibreOffice.
Follow-up to commit 56588663a0fddc005c12afaa7d3f8874d036875f
"tdf#131728 sw inline heading: fix DOCX paragraph layout
interoperability".
Change-Id: Ic61617f9c9652c9364f8262914c66dec093d6910
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175372
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
V1024 The 'aIfstream' stream is checked for EOF before reading from it, but is not checked after reading. Potential use of invalid data.
Change-Id: I253513c47ec1482882bbfb1c6e32e25c15ace99c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175475
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
It was too convoluted; the three properties that were set there
all used different logic (PROP_PARA_FIRST_LINE_INDENT was only
set when the parent style id was present; PROP_PARA_LEFT_MARGIN
was set when it was found either in the entry or in its parent;
PROP_PARA_RIGHT_MARGIN was only set when parent style was found,
and it had properties). It seems to be just some leftovers from
iterative partial changes of the code.
This makes the code more uniform. For PROP_PARA_RIGHT_MARGIN it
keeps setting PROP_PARA_FIRST_LINE_INDENT/PROP_PARA_LEFT_MARGIN
from getNumberingProperty; but otherwise, all three are handled
similarly: if the property is set either in the entry itself or
in its parent, it is processed. This changes the logic slightly,
but hopefully in the correct direction.
Change-Id: I1a8fb95d055101dcbc3aaec6207721146c94cc21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175437
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
V1024 The 'aInput' stream is checked for EOF before reading from it, but is not checked after reading. Potential use of invalid data.
Change-Id: Ie0c6d1928dad804b21d3c9920cc1de8035ea0367
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175476
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Some archs does not support NaN payload(e.g. riscv64).
It would be meaningless to continue building a test related
to NaN payload if the builder doesn't support this feature.
Change-Id: I895a8647bf7ff68f645faa7428d30b1c741669f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175293
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>