Commit Graph
1408 Commits
Author SHA1 Message Date
ApurvR20 79d1e583fb tdf#173254 Removed 'using namespace' in lokclipboard
Change-Id: I490f84aa8a4e33600ff3c03e213c5ed5321fedd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210117
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2026-08-27 13:33:57 +02:00
Khaled Hosny a1b5f5cedd vcl: Remove the dead fd-hack
Drop the exterals patches as VCL internals don’t support this anymore,
and drop the LOK addfont change as it wouldn’t work now. I don’t know if
LOK addfont has any use now, but I left it.

Change-Id: I2798679d0bb59bb6c2c6e0eae329287f36662223
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208546
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-24 18:12:39 +02:00
Christopher Sherlock c928d5bc07 vcl: Rename Y-axis origin methods to Get/SetDeviceOriginY
Completes the deprecation of legacy coordinate subsystem naming by
renaming GetOutOffYPixel() and SetOutOffYPixel() to
GetDeviceOriginY() and SetDeviceOriginY() across OutputDevice,
Window, and CoordinateMapper.

This unifies axis naming conventions following previous X-axis
refactoring passes, clarifying that these fields represent the
physical origin offsets of the device rendering canvas.

This patch also moves view transformation logic inline from outdev/map
to CoordinateMapper, and wraps sprawling multi-line logic formulas
across mapping routines to clean up formatting boundaries.

Key changes:
* include/vcl/outdev.hxx / window.hxx: Updated public declarations
  to replace GetOutOffYPixel with GetDeviceOriginY.
* vcl/inc/CoordinateMapper.hxx: Migrated view transformation cache State
  members and mapping calculation methods into the mapper object.
* Global adjustments: Patched all related coordinate offset reads
  and tracking writes throughout desktop, editeng, sc, svx, and vcl.

Change-Id: I28fec54a7f3312cc41ada2de38b26351c0a65527
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203646
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-07 14:22:05 +02:00
Christopher Sherlock 90951d958c vcl: rename X-axis origin methods to Get/SetDeviceOriginX
Rename GetOutOffXPixel() and SetOutOffXPixel() to GetDeviceOriginX()
and SetDeviceOriginX() across OutputDevice, Window, and CoordinateMapper.

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

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

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

Change-Id: I546e1d255887e3b280ff15caca2e27ef10de52d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206509
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-07-07 14:14:50 +02:00
Xisco Fauli 1cac4f1a69 lok: drop sendDialogEvent
Follow-up of
commit 8a91868e21
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Tue Jun 2 14:53:19 2026 +0200

    drop JSDialog machinery

Change-Id: I61946b9504e0ada95d08d2414195f4ca8eab9ae4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206244
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-09 14:49:09 +02:00
Xisco Fauli 80c1a38018 sfx2: drop IsCommandAllowedInLokReadOnlyViewMode
it allows to drop setAllowChangeComments and setAllowManageRedlines
as well

The logic was relevant for Collabora Online
but it's no longer using this repo

Change-Id: I47a7eeddab000d748ba08896592e9403fdf010fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206240
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-09 14:48:59 +02:00
Xisco Fauli b0e4238a46 svx: remove svx::theme::notifyLOK
The logic was relevant for Collabora Online
but it no longer uses this repo

Change-Id: I11755f26a3ed345eafcf7fe5aeaee850729227eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206162
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-05 21:52:31 +02:00
Michael Weghorn 98fff9f07f vcl/weld: Drop logic to collect UI coverage information
This was originally introduced in

    commit be0e1382a6
    Date:   Fri Dec 5 20:22:22 2025 +0000

        Collect .ui use coverage information

, presumably for Collabora Online which no longer uses
this repo.

By now,

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

        drop JSDialog machinery

dropped the use of the collected information, so
also stop collecting it altogether.

Change-Id: I4a7ac9e8f503c9958133e6cd0a1574bf9347e393
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205938
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:19 +02:00
Xisco Fauli 8a91868e21 drop JSDialog machinery
It's no longer needed and not used internally

Change-Id: Iecb0d1055fd6c61d0c34ffb8afc670ab9d5fe899
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205908
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 20:15:18 +02:00
Xisco Fauli 078f2099d7 desktop: drop TraceEventDumper
'SAL_LOK_OPTIONS=profile_events' is not used anywhere
internally

