1370 Commits
Author SHA1 Message Date
Caolán McNamara 9919c42576 MasterScriptProvider::getScript: match the location to the context exactly
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib569ce5b5a8ccaf56c7922497b920b79a5b7b846
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13658
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ae5d7f7ce564b4cd4656366ee88afa762e457c8f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211527
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-28 22:25:42 +02:00
Andrea Gelmini 6410690a38 Fix typos in code and comments.
Change-Id: I8f1419c60c8aec0784e6de685ba7f630ae99638d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210571
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 14:00:17 +02:00
Andrea Gelmini ac2c1efd43 Fix typos in code and comments.
Change-Id: Ic36a34d51e781d1122fd3fa05834401d9ee4d9e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210053
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 20:41:03 +02:00
Andrea Gelmini b852cb2c39 Fix typos
Change-Id: Iaade8f3adc17b9ff20d1295050e3534b1d940356
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210052
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 15:01:16 +02:00
Andrea Gelmini 1dd550023c Fix typos: code + comments
Change-Id: I9b997720c5212a9413a78f15e139549f0345895c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209992
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-26 09:11:46 +02:00
Neil Roberts 365de006d1 tdf#173160 Maintain order of arguments to macro
The arguments for a macro when invoked by the dispatch provider get
converted from a set of PropertyValues to a sequence of Anys containing
just the values. Since the commit below, the TransformItems step was
changed to store the PropertyValues in an unordered_map which makes the
order of the values unpredictable. If the dispatch provider is used to
execute a macro then the order of the arguments becomes important
because the macro has no other way to determine which argument
represents which property. In order to maintain the previous behaviour,
the dispatch method now reorders the arguments so that they have the
same order as before. The previous order was determined by the order the
properties were handled in TransformItems.

commit e8d73d5307
Author: Mike Kaganski <mike.kaganski@collabora.com>
Date:   Wed Dec 3 10:45:35 2025 +0500

    Let TransformItems return comphelper::SequenceAsHashMap

    Simplifies its usage in all places where the result needs to be
    modified.

    Change-Id: I37f8d99827e0f1cb2b6e4f4f7735e26fb87f6703
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195162

Change-Id: Iacf64650842eb62c0a2bd266784aa9c7accf45bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209231
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-08-18 18:31:55 +02:00
Neil Roberts 6a4bf34e5a singleprov/ScriptFile: Implement XCopyableBrowseNode
Implements XCopyableBrowseNode on the ScriptFile class so that all
script providers based on the single-file provider can support copying.

Change-Id: I14aa057ac432ff80e4a4841fbe5c19be082aa099
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208161
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-07-23 15:18:33 +02:00
Neil Roberts 54ba86b578 scripting: Replace XAggregation of XBrowseNode with helper function
The browse node factory had a wrapper using XAggregation that wraps
every XBrowseNode. As far as I can tell this was used to replace the
implementation of getChildNodes with one that checks for exceptions from
the underlying provider and then sorts all of the resulting nodes by
name. The trouble with this is that it prevents the script providers
from detecting when a node is one from the same script provider and thus
makes it difficult to implement the XCopyableBrowseNode interface. The
documentation for XAggregation mentions this problem and also states
that the interface is deprecated.

To avoid this overhead, this patch replaces the aggregation with a
helper function in comphelper that should be used to retrieve children
from a browse node. That takes care of catching exceptions and sorting
the results.

Change-Id: I319888fee1b84ddcef397317d2cf7e72bd2867cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208160
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-07-23 15:18:22 +02:00
Neil Roberts 25458311e0 pythonscript: Implement the XCopyableBrowseNode interface
Implements the XCopyableBrowseNode interface on the Python script
provider.

Change-Id: I17c6916567518fd9f28d11724def4a0d98f53ed9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207737
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-07-15 09:09:36 +02:00
Neil Roberts be27055b34 tdf#172532 basprov: Use new concrete interfaces for optional methods
Instead of using XInvocation and XPropertySet to expose the optional
edit method, the BASIC script provider now uses the new concrete
interface XEditableBrowseNode.

