Commit Graph
3455 Commits
Author SHA1 Message Date
Gabor Kelemen 4d24007632 tdf#146619 Run IWYU again on include/svl/
Change-Id: I5dc8757a6d06ab6917a9af733550295008fde5b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193914
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2025-11-29 13:59:05 +01:00
Mike Kaganski b8df7459ba Drop explicit template parameter where deducible
Namely, from SfxRequest::GetArg variant taking TypedWhichId.

Change-Id: I60e0fcf6defdc78d29bc98afe24ac22014d4aee2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194672
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-11-27 19:20:38 +01:00
Christopher Sherlock e3ea978616 vcl: remove OutputDevice::DrawBitmapEx()
This also streamlines DrawBitmapWallpaper()

Change-Id: I694667147319ba9d235348068ed8fc811447fae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190898
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-11-11 07:16:00 +01:00
Gabor Kelemen fd2e467ba3 tdf#146619 Run IWYU in fw decl mode on include/[a-c]*
After recent commit 851fb75779
recheck these directories in include/ again
to test drive the new --headersfwd mode of bin/find-unneeded-includes

Change-Id: I0ede437c4f9958cd98210ed1760a5b98ea8bd1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192377
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-08 09:37:19 +01:00
Caolán McNamara 61ce786060 cid#1667146 Variable copied when it could be moved
and

cid#1667145 Variable copied when it could be moved

Change-Id: I743bd3f2a3a3db35f31864b360c8fcd953522015
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192693
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-10-20 13:46:23 +02:00
Caolán McNamara 91a219d847 cid#1667139 Unchecked return value
Change-Id: I7d4b3a2cbd3d63e067087385bd19564c32ad5709
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192651
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-19 12:40:40 +02:00
Caolán McNamara 55ec4cbab8 cid#1667146 Variable copied when it could be moved
and

cid#1667145 Variable copied when it could be moved
cid#1667144 Variable copied when it could be moved
cid#1667143 Variable copied when it could be moved
cid#1667142 Variable copied when it could be moved
cid#1667141 Variable copied when it could be moved
cid#1667140 Variable copied when it could be moved

Change-Id: I5e4acc28071623a8676d83521f445c3c127de6ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192650
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-10-19 12:40:33 +02:00
Devansh Varshney 84401c3b18 tdf#165785: basctl: Activate Details Pane and Contextual Status Bar
This patch brings the Object Browser's information panels to life,
activating the main details pane and the bottom status bar.

When a user selects an item, the details pane now displays a rich,
formatted view of its properties, such as its full signature or a summary
of its contents. The status bar provides helpful context, like member
counts, and displays the total time taken for the initial data load.

(GSoC 2025 - Object Browser: Rich Information Display)

Change-Id: Iadbc2f3dfeb8eba357558d8a98e7ef663a3e2683
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192079
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2025-10-17 01:52:45 +02:00
Devansh Varshney 2b5803c3b4 tdf#165785: basctl: Implement Right-Pane Interactivity
This patch brings the Object Browser's right-hand members pane to life.

The right pane now supports on-demand expansion for nested UNO types.
Double-clicking items now performs a context-aware action: opening
the relevant Doxygen API page for UNO types or navigating to the
source code for BASIC macros.

(GSoC 2025 - Object Browser: Right-Pane UI Enhancement)

Change-Id: Ibcc2a0479746f3724372c9bd89853626506d42f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192050
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-10-17 01:51:10 +02:00
Devansh Varshney edb03719a7 tdf#165785: basctl: Activate Core UI Interactivity and Member View
This patch brings the Object Browser's user interface to life. It
connects the left navigation pane to the right members pane.

When a user expands a node on the left, its children are now loaded on
demand to keep the UI responsive. When a user selects an item, such as a
module or an interface, its members are now fetched and displayed in the
right-hand pane.

(GSoC 2025 - Object Browser: Member View and UI Logic)

Change-Id: I199ebcac20590d1a1ca83ef3ee7759ff34504252
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191923
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-10-16 23:09:08 +02:00
Devansh Varshney dd1474c34f tdf#165785: basctl: Activate Object Browser Scope Selector and Dynamic Refresh
This patch brings the Object Browser's scope mechanism to life. It
connects the UI's "Scope" dropdown to the data provider, allowing the
view to be filtered between "All Libraries" and "Current Document".

The browser now also automatically updates its view to reflect the
currently active document when in "Current Document" mode.

