Commit Graph
3439 Commits
Author SHA1 Message Date
Noel Grandin 63a9abb2ab map->unordered_map in ConfigurationWrapper::getPropertyValue
no need to use an ordered map here, and an unordered map
is much faster.

Change-Id: Ia4b6fa7174e2d8c62cec80a2ea65e12c0a837ec4
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9631
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 8003011a7b16bf4f7e3826cba5600b2cea18d1f8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210490
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-04 19:47:21 +02:00
Andrea Gelmini 6bbb5da94b Fix typos
Change-Id: I8c4a063b7a60841db384cd6dfc11f830d371fd00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210153
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-28 17:11:01 +02:00
ApurvR20 9d4d2c85fa tdf#42982 Improve UNO API error reporting
Provide a descriptive error in RuntimeException in instancelocker.cxx

Change-Id: I7b0579a51fa0f0423df43dadd1aa0a010ac1f420
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209481
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2026-08-27 13:33:16 +02:00
Andrea Gelmini 2f4c240fab Fix typos
Change-Id: I739007b9f8ce1d0fa654fe14c2d15cfb5678415d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210064
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 11:20:33 +02:00
Andrea Gelmini 48a8b4d2bb Fix typos
Change-Id: I4def0e2e77a75e09f5c8ba065b547334d5846e95

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209812
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:36:46 +02:00
Xisco Fauli 8ff6a53f56 Revert "comphelper/string: add OString variant of split()"
In order to avoid duplicity. Use OUString::fromUtf8 as it's
already done in another part of the code
This also helps to backport
commit 41e35a2d40
Author: Dan Williams <dcbw@libreoffice.org>
Date:   Thu Jul 30 12:36:44 2026 -0500

    tdf#169919: add unit test for PDF link clickable rectangle transformation

to release branches

This reverts commit cb96c7a9a5.

Change-Id: Ib87768458ba30baa0b29d17cc05d0e032719cf70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209180
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-17 16:33:52 +02:00
Dan Williams cb96c7a9a5 comphelper/string: add OString variant of split()
There's already one for OUString; copy that one and adjust for
OString and single-byte characters.

Change-Id: I2de901ead05284f9a73eadecf8628f30f8521b55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208865
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-08-12 17:00:28 +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
Xisco Fauli 208d055212 skia: turn ForceSkiaRaster into ForceSkiaGPU
so unless ForceSkiaGPU is specifically enabled by the user,
hardware accelatarion will be disabled by default.
Some discussion on the topic can be found here
https://gerrit.libreoffice.org/c/core/+/208116/comments/273234df_69198d70
and here
https://gerrit.libreoffice.org/c/core/+/208116/comments/372732df_f989e4f3

In libreoffice-26-2 branch, Vulkan has been put under experimental mode
so it doesn't touch translations,
see https://gerrit.libreoffice.org/c/core/+/208134

Change-Id: Ib7a39d269f24b5ef82752edb238944d3d453153c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208148
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-18 13:00:28 +02:00
Neil Roberts ca34fab9cc [API CHANGE] tdf#172532 Add concrete interfaces for manipulating scripts
Adds optional concrete interfaces that can be added to implementations
of XBrowseNode to create, delete, edit or rename nodes. The comphelper
abstraction now uses these if the interface is implemented otherwise it
will fall back to the old method using XPropertySet and XInvocation so
that existing script providers will continue to work.

The goal is to avoid using XInvocation for duck-typed methods because
that breaks pyuno. It is also easier to implement the optional
interfaces than to use the previous approach.

Change-Id: Id59136152941fd232673ec4b9082a0be0cb6ca8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207344
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-07-15 09:05:46 +02:00
Neil Roberts 2365c64aa3 comphelper: Add helpers for accessing duck-typed methods of XBrowseNode
Implementations of XBrowseNode have a bunch of extra methods which are
accessed by using XPropertySet::getPropertyValue to determine if the
action is possible and then XInvocation::invoke to invoke it. This patch
adds wrappers around checking and invoking these methods. The idea is to
abstract away the actual implementation so that the approach can be
changed in a later patch.

