The SfxStatBar_Impl struct only has a single StatusBarId
member. Use StatusBarId directly instead and drop the
struct.
Change-Id: Icc56290e3024baf83ae3e08da82749cec1b7b675
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208115
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
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>
Pass the param by ref instead of pointer. This makes
clear the param is always non-null.
Change-Id: I8b91f0aa63267ed3d719b626d72145b03acca64e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207573
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The only caller of TemplateViewItem::getDefaultIconArea
is only interested in the top left position
of the returned rectangle. Simplify to return that
and rename the method accordingly.
Change-Id: Ieb25f678059e48afe3398d307e49f496a8446022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207572
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Move code that is the same for the if/else branches
out of those to share it.
Change-Id: Ibf0c6a08e4b98bf5eb16defad33bd437a145033b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207364
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Let the TemplateDlgLocalView take care of
focusing the widget that is currently enabled
due to the current mode instead of having
to take care of such implementation details
in SfxTemplateManagerDlg that uses
TemplateDlgLocalView.
Change-Id: I1cdf66fd93dcab84b82c6de97cf658c371f7d19a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207358
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Do that in the class itself, instead of calling
weld::TreeView::connect_column_clicked in the
only subclass.
Also make the handler (and while at it, also the tooltip
one) private.
Change-Id: I18cb307b65c49cd1217d2b47ace8a53e94d87faa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207357
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.
By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.
By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)
Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.
Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Add SID_INSERT_THREADED_COMMENT slot (.uno:InsertThreadedComment) and
SID_RESOLVE_THREADED_COMMENT slot (.uno:ResolveComment) to the Calc cell
shell. The insert handler creates a note with ScThreadedCommentData,
generates a random GUID for the comment and a deterministic UUID v5
(SHA-1, RFC 4122) for the person entry. The resolve handler toggles the
resolved state.
Include "threaded" and "resolved" fields in the COKit comment JSON
payload; when COKit is active, send the actual threaded root text
instead of the legacy fallback.
Rename .uno:InsertAnnotation label to "Insert Note" in Calc, and add
.uno:InsertThreadedComment as "Insert Comment" — matching Excel's
terminology where Notes are the old-style and Comments are threaded.
The unit test for this is on the Online side (cypress).
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I398ee844d8706626eb859447021c4d4630d48631
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/804
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 894a2346a3fd37f9404147137f6bc5fe94c2fc99)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205352
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Replace hand-written search loops with C++ STL algorithms
(std::any_of/std::find/std::find_if and std::ranges variants) for
clarity and conciseness across sc, sfx2, and sw modules.
Change-Id: Id0c9da990280c3718aee03c74f932a0c9a7bdf24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204349
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Replace DBG_ASSERT with SAL_INFO in both Register_Impl and Release
since re-entrancy here is valid, and restart the update loop when
detected.
Re-entrancy call chain:
NextJob_Impl
Update_Impl
FillState_
ScTabViewShell::GetStyleState
SfxBindings::QueryState
... (dispatch provider chain)
SfxBindings::GetDispatch
SfxOfficeDispatch ctor
SfxDispatchController_Impl ctor
BindInternal_Impl
Register_Impl
GetStyleState queries a slot's state through the dispatch provider
chain. SfxBindings::GetDispatch constructs a new SfxOfficeDispatch
whose SfxDispatchController_Impl registers itself as an internal
controller, re-entering Register_Impl while bInNextJob is set.
In Register_Impl, inserting a new cache sets bMsgDirty. In Release,
removing the last controller from a cache leads to LeaveRegistrations
erasing the cache from pCaches. Both cases invalidate NextJob_Impl's
cached nCount. The bMsgDirty check after Update_Impl detects this and
restarts the loop so UpdateSlotServer_Impl runs first.
Change-Id: Ifcbff9c84d037f093668c789b828d630c1bd9604
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/141
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 6629080e76b2a3c5db76607325edcc26ea34e278)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205194
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
...as emsdk 5.0.3 deprecated the predefined EMSCRIPTEN macro (see
<https://github.com/emscripten-core/emscripten/commit/506052bd8b4e23ded7f2351c62ca3b24d40c8cf3>
"Warn about usage of deprecated EMSCRIPTEN macro. NFC (#26381)"), causing
failures like
> In file included from static/source/unoembindhelpers/PrimaryBindings.cxx:29:
> In file included from include/sfx2/viewsh.hxx:35:
> In file included from include/editeng/outliner.hxx:32:
> In file included from include/tools/color.hxx:26:
> include/osl/endian.h:66:15: error: macro 'EMSCRIPTEN' has been marked as deprecated: use __EMSCRIPTEN__ instead [-Werror,-Wdeprecated-pragma]
> 66 | #elif defined EMSCRIPTEN
> | ^
> /home/sberg/emsdk/5.0.4/emsdk/emscripten/main/cache/sysroot/include/emscripten/emscripten.h:35:66: note: macro marked 'deprecated' here
> 35 | #pragma clang deprecated(EMSCRIPTEN, "use __EMSCRIPTEN__ instead")
> | ^
To avoid confusion, also suppress the -D$(OS) in
solenv/gbuild/platform/unxgcc.mk that would unnecessarily keep defining
EMSCRIPTEN.
Change-Id: Ic1f187cf1c6417cd95d4092e9cea01a665bd1b2f
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/34
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 50291c2ed83bdb49bb827a4a12905d94b8c42035)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205167
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Replace iterator-based for loop with range-based equivalent in
SfxCharmapContainer when populating the icon view from a char list.
Change-Id: I40169c9cb23ae75977a5efaf9aed15d1af0e4786
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204690
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
* Checkbox label and position as well as button width and margins
at the UI changed
* Consistent access to the variable via a new class including
the consistent storage of the query flag
* Additional buttons added to have homogeneous Yes/No as well as
non-homogeneous long names, eg. for file formats
Change-Id: Icfbd923b298e1192a1474519543986142167f6c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203572
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
No need for an else block, because there is a return
statement in the if block.
Also merge variable declaration with assignment.
Change-Id: I45cb7ebbc621962badec7d01fcc742717dc82f6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203846
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch the param for the signal and handlers used when
the selection in a weld::IconView changes from weld::IconView&
to the base class, weld::ItemView&.
This is in preparation of moving the logic to the weld::ItemView
base class in an upcoming commit.
This is the IconView equivalent of previous commit
Change-Id: I0bbf8fe1dbd95906a5224155d48d832bcd144532
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Apr 9 13:45:18 2026 +0200
weld: Switch TreeView selection changed signal param to ItemView
Change-Id: I87fad3a129128d4387adfdd75d18e93f05af5e84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203367
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch the param for the signal and handlers used when
the selection in a weld::TreeView changes from weld::TreeView&
to the base class, weld::ItemView&.
This is in preparation of moving the logic to the weld::ItemView
base class in an upcoming commit.
Handler implementations that require a weld::TreeView
instance can use the one that the signal is connected
to, e.g. use the class member directly inside of the
implementation instead of using the param (as is done
in most of the places anyway).
Change-Id: I0bbf8fe1dbd95906a5224155d48d832bcd144532
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203366
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Rename methods and field related to signalling activation
of a weld::TreeView row to use the same names as the equivalent
ones for signalling activation of an entry in weld::IconView:
* weld::TreeView::m_aRowActivatedHdl -> weld::TreeView::m_aItemActivatedHdl
* weld::TreeView::signal_row_activated -> weld::TreeView::signal_item_activated
* weld::TreeView::connect_row_activated -> weld::TreeView::connect_item_activated
This is in preparation of deduplicating the weld::TreeView
and weld::IconView implementations for these by moving them
to the common weld::ItemView base class in an upcoming commit.
Change-Id: I4ca4dec1295c57cea574b68fd41b89c12144c4f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203350
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This is basically the weld::TreeView version of earlier
commit
Change-Id: I8ca62ac32108f01e2055d5ef9301de22eb5b1931
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Apr 8 12:35:25 2026 +0200
weld: Pass activated item in IconView::signal_item_activated
applying an equivalent change for weld::IconView instead
of weld::TreeView. See that commit for more details/background.
For weld::TreeView, the weld::TreeIter refers to
a full row (and columns are handled separately
by a column index in the weld::TreeView API).
As for the above commit:
Initially, leave the logic of the existing signal handlers/callbackes
(in dialog implementations) unchanged. At least some of them
will be simplified in upcoming commits to use the
newly passed weld::TreeIter param directly instead of
determining the current/activated row a different
way.
Change-Id: Ie6a962702d4f7f069b2f7b77a22a78722b2a6408
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203331
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Make use of the new param introduced in
Change-Id: I8ca62ac32108f01e2055d5ef9301de22eb5b1931
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Apr 8 12:35:25 2026 +0200
weld: Pass activated item in IconView::signal_item_activated
to simplify the existing handlers/callbacks that get
called when a favorite/recent special character is activated
in the icon views used in the special characters dialog and
popup instead of having extra logic to get the (first) currently
selected item in the icon views.
Change-Id: I24941043fc67fbe43a4f0b335cb8d96d6f4a5c07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203318
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
So far, the IconView::signal_item_activated was called
with the weld::IconView itself as a parameter, i.e.
the information what item was selected wasn't directly
passed to the signal handlers.
Change that to pass a weld::TreeIter param referring to the
activated item instead of the IconView itself.
The information what item was activated is relevant
and this way, there is no need to determine it some
other way in the handlers (e.g. by using the first
selected entry).
This also aligns this more with what UI toolkits
like GTK and Qt provide.
For GTK, the GtkIconView::item-activated signal [1]
has the path of the activated entry.
For Qt, the QAbstractItemView::activated signal [2]
has the QModelIndex of the activated item.
For the vcl implementation in SalInstanceIconView::DoubleClickHdl,
use the cursor/current item.
In LOKTrigger::trigger_item_activated, use the currently selected
entry (retrieved via weld::IconView::get_selected), because the
only caller in jsdialog::ExecuteAction uses weld::IconView::select
first to select an entry before triggering the signal.
Initially, leave the logic of the existing signal handlers/callbackes
(in dialog implementations) unchanged. At least some of them
will be simplified in upcoming commits.
[1] https://docs.gtk.org/gtk3/signal.IconView.item-activated.html
[2] https://doc.qt.io/qt-6/qabstractitemview.html#activated
Change-Id: I8ca62ac32108f01e2055d5ef9301de22eb5b1931
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203317
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Don't have a single handler method for both of the
icon views in SfxCharmapContainer and make a distinction
on the icon view in the handler, but have a separate handler
for each of them.
This prepares for adjusting the IconView::m_aItemActivatedHdl
to pass the weld::TreeIter of the activated entry instead
of just the weld::IconView itself.
Change-Id: I716197d0e4818469b88e53d9198066392d1c975a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203289
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
New dialog (Insert > Calculated Field) to add, modify, and delete
calculated fields. Accessible from the menu bar, pivot table context
menu. Insert, modify, delete a calculated field properly.
TODO: maybe more warnings during formula entry edit
Change-Id: Ifdf50de96ff6f7b736b6307e9bea3ae56108679f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200314
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga@collabora.com>
Also replace the "SFX_" with a "RID_" prefix.
This prepares for reuse inside vcl in an upcoming commit.
Change-Id: Idf0fc77fcce2182c94be872fb01fe0da0b16c790
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201521
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
cache is only used for non-master commands
This fixes warnings like:
warn:legacy.tools:1611319:1611319:sfx2/source/control/bindings.cxx:1755: No cache for OfficeDispatch!
Change-Id: I9d7583b55481177a15b22317b45316724c0e5e95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200059
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: I5b23b02151c75bb49831a2bbf8d515eb0b54415e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199068
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: I86edb8abe2178862269f2fc2a1629fb682a6a752
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198790
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
menubar Insert and Data. With that command a new Table Style area (context) can be
added to the sheet with a defalt table style name (Table1, Table2 etc.).
If the default ooxml table styles are available the "TableStyleMedium2"
style will be automatically applied (same as in Mso), which can be modified
to any other available style after that.
Also add new command for delete a table context. It is also available
from Insert and Data menubar.
For simplifying the dbrange behaviour, it will not possible to change DbRange
properties of those DbRanges which has Table context. (same as in MSO)
from the older DbRange dialog
Includes cleanup for unused-but-set variables (-Werror).
Change-Id: I98067e895d9595ba07206759deff6848dc299216
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194408
Tested-by: Balazs Varga <balazs.varga@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Balazs Varga <balazs.varga@collabora.com>
Code-Style: Balazs Varga <balazs.varga@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196768
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197994
Tested-by: Jenkins