(GSoC 2025 - Object Browser: Scope Activation and Dynamic UI)

Change-Id: Icd3679330c9b05eaa0cb351d81fd4d2415f91d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191886
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-10-16 21:02:46 +02:00
Andrea Gelmini 4b48de50c4 Fix typo
Change-Id: I5e43e08ed99e2c781f8344aace44a5cf3934e807
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192411
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2025-10-15 10:21:26 +02:00
Sergey Anisimov 520d75f9d2 tdf#158237 - Use C++20 contains() instead of find() and end()
Change-Id: I2f8497f20acd72653530d60fec738dcbd4b1af10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192318
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-10-15 00:44:52 +02:00
Devansh Varshney a2d19c0704 tdf#165785: basctl: Implement data provider for Object Browser
This patch introduces the core data-fetching logic for the new Object
Browser. It implements the logic to scan all available UNO APIs and to
preload BASIC libraries.

For this foundational patch, the data initialization is performed
synchronously. A subsequent patch will refactor this into a non-blocking,
asynchronous operation to keep the UI fully responsive.

(GSoC 2025 - Object Browser: Data Provider Implementation)

Change-Id: I46446fc498820d9776d77ba25c4fa3fd4ca89a8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191405
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-10-14 18:35:47 +02:00
Mike Kaganski e16910adad SbModule: [GS]etSource32 -> [GS]etSource
The *32 methods were initially introduced in a series of "Basic Modules > 64K"
commits (2003), in addition to the pre-existing [GS]etSource methods. Then, in
commits d41b8ac9e5 (callcatcher: shave off a few
more, 2015-02-02) and 919375354c (GetSource32
and GetSource are identical, 2019-12-09), the original methods were dropped.
Now the '32' suffix to the methods makes no sense.

Change-Id: I9dc172ce973b1b49511518f184d174ea68227cdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192086
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-09 22:06:25 +02:00
Caolán McNamara 41a20e67c8 cid#1421169 Uncaught exception
and

cid#1421161 Uncaught exception
cid#1421146 Uncaught exception
cid#1421145 Uncaught exception
cid#1421100 Uncaught exception
cid#1659879 Uncaught exception

Change-Id: Ib117e8f2de0d51189d7277d3eec8a1ed685f0724
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191947
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-06 11:22:08 +02:00
Caolán McNamara 153b4dc2e0 drop some more COVERITY stuff
Change-Id: I5964880c3eb62875c45e3262a9c657f7bade236d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191946
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-06 11:22:01 +02:00
Devansh Varshney 87a7d94cc3 tdf#165785: basctl: Integrate blank UI shell for Object Browser
This patch integrates the user interface for the new Object Browser.
It introduces the UI definition file and the C++ logic to create,
display, and manage the window's lifecycle within the IDE.

(GSoC 2025 - Object Browser: UI Shell Integration)

Change-Id: I9a2d7c319a7590e44eafe3d575eb3b0aeffb7e86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191206
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2025-09-26 21:46:24 +02:00
Devansh Varshney dadddf3861 tdf#165785: basctl: Core Data Structures for Object Browser
This commit introduces the core data structures and minimal C++ class
definitions for the new BASIC IDE Object Browser. It establishes the
necessary foundation for the feature, allowing the code to build cleanly.

The actual logic for the UI, data fetching, and other features
will be implemented in subsequent, focused patches.

(GSoC 2025 - Object Browser: Core Data Structures)

Change-Id: Ibd9bb6be0adf579d156662bf33565de497187a55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189934
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2025-09-26 20:53:40 +02:00
Noel Grandin 4efd03d69a BitmapEx->Bitmap in DlgEditor::Print
now that Bitmap supports transparency

Change-Id: I99f69fcd081b98077b17b0b54c604239faf88263
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190459
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-01 10:50:15 +02:00
Mike Kaganski d3504acf62 Use RepeatedUChar in basctl and basic
Change-Id: I87a6e802ef3720dd290ddbe202dad6a9220365c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190343
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-29 06:11:38 +02:00
Mike Kaganski b68633e21c Use OutputDevice::ScopedPush in various
Change-Id: I1eb4340c603bae6a62fa676534ffb21fe2316649
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189806
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-17 09:44:41 +02:00
Caolán McNamara d3fcc9a5b6 drop apparently no longer needed coverity markup
Change-Id: Ia8b3b271bb5cc67131b50d563bed58400da5b317
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189662
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-15 11:25:12 +02:00
Caolán McNamara fc6d103827 cid#1662042 Variable copied when it could be moved
and

