Commit Graph
30162 Commits
Author SHA1 Message Date
Caolán McNamara b45d468a3d put media files under link update control
A media object whose content lives at an external URL, rather than
inside the document, is registered with the link manager like a linked
graphic. So it then shares the usual link update mechanism.

Media copied into the document is extracted to a temp file and is not a
link, so that's left alone.

Change-Id: I59dadaf05567ee9d9c0492b13cbc7174aca953da
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/6980
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 1ea4fc54036587c7eb4d4cea74e776de9e6baaf3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208322
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-21 11:38:09 +02:00
Rafał Dobrakowski 6fac2ead2d tdf#171872 sc: allow copying status bar function values
Copy the value from the status bar.
According to the checkboxes selected in the submenu.
If “None” is selected, choosing “Copy Value...” saves
an empty string to the clipboard.
This effectively clears the clipboard.
Support for multiple national languages has been added.

Change-Id: I662e8be8feaeac5bf2e4d69f557a8fec2420ff47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207385
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-07-20 17:56:20 +02:00
Justin Luth f6d9c40207 tdf#39881 srchdlg: no need for AllSheets to call ModifyHdl_Impl
Prior to 2013, the Search All button was disabled
when All Sheets was enabled,
so toggling it off meant that the search buttons
need to be re-evaluated - thus the call to ModifyHdl_Impl.

But with patch 09a546ed1f nothing was being disabled,
so there is no longer any reason to call ModifyHdl_Impl AFAICS.

Change-Id: I669e81d61fdbe0e98577155fda32189488d4aa84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208206
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-07-18 13:29:13 +02:00
Justin Luth 9966db0cbe tdf#39881 srchdlg: don't hide search buttons if 'search by styles'
I triggered this in Calc.
When 'Cell Styles' is enabled, then clicking on 'All Sheets'
was disabling all of the search buttons.

This could happen with anything that called ModifyHdl
(which doesn't seem to be anything except styles and AllSheets).

Not sure why AllSheets needs to call ModifyHdl.
Changed for tdf#39881. Prior to that SearchAll was disabled
when AllSheets was checked.
So then it makes sense to call it (to re-enable the buttons).
But now it no longer makes any sense.

Change-Id: I809a99aaddfad4add5a4017db60715d88944eb70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208205
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-07-18 13:28:27 +02:00
Michael Weghorn 312aac710b Move SvtViewOptions from unotools to svtools
The SvtViewOptions class is used to store the state
of windows/dialogs.

So far, SvtViewOptions::SetWindowState and
SvtViewOptions::GetWindowState are string-based
and the callers are responsible for (de)serializing
the vcl::WindowData to/from string.

This will be changed to become the responsibility
of SvtViewOptions in an upcoming commit.

Since unotools is below vcl in the module
dependency chain, it cannot make use of vcl,
i.e. vcl::WindowData couldn't be used there.

Therefore, move SvtViewOptions from unotools
to svtools, which is above vcl in the module
dependencies.
(svtools/README.md summarizes the purpose of the
module as "Tools on the Top of VCL", which seems
an appropriate place for helper code to manage
the state/options for dialogs, tab pages,...)

Change-Id: If849224c35c7ac895659ddb7c17e6d17061d61a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208124
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-15 14:45:41 +02:00
Justin Luth ce4939aeac tdf#53290 srchdlg: only set SearchItem RegExp if button is visible
Draw and Impress were using the user options
to enable searching as a regular expression
even though the dialog tried to avoid that
by not making the regex checkbox available.

Now, we don't want to affect the user options,
so we can't just set the checkbox to false.

Change-Id: I0c3797368669099ace1fb2080da9f11fb07d7949
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208121
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-07-15 00:21:30 +02:00
Justin Luth 6e873ec987 tdf#102307 quick find: add hard-coded MS Word keyboard shortcuts
Why not?
These keystrokes otherwise would do nothing,
so why not add them?

People moving from Word will be familiar with this
so if it works in LO too, so much the better.

Change-Id: If5d1528a5bc8598d7fafaf3e147e2e19db525094
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208045
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
2026-07-14 13:32:02 +02:00
Caolán McNamara 95045fb7d5 put links in form imagecontrols under link management
Change-Id: I265f889bcfdcf1b214cde02e9e5799081ec6aa42
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2396
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 01a314d398a497e01d0b9e4b575f3b7c842b8622)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206343
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-14 13:26:15 +02:00
Justin Luth 25ff7de2f7 tdf#102307 quick find: also use .uno:RepeatSearch to find next
Although 'find again' is supposed to travel in the same direction
as the last 'find', in the context of the quick find dialog
we don't have access to that information.