Change-Id: I117ab848391dbb1277f9331d6a93f71c2cb556ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207343
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-07-15 09:05:13 +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
Xisco Fauli 6f81bce807 loplugin:unusedmethods
Change-Id: I57a535f72e639a9b708c5c7dc1790e354d2d477e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205943
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-04 10:00:29 +02:00
Mike Kaganski 350c6c5333 Drop OPropertyContainer2
Unused since I4e54547df46feed01613ebe0766c53be3c06de17 (Move EventListener
to use OPropertyContainerImplHelper).

Change-Id: Iad4efd1df433c77f4a5df20caa7a7b35558ab7e5
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/247
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 51be9cb71c55b72b61720c38295a62b127c83290)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205668
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 14:34:09 +02:00
Jonathan Clark b19cc5a5d1 comphelper: fix replaceAt string corruption, potential buffer overflow
comphelper::string::replaceAt contained pointer arithmetic errors. In
testing, this function only worked at all in the trivial append case.
Inserting a non-empty string anywhere else in the buffer would either
only insert part of the string, corrupt the string in the buffer, or
both.

In addition to replacing the implementation, this change adds unit tests
so we can be more confident that this function works in the future.

Change-Id: I97e109dc513b08528d6d20e7dbf6eedb3040670c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205222
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-05-15 23:28:19 +02:00
Stephan Bergmann 811769f009 Consistently use __EMSCRIPTEN__ instead of EMSCRIPTEN macro
...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>
2026-05-14 10:11:38 +02:00
Asad Tauqeer 92cea47a5e tdf#168771 Convert enum to enum class in backupfilehelper.cxx
Change-Id: I9b1fcde7aa929af9cf58fb320862e2b237c81d63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204653
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2026-05-08 06:22:31 +02:00
subhanigc 8ac7d04229 tdf#171853 use endsWith instead of lastIndexOf+getLength in comphelper
Change-Id: I8e18fab55e86d912673698b284ddc89b59342bef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204354
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-28 08:48:06 +02:00
Ujjawal Kumar 1f665988d0 tdf#171481 Remove redundant markdown heuristic detection code
Introduced in changes I3b14b5a07f107de69825583f54023d2d98984288,
I2ac162e13040b0414bf0cdc5d3eb7ac997db9503 and
Iac1761e71169a322d67dcabecb7eb89ab00176c3

We can remove all these code and files because we now have
markdown under paste special.

Change-Id: I33eb547c9d8f6753565090741af44aa89b33da4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203026
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203109
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-24 10:50:48 +02:00
RashmiVid 2d09ec6611 tdf#158237 Use contains() instead of find() != end() for maps/sets
Replace occurrences of find() != end() with contains() where supported.

Change-Id: Ie8e4625dc2e0f6e6b7273fe2190e52580eef90f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202908
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2026-03-30 18:13:10 +02:00
Mike Kaganski 8a5f3cc219 Simplify a bit
Change-Id: Iec41c755f76e39a7e15eab9dd1821aa6e9533794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202645
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit d8532c689593bc0ab8f9fcdf5538b8875fff475b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202668
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-03-25 20:49:11 +01:00
Mike Kaganski f5e3ba8714 Drop WeakImplHelperBase::queryInterface
It did nothing that the inherited method wouldn't do.

Change-Id: Ifc796723149c3d6b4823795c81af69ac79254bbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202597
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-03-24 18:16:47 +01:00
Xisco Fauli 6581f7ba78 comphelper: use ScopeGuard and osl_setEnvironment
Change-Id: Idbfc8773639bda5de3c542cdaa9d68012ce8e0f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201377
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-03-11 10:46:36 +01:00
Miklos Vajna e7ab4b7dd1 tdf#170595 sw lok, idle layout: fast render of the 2nd page, too
Open a large document, the first page (inside the visible area) shows up
fast, then the idle layout starts calculating later pages. Now scroll
down to page 2, and tiles for that second page only arrive after the
full layout finished.