cid#1662041 Variable copied when it could be moved
cid#1662040 Variable copied when it could be moved
cid#1662038 Variable copied when it could be moved
cid#1660211 Variable copied when it could be moved
cid#1660147 Variable copied when it could be moved
cid#1660117 Variable copied when it could be moved
cid#1660071 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1659985 Variable copied when it could be moved

Change-Id: I34627585e593f9de6bfa195ee0617848d9ed6135
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189157
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-08 12:35:37 +02:00
Michael Weghorn a635742d53 tdf#130857 basctl: Don't use GtkBox as GtkFrame label child
This is a similar change to previous commit

    Change-Id: I86754be7c0ce068ceb6216fd0463657b05f4ca41
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Aug 7 16:15:12 2025 +0200

        tdf#130857 svx: Don't use GtkBox as GtkFrame label child

, but for a different dialog.
See the commit message of the above-mentioned commit for more
background.

The dialog adjusted in this commit can be triggered from Writer
using "Tools" -> "Macros" -> "Organize Macros" -> "Basic".

Change-Id: Ibe1f3ea10d27c6032906ca716859f1d961239304
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189113
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-08-08 05:49:15 +02:00
Gabor Kelemen 330959905a tdf#146619 Run IWYU on basctl/
Change-Id: Ia2e6fac20d017c5cfb5f7ab11b32afaaf97c5ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188428
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-08-06 18:41:27 +02:00
Caolán McNamara 368cd2678f cid#1660185 Variable copied when it could be moved
and

cid#1660184 Variable copied when it could be moved
cid#1660183 Variable copied when it could be moved
cid#1660182 Variable copied when it could be moved
cid#1660181 Variable copied when it could be moved
cid#1660177 Variable copied when it could be moved
cid#1660176 Variable copied when it could be moved

Change-Id: Id5c90c0a0d4a0a86ef0f4b513b45c2db3a97b207
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188975
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-06 09:33:31 +02:00
Caolán McNamara c2e99a2502 cid#1555615 Variable copied when it could be moved
and

cid#1555637 Variable copied when it could be moved
cid#1555640 Variable copied when it could be moved
cid#1555863 Variable copied when it could be moved
cid#1556471 Variable copied when it could be moved
cid#1556634 Variable copied when it could be moved
cid#1556731 Variable copied when it could be moved
cid#1556751 Variable copied when it could be moved
cid#1556807 Variable copied when it could be moved
cid#1557366 Variable copied when it could be moved
cid#1558026 Variable copied when it could be moved

Change-Id: I187cb364877d35acd843d8391e5b376437ec96f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188935
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-05 12:05:04 +02:00
Caolán McNamara 1dcdc80798 cid#1660247 Variable copied when it could be moved
and

cid#1660246 Variable copied when it could be moved
cid#1660243 Variable copied when it could be moved
cid#1660240 Variable copied when it could be moved
cid#1660237 Variable copied when it could be moved
cid#1660235 Variable copied when it could be moved
cid#1660234 Variable copied when it could be moved
cid#1660230 Variable copied when it could be moved
cid#1660228 Variable copied when it could be moved
cid#1660225 Variable copied when it could be moved
cid#1660223 Variable copied when it could be moved

Change-Id: I3cd87174e8e88a9c55101a73399117c3f2b80644
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188926
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-05 09:42:05 +02:00
Caolán McNamara 6fc58fb3a4 cid#1660346 Variable copied when it could be moved
and

cid#1660344 Variable copied when it could be moved
cid#1660343 Variable copied when it could be moved
cid#1660341 Variable copied when it could be moved
cid#1660339 Variable copied when it could be moved
cid#1660337 Variable copied when it could be moved
cid#1660335 Variable copied when it could be moved
cid#1660334 Variable copied when it could be moved

Change-Id: I3758a4228d5e848750b4ef37296b4d38b5d3e31c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-03 12:18:26 +02:00
Michael Weghorn aa67679df7 tdf#130857 weld: Restrict default widget concept to buttons
Only buttons are used as default widgets for dialogs,
and that's also the only thing that Qt supports conceptually,
see [1] and previous commit

    Change-Id: If5042dce9b10c9c4f3450a1aa1299bec81c16771
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sat Jul 26 00:36:10 2025 +0200

        tdf#130857 weld: Move methods to set default widget to Dialog