I didn't see any clean way to track this information either.

So just treat it as a 'Find Next' in this context.

Change-Id: Icc5ee9da228d0f05844db4cc19fd8e4cab499a0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208044
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-07-14 03:59:12 +02:00
Khaled Hosny ef3c39851d vcl: Rename Font::Set/GetAverageFontWidth to Set/GetFontWidth
It is a misnomer now, so return to the original name.

Also drop the redundant private Font::GetAverageFontSize().

Change-Id: I67495fa675091b459a4e90ac09665489cc61fdd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207991
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-14 00:16:59 +02:00
Justin Luth 5525f5e89b tdf#151688 srchdlg: on open, repopulate Replace as well as Search
When the dialog is opened, the last searched for string
(from the session, not from stored config) was already restored.
However, no attempt was made to restore the last replace string.

Although it might feel a little dangerous to provide a restore value,
it isn't really dangerous, because the user has to hit the
replace button in order for it to do anything.

The bug report is worried about replacing with 'nothing' by accident,
so I guess the 'danger' goes both ways.

Personally, I would like having both last values restored
in case I accidentally closed the dialog
(or closed it to get it out of the way while I manually made changes
and then restarted it to continue my replace task).

Only Writer replaces the 'search' content with a user's selection.
In this case it seems very wise to clear the replacement string.

Change-Id: Id9f40c01724978a2e51f685a60b9e3e75c21135a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207901
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-07-10 23:55:38 +02:00
Michael Weghorn f1f6a505a0 weld: Pass weld::TextWidget& in text change callback/handler
Switch the weld::Entry and weld::TextView handlers
that are called when the text changes due to user
interaction to pass a weld::TextWidget& param
instead of a weld::Entry& and weld::TextView&
one respectively.
Adjust related methods across the code base accordingly.

This unifies the behavior for both of these
weld::TextWidget subclasses and prepares for
deduplicating the logic and moving it to the
common base class in an upcoming commit.

That will also ensure they stay in sync.
(Change also motivated by the fact that their behavior was
differing before

    Change-Id: I03d2a13cd84d53d806eb9e363f49c4b6be28d938
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jul 9 13:08:58 2026 +0200

        tdf#130857 weld: Don't signal about programmatic TextView text change
.)

Change-Id: I5572fc88caf577fae9a23a39f1ec4f2179935a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-10 18:17:27 +02:00
Justin Luth 09086ecab8 related tdf#126275 srchdlg: resize dialog after NoFormat search
This started in LO 5.2
with commit beeef93480
tdf#98417, tdf#98539: DIALOG: Improvements to the Find & Replace dialog
    Reviewed-on: https://gerrit.libreoffice.org/23057

If the replace label had a description,
then both the search and replace labels were shown.
So if you remove the search label first,
then that space would not be recovered,
not even when the replace label was cleared.
[You would need to again set and clear the Attribute label.]

Noticed by a code read, and then confirmed by unexpected results
from my previous patch.