What happens is that idle layout unfortunately creates high priority
tasks as a side effect of completing its work, so the COOL any input
callback will not interrupt (assuming core has high priority tasks),
even when it should, so idle layout runs to completion and only then we
start rendering tiles.

An option would be to fix the priority of these tasks, but there are a
lot of them: 'vcl SystemDependentDataBuffer', 'svx::SdrPaintView
aComeBackIdle', 'svx::svdraw::SdrPageWindow mpObjectContact',
'sw::SwView m_aTimer', then I stopped looking further. At this point it
looks better to have a higher level mechanism. So introduce a flag in
comphelper/, and using that ignore reporting high priority tasks from
core to COOL till idle layout is in progress.

Note that recursive layouts are not supported, so no need to query the
current value before the first
comphelper::LibreOfficeKit::setIdleLayouting() call. With this, my 839
pages long document shows content on e.g. pages 2 & 3 just fine, even if
the full layout is not yet complete.

Change-Id: I3b7d422dd4a6c95e6fcedbdecb8a98bca6130002
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201102
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2026-03-07 07:54:34 +01:00
Michael Weghorn 99ff2618e6 a11y: Introduce helper to implement XAccessibleExtendedAttributes logic
In OAccessible, which is used as the base class for most a11y
implementations, introduce a new virtual
OAccessible::implGetExtendedAttributes that returns a
std::unordered_map for the key/value pairs for extended attributes
and use that in OAccessible::getExtendedAttributes to build the
string mandated by the XAccessibleAttributes UNO interface.
(The order of attributes in the resulting string shouldn't
matter.)

The default implementation still results in an empty map/string
being returned. But this will allow switching subclasses to
override the new helper method in upcoming commits instead of
having to implement the string concatenation logic in each of them.

Also let OAccessible::getExtendedAttributes use
OExternalLockGuard like other UNO API methods in the class do,
which locks the SolarMutex and checks that the object hasn't been
disposed yet. (Both are reasonable when a11y UNO API methods
are called.)

If the latter results in any issues when switching subclasses
to the new logic, those are probably preexisting issues that
are surfacing then.

Change-Id: Ie66f135fbf6cdc98c7cdca27fa3f5fe7db7f9a74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201035
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-03-06 07:14:57 +01:00
Michael Weghorn 9ec6cec8fc a11y: Let OAccessible implement XAccessibleExtendedAttributes iface
Let the OAccessible base class used by most a11y implementations
implement the XAccessibleExtendedAttributes interface and
add a default implementation for
XAccessibleExtendedAttributes::getExtendedAttributes
that simply returns an empty string.

Platform/Toolkit a11y bridges were prepared for this in
previous commit

    Change-Id: I84252f8764d3385d71b9ada24125ca96762baf9d
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Mar 4 19:30:05 2026 +0100

        a11y: Handle empty extended attributes string

This simplifies those subclasses that were already
implementing the XAccessibleExtendedAttributes interface
so far and will allow further refactoring.

Change-Id: I05f02b57f4c32be42232a52b24fe13c945090836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200971
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-03-05 11:21:40 +01:00
Noel Grandin 4b10710e09 loplugin:passstuffbyref
Change-Id: I559d246b25c99e5cb7a28ba94e04a2acedd3e720
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-04 19:22:19 +01:00
Noel Grandin 5505d3bc4d loplugin:constparams
Change-Id: I33c701be5a441c1121b797f1eb5a8bda6fc3f89b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200927
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-03-04 11:29:39 +01:00
Stephan Bergmann 394cd5db81 Use some more ""_ustr literals
(in places that were otherwise hit by a libstdc++ 16 trunk issue involving
std::source_location that is discussed at
<https://gcc.gnu.org/pipermail/libstdc++/2026-February/065220.html> "Re: [PATCH
6/9 v4] libstdc++, contracts: Add base P2900R14 contracts support.")

