now that Bitmap supports transparency
Tweak a couple of unit tests. Since some backends use
pre-multiplied alpha, if A == 0, then RGB will also
be zero.
Had to comment out one unit test (see comment in unit test).
Change-Id: I45e4b5ea9f21e3c5bc74992ca4ecee1897212821
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189022
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
and
cid#1659754 Variable copied when it could be moved
cid#1659755 Variable copied when it could be moved
cid#1659756 Variable copied when it could be moved
cid#1659766 Variable copied when it could be moved
cid#1659767 Variable copied when it could be moved
cid#1659769 Variable copied when it could be moved
cid#1659770 Variable copied when it could be moved
cid#1659777 Variable copied when it could be moved
cid#1659787 Variable copied when it could be moved
cid#1659790 Variable copied when it could be moved
cid#1659793 Variable copied when it could be moved
cid#1659802 Variable copied when it could be moved
cid#1659818 Variable copied when it could be moved
cid#1659822 Variable copied when it could be moved
cid#1659824 Variable copied when it could be moved
cid#1659825 Variable copied when it could be moved
cid#1659826 Variable copied when it could be moved
cid#1659842 Variable copied when it could be moved
cid#1659849 Variable copied when it could be moved
cid#1659850 Variable copied when it could be moved
Change-Id: I70729aaf6e229518a9a50ac18311286ab5b05b53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189348
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
When a user enables 'mouse as pen' before starting the slideshow, then
his paintings are saved as persistent shapes when he exits slideshow.
These shapes were then converted back to paintings when the user starts
the slideshow again, so that they are visible againg.
But these old paintings were treated as new paintings when the user
exits slideshow and were then saved again as shape to the page although
the page contains these shapes already. Thus with every new start and
exit of the slideshow the shapes were duplicated. Because the duplicates
are at exactly the same place as the originals, you do not notice it
immediately. But you can see the duplicates in the Navigator and notice
it in the file size.
The fix introduces a flag that is set at the paintings from the existing
shapes when the slideshow is started. This flag is then used to skip those
paintings from converting to shapes when slideshow is finished.
Change-Id: I93324d157b1b802d7b8e24858034d2fdc5d71b45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188364
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@collabora.com>
Embedded fonts may appear several times during document loading. Now,
they activate immediately after current element was processed, and a
portion of the embedded fonts was collected. The activation may also
happen several times during the load process, each time refreshing
fonts in all windows, which takes significant time.
This change tries to not activate collected fonts in the destructor
of EmbeddedFontsHelper, but to send the list to the model. The model
accumulates the lists in its medium, and only activates late in the
loading process, when all the embedded fonts are collected.
Change-Id: Iff188e84e259206541bcc94880d8aead2b72715a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189310
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
This commit adds a drop-down dialog that appears when the user pastes
plain text containing Markdown-formatted content, prompting the user
to choose between text and markdown.
Change-Id: I3b14b5a07f107de69825583f54023d2d98984288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188067
Reviewed-by: Thorsten Behrens <thorsten.behrens@collabora.com>
Tested-by: Jenkins
Before the change, ODF import created unique font name every time,
using '?' as extra; that meant that every document with embedded
fonts would create and register its fonts, even when it was already
registered by a different document. On the other hand, OOXML import
would rely on file name match, which might not guarantee that the
files were actually identical.
This change compares the existing file content, which would only
happen when the files are of the same size. This also writes the
file only after doing all the checks.
Change-Id: I2377bd6c24291d9b4113607b4d48a223187b635c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189270
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Many times it is useful when to log the window type name instead
of only the number of the type enum (i.e. when you check the list
of parent windows). This change adds a new method that exposes the
type to type name conversion that is already present in the code
for the Window.
Change-Id: Ice97f7ad27988d99f0e45051e0d8e44befe955e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189162
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
No longer rely on weld::Frame having a weld::Label child,
which is not the case for QtInstanceFrame, where
the QGroupBox widget handles the text itself instead
of using a separate label widget.
Now that all uses of the method have been ported away from
in previous commits up to
Change-Id: Ia37e5f73d7b68aa5fae87be167bdc00e5cf6f1f3
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Sat Aug 9 00:46:12 2025 +0200
tdf#130857 formula, sc: Stop relying on weld::Frame's label child
, drop the now unused method.
Change-Id: Iaed991ab0cae3afe7bd2ea97819942d2dbef4c62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189221
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Add a RefEdit::SetReferences variant that takes a weld::Frame
instead of a weld::Label param.
For those cases where a Frame's label was previously retrieved using
weld::Frame::weld_label_widget in order to pass
it to the only RefEdit::SetReferences variant taking
a weld::Label, use the new variant instead and stop
calling weld::Frame::weld_label_widget to get the
label child.
Use default of nullptr for the second param to the
RefEdit::SetReferences method taking a weld::Label,
to avoid ambiguity for the cases where an explicit
nullptr is passed.
For the QtInstanceFrame implementation, the QGroupBox
widget doesn't have a separate label child, but handles
the text itself, which is why
QtInstanceFrame::weld_label_widget simply triggers an assert.
This commit prepares for removing weld::Frame::weld_label_widget
altogether.
No change in behavior intended or seen in a quick test.
One way to trigger this code path:
* start Calc
* select some cells
* "Data" -> "Define Range"
* type "foobar" into the name field
* click on the "Shrink" button
Change-Id: Ia37e5f73d7b68aa5fae87be167bdc00e5cf6f1f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189220
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
No longer store the weld::Label* passed to
RefEdit::SetReferences as a class member RefEdit::mpLabelWidget,
but instead have a std::function that returns the
label's label/text.
No change in behavior intended yet, but this prepares
for allowing non-weld::Label widgets to be used in
the future.
See also previous commit
Change-Id: I3b987a052fe4ba72a6793671a7a81142b12afe95
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Aug 8 10:54:27 2025 +0200
tdf#130857 formula: Don't have getter for Label, but text
for more background.
Change-Id: I45f6c328b7da134ca0d4fcb4b078a50056c6564a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189219
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Some class members already had an "m" prefix, others
didn't. Add it for those who didn't, to make it easier
to distinguish local variables from class members at
first sight.
Change-Id: Iadf6550a803eff3f6fd0d9b7e0c63bca283425be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189218
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Replace RefEdit::GetLabelWidgetForShrinkMode that
returns a weld::Label with RefEdit::GetLabelTextForShrinkMode
that only returns the label's text.
This is the only information of interest in the caller, and
for the case where the label is actually the label child of
a frame (as in the example mentioned below) instead of an
independent label, there will be no actual label for the
native Qt implementation, as the QGroupBox used in
QtInstanceFrame handles its title/text itself.
This is one step towards getting rid of
weld::Frame::weld_label_widget for the above reason.
One way to trigger this code path:
* start Calc
* select some cells
* "Data" -> "Define Range"
* type "foobar" into the name field
* click on the "Shrink" button
Change-Id: I3b987a052fe4ba72a6793671a7a81142b12afe95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189217
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The weld::Frame API implementations expect that
the `<child type="label">` child of a GtkFrame
object in a UI file is a GtkLabel.
In addition, QtBuilder also expects that when
processing the UI file as it doesn't use a
separate widget, but sets the label's text directly
for the QGroupBox (that's used for the GtkFrame
object in the .ui file).
The "Header"/"Footer" tab pages used e.g. in Writers
"Format" -> "Page Style" dialog however were using
a GtkBox child, containing 2 labels: One having the
string to be used for the "Header" dialog, one the
string to be used for the "Footer" dialog set as text,
and only that label was set to visible in the SvxHFPage
ctor.
Replace that approach by using a GtkLabel child,
and calling weld::Frame::set_label with the corresponding
string instead.
Change-Id: I86754be7c0ce068ceb6216fd0463657b05f4ca41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189111
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
When saving a doc which was based on a template,
don't preselect the path where the template was stored.
Instead, preselect the last used path from the Save dialog.
Change-Id: I484e5a908cc739618683b6c2e2b4a7fda4a66232
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189053
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>