Change-Id: I74bef84dcf006a6bfed85b6236ed1e8179053e13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207899
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-07-10 12:15:17 +02:00
Justin Luth b00fb3ee0c NFC related tdf#126275 srchdlg: remove dead code: sDesc is always empty
This was introduced in LO 5.2
by commit beeef93480
tdf#98417, tdf#98539: DIALOG: Improvements to the Find & Replace dialog
    Reviewed-on: https://gerrit.libreoffice.org/23057

Using sDesc was confusing to me as I was reading through the code.
Just use an empty string if you want to clear a label,
instead of using an uninitialized, named OUString.

Change-Id: Ia5b5ebd6cdc423b6595f83db8b35ee94d657ab3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207898
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-07-10 12:13:33 +02:00
Justin Luth 0f9a60c115 tdf#126275 srchdlg: reset m_bFormat when m_xSearchAttrText isEmpty
There was a bit of inconsistency when all enabled Attributes
were then removed - leaving an empty description.

Specifically, the 'Paragraph Styles' label was re-enabled
even though TemplateHdl_Impl returns early if m_bFormat is set.

Additionally, the NoFormat button was disabled - preventing the user
from properly clearing the attribute field.

So the best course of action seemed to be to just call the
NoButton handler - which clears, hides, and resizes.

Change-Id: I65f88ed97e692a0ff9e162c2c8b9b85c9971ea58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207897
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-07-10 12:12:50 +02:00
Xisco Fauli 54a33b7661 cid#1693811: silence Overflowed constant
Change-Id: Iccb122059c03a497fc2627dbd93b39c6623c8ce7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207889
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-10 01:08:07 +02:00
Julien Nabet 9ced3a0230 tdf#172714: fix errors in tablestyles.xml when inserting a table
I suppose after 4fb31ea85f
tdf#105933 GSoC: New Dialog to Edit Table Styles

Following Karthic's advice, I removed all
style:font-name style:font-name-asian style:font-name-complex attributes

+ "skip exporting these in `SvxTableStylesExport::exportTextProperties`"

Change-Id: I90f440d6db7ec4024f1900c8061f1675debff6ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207815
Tested-by: Jenkins
Reviewed-by: Karthik Godha <karthik.godha@collabora.com>
2026-07-09 15:51:25 +02:00
Andreas Heinisch ba9f142eb9 tdf#163785 - Embed the color picker content inline without any popup
Change-Id: If036458b7eb14482be2e05a3ebb099dc6f12e4c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207756
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-07-08 22:59:26 +02:00
Christopher Sherlock 90951d958c vcl: rename X-axis origin methods to Get/SetDeviceOriginX
Rename GetOutOffXPixel() and SetOutOffXPixel() to GetDeviceOriginX()
and SetDeviceOriginX() across OutputDevice, Window, and CoordinateMapper.

The legacy "OutOff" naming convention obscured the difference between
system-level window positioning offsets and internal content scrolling
(SetPixelOffset). The new nomenclature explicitly communicates that
these metrics strictly govern the device coordinate space origin.

This patch focuses strictly on the X-axis coordinate reads and cleans
up duplicated formatting signatures inside the CoordinateMapper header.

Impacted modules:
* include/vcl: Update public declarations in outdev.hxx and window.hxx.
* vcl/inc: Clean up CoordinateMapper.hxx whitespace and scaling hooks.
* Global: Patch dependent pixel coordinate reads across desktop, editeng,
  sc, sfx2, svx, and vcl.

Change-Id: I546e1d255887e3b280ff15caca2e27ef10de52d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206509
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-07-07 14:14:50 +02:00
Justin Luth 8624e67503 tdf#128419 srchdlg: stop losing user's 'replace backwards' choice
Every time the user called a different command (find/findprev/findall)
the 'replace backwards' checkbox was being reset
to some seemingly random state.

That random state was 'whatever the checkbox was
the last time that "Replace" was called'.

Instead, it should retain the last state that the user provided.
[Fortunately, I found a couple of examples to guide me.
 since m_pSearchOpt isn't reliable
 as the 'Find Previous' button can also SetBackward.]