Change-Id: I57a17c98412a87144dd5edca6efc213bc2f0367a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205891
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 00:55:44 +02:00
Xisco Fauli 89c5152164 desktop: drop methods using unused env variables
LOK_HELP_URL, LO_CERTIFICATE_DATABASE_PATH, DEEPL_API_URL
and DEEPL_AUTH_KEY are never used internally

Change-Id: I995768a7ecd4b56b249dee261574e6709cd5f639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205890
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 00:55:39 +02:00
Xisco Fauli fd65cea59c drop notebookbar_online.ui
'SAL_LOK_OPTIONS=notebookbar' is not used anywhere
internally

Change-Id: Ibee2bf6d990ec53f7c2109bcfed451d37d70e8ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205885
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-01 20:44:45 +02:00
Xisco Fauli 0a231f1237 drop isLOKDesktop and LOKDeviceFormFactor
follow-up of
commit 7579bac8e9
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Fri May 29 10:46:04 2026 +0200

    drop isLOKTablet

and

commit f436c1cd89
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Fri May 29 10:07:20 2026 +0200

    drop isLOKMobilePhone

Change-Id: I59604e56af75933acaa3ba6146e9b406d7a7845e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205828
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-29 15:13:09 +02:00
Michael Weghorn d1245f5ca9 vcl: Pass Window::PaintToDevice outdev param by ref
This makes clear that this is always non-null.

Change-Id: I4452fa69ac5869b1654771b8a38781e57fe89194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205348
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-20 00:38:26 +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
Noel Grandin 0e40cab8b4 Fraction->double in SetOutputSizePixelScaleOffsetAndLOKBuffer
Change-Id: Ie049437a68ff4957206fd845665144f63919e54e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202324
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-23 07:05:42 +01:00
Gökay Şatır ec98972ddc cool#12762: Calc Online: Implement doc_getPrintRanges for document load.
Issue: If a document has print ranges defined, Online side doesn't get it on document load and can't show the ranges.
Fix: Add it to the document status message. There is also an Online side commit.

Also a test added for the feature.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Id7c1f37be435b2ac6e9f7bb6554376e1867bfbcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190563
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200291
Tested-by: Jenkins
2026-02-27 10:01:11 +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 d8bf4ddc6d fix assorted VirtualDevice GDI handle leaks
Similar to commit e9392c0c86fcf373e00ede92f8ceeee2c7efd233 (fix
VirtualDevice GDI handle leaks across IconView callers, 2026-02-21).

Change-Id: Idae4f9e5fba0d5c46d32e35da5f84716616f59ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199936
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199948
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-02-21 18:51:04 +01:00
Caolán McNamara 695570d7ad various 'common' dialogs only appear in specific applications.
set:
a) the 'writerperfect' .uis
b) svx/ui/acceptrejectchangesdialog.ui
to the writer a11y testing category

exclude:
a) svx/ui/gotopagedialog.ui
b) cui/ui/splitcellsdialog.ui
from the calc a11y testing

Change-Id: I78822177fe70b7f9c2d5b8910462ad92e9eac565
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198617
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199819
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2026-02-20 17:42:46 +01:00
Ujjawal Kumar c10f8589fa Remove bUseDetection used for heuristic detection of markdown content
Change-Id: I4d49a7d927d7b33c9bc9e3420279ebb289bf98a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199156
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@collabora.com>
2026-02-16 05:08:32 +01:00
Caolán McNamara 8607638c6f handle coverage for a self-build without dictionaries submodule
Change-Id: Ifb22e1132b96f51cd754a57ec4b1dfc08cf7ff8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198142
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199324
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2026-02-13 12:58:04 +01:00
Gabor Kelemen 76eb42c5aa tdf#146619 Use more forward declarations in include/svl
This shaves off some 40M of input

Change-Id: I89411ee8d94963ec6bc16fe155c885d2c78ee3a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198233
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 16:36:16 +01:00
Gabor Kelemen 49cb3077fb tdf#146619 Use more forward declarations in include/vcl/outdev.hxx
these were skipped in previous runs, since they contain some code behind #if

After inspecting these, it seems like the removals should not cause trouble.

This also shaves off some 140M input