Change-Id: I7a99a1c335f408da9b0ac26c741577eb449e63c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207348
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-07-15 09:08:17 +02:00
Neil Roberts b447e5d7b2 tdf#172532 singleprov: Use new concrete interfaces for optional methods
Instead of using XInvocation and XPropertySet to expose the optional
create and edit methods, the script providers based on singleprov now
use the new concrete interfaces XCreatableBrowseNode and
XEditableBrowseNode.

Change-Id: Iae966e554f436b8708699c7d86311f165db2d19f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207347
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-07-15 09:07:55 +02:00
Neil Roberts e0fb7f2466 tdf#172532 pythonscript: Use new concrete interfaces for optional methods
Instead of using XInvocation and XPropertySet to expose the optional
create and edit methods, the script provider for Python now uses the new
concrete interfaces XCreatableBrowseNode and XEditableBrowseNode.

Change-Id: Ic5944f2ade291598bac6f39411e86b351ffb0082
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207345
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-07-15 09:06:29 +02:00
Noel Grandin a27dcf22cd fix SbxArrayRef leak
found by running

    make CppunitTest_sc_macros_test CPPUNIT_TEST_NAME=testTdf133889

under ASAN with detect_leaks=1

We end up with a cycle here, between the SbxArrayRef and one of its children.
Clear the SbxArray to break the cycle.

Change-Id: Ia996eca6da7d9f39821305514b456b7aba799cf1
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2608
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ff5487aaab39aa8b862da1cf0b3f41e8fb1f8d7d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206324
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-10 22:28:40 +02:00
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
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
2026-06-05 07:58:07 +02:00
Mike Kaganski 85e3e0facd Move EventListener to use OPropertyContainerImplHelper
Simplifies the implementation, removing boilerplate.

Change-Id: I4e54547df46feed01613ebe0766c53be3c06de17
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/246
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 5368ec1c2b6a1d67f4b23c2ce75482993ca263f0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205665
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 14:33:55 +02:00
Mike Kaganski d59fed102e Move BasicScriptImpl to use OPropertyContainerImplHelper
Simplifies the implementation, removing boilerplate.

Change-Id: I5ec16fee95fa7180e8551b7eeca3d80b829e044b
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/245
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 834e3df39cf1abe87957f9a589916fb90783ec37)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205664
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 14:33:46 +02:00
Mike Kaganski ca02ecc4f6 Move BasicMethodNodeImpl to use OPropertyContainerImplHelper
Simplifies the implementation, removing boilerplate.

Change-Id: Idf7ca45d428c09ad18c6af2663f18f306a14bad1
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/244
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 122cecfefb8302f43d4dc6fa8911b96c4d18be3c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205663
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 14:33:29 +02:00
Neil Roberts 2c0bc4e33c scripting/jsprov: Define the XSCRIPTCONTEXT global variable
Adds a global variable to the QuickJS context called XSCRIPTCONTEXT
which holds an instance of ScriptContext. This makes the scripts more
compatible with scripts written for the Rhino JS implementation and also
more like Python scripts.

Change-Id: I95fd86229786a37c6fff282f45f65555cbde21cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205122
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-05-13 09:06:32 +02:00
Neil Roberts 1183f254fe scripting: Add a helper class to implement XScriptContext
Adds a generic helper class that implements the XScriptContext
interface. This interface is used in the providers to provide the
XSCRIPTCONTEXT builtin variable. For example for the Python provider it
is implemented in Python code. This C++ implementation can be reused by
any script providers.

Change-Id: I56f23138179555dee84ebf368e8a10cfb2fb4066
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205121
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-05-13 09:06:22 +02:00
Muhammad Naeem 098e175fb5 tdf#147021: Use std::size() instead of SAL_N_ELEMENTS in several modules
Change-Id: Ifcfd17b089c14033780792deb2d8e23fa26cd2b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204733
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-05-11 14:40:51 +02:00
Neil Roberts 1d324602ba Add an XBrowseNode implementation for QuickJS
Adds an XBrowseNode implementation for JavaScript scripts using the
QuickJS bindings so that JS files can be found and executed from the
macro organizer. Unlike in Python macros, the entire source file becomes
a single macro instead of trying to find function definitions in the
source.