With this patch, the user's selection is:
-the sole controller of the checkbox
-saved and restored between sessions (wasn't restored earlier)
  [ClickHdl_Impl calls SaveToModule_Impl - so immediately saved]

Change-Id: I1364c97f6a853989cb9b2706ec4a03a5e4c0ca13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207696
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-07-06 23:51:07 +02:00
Justin Luth b68f735f5c tdf#90558 sw: disable 'Replace' when 'Current selection only'
When there is already a user selection,
it is a little bit ambiguous about what will happen
when the replace button is pressed.
At least in Writer, the user is never SHOWN what has happened
for that first 'Replace' attempt.
But there isn't much we can do about that.
(Calc at least highlights the cell,
while Draw/Impress does no replace, but just the next find.)

It is worse when the user requests to replace something
only in the current selection.
At that point the user kind of expects that the next replace
will just continue within his selection,
but the very act of finding changes the selection.

So, simply disable the replace button for 'current selection only'.
The user can either replace-all,
or else Find the first instance they want and then replace-all
(since only one instance will be in the current selection only).
At the end of the replace-all, there is no selection,
and that re-enables the replace button (via a short timer).

I suppose this might be 'bad training' since using replace-all
is generally a very bad idea.
But the alternatives are worse.

Change-Id: I4349a47702be8671f25b67c816956bb0fb6bcf4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207592
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-07-06 15:44:04 +02:00
Justin Luth d63a0b60fb tdf#74078 srchdlg.cxx: remove non-working Page Style
Page Style is not a 'on or off' kind of attribute.
In order to compare a Page Style, you need a name to match,
and the attribute dialog has no ability to specify a name.

Change-Id: Ifd7e85bd7e0cc80e2ee9fbda87520c60045364f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207619
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-07-05 02:17:49 +02:00
Michael Weghorn 2dca1c0f02 weld: Rename TreeView *_column_clicked methods to *_column_header_clicked
Rename weld::TreeView::connect_column_clicked
and weld::TreeView::signal_column_clicked to make
clear that they are not about a click anywhere in a
column, but about the column *header* being clicked.

The GTK 4 doc for the corresponding
GtkTreeViewColumn::clicked signal [1] by which the API
was apparently inspired is clear about this:

> Emitted when the column’s header has been clicked.

[1] https://docs.gtk.org/gtk4/signal.TreeViewColumn.clicked.html

Change-Id: I0b4b337b5ca938bb1526d9857ed2b0b244daf23c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207591
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-03 22:26:00 +02:00
Bogdan Buzea 30a04b7cb2 tdf#105822 Magnetic disk broken transparency
Change-Id: Idaff3ddb69dc754d6a654914ae11887825f3a757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205916
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-06-29 15:37:16 +02:00
Xisco Fauli 5a5433c8d1 cid#1695406: Variable copied when it could be moved
Change-Id: Idcd7ab97abd0532f43d8c2ecacf5ee35cd5325e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207350
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-26 14:57:52 +02:00
Michael Weghorn 1d3c22af84 svx: Drop obsolete LOK/jsdialog workaround in ColorListBox::ToggleHdl
This was introduced as a workaround for Collabora Online in

    commit 90f9a35319
    Date:   Mon Jun 21 17:21:11 2021 +0200

        Don't steal focus from popup in online

        To avoid closing the popup when it is first time activated.

However, that one no longer uses this repo and
jsdialog support was dropped in

    commit 8a91868e21
    Date:   Tue Jun 2 14:53:19 2026 +0200

        drop JSDialog machinery

, so drop that now obsolete special handling as well.

Change-Id: I86d9243784432fa3c2e79d8447bb7d333d7358c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207334
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-26 13:38:34 +02:00
Michael Weghorn 2a22cafb60 svx: Return by ref in ColorListBox::getColorWindow
Return the ColorWindow by ref, which also
allows to drop a null check in
ColorListBox::ToggleHdl.

Change-Id: Ife262e607eb090bee39fda1a9f497bdf1baf263d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207333
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-26 13:38:25 +02:00
Andreas Heinisch f065da78ba tdf#98382 - Apply alignment property for listbox columns in grid controls
Change-Id: Iacd345c16f06e84626b6da4dce74e551f23ec07a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207275
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-06-26 07:37:45 +02:00
Michael Weghorn 35e2a8f8c6 tdf#130857 weld: Add default param for TreeView::enable_toggle_buttons
Most callers use weld::ColumnToggleType::Check
and only a few use weld::ColumnToggleType::Radio.

Add a default param of weld::ColumnToggleType::Check
and drop the explicit param for callers passing this.

This prepares for moving setting the toggle button
type to a separate method in an upcoming commit to
clarify what it actually does.
(It doesn't only set the toggle button type of the
special "expander toggle column" enabled by
weld::TreeView::enable_toggle_buttons, but of *all*
toggle buttons used in any of the cells of the
whole table.)

Change-Id: I65edb7cd5f79c59222c1c415f118b8adbdec0271
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207249
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-25 18:23:42 +02:00
Mike Kaganski db79242098 svx, sd: add threaded fields to Draw annotation model
Extend sdr::annotation::Annotation and AnnotationData with m_Threaded,
m_Resolved, and m_ParentId so a Draw annotation can carry a reply/resolve
relationship. The three fields are propagated by toData / fromData and
by sd::Annotation::clone; when IsThreaded() is true they are emitted
from Annotation::ToJSON and SdXImpressDocument::getPostIts under the
same keys (threaded, resolved, parentId) that ScModelObj::getPostIts
already uses for Calc.

The fields will be used by the PDF filter (follow-up commits) and left
at their defaults elsewhere; ODP, PPTX and ODF exporters are unchanged
and continue to ignore them. Support for [MS-PPTX] extensions [1] for
comments that introduce state and replies is not in the scope of this
patch series.

[1] https://learn.microsoft.com/en-us/openspecs/office_standards/ms-pptx/161bc2c9-98fc-46b7-852b-ba7ee77e2e54

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I49594e1e4698bfd541f4c5041362a52b675683fd
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1454
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit bbde910405829527c92c406a82f75743bc4416c2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207199
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-23 17:16:44 +02:00
Xisco Fauli 667fe200a9 Revert "[API CHANGE] remove deprecated XSpell1 and XSupportedLanguages"
This reverts commit bce4b4af9d.

Reason for revert: Revert it for now until there is a policy
for removal of published APIs

Change-Id: Ia1cbcfcd6b953be48a60d8ef67333b1e3265e563
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207150
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 10:58:29 +02:00
Xisco Fauli 18fd26c40b Revert "oox: export custom-shape equations and handles to DrawingML custGeom"
This reverts commit fd02bc931f.

Reason for revert: See cf71aff66f467f1f4a4506c07fbe552dd1bd3845

Change-Id: I453c46646e36e15ebe8ebd15843258de35f39d27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207108
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-22 16:08:13 +02:00
Caolán McNamara 42cfdea1b5 remove optimize svx::ThemeColorsPaneBase::initColorSets cost
19.17% of

https://github.com/CollaboraOnline/online/issues/15054#issuecomment-4213614352

this is fired too often, make the broadcast/listen more direct and avoid
the spurious wakeup on generic invalidate-all that it can't filter out.

Change-Id: I9476591a5feefa5e47de5f8098eaa152fc8b10ac
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/870
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 92ae69bd1c8a8bc7f8fafc2dddec000182c6fb6d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207074
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-06-21 22:16:28 +02:00
Andras Timar 8a19617bfd Fix SIGSEGV in EditView/ImpEditView with disposed window in multi-view LOK
In multi-user LOK Impress sessions, when SetUpdateLayout(true) is called
inside ImpMakeOutlinerView (e.g. during ShowSdrPage for a new user or
SdrBeginTextEdit), the EditEngine iterates all registered EditViews and
calls ShowCursor, HideCursor, InvalidateWindow, and InvalidateAtWindow.
Secondary EditViews created by the ShowSdrPage lambda for other users
can reference windows that have been disposed (user disconnected or
switched pages).  These functions accessed the disposed window without
checking isDisposed(), leading to null dereferences of mpWindowImpl
(which is reset to null in Window::dispose()).

Crash path: SetUpdateLayout(true) -> EditEngine::SetUpdateLayout ->
mpActiveView->ShowCursor -> GetOutputDevice() ->
*mpOutputWindow->GetOutDev() -> dereferences null mpWindowImpl -> SIGSEGV.

Guard all EditView/ImpEditView functions that access the output window
against disposed state:
- ImpEditView::ShowCursor: early return when no callbacks and window
  is null/disposed, since GetOutputDevice() and all subsequent cursor
  positioning code requires a valid window
- ImpEditView::InvalidateAtWindow: check disposed before Invalidate()
- EditView::InvalidateWindow: check disposed before Invalidate()
- EditView::ShowCursor/HideCursor: check disposed before
  GetParentWithLOKNotifier()

Also guard two loops in SdrObjEditView that iterate OutlinerViews and
access their windows without disposed checks:
- ModelHasChanged: skip views with disposed windows
- ImpInvalidateOutlinerView: check disposed in addition to null

Change-Id: I8b3e4c7d2a1f5e9d0c6b8a3f7e2d4a9b1c5f8e0d
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/939
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1443
(cherry picked from commit 5b0d6592d3339e8e6514a4ef28929687636087c5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207066
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-21 21:06:11 +02:00
Michael Weghorn a14a19a83c a11y: Drop unused AccessibleBrowseBox includes
Directly include the OAccessible header where the
code was previously depending on transitive includes.

Change-Id: I83750f8db6f843e9afc0a2b95bd7969667550992
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206727
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-19 18:11:22 +02:00
Michael Stahl a50e3188a3 svx,sw,xmloff: split no-first-page-header-flag in 2
In Word only the first-page-shared flag is shared between header and
footer, while the existence of header and footer is independent.

Split into core flags `DisableFirstHeader` / `DisableFirstFooter`,
properties `HeaderNoFirst` / `FooterNoFirst` (which allows removing some
special checks as the name prefix checks now cover these).

`SectionPropertyMap::setHeaderFooterProperties()` had some special code
to turn off a header but not a footer, add that to do it consistently.

Also rename the ODF attributes, `is-first-page-header-enabled` better
describes the values than `is-first-page-header-shared`.

Signed-off-by: Michael Stahl <michael.stahl@collabora.com>
Change-Id: Ieee9cb7a8f7b4fb7e66352c95142d8ccb06f9cb5
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4383
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a443891f1a6480421fa08c311526c1a9d4bdd642)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206703
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-18 12:17:26 +02:00
Oliver Specht 5dd328effe Support of page styles without header/footer on first page
Import/export to/from docx/rtf supported.
Unit test available.

Change-Id: I12065ba4fb050d7dfc013eda704ebe2acb53c88e
Signed-off-by: Oliver Specht <oliver.specht@cib.de>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3580
Tested-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit b8af8f046a098c67d7caf44dc70d1db5cabf24e2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206698
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-18 12:17:01 +02:00
Noel Grandin b1712dadb7 the depth parameter to the configmgr open call has never done anything
Change-Id: I74c803a93f561d09d6ec8cccc9bdc764596f321a
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3591
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 758e96b21b067487931bb1e1f3c49815e976955e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206438
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-18 11:17:33 +02:00
Andreas Heinisch c7b9fcb594 tdf#123441 - Use clone-based drag for fixed-tail captions
Use clone-based drag for fixed-tail caption to keep the arrow anchored
to the cell.

Change-Id: I77a6bfce61fd887c96f2b53f1255c72f334be58b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206693
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-06-17 16:58:43 +02:00
Andras Timar fd02bc931f oox: export custom-shape equations and handles to DrawingML custGeom
A custom shape that has no matching OOXML preset is exported as
<a:custGeom>. Until now that path baked every coordinate to a fixed
number and wrote empty <a:avLst> and <a:ahLst>, so the shape lost its
adjustment values and adjust handles: it became frozen and could no
longer be edited by its control points after saving to docx/pptx/xlsx.

Convert the shape's ODF "Equations" to DrawingML guide formulas by
walking the parsed expression tree (FunctionParser::parseFunction). At
that level the original structure is intact, which lets the export:

 - emit <a:gdLst> guides for the equations, keeping width/height symbolic
   ("w"/"h") so the geometry scales correctly on resize;
 - express the trigonometric functions (sin/cos/tan): the angle-conversion
   idiom (X*pi/180 or pi*X/10800000) is recognised and reconciled to
   OOXML's 60000ths of a degree, for both trig arguments and standalone
   angle values such as arc parameters;
 - declare the referenced adjustment values in <a:avLst> ("adj1", ...) so
   the guides stay driven by the shape's handles;
 - emit an <a:ahXY> handle for each ODF handle that drives an adjustment
   value, referencing the matching adjustment guide;
 - reference an equation from a path coordinate (or handle) by the token
   that holds its value.

svx gains two small ExpressionNode accessors (getChild/getIndex) so the
expression tree can be walked from the export filter.

Equations or handles that cannot be expressed yet (raw-radians angles
without the pi/const idiom, atan2/cat2/sat2, ellipse, polar handles) fall
back to resolved coordinates, as before.

Also update the now-outdated comment in ShapeExport that claimed ODF
equations cannot be converted to DrawingML. Adds a test on a symbol shape
(tdf#142603) and a circular arrow (tdf#157289 trig guides), and updates
testFlipAndRotateCustomShape / testEquationGuidesExport for the new
parametric output.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I21cf73df018417fcfe9c2f9ecd185c0ac29a198d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4464
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 40967878aeaee989216b6e0cfd6cf81af4a8b1d8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206685
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 20:38:02 +02:00
Noel Grandin bce4b4af9d [API CHANGE] remove deprecated XSpell1 and XSupportedLanguages
in favour of their replacements XSpell and XSupportedLocales

Change-Id: I3ad20d0c6c3bf0a00d7ef3947705059027a1ff6f
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4228
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 35842d441f2e82204ce77ba8c53735be3f18dc78)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206467
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 14:55:20 +02:00
Andreas Heinisch 818737303a tdf#58349 - Turn border button into a split button
Turn Border button into a split button and remember recent border style.

Change-Id: I7c971ff9f5f18504cea9058ffd876f3608a7479f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206619
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-06-16 07:26:03 +02:00
Michael Weghorn 676d40a32e svx: Drop unused SvxColorValueSet::layoutAllVisible
Unused since

    commit a4d5983b4e
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jun 5 11:48:54 2026 +0200

        tdf#130857 Port ColorWindow from SvxColorValueSet to ColorIconView

Change-Id: I4b4d11a9c6e66659c970dc1c9afe2908306b8b71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206308
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-11 21:42:36 +02:00
Michael Weghorn 31b4948c7d svx: Move SvxColorValueSet to svx-internal header
Since

    Change-Id: Ia997dfa48f4239046a1b821f40ed402128111b23
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 10 10:25:27 2026 +0200

        tdf#130857 sc: Port tab color dialog to ColorIconView

, the class is only used in SvxColorValueSet_docking in
svx itself, so there is no more need to have it defined in a
global header.

Change-Id: Idf9763049faf5d2dcf25151fdbcfbc4c0f128304
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206307
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-11 21:42:26 +02:00
Caolán McNamara 23ea1663b7 put calc background images under link control
Change-Id: I5adbbaf7e4860732dad2375dcbee541198ef6fab
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2393
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 6ebc3fb5db211b6c9de96dcf3ba14b6b7f37c203)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206342
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-11 21:42:21 +02:00
Michael Weghorn eb04a45568 svx: Move setting a11y name out of SvxColorValueSet_docking::SetDrawingArea
Set the a11y name for the drawing area in
SvxColorDockingWindow::SvxColorDockingWindow instead,
where the help ID is also set.