Change-Id: Iaedf3e44a5f2290e194286fa035ceed8fd40da45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198627
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-04 08:22:35 +01:00
Karthik Godha f6ff3ccbf1 ODP->PPTX: Incorrect MimeType for media files
If a media file's name has its file extension in uppercase then the
mime type is not handled.
Example: audio1.mp3 is handled but audio1.MP3 is not handled

bug document: tdf123653-1.odp

Change-Id: If220283b1a447cde0a070853192638ee5f30c87b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196302
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 3adcd9fa929e7ed072877536df93558c6add05c8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198177
Tested-by: Jenkins
2026-01-27 14:29:50 +01:00
Karthik Godha 808b88b88b tdf#170153: PPTX->PPTX handle ".bin" media file
Media files are exported based on file extensions. ".bin" file extension
is not handled.

Change-Id: Ib7af829e6a5bd042c59edcef9d09b6c5d4fb80a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196267
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit b3e0324dcc240a08ba75ce7916e5e1b5dee82295)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198173
Tested-by: Jenkins
2026-01-27 14:25:15 +01:00
Andras Timar 348161ac8c if LOK_ALLOWLIST_LANGUAGES is not defined, allow all languages
Change-Id: I7cab7b87dea84449ceae65896841909362390235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193425
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195660
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2025-12-15 18:14:17 +01:00
Stephan Bergmann a6325b777b Missing include
...for PATH_MAX, after 6112dac3ab "cool#13770 lok:
add a file save dialog callback"

Change-Id: I976c5ca00c441896042b3eb4565e386c717e4d4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195478
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-12-12 08:03:38 +01:00
Miklos Vajna 6112dac3ab cool#13770 lok: add a file save dialog callback
Commit f4b9d6f024b27c4d8ddaabfe0eaa0b404137e3cf (Add horrible hack to
ask the filename when exporting PDF in CODA-W, 2025-12-02) added a
callback from core to the LOK client to trigger a file picker during PDF
export.

The problem is that in its current form, this callback is
Windows-specific so other platforms (Linux, macOS) can't provide their
implementation in a straightforward way.

Fix the problem by reworkig this, so it works similar to the anyInput
callback, which is cross-platform already.

The behavior for the case when the new callback is not registered is
meant to be unchanged.

Change-Id: I27934774889fc827772b2665799eca358dd62e55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195381
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2025-12-11 15:49:35 +01:00
Raul Feier 967c43bf55 tdf#158237 use c++20 contains() instead of find() and end()
Change-Id: Idffad61325c531fb65398cf838d90fd3497b4d72
Signed-off-by: Raul Feier <feierraul44@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194965
Tested-by: Jenkins
Reviewed-by: Gabriel Masei <gabriel.masei@libreoffice.org>
2025-12-10 16:26:03 +01:00
Caolán McNamara abdba6ee5b save/restore docId in Application::Reschedule
similar to what we do for viewID.

On attemting to load multiple documents StatusIndicator::start calls
Application::Reschedule during load of document #1.

That inner loop ends up loading document #2. The inner loop ends, and
load of document #1 completes in the outer loop.

Unfortunately the inner loop left the current DocumentId as that of the
inner document #2, so the document id set on the view of #1 is
incorrect.

Extend the similar fix for viewId switching during Reschedule to restore
the docId. If this Reschedule happens at any other time except load then
restoring the viewId is sufficient to identify the correct document, but
in the load case there is no viewId yet

Move the mnCurrentDocId out of sfx2 and ViewShell into comphelper so
it's available from vcl without needing to make any adjustments to
LibreOfficeKit.h[xx]

Change-Id: Ied70e0f9ff33f2587cfbcb02b0c9ca3cd4792cfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193814
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-11-13 09:37:13 +01:00
Mike Kaganski feec8bd9e8 Simplify exception message
No need to mention function name and line. In debug builds,
exceptions get this information automatically.

Change-Id: Ia09d72ff892c98cff9b33131dd44d1b821b54ff3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193719
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-11-10 12:47:59 +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
Justin Luth e9f5d6ce38 tdf#148478 pptx export: only export ASCII .wav filenames
MS PowerPoint reports a corrupt presentation
if one of the ppt/media files contains non-ascii characters.