Change-Id: I73d0c6e6fc6bb7ffd4f6164d1f1887d03bfdfe62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203219
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-30 10:39:18 +02:00
Neil Roberts be90e52d93 singleprov: Implement the “Creatable” action
This makes the create button enabled for script providers based on
SingleScriptProvider. When the button is pressed the SingleScriptFactory
is queried to get an example script to fill the new macro with and then
the file is created.

This is based on the code for the Python script provider in tdf#56289.

Change-Id: I11a6782e55ba775afed6b62f24ae0d11c347e529
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203283
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-30 10:38:18 +02:00
Neil Roberts b3b982d733 singleprov: Implement “Editable” with the system default app
The Editable property is now advertised on script providers based on
SingleScriptProvider. Once invoked, the system default application for
the script will be opened using SystemShellExecute.

On Windows, the default app is queried via AssocQueryStringW and then
passed to the SingleScriptFactory to check if it looks like an
interpreter for the given language. If so, the script is opened in
Notepad instead to avoid just executing the script.

This is based on the code for the Python script provider in tdf#56289.

Change-Id: Ia89ddbdd92b4d76c3a4ce133ffcf9b6d7a9f1e27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203282
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-30 10:38:01 +02:00
Neil Roberts e5900bee28 scripting: Add script provider helpers for files with single macros
Adds a set of helpers to implement a script provider where the script
files are the entire macro. The provider only needs to make a subclass
of the abstract SingleScriptFactory class to provide the filename
extension, language name and a method to convert the contents of a file
to an XScript. The parts about handling file browsing and reading the
file contents are in the shared helper code.

This is based on the script provider from Luno.

Change-Id: Id39f3a07e887898650b0d77ec493011fb5acc858
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203216
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-30 10:36:31 +02:00
Neil Roberts e66d2aec00 tdf#171853 Use endsWith instead of checking lastIndexOf is at end
There seems to be an idiom used throughout the LibreOffice code where
lastIndexOf is called and then the returned index is checked to see if
it covers the entire end of the string. This should be equivalent to
just calling endsWith but it’s slightly less efficient because
lastIndexOf will pointlessly continue searching other places in the
string if the end doesn’t match.

Change-Id: I4c2c6dd750d41ffabf5d27011c22a4bbb5e32777
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204300
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-26 09:32:38 +02:00
Neil Roberts 04381ba830 tdf#171671 pythonscript: Unquote the URL when generating library name
Otherwise for example if the filename has spaces in it then these will
appear as “%20” in the macro organiser.

Change-Id: I2da91d5aeb08962c9175219ab75ee7cb9d7277f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203304
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-08 11:39:58 +02:00
Neil Roberts 6b037fe8e6 tdf#56289 pythonscript: Make file dir browse nodes "Creatable"
If a DirBrowseNode points to a file:/// URI then the Creatable property
will now be True. When the Creatable action is invoked it will create a
file with the chosen name and insert an example macro into it.

Change-Id: Ib63da6a2a075ea7c2cf7dcda464b5f61aee53041
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202853
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-08 09:16:46 +02:00
Neil Roberts 35ad1a73cb tdf#56289 pythonscript: Implement edit action by invoking default app
This implements the Editable invoke action on ScriptBrowseNode and
FileBrowseNode using a shared mixin class so that when the user selects
a file or a macro in the dialog for organising macros the edit button
will be clickable. When clicked the default app for .py files will be
opened.

On Windows it seems that installing a Python interpreter makes that the
default application for Python files. In order to avoid just running the
script instead of editing it, the code tries to determine what program
is the default by calling AssocQueryString via ctypes. If it looks like
a Python interpreter the python file will be opened with notepad
instead. Otherwise the document is opened with the “open” verb via
os.startfile.

On all other platforms the file is opened with SystemShellExecute. On my
Mac this ends up opening it in XCode. On my default Fedora install this
ends up opening the script in gedit which is probably quite a good
default. Hopefully there are no distros that default to executing Python
scripts when passed to xdg-open.