This could also make it easier to port away from
using SvxColorValueSet in the future.

One use case of UI using the class:

* start Impress
* enable "View" -> "Color Bar"
* select e.g. the title or content box on the slide
* click on one color in the color bar to apply the
  selected color as background color for the selected
  content box

Change-Id: I899bbe21ac1d6db3c24d6d8a088c9ab2b3d90d9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206306
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-11 21:42:17 +02:00
Michael Weghorn b7fd9a70e3 svx: Prefix SvxColorDockingWindow members with "m_"
This makes it easier to distinguish them from local
variables at first glance.

While at it, also use a "p" instead of an "x" prefix for
(smart) pointer members.

Change-Id: I8a303113149bdc8799043b5632656d3bd61f1ac3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206305
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-11 21:42:08 +02:00
Michael Weghorn dc3b6ec185 tdf#130857 sc: Port tab color dialog to ColorIconView
Similar to

    commit a4d5983b4e
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jun 5 11:48:54 2026 +0200

        tdf#130857 Port ColorWindow from SvxColorValueSet to ColorIconView

, also port ScTabBgColorDlg from using SvxColorValueSet
to use ColorIconView instead.

This helps to be more consistent with other platform/toolkit
widgets, reduces custom logic and prepares for enabling
support for that dialog with native Qt widgets
(SAL_VCL_QT_USE_WELDED_WIDGETS=1) in an upcoming commit.