Change-Id: Ie1f57174dd6fec3ba5b0b91eb0688acdc1a8143d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197494
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-23 21:27:08 +01:00
Andrea Gelmini fe4cb5de3f Fix typo
Change-Id: I72594e4f6a5dd5af1fb7e2b2168dfc7d0fcf4247
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197154
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2026-01-14 03:08:41 +01:00
Tor Lillqvist aad13413e5 Clarify that freeError() despite its name is a generic LOKit deallocation API
Especially on Windows it is important to not call free() in your own
code on a pointer returned from some random other dynamic library
(like the one the desktop/source/lib/init.cxx code goes into). It
might have been allocated by calling malloc() (etc) in a C runtime
library that is different from the one used by your code. That will
lead to a crash.

One should alays call the free() in the same C runtime where the
malloc() that allocated the pointer is.

Add a wrapper called freeMemory() to the C++ API.

Change-Id: Ibf9cf6fad2c30c4416d2a1f6badbd161c7ba18a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194594
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197107
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@iki.fi>
2026-01-13 15:31:47 +01:00
Mohit Marathe 829544185d sd: remember canvas page zoom
store zoom for canvas page & non-canvas page, and trigger zoom change
when switching between them

Signed-off-by: Mohit Marathe <mohit.marathe@collabora.com>
Change-Id: I93310f09af3f2c2bbc87c4561ef5e0fc791d2ec3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193459
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196801
Tested-by: Jenkins
2026-01-12 19:27:18 +01:00
Caolán McNamara 516e2915e7 add something to report to kit when core is idle
Change-Id: Idf5e1659d111a9351e4833114d4f1cb899cc6f17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196911
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit ea6534827d708f24d4b9d7e176dee738e5d24598)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197075
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2026-01-12 15:52:06 +01:00
Tor Lillqvist 430f603c6a Make --enable-headless possible also on Windows, for CODA-W
We variously look at both ENABLE_HEADLESS and USE_HEADLESS_CODE to
check for the --enable-headless case. Are both really needed?

In the --enable-headless case, freetype, fontconfig and cairo are
built. For now, cairo is built as a Library (DLL), but fontconfig and
freetype as StaticLibrary. Possibly should change these to DLLs,
too. (See preceding commits.) Do not build the vclplug_win.

Windows-specific fixes to the headless vcl code, and headless-specific
fixes to some Win32 vcl code. Use <tools/UnixWrappers.h> where
appropriate instead of <unistd.h>, <sys/mman.h>, etc.

fontconfig already has code for Windows, but likely things will break
on machines with a non-ASCII name for the Windows fonts directory, or
for funky font names. Should eventually make it use the new
<tools/UnixWrappers.h>.

Change-Id: Id3a1313083b1c7c44b0b26819c1ffb5138e15bc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194573
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196980
Tested-by: Tor Lillqvist <tml@iki.fi>
Reviewed-by: Tor Lillqvist <tml@iki.fi>
2026-01-11 08:34:27 +01:00
Justin Luth df7e61358b tdf#170261: introduce DOCM 2010 (VBA) filters
This patch primarily allows exporting as an DOCM file
without forcing compatibilityMode = 12 (2007)
Other than that, I don't think there will be any other impact
(although that simple fact has lots of layout implications).

With this patch, the Word 2010-365 (macro-enabled) filter
will be the default for:
- --convert-to (command line) docm
- GUI (save-as) docm
- LOKit download as docm
- TestFilter::DOCM unit tests

Change-Id: Iabc9820096a100774157996b54e325c76d2440c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196789
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-01-10 16:34:57 +01:00
Justin Luth b5b2413db6 tdf#170261: introduce XLSM 2010 (VBA) filters
This patch primarily allows exporting as an XLSM file
without forcing lowestEdited = 4 (2007)
Other than that, I don't think there will be any other impact
(and at this point we don't even know of lowestEdited impacts).

With this patch, the Excel 2010-365 (macro-enabled) filter
will be the default for:
- --convert-to (command line) xlsm
- GUI (save-as) xlsm
- LOKit download as xlsm
- TestFilter::XLSM unit tests

Change-Id: I5c5fac221b6a454a98df9034f59aba0a7d97880d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196788
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-01-10 16:33:57 +01:00
Noel Grandin 558a189c7c used more TypeWhichId to avoid casting
Change-Id: Icd281619c1d86506d5f248234562a7cf2c5ead77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196903
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-01-10 12:15:32 +01:00
Mohit Marathe 7d08f38681 lok: handle switching to page having different size
by sending a lok callback such that client can handle it by retrieving
individual part sizes, and set the view size accordingly

Signed-off-by: Mohit Marathe <mohit.marathe@collabora.com>
Change-Id: I2d707c38aa39d38a7be09176957bbbcfbf7d2dd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192004
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit e83fcef89185531487d9c3b8356ce91252d2f642)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196649
Tested-by: Jenkins
2026-01-07 11:47:27 +01:00
Justin Luth ac118e868b tdf#165180 xlsx LOKit: prefer Excel 2010–365 Spreadsheet, not 2007
A prior commit in this patchset
clarified what "Calc Office Open XML" is targeted for.