For some reason SystemShellExecute doesn’t seem to do anything on
Windows which is why os.startfile is used instead.

Change-Id: If37ee13aea0200cd6b20230bd92a77aa6a0d3273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202852
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-08 09:16:21 +02:00
Neil Roberts d65717d72d pythonscript: Pass on XPropertySet and XInvocation to dirBrowseNode
Adds an implementation of XInvocation and XPropertySet to
PythonScriptProvider that just passes on all the methods to the wrapped
dirBrowseNode. If we don’t do this then the root browser nodes can’t
report that they are Editable or Creatable.

Change-Id: I2ddab92910ab0cb34866246844669c63b2f66671
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202851
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-04-08 09:16:09 +02:00
Neil Roberts 34aecf9078 pythonscript: Convert the source code to bytes before running from editor
The ensureSourceState function assumes the source code is a bytes object
but the editor was passing it the result of calling getText on the
editor control directly, which is a str object. This was making it throw
an exception.

Change-Id: Id96b22c2b43667cd4b4b245cfeff5a6d2cca6fc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202744
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-08 09:15:49 +02:00
Michael Weghorn b696d2bf63 vcl: Get Toolkit from SalInstance, not SystemEnvData
SystemEnvData holds data specific to a single
frame/object, but the toolkit used is specific
to the SalInstance/vcl plugin.

Instead of having a SystemEnvData::toolkit member
that needs to be set for each object, introduce
a SalInstance::GetToolkit getter and a corresponding
Application::GetToolkit that calls it.

Change-Id: I052f122e991bec745af88d3f43847e4d77fb4ba4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201536
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-03-13 07:40:38 +01:00
Gabor Kelemen a9e9175ba6 tdf#146619 Use more forward declarations in include/sfx2
This shaves off some 300M of input
Change-Id: I2fae9ff6c6dab31010986e55365676d4a01f402d

Change-Id: I3b2551a1937929100f25c01c0c416a419e7fbb51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199388
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-23 12:19:48 +01:00
Mike Kaganski e18a815190 Use rtl::isAscii(Hex)Digit and o3tl::convertToHex
Since some code needs flexibility in error handling, where hardcoded
error value of -1 wasn't handy, o3tl::convertToHex was changed to
accept the error value as its template parameter.

Change-Id: Ifc771cc8fa29a801d4556dea969fc3ea7e620df5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199367
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2026-02-14 11:40:50 +01:00
Michael Weghorn ab3635b2f3 weld: Move weld::MessageDialog to own header
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
2026-02-11 07:32:45 +01:00
Gabor Kelemen 495fa42afa tdf#146619 Use more forward declarations in include/vcl/weld/
after recent split of these headers

This shaves off another 150M input

Change-Id: Ia4e42781cdc6fd6e795c9fb55c6c24dd641b8f0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197339
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 11:06:42 +01:00
Michael Weghorn 5b16b3acc6 weld: Move weld.hxx and weldutils.hxx to new include/vcl/weld subdir
This is in preparation of moving code out of weld.hxx
to separate headers/source files, in order to make it
easier to keep an overview and to avoid having to
recompile ~all UI code when anything changes.

Also move weldutils.cxx to a new vcl/source/weld
directory.

Change-Id: Ia75b42f21e560dd248307282a522f186a64cd742
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195777
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-12-17 18:20:13 +01:00
Mike Kaganski 7f198b27f4 Drop class utl::MediaDescriptor, and use comphelper::SequenceAsHashMap
utl::MediaDescriptor was just a SequenceAsHashMap with a few added
methods. It made it more difficult to assign a SequenceAsHashMap to
MediaDescriptor, without real upsides. In many places, the class was
used not as media descriptor, but just as helper to create sequences.

This change puts the string constants and the former methods into a
namespace utl::MediaDescriptor.

It would be also good to drop comphelper::NamedValueCollection, which
is basically a twin of comphelper::SequenceAsHashMap (TODO).