Extend ColorIconView to also allow setting a handler that
gets called when the selection changes and make use of that
in ScTabBgColorDlg.

The custom ScTabBgColorValueSet::ScTabBgColorValueSet
subclass for SvxColorValueSet was used to allow automatically
closing the dialog when the space or Return keys were pressed
while the widget to select the color had focus.
This is now covered by the handler for item activation,
ScTabBgColorValueSet::TabBgColorActivatedHdl, so no
separate class is needed for that any more.

The dialog can be triggered like this:

* start Calc
* "Sheet" -> "Sheet Tab Color"

Change-Id: Ia997dfa48f4239046a1b821f40ed402128111b23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206285
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-11 21:41:36 +02:00
Caolán McNamara dfc1b53266 put impress/draw background images under link control
Change-Id: Id1355ed3346e2c2123a2b35f16bd9cabf21d451f
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2391
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit bdb5efeea50d3d7aeb1b50bc5b7e00b5a89c17d9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206341
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-11 10:45:37 +02:00
Tomaž Vajngerl 572d9c1582 Fix text auto color in table cells when there is no cell background
This fixes auto font color not changing to white when the slide
background is dark and the table cell has no explicit fill.

When resolving automatic font color for text in table cells, the
code previously used the table object's own fill (either on object
or from style). This fill is not rendered behind cell text at all,
so it shouldn't affect the text color.

Add GetActiveTextBackgroundColor() method on SdrTextObj that returns
the object's fill color for auto color resolution. SdrTableObj
uses it's own version that checks the specific cell's fill first,
then falls back to the page/master-page background, skipping the
table object's own fill entirely.

Change-Id: I06c1b23bc1876d2f8c69d8219958a46212b0f793
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2435
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 21aade416e94db7d31244166a349f3590d3aa7f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206336
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-11 09:02:32 +02:00