Probably it is time for us to intentionally target the 2010+ format...

Change-Id: I58bffb393f82d2ea667cded8c0a198217fc93cc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195033
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2025-12-12 00:44:08 +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
Caolán McNamara b749f045bc put the uicoverage into the first level json
i.e. don't put json into json

Change-Id: I5606c0d280e7f8c3c08cc21e1bc62689de7422bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195226
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195315
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-12-10 16:08:55 +01:00
Caolán McNamara be0e1382a6 Collect .ui use coverage information
bootstrap reporting of what .ui files were used in a session.

Change-Id: I19b004482a3892898a9738e5e98ee084ab8cdcec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195113
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195314
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-12-10 16:08:46 +01:00
Jan Holesovsky bd2d0bec67 coda-m: Don't skip the tile painting on macOS
Change-Id: Iecbb24f2bc4b3824cd556baa864327c0c52b1475
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195349
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2025-12-10 13:15:30 +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
Justin Luth a21904b2da LOKit: fix/add known PowerPoint extensions
97 Autoplay should have been capitalized as AutoPlay,
so even if it should have shown up somewhere,
(and I don't see it listed under save-as, export, or download)
it (probably) wouldn't have worked anyway?
But probably this is just used as icon/recognized-file-type info.

Added recognition for XML AutoPlay too.

potm is a macro-enabled template.
That seems highly unlikely to be used in LOKit,
so I added the non-macro template as well.

Change-Id: Id95a4f04b0ff6ca07098105cbed1501c73f6a59d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195026
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2025-12-05 22:06:13 +01:00
Noel Grandin 4e2b089020 loplugin:stringloop
resurrect the plugin and run it over the codebase

Change-Id: I443a75961124aabd1e62b3c4bc166d52e4621b52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194870
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-12-01 14:25:01 +01:00
Caolán McNamara cf56ab4c9e use SfxLokHelper::getViewOfId to get most recent view of this document
Change-Id: I4bdc51b1c175c6a46094305090f711d8b3ffb388
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190861
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194797
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-11-29 01:11:20 +01:00
Miklos Vajna bb8086aea0 cool#13574 sw lok: introduce a redline render mode view option
Redlines (when shown) are decorated with an underline for inserts and
with a strikethrough for deletions. There is no way to render just the
old or the new version, which would be handy for a 2-up render result
(old on the left hand side, new on the right hand side).

Now fully hiding inserts or deletions would require not sharing the same
layout and would be quite complex to implement, it's possible to simply
not render the unwanted content, typically leaving white holes in the
render result.

The newly introduced SwRedlineRenderMode as a view option does exactly
this: keep the default behavior unchanged, but allow not rendering
inserts or deletions as a view option.

This requires no change to the LOK API: ther was a paint "mode"
parameter already (to handle normal slides, slide masters, slide notes
in Impress), which can be reused here for Writer's redline needs.

Change-Id: I21aee667913b916c030d067bbe8bb03a5f6b3ee2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194676
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Code-Style: Miklos Vajna <vmiklos@collabora.com>
2025-11-27 10:41:32 +01:00
Méven Car 042ffad714 HostFilter: Allow to disable SSL Host verification for allowed hosts
LOK_HOST_ALLOWLIST allows to pass a restricted list of hosts that
curlsession will be allowed to download from.

LOK_HOST_ALLOWLIST_EXEMPT_VERIFY_HOST reuses this list for the use case
of not verifying SSL host additionaly for them. This is useful for say
developpement environement.

Change-Id: I75ac26a4bfe1c33ff183c4ad12391b2da08593cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193961
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 8688e9d8c94a21a7a0abc9edfe632e6fa0e94281)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194187
Tested-by: Jenkins
Reviewed-by: Méven Car <meven.car@collabora.com>
2025-11-19 13:21:52 +01:00
NickWingate 20088bd544 Detach QuickFindPanel
Main changes are:
1) new jsontype: `quickfind`
2) send the full json when constructed
3) create new .uno:QuickFind
4) create wrapper and window to register
   QuickFindPanel as a DockingWindow so that we
   can create it from CreateChildWinow without
   going through sidebar