Change-Id: Ia9b69c5a2ad153ecc654944c419c1880252ed86e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195163
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-06 18:18:32 +01:00
Mike Kaganski 65276d9a6d Use XVndSunStarExpandUrl::expand directly, instead of re-implementing it
Similar to commit efd69fbd84 (Use
XVndSunStarExpandUrl::expand directly, instead of re-implementing it,
2025-11-16).

Change-Id: I4857b9172308a660d5a0d20b414d991f394864af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194072
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-11-17 04:32:34 +01:00
Chenxiong Qi 478583be4c Don't treat __pycache__ dir as a DirBrowseNode
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: Ie1026fc5f34adb307773ef15ff8e79d035adac0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190404
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-10-23 21:16:23 +02:00
Caolán McNamara 77816cef91 use more constexpr
Change-Id: Ifc319bdc9ed0cf095a99f6ea7cac068f52bc31b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187748
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-12 01:15:46 +02:00
Bogdan Buzea a2569900d7 tdf#158803 E402 Module level import not at top of file
Change-Id: Id2a1d7715ba7c7094c39949afc6fe7b03a445cba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186114
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-06-10 09:00:16 +02:00
Gabor Kelemen 925be2132e Remove obsolete fw declarations from scripting/
found with bin/find-unneeded-includes --fwdecl

Change-Id: Ie489c1dd7b682808d38dcb6e92ca49cbf391e08e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183900
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-04-28 10:33:06 +02:00
Xisco Fauli 75649dbc8d scripting: remove obsolete commented out code
Since
commit 6af846d0a1
Author: Michael Stahl <mstahl@redhat.com>
Date:   Sun Nov 25 16:03:47 2012 +0100

    scripting: pythonscript.py: adapt to Python 3

Change-Id: I7b39f3b3c098ec3a07ee95bd3ca706d0fd0c9671
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183704
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-04-04 14:18:18 +02:00
Noel Grandin 22f46bd89f use more concrete UNO classes
Change-Id: Id10786bbf7985adbb251224b45f9dabcc84d0a3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182721
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-10 14:18:35 +01:00
Mike Kaganski d80dd99db9 Use LO_DEBUG_MAILMERGE environment variable to debug mailmerge.py
This is often useful in release builds, too.

Change-Id: Icb01353541836a18834897f3da501f1b0e466f3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181771
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-02-17 16:07:39 +01:00
Chenxiong Qi b0ed190986 Format pythonloader.py and pythonscript.py
The goal is to make the script more readable. The format is done with
command:

    black --line-length 120 <filename>

No manual modification to these files.

Change-Id: I8ebbac936924277308fc011b20cba60849fa9c45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179438
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-12-29 15:22:47 +01:00
Mike Kaganski a049c6ef42 Use SvtSecurityOptions::IsMacroDisabled() instead of officecfg check
The change is most important for Viewer app mode, which also disables
macros

Change-Id: Ie305649dafbb3717e7986a4b437c38b09ffc1802
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178275
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-11 11:43:20 +01:00
Caolán McNamara 8c1dbd3188 cid#1607542 COPY_INSTEAD_OF_MOVE
and