Therefore, also adjust the weld API accordingly by switching the
params from weld::Widget to weld::Button and renaming the
methods accordingly.

[1] https://doc.qt.io/qt-6/qdialog.html#default-button

Change-Id: I6a2b162e1711fd49df852360510bf25f33f6c874
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188380
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-07-29 05:20:56 +02:00
Michael Weghorn 7c036efe76 vcl a11y: Return OAccessible in vcl::Window::CreateAccessible
By now, the accessible is known to always be an OAccessible,
so return that more specific type instead of a Reference to
the abstract XAccessible interface.

Change-Id: Ie8f5318fb35d2fdeb59ac97452e2e27971c6b5a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188180
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-07-23 08:00:28 +02:00
Mike Kaganski 0a031b751a tdf#167277: make LineNumberWindow and BreakPointWindow paint immediately
... on scroll. No idea why did it only show up with Vulkan; but for these
windows, the immediate paint is the correct thing to do.

The behavior of Paint wrt. SyncYOffset was changed: on invalidation, now
it doesn't return from Paint, to avoid flicker (the background of windows
is already erased; keeping it white until next paint can be noticed).

Change-Id: I5d306122f4465ca4556cd5b8c69d5f047ce9b53f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187131
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-06-28 18:45:53 +02:00
Noel Grandin 9b3f618747 retrieveParagraphBounds always has false for bAbsolute param
ever since
    commit 9ed4a07cee
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Jan 28 17:14:05 2025 +0100
    a11y: Use OAccessibleComponentHelper for text window Paragraph

Change-Id: I2aa56a76ed4d8804d6bfcf93c45d9a8e83a16dfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187042
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-06-26 18:12:40 +02:00
Michael Weghorn e7e3a51c32 a11y: Rename OAccessible source and header file
Rename files accordingly after the class
was renamed in previous commit

    Change-Id: I33210b47cda5f71820a3c0fa657e4c3548d45732
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Jun 25 10:15:23 2025 +0200

        a11y: Rename OAccessibleComponentHelper to OAccessible

Change-Id: I1d38d124af685960c0170601e930da516ce2ead3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186953
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-06-26 13:09:50 +02:00
Michael Weghorn 671b8cad97 a11y: Rename OAccessibleComponentHelper to OAccessible
The helper class used to implement less functionality
in the past and was used less than it is now.
But by now it is the central helper/base class used
by most a11y classes.

Since

    commit 22049f633b
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon May 26 12:24:52 2025 +0200

        vcl a11y: Let OAccessibleComponentHelper implement XAccessible

it also implements the XAccessible interface.

That will allow to switch parameters and class members
from the abstract XAccessible interface to using this
more concrete C++ base class in various places.

Rename the class to OAccessible to account for the
new responsibilities, and adjust its doc accordingly.

Renaming source and header file will be done in a
separate commit to simplify (git) keeping track.

Change-Id: I33210b47cda5f71820a3c0fa657e4c3548d45732
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186952
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-06-26 13:09:41 +02:00
Michael Weghorn 22049f633b vcl a11y: Let OAccessibleComponentHelper implement XAccessible
By now, in particular after

    Change-Id: I62da0040e6c98636681c4f05dbd0b796dae5b928
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon May 26 09:35:07 2025 +0200

        vcl a11y: Let VCLXAccessibleComponent implement XAccessible

, all OAccessibleComponentHelper subclasses are
implementing the XAccessible interface and returning
`this` in their XAccessible::getAccessibleContext implementation.

Unify and deduplicate that by moving the implementation to the
OAccessibleComponentHelper base class.

Locking specifics (whether a mutex was locked and which one)
and whether a check whether the accessible hadn't been
disposed yet was done varied across the different implementations.
The new OAccessibleComponentHelper::getAccessibleContext
unifies this to use OExternalLockGuard, i.e. it both locks
the mutex and throws an exception if the instance is no
longer alive.

Should this commit result in any issues, it's likely because
there is a preexisting locking issue/inconsistency or an object
has already been disposed and that needs to be addressed.
(The easiest approach in case of a disposed object would be
to simply catch + ignore the exception in the caller, but
a more thorough investigation would likely be helpful.)