5) Register SID_QUICKFIND as a ChildWindow in
   the SwView interface

Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: I2086316b932c1495b0adee7a062bdbbcb104f1ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188667
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194144
Tested-by: Jenkins
2025-11-18 10:46:42 +01:00
Miklos Vajna 64cf69926b cool#13468 sw markdown paste: add UNO command parameter to skip the detection
.uno:Paste tries to detect if the plain text content is really just
plain text or markdown. There is no way to paste the clipboard content
as plain text in a non-interactive way if the input looks like markdown.

What happens is that .uno:Paste uses comphelper::IsMarkdownData() to
guess if the input is markdown. This is fine in general, but if you want
to paste "foo _bar_ baz" as-is, there is no .uno:Paste parameter to do
so, you always get "foo <i>bar</i> baz".

Fix the problem by adding a new SkipDetection parameter for .uno:Paste,
while keeping the current behavior unchanged. The LOK API's doc_paste()
function has an explicit mimetype parameter, so skip detection when
using that API (a LOK client will use doc_setClipboard() when the user
does a Ctrl-V, behavior there is unchanged).

Note that an interactive way did exist previously: if you did paste
special and selected plain text, that did work.

Change-Id: I9888b1bf2322d3e1eeb32ffc8c8d08490b8eaa2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194110
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-11-17 18:34:08 +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 cbfda0dd1a LOK: Avoid failed assertion when extracting document structure
coolforkit-ns: /home/mk/core/vcl/source/app/dbggui.cxx:36: void ImplDbgTestSolarMutex(bool):
 Assertion `ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && "SolarMutex not
 owned!"' failed.

Seen with this call stack:

 #0  0x00007f71b2b7ee96 in __GI___assert_fail (
     assertion=0x7f71aa2c4de0 "ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && \"SolarMutex not owned!\"", file=0x7f71aa2c4db8 "/home/mk/core/vcl/source/app/dbggui.cxx", line=36,
     function=0x7f71aa2c4d90 "void ImplDbgTestSolarMutex(bool)") at ./assert/assert.c:103
 #1  0x00007f71a952e69b in ImplDbgTestSolarMutex (owned=true) at /home/mk/core/vcl/source/app/dbggui.cxx:36
 #2  0x00007f71ab311ee0 in DbgTestSolarMutex (owned=true) at /home/mk/core/tools/source/debug/debug.cxx:54
 #3  0x00007f719ae4156d in SwModify::Add (this=0x55ace7ff8ec0, rDepend=...)
     at /home/mk/core/sw/source/core/attr/calbck.cxx:172
 #4  0x00007f719b42e062 in SwContentNode::SwContentNode (this=0x55ace8021f50, rWhere=..., nNdType=SwNodeType::Text, pColl=0x55ace7ff8ec0) at /home/mk/core/sw/source/core/docnode/node.cxx:1082
 #5  0x00007f719ba84bee in SwTextNode::SwTextNode (this=0x55ace8021f50, rWhere=..., pTextColl=0x55ace7ff8ec0, pAutoAttr=0x0) at /home/mk/core/sw/source/core/txtnode/ndtxt.cxx:219
 #6  0x00007f719ba84661 in SwNodes::MakeTextNode (this=0x55ace83b0ee0, rWhere=..., pColl=0x55ace7ff8ec0, bNewFrames=true) at /home/mk/core/sw/source/core/txtnode/ndtxt.cxx:133
 #7  0x00007f719b442347 in SwNodes::MakeTextSection (this=0x55ace83b0ee0, rWhere=..., eSttNdTyp=SwNormalStartNode, pColl=0x55ace7ff8ec0) at /home/mk/core/sw/source/core/docnode/nodes.cxx:1953
 #8  0x00007f719b18c9a2 in SwRangeRedline::MoveToSection (this=0x55ace8302bd0) at /home/mk/core/sw/source/core/doc/docredln.cxx:1962
 #9  0x00007f719b18b8c8 in SwRangeRedline::ShowOriginal (this=0x55ace8302bd0, nLoop=0, nMyPos=3) at /home/mk/core/sw/source/core/doc/docredln.cxx:1772
 #10 0x00007f719c650b17 in (anonymous namespace)::HideNewerShowOlder::Hide (pRedline=0x55ace8302bd0, rTable=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:934
 #11 0x00007f719c650668 in (anonymous namespace)::HideNewerShowOlder::HideNewerShowOlder (this=0x7ffea7e20b60, limit=..., rTable=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:885
 #12 0x00007f719c651152 in (anonymous namespace)::GetDocStructureTrackChanges (rJsonWriter=..., pDocShell=0x55ace7d72d00, filterArguments=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:997
 #13 0x00007f719c651cc3 in (anonymous namespace)::GetDocStructure (rJsonWriter=..., pDocShell=0x55ace7d72d00, rArguments=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:1077
 #14 0x00007f719c6524a4 in SwXTextDocument::getCommandValues (this=0x55ace836de60, rJsonWriter=..., rCommand=...) at /home/mk/core/sw/source/uibase/uno/loktxdoc.cxx:1162
 #15 0x00007f71b272492f in lo_extractDocumentStructureRequest (pFilePath=0x55ace4085040 "file:///tmp/user/docs/IvJPNWKKqE4D3jXV/works.docx", pFilter=0x55ace7b2a450 "trackchanges,contextLen:100") at /home/mk/core/desktop/source/lib/init.cxx:3352
 #16 0x000055accb8ae888 in lok::Office::extractDocumentStructureRequest (pFilter=<optimized out>, pFilePath=<optimized out>, this=0x55acd7c16bd0) at /home/mk/core/include/LibreOfficeKit/LibreOfficeKit.hxx:1301
 #17 ChildSession::_handleInput (this=0x55ace78ead30, buffer=<optimized out>, length=<optimized out>) at kit/ChildSession.cpp:371
 #18 0x000055accb95f62c in Session::handleMessage (this=0x55ace78ead30, data=...) at common/Session.cpp:326
 #19 0x000055accb901e25 in Document::forwardToChild (this=0x55ace7a662b0, prefix=..., payload=...) at kit/Kit.cpp:2283
 #20 0x000055accb902a8e in Document::drainQueue (this=0x55ace7a662b0) at /usr/include/c++/13/string_view:146
 #21 0x000055accb9036cd in KitSocketPoll::drainQueue (this=0x55ace7a8c880) at kit/Kit.cpp:2961
 #22 KitSocketPoll::kitPoll (this=0x55ace7a8c880, timeoutMicroS=<optimized out>) at kit/Kit.cpp:3034
 #23 0x00007f71a99ac661 in SvpSalInstance::ImplYield (this=0x55acd7c35700, bWait=true, bHandleAllCurrentEvents=false) at /home/mk/core/vcl/headless/svpinst.cxx:463
 #24 0x00007f71a99ac938 in SvpSalInstance::DoYield (this=0x55acd7c35700, bWait=true, bHandleAllCurrentEvents=false) at /home/mk/core/vcl/headless/svpinst.cxx:504
 #25 0x00007f71a95f88d9 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/mk/core/vcl/source/app/svapp.cxx:389
 #26 0x00007f71a95f9794 in Application::Yield () at /home/mk/core/vcl/source/app/svapp.cxx:492
 #27 0x00007f71a95f855a in Application::Execute () at /home/mk/core/vcl/source/app/svapp.cxx:364
 #28 0x00007f71b26602a7 in desktop::Desktop::Main (this=0x7ffea7e23f30) at /home/mk/core/desktop/source/app/app.cxx:1680
 #29 0x00007f71a96249f1 in ImplSVMain () at /home/mk/core/vcl/source/app/svmain.cxx:228
 #30 0x00007f71a9624ad6 in SVMain () at /home/mk/core/vcl/source/app/svmain.cxx:246
 #31 0x00007f71b26d300e in soffice_main () at /home/mk/core/desktop/source/app/sofficemain.cxx:121
 #32 0x00007f71b2743c40 in lo_runLoop (pPollCallback=0x55accb904070 <pollCallback(void*, int)>, pWakeCallback=0x55accb8e6ab0 <wakeCallback(void*)>, pData=0x55ace7a8c880) at /home/mk/core/desktop/source/lib/init.cxx:7873
 #33 0x000055accb90c3af in lok::Office::runLoop (pData=0x55ace7a8c880, pWakeCallback=0x55accb8e6ab0 <wakeCallback(void*)>, pPollCallback=0x55accb904070 <pollCallback(void*, int)>, this=0x55acd7c16bd0) at /home/mk/core/include/LibreOfficeKit/LibreOfficeKit.hxx:1156
 #34 lokit_main (childRoot=..., jailId=..., configId=..., sysTemplate=..., loTemplate=..., noCapabilities=<optimized out>, noSeccomp=<optimized out>, useMountNamespaces=<optimized out>, queryVersion=<optimized out>, displayVersion=<optimized out>, sysTemplateIncomplete=<optimized out>, numericIdentifier=<optimized out>) at kit/Kit.cpp:3926
 #35 0x000055accb8c7ea9 in operator() (__closure=<optimized out>) at kit/ForKit.cpp:556
 #36 std::__invoke_impl<void, createLibreOfficeKit(const std::string&, const std::string&, const std::string&, const std::string&, bool, bool)::<lambda()>&> (__f=...) at /usr/include/c++/13/bits/invoke.h:61
 #37 std::__invoke_r<void, createLibreOfficeKit(const std::string&, const std::string&, const std::string&, const std::string&, bool, bool)::<lambda()>&> (__fn=...) at /usr/include/c++/13/bits/invoke.h:111
 #38 std::_Function_handler<void(), createLibreOfficeKit(const std::string&, const std::string&, const std::string&, const std::string&, bool, bool)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/13/bits/std_function.h:290
 #39 0x000055accb8cb1c2 in std::function<void ()>::operator()() const (this=0x7ffea7e24e90) at /usr/include/c++/13/bits/std_function.h:591
 #40 forkKit(const std::function<void()> &, const std::string &, const std::function<void(int)> &) (childFunc=..., childProcessName=..., parentFunc=...) at kit/ForKit.cpp:499
 #41 0x000055accb8cc6ef in createLibreOfficeKit (childRoot=..., sysTemplate=..., loTemplate=..., useMountNamespaces=<optimized out>, queryVersion=<optimized out>, configId=...) at kit/ForKit.cpp:576
 #42 0x000055accb8d1578 in forkit_main (argc=<optimized out>, argv=<optimized out>) at kit/ForKit.cpp:1042
 #43 0x00007f71b2b6ed90 in __libc_start_call_main (main=main@entry=0x55accb8835a0 <main(int, char**)>, argc=argc@entry=10, argv=argv@entry=0x7ffea7e25e58) at ../sysdeps/nptl/libc_start_call_main.h:58
 #44 0x00007f71b2b6ee40 in __libc_start_main_impl (main=0x55accb8835a0 <main(int, char**)>, argc=10, argv=0x7ffea7e25e58, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffea7e25e48) at ../csu/libc-start.c:392
 #45 0x000055accb884845 in _start ()

Change-Id: Ib7e8f93b094db925b6bb60134d23aeb325a10f54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191016
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 3d166314525aa86f16a2c8aba76bb796c77589fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193554
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-11-08 08:04:54 +01:00
Henry Castro 24d7dfd11f sd: add "bAllyState" parameter to "getPresentationInfo" function
To check if the user has enabled the accessibility feature flag,
verify the corresponding setting.

Change-Id: Iae44631ca4b2359f29f3aba6d5434789e29c1717
Signed-off-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190705
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192440
Tested-by: Jenkins
2025-10-15 18:36:37 +02:00
Jason Whitmore 654dfca97f tdf#158237 replace find() and end() with contains()
This change updates some code to use C++20 features
as well as minor performance improvements.

Change-Id: I1f84d0f7155bec41a83ee2ddb011fdc5f0ba7386
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191056
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2025-10-15 13:41:03 +02:00