cid#1606986 COPY_INSTEAD_OF_MOVE
cid#1557969 COPY_INSTEAD_OF_MOVE
cid#1557837 COPY_INSTEAD_OF_MOVE
cid#1557772 COPY_INSTEAD_OF_MOVE
cid#1557735 COPY_INSTEAD_OF_MOVE
cid#1557672 COPY_INSTEAD_OF_MOVE
cid#1557664 COPY_INSTEAD_OF_MOVE
cid#1557650 COPY_INSTEAD_OF_MOVE
cid#1557642 COPY_INSTEAD_OF_MOVE
cid#1557639 COPY_INSTEAD_OF_MOVE
cid#1557628 COPY_INSTEAD_OF_MOVE
cid#1557623 COPY_INSTEAD_OF_MOVE
cid#1557581 COPY_INSTEAD_OF_MOVE
cid#1557489 COPY_INSTEAD_OF_MOVE
cid#1557473 COPY_INSTEAD_OF_MOVE
cid#1557317 COPY_INSTEAD_OF_MOVE
cid#1557261 COPY_INSTEAD_OF_MOVE
cid#1557146 COPY_INSTEAD_OF_MOVE
cid#1557135 COPY_INSTEAD_OF_MOVE
cid#1557134 COPY_INSTEAD_OF_MOVE
cid#1557079 COPY_INSTEAD_OF_MOVE
cid#1557063 COPY_INSTEAD_OF_MOVE
cid#1557052 COPY_INSTEAD_OF_MOVE
cid#1556982 COPY_INSTEAD_OF_MOVE
cid#1556977 COPY_INSTEAD_OF_MOVE
cid#1556950 COPY_INSTEAD_OF_MOVE
cid#1556943 COPY_INSTEAD_OF_MOVE
cid#1556804 COPY_INSTEAD_OF_MOVE
cid#1556736 COPY_INSTEAD_OF_MOVE
cid#1556658 COPY_INSTEAD_OF_MOVE
cid#1556621 COPY_INSTEAD_OF_MOVE
cid#1556590 COPY_INSTEAD_OF_MOVE
cid#1556579 COPY_INSTEAD_OF_MOVE
cid#1556534 COPY_INSTEAD_OF_MOVE
cid#1556524 COPY_INSTEAD_OF_MOVE
cid#1556478 COPY_INSTEAD_OF_MOVE
cid#1556467 COPY_INSTEAD_OF_MOVE
cid#1556422 COPY_INSTEAD_OF_MOVE
cid#1556314 COPY_INSTEAD_OF_MOVE
cid#1556309 COPY_INSTEAD_OF_MOVE
cid#1556258 COPY_INSTEAD_OF_MOVE
cid#1556143 COPY_INSTEAD_OF_MOVE
cid#1556119 COPY_INSTEAD_OF_MOVE
cid#1556101 COPY_INSTEAD_OF_MOVE
cid#1556097 COPY_INSTEAD_OF_MOVE
cid#1556039 COPY_INSTEAD_OF_MOVE
cid#1555966 COPY_INSTEAD_OF_MOVE
cid#1555948 COPY_INSTEAD_OF_MOVE
cid#1555915 COPY_INSTEAD_OF_MOVE
cid#1555836 COPY_INSTEAD_OF_MOVE
cid#1555748 COPY_INSTEAD_OF_MOVE
cid#1555644 COPY_INSTEAD_OF_MOVE
cid#1555582 COPY_INSTEAD_OF_MOVE
cid#1555478 COPY_INSTEAD_OF_MOVE
cid#1555475 COPY_INSTEAD_OF_MOVE
cid#1555409 COPY_INSTEAD_OF_MOVE
cid#1555372 COPY_INSTEAD_OF_MOVE
cid#1555334 COPY_INSTEAD_OF_MOVE
cid#1555330 COPY_INSTEAD_OF_MOVE
cid#1555310 COPY_INSTEAD_OF_MOVE
cid#1555257 COPY_INSTEAD_OF_MOVE
cid#1555247 COPY_INSTEAD_OF_MOVE
cid#1555147 COPY_INSTEAD_OF_MOVE
cid#1555120 COPY_INSTEAD_OF_MOVE
cid#1555059 COPY_INSTEAD_OF_MOVE
cid#1555016 COPY_INSTEAD_OF_MOVE
cid#1554880 COPY_INSTEAD_OF_MOVE
cid#1554824 COPY_INSTEAD_OF_MOVE
cid#1554808 COPY_INSTEAD_OF_MOVE
cid#1546189 COPY_INSTEAD_OF_MOVE

Change-Id: I2d2f33c603f1596228c9ecb169472ba6751e7826
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177593
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-30 22:39:23 +01:00
Noel Grandin a34d9e3619 loplugin:reftotemp in scripting..uui
Change-Id: I6953958b4429dd0fa1a44d02b0b49618f97baf90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176500
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-13 06:35:19 +01:00
Noel Grandin 20d971a587 clang-tidy: performance-unnecessary-copy-initialization in sd
Change-Id: I2521bc29afb9ae98d7db2fab81f93264c91c4065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176438
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-12 11:15:14 +01:00