make CppunitTest_sd_export_tests-ooxml3 \
    CPPUNIT_TEST_NAME=testTdf148478_transitionMusic

Change-Id: Ide5c5d38b4517e7a933fb8d414d901b49b15faca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193435
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2025-11-06 19:47:51 +01:00
Neil Roberts d4c463c04b Shortcut LocalizeDigitsInString if locale already uses arabic digits
Instead of calling GetLocalizedChar for every character in the string to
be localized, we now just call a replacement function that returns the
offset to apply for digits. That means that in the likely case that the
offset is zero we can skip scanning the string altogether and just
return the original one.

Change-Id: I8b1ffa3ba38d5a8ed491668c7c1a242327bce626
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193462
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-11-06 08:19:10 +01:00
Ujjawal Kumar 11a6dba109 tdf#168833 Remove check for olist and ulist to improve markdown heuristics
Change-Id: I9c81734b313c4f36f701041cfb72ec9d6bc1ae84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192460
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-10-16 09:09:36 +02:00
Gabor Kelemen a20e7520c3 Sanity check all IwyuFilter files
This should not complain anymore:

for i in $(ls -1 */*yaml) ; do mod=$(echo "$i" | cut -d '/' -f1 ) ; bin/find-unneeded-includes --sanitycheck "$mod"; done

Change-Id: I5c4b99f5cb58c6f696b127c81edd6d323104cd7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191829
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-10-14 19:44:19 +02:00
Mike Kaganski 712c53c4e8 LOK Transform API: add generic UnoCommand command
There already was UnoCommand support inside SlideCommands. This change
introduces it at top level.

The syntax of the command is:

{"UnoCommand": {
    "name": ".uno:Foo",
    "arguments": {
        "Arg1": {
            "type": "long",
            "value": 0
        },
        "Arg2": {
            "type": "long",
            "value": 1
        }
    }
}}

Change-Id: I0015e937495ad1ae756c5366b555a3b0d5fb09ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191963
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-13 08:57:17 +02:00
Stephan Bergmann f0f1c92091 Missing include (for getenv)
Change-Id: I7bc04264cf9e5ad3553a9f8c5b071b905bdb2f3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191357
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-09-22 20:25:08 +02:00
Mike Kaganski a255b04d8d Shorten some names ending with _ASCII
Whatever that was intended to mean: if that meant that the constants
were encoded that way, these are UTF-16 already; is that meant that
they only contained characters in that range, that is unimportant.

Change-Id: I5463f1fca0d552a93d3c9d487ed9912c9e1a989e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191240
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-09-20 19:35:12 +02:00
Noel Grandin 28098d9d63 use more unique_ptr in EmbeddedObjectContainer
Change-Id: I3794e081bc2bf0b6dfe2088dbb8402c490af5a57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191113
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-18 15:20:41 +02:00
Noel Grandin d62a29c705 simplify EmbeddedObjectContainer::CreateEmbeddedObject
dont need the variant that passes extra params, we already take that param

but convert that extra parameter from a pointer to a std::optional,
because some of the call sites pass a temporary OUString, and taking
the address of a temporary is a no-no.

Change-Id: I4d55f01a14230f5c64a052a143666a08bfcbf704
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191021
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-16 15:01:59 +02:00
Gabor Kelemen 2ceebbe548 tdf#146619 Run IWYU on comphelper/
Change-Id: If7c9691b5531d079e80ce3115409e60777bd75f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189789
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-09-12 23:56:34 +02:00
Noel Grandin 02db8e7392 pretty up EmbeddedObjectContainer a little
Change-Id: I69f29310da41ccc7ae619529fd503bd5ce55d6bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190886
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-12 20:58:10 +02:00
Mike Kaganski fb022d3ba4 Use less magic numbers
The constexpr function can generate them better

Change-Id: Iff25750a4f20181cca5c42c47884d68933229e74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190807
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-09-11 14:55:51 +02:00