Change-Id: Ib56a9ddb1c36356943c2dfd7a5705351ee43e9d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185849
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-06-25 07:40:30 +02:00
Michael Weghorn 6958721f4f vcl a11y: Let VCLXAccessibleComponent implement XAccessible
Various VCLXAccessibleComponent subclasses were already
implementing the XAccessible interface and returning
`this` in their XAccessible::getAccessibleContext implementation.

Unify that and move the implementation to the
VCLXAccessibleComponent base class.

Locking specifics (whether a mutex was locked and which one)
and whether a check whether the accessible hadn't been
disposed yet was done varied across the different implementations.
The new VCLXAccessibleComponent::getAccessibleContext
unifies this to use OExternalLockGuard, i.e. it both locks
the mutex and throws an exception if the instance is no
longer alive.

Should this commit result in any issues, it's likely because
there is a preexisting locking issue or an object has already
been disposed and that needs to be addressed.
(The easiest approach in case of a disposed object would be
to simply catch + ignore the exception in the caller, but
a more thorough investigation would likely be helpful.)

This commit also prepares for letting vcl::Window create
its accessible directly, at which point the VCLXAccessibleWindow
will become both, its XAccessible and its XAccessibleContext
(while it is only the latter at the moment for those cases
still handled in Window::CreateAccessible, i.e. not an override
inside a subclass).

Change-Id: I62da0040e6c98636681c4f05dbd0b796dae5b928
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185839
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-06-19 19:37:19 +02:00
Jim Chen c0c3d93e57 tdf#97169 Macro Sort Dialog for Basic IDE Panel
Allows users of the BASIC macro editor the option to sort Basic scripts
either alphabetically or in the order in which they appear.

Change-Id: I346fc543ae9d6930ed707185c84c0fdf5d3bf727
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179627
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-06-12 10:38:54 +02:00
Khaled Hosny b2b31dd8be tdf#166357: Fix saving font weight to documents
Several font weights (Ultra Light, Light, and Medium) were incorrectly
saved to file.

ULTRALIGHT and LIGHT were saved as fo:font-weight 150 and 250,
respectively. But, according to ODF spec, the values of the
fo:font-weight attribute are normal, bold, 100, 200, 300, 400, 500, 600,
700, 800 or 900:

https://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#a_20_184_fo_font-weight

This change fixes ULTRALIGHT and LIGHT to map to 200 and 300,
respectively.

This change also introduces awt::FontWeight::MEDIUM and gives it an
arbitrary 105% value (the percentage values in awt::FontWeight make no
sense at all, THIN numeric value is 100, so it should be 25% of NORMAL
whose numeric value is 400, but it is 50% in awt::FontWeight), and fix
the mapping to and from awt::FontWeight to handle medium weight
properly, and fixes the numeric weight values saved to file.

The backward compatibility for this change are likely negligible since
we don’t support extended font families on Windows, or Linux for
non-variable fonts.

Change-Id: I80ece7bb05462b0f3aceb7f39409f8135f63e94d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186128
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2025-06-10 18:26:22 +02:00
Michael Weghorn e6e6554e5e basctl a11y: Drop AccessibleDialogControlShape::getAccessibleIndexInParent
The base class implementation in
OAccessibleComponentHelper::getAccessibleIndexInParent
already implements the same logic.

Change-Id: I42634213177d4c34ca9330db58a01a4f687a66f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185945
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-05-28 18:03:15 +02:00
Michael Weghorn a57c6e99c9 a11y: Drop unused accessiblefactory.hxx includes
Change-Id: I5b605a32a62dfd17318db5232c59282a6ae1cb7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185841
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-05-28 18:02:30 +02:00
Mike Kaganski 374dd9fbd6 Unify on VclPtr::reset
We used to have two duplicating sets: smart pointer-like VclPtr::reset,
and Reference-style VclPtr::set / VclPtr::clear. There is no need in
this duplication. Further, in ScopedVclPtr, reset is hidden / removed
to avoid skipping disposeAndClear; but the twin functions are kept
accessible, possibly as an overlook.

This change drops Reference-style VclPtr::set / VclPtr::clear, and
unifies on VclPtr::reset, which looks more consistent with the class
nature (it is closer to shared_ptr, than to uno::Reference). Doing
that uncovered one place, where a ScopedVclPtr was used incorrectly:
clear() was used for NotebookbarPopup::m_pParent in NotebookbarPopup
dtor. I assume then, that the correct class needed here is VclPtr.

Change-Id: I0746075c58d793fabdce1bc357afea8ee455cd8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185553
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-05-25 11:23:18 +02:00
Michael Weghorn 92df695bf5 basicide a11y: Let Document implement XAccessible, drop TextWindowPeer
No longer have TextWindowPeer as a custom VCLXWindow
subclass that gets returned in
EditorWindow::GetComponentInterface (called via
vcl::Window::CreateAccessible) and is then responsible for
creating an accessibility::Document object for its XAccessibleContext.

Instead, let the Document class which already implements
the XAccessibleContext interface also implement the
XAccessible interface (and return self in its
XAccessible::getAccessibleContext implementation)
and create the new class when an XAccessible is
requested via EditorWindow::CreateAccessible, i.e.
override vcl::Window::CreateAccessible to avoid
the VCLXWindow indirection altogether.

No change in end user behavior expected or observed
in a quick test with Basic IDE ("Tools" -> "Macros"
-> "Edit Macros") when testing with Orca and Accerciser
with the gtk3 and qt6 VCL plugins.

Change-Id: Ie6f492b523dfd404c2ac7c3a149979105cc1d43f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184839
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-05-01 09:52:49 +02:00
Michael Weghorn d997c4fd03 basicide a11y: Move TextWindow a11y classes to basctl, create directly
Move the a11y classes used for implementing Basic IDE a11y
from vcl to basctl. Move them into a namespace
"accessibility" to avoid a name clash with the Paragraph
class declared in include/editeng/outliner.hxx.

In TextWindowPeer::CreateAccessibleContext, call the
Document ctor directly and drop the now unused
AccessibleFactory::createAccessibleTextWindowContext.

Change-Id: I396507e5fca17b4e7a1b65b28797569bc31d6a04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184838
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-05-01 09:52:37 +02:00
Michael Weghorn 9e96699b40 basicide a11y: Move basctl::createTextWindowPeer logic to caller
Drop the helper method basctl::createTextWindowPeer
that calls the TextWindowPeer ctor, and instead
call the ctor directly from
EditorWindow::GetComponentInterface.

In order for the class to be known there, move it
to the anonymous namespace in the same source file.

This is an intermediate step towards
getting rid of TextWindowPeer altogether.

Change-Id: I58111af8fadb45c6471af942b300665f3df189c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184837
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-05-01 09:52:30 +02:00
Michael Weghorn d5882d293e tdf#130857 basctl: {G,S}et SpinButton value instead of text
Just set/get the value directly and leave it to the
weld::SpinButton implementation to handle the
string <-> value conversion.

This GotoLineDialog can be triggered as follows in
Writer:

1) "Tools" -> "Macros" -> "Edit Macros"
2) in Basic IDE click on the info about current
   line and column in the centre of the status bar
   (e.g. "Ln 1, Col 1")

Change-Id: I857ec345d37b35733079aee4d1723f838a438a5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184107
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-04-13 19:17:47 +02:00
Gabor Kelemen 530e3ae320 Remove obsolete fw declarations from avmedia, basctl, basic, binaryurp
found with bin/find-unneeded-includes --fwdecl

Change-Id: Ia9eb16d95b02b5e8c13a98b6cc4b06a6315f2311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183878
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-04-11 10:52:47 +02:00
Michael Weghorn 2384755ca8 a11y: Drop unnecessary XAccessibleExtendedComponent overrides
Drop overrides of the XAccessibleExtendedComponent
which just return an empty string.

That is now already implemented in the base class
implementations in OAccessibleComponentHelper, see

    Change-Id: I05547b12806a6a90b166edbe196b4bc5a27344be
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Mar 31 13:49:20 2025 +0200

        a11y: Merge OAccessible{,Extended}ComponentHelper, add default impl

Change-Id: Ibc3fe295eaa2dc5443ba4f8fa25a81451b7b3765
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183553
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-04-01 11:20:32 +02:00
Michael Weghorn 0cb6632ece a11y: Merge OAccessibleComponentHelper and OCommonAccessibleComponent
Merge the two classes, now that OAccessibleComponentHelper
is the only OCommonAccessibleComponent subclass after

    Change-Id: I05547b12806a6a90b166edbe196b4bc5a27344be
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Mar 31 13:49:20 2025 +0200

        a11y: Merge OAccessible{,Extended}ComponentHelper, add default impl

Change-Id: Ic7a36c40066f307f8df29dc4dd45ed3ee966bcb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183552
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-04-01 11:20:23 +02:00