LibreOffice.git
8 months agoBump version to 21.06.6.1co-21.06.6-1
Andras Timar [Wed, 10 Nov 2021 10:42:31 +0000 (10 11:42 +0100)]
Bump version to 21.06.6.1

Change-Id: Ic49366632debf2c7b603e6a81d6ae41316065bde

8 months agotdf#136111 fix scaling problem on chart driven by a macro
Andras Timar [Tue, 9 Nov 2021 22:36:32 +0000 (9 23:36 +0100)]
tdf#136111 fix scaling problem on chart driven by a macro

Change-Id: I9a55bcfceb9259f0d5dc944c00a34b3e4a891e0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124940
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
8 months agosw: Wrong ZOrder after import for images anchored to non-1nd page
Tomaž Vajngerl [Sat, 30 Oct 2021 08:03:33 +0000 (30 10:03 +0200)]
sw: Wrong ZOrder after import for images anchored to non-1nd page

Importing a document that has images anchored to the non-1st
page, can result in images having the wrong the wrong Z index
(ZOrder). If there are overlapping objects in the document,
this can become a problem.

The issue is with the call to SwRootFrame::RemoveMasterObjs,
which removed the "master objects" - SwFlyDrawObj* castable
objects. Normally the SwFlyDrawObj* objects on the page are wrapped
and replaced by SwVirtFlyDrawObj*, but when the call to the
RemoveMasterObjs was made, this hasn't happen yet to all the
objects (objects that were not on the 1st page).

The fix is to move the RemoveMasterObjs call to a different place,
where we processed all the pages, so we can safely remove the
remaining master objects on the page.

Change-Id: I7d2f31614d269c22a82e7e5dea960f3d0844a5d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124597
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 8b7dbd220dbdfd286de2d770503dae8bf6d2e53e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124686
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
8 months agosw: try grouping undo actions of IME-edited text
Miklos Vajna [Mon, 8 Nov 2021 07:27:52 +0000 (8 08:27 +0100)]
sw: try grouping undo actions of IME-edited text

This is a problem since commit e7760d428bc82ccfcae14f1907b78f9f1013b88c
(Fix tdf#87500 - Freeze with English/Japanese mixture undo.,
2015-09-08), that started not grouping IME-edited text completely.

This means that in case you go via SwEditWin::Command() instead of
SwEditWin::KeyInput() to type a 4 characters word, then it'll create 4
undo actions.

Fix the problem by tracking who was the last caller of
sw::DocumentContentOperationsManager::InsertString(), so we can only
disable grouping switching between IME and non-IME, and we can have
grouping for a series of IME input.

(cherry picked from commit 6680e51716e383c68bb1ec9cc0a05d698d3b6a3d)

Change-Id: I31bd02db4fe653ab63e41a77c75b8bebfc749ff1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124834
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
8 months agotdf#139205: Keep hierarchical structure of localized default styles in Calc
Kevin Suo [Wed, 3 Nov 2021 06:16:52 +0000 (3 14:16 +0800)]
tdf#139205: Keep hierarchical structure of localized default styles in Calc

The default cell styles (when creating a new Calc document), as returned by orcus
parsing, are built-in English names, as defined in sc/res/xml/styles.xml. These
names can be localized. On non-English UI, all these (localized) styles names
will be forced to use the localized "Default" as their parent because there is
no such non-localized parents in the localized style tree on UI.

In this patch, I added SC_DLLPUBLIC to ScStyleNameConversion::ProgrammaticToDisplayName,
then used this function to convert the parent style name to the (localized) UI name.

Change-Id: I3689211a10c60a5e7b2b273b6c15a4da92f0d633
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124556
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
8 months ago[cp] --disable-skia, there's not that much point in building that for Linux
Andras Timar [Thu, 4 Nov 2021 21:42:18 +0000 (4 22:42 +0100)]
[cp] --disable-skia, there's not that much point in building that for Linux

Change-Id: I0ccd3e6b544609dcdb6e78ef846adaa0f4d93768

8 months agosc: EMBED_SOURCE: extend copy to clip area...
Dennis Francis [Tue, 2 Nov 2021 10:07:17 +0000 (2 15:37 +0530)]
sc: EMBED_SOURCE: extend copy to clip area...

to include the draw objects in the sheet read from system clipboard.

This is needed because GetCellArea() computes the "last row" and "last
column" only based on the cell contents and not the drawing layer
contents.  So copying a "empty cells" range that has images in it and
pasting it will not include any images without this fix.

Change-Id: I56ffb14e881a1aecc5b43590ea4fb3fc1c35ace8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124629
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
8 months agosc: EMBED_SOURCE: also include objects on copy to clip
Dennis Francis [Tue, 2 Nov 2021 10:04:08 +0000 (2 15:34 +0530)]
sc: EMBED_SOURCE: also include objects on copy to clip

This is to match the behaviour of copy-pasting with the internal
clipboard. If user copies a range that contains some images then on
pasting these images are also included when using internal clipboard
document.

Change-Id: I61a6e71bd6afcace51230d1e7e7539e88404cbe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124628
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
8 months agosc: fix clip cell range for clip with no content
Dennis Francis [Tue, 2 Nov 2021 07:21:30 +0000 (2 12:51 +0530)]
sc: fix clip cell range for clip with no content

The problem was observed in LOK mode with the following step:
1. Select and copy a sheet area with no content.
2. Paste this into another document.
=> You get an error dialog saying "Protected cells cannot be modified".

The issue here is in ScViewFunc::PasteDataFormat, rSrcDoc.GetDataStart()
gives the correct cell indices of the clip selection, but GetCellArea()
truncates the range to empty range as there is no content. Since these
functions are used in many places which might depend on this behaviour,
it seems right to fix it just for this usecase.

Change-Id: Ibc85a8d7dd33b377a37298ea9a2a7ebb55eccf1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124627
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
8 months agoxmlsec: fix OOXML signing with multiple certs, extend the test
Tomaž Vajngerl [Mon, 1 Nov 2021 20:46:43 +0000 (1 21:46 +0100)]
xmlsec: fix OOXML signing with multiple certs, extend the test

Signing OOXML with 3 or more times didn't work as other ids
("idPackageObject", "idOfficeObject", ...) were not uniqe. This
change makes those ids unique by appending the signature id. The
signature ID is now generated for OOXML too, while previously it
was a hardcoded string ("idPackageSignature").

The test for signing multiple OOXML was written before, but didn't
catch the issues because it didn't assert the status of the
document after loading it again. This is which is now fixed (and
also added changed for the ODF test case).

Change-Id: Ifa20ea17498b117a4c57f6eddf82f8e83bc640bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124571
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit f2e1e4ff085962a08a5d7738325b383c07afcbbd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124598
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
8 months agoUse JSDialogBuilder for "Find and Replace" dialog.
Gökay ŞATIR [Tue, 2 Nov 2021 09:38:26 +0000 (2 12:38 +0300)]
Use JSDialogBuilder for "Find and Replace" dialog.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I31307601f067c9b303854899258139678ddbba57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124586
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agofix comparison when searching cache
Luboš Luňák [Fri, 29 Oct 2021 12:20:57 +0000 (29 14:20 +0200)]
fix comparison when searching cache

This made the cache always fail and re-cache, making CJK text layout
slower over time. A mistake from ef513fd4b049b214a03fbe6e that
converted !strcmp() to != instead of ==.

Change-Id: Ib70579cd36d7b1df062e4d067e03f5c65e34b142
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124203
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months agojsdialogs: use for MessageDialogs
Szymon Kłos [Wed, 27 Oct 2021 11:04:47 +0000 (27 13:04 +0200)]
jsdialogs: use for MessageDialogs

Change-Id: Ie82558356cd9669f21afefd1ee88d769bf28eb8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124270
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agotdf#145312 xmlsecurity: prevent from crash when cannot receive pdfium annotation
Szymon Kłos [Mon, 25 Oct 2021 10:04:30 +0000 (25 12:04 +0200)]
tdf#145312 xmlsecurity: prevent from crash when cannot receive pdfium annotation

Change-Id: I6adc2cb0a07eb08a50c610958983493f4f8031ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124145
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agoCheck pOutWin before use in ImpEditView::DeselectAll
Szymon Kłos [Thu, 28 Oct 2021 10:33:48 +0000 (28 12:33 +0200)]
Check pOutWin before use in ImpEditView::DeselectAll

Change-Id: I47e417d61093f1845a1541a65d2047ab8dc0b7d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124325
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agoMake Certificate not found dialog async
Szymon Kłos [Wed, 27 Oct 2021 11:04:17 +0000 (27 13:04 +0200)]
Make Certificate not found dialog async

Change-Id: I8da2a2dc763cffd13659b61966a954a6e1ef06a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124269
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agoMake View Certificate sub-dialog async
Szymon Kłos [Mon, 25 Oct 2021 10:03:26 +0000 (25 12:03 +0200)]
Make View Certificate sub-dialog async

Change-Id: I0e1a6a59d856ab266511fc3d6be87fe04c5afdfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124143
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agoMake View Certificate dialog async
Szymon Kłos [Fri, 22 Oct 2021 11:08:46 +0000 (22 13:08 +0200)]
Make View Certificate dialog async

Change-Id: Id93145ecf6be3cb558f0ce8d3cc340bbc67095e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124061
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agojsdialog: enable Digital Signatures dialog
Szymon Kłos [Wed, 20 Oct 2021 09:01:41 +0000 (20 11:01 +0200)]
jsdialog: enable Digital Signatures dialog

In LOK case run it in the readonly mode.
In readonly mode we can run it asynchronously.

Change-Id: I721dd14fa23d4e30255dd976e0cc2a4f30470a3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124058
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agojsdialog: activate tabpage after switch
Szymon Kłos [Mon, 25 Oct 2021 13:02:30 +0000 (25 15:02 +0200)]
jsdialog: activate tabpage after switch

Change-Id: Ib9f61f9e219f1775bccccdb2304cc7ce9fc8a1ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124150
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agojsdialog: weld Image widget
Szymon Kłos [Wed, 20 Oct 2021 08:59:12 +0000 (20 10:59 +0200)]
jsdialog: weld Image widget

Change-Id: Iaf900da5d6256b1aa441dc0dad07ba967f88b085
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123877
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agoUpdate git submodules
Christian Lohmaier [Fri, 29 Oct 2021 09:23:54 +0000 (29 11:23 +0200)]
Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to 0b553b25815d61d60042f58cf00faaea5a1da55c
  - update templates for 7.1.7 rc2

    and force-fix errors using pocheck

    Change-Id: If939ee89c3695d61e8191c75572479d13c22f903

8 months agoAccept macOS SDK 12.0
Tor Lillqvist [Wed, 27 Oct 2021 10:28:58 +0000 (27 13:28 +0300)]
Accept macOS SDK 12.0

Change-Id: I3e2b004578394e0199ac425f7b80da47a668f70d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124266
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124276
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
8 months agoupdate credits
Christian Lohmaier [Wed, 27 Oct 2021 10:41:52 +0000 (27 12:41 +0200)]
update credits

Change-Id: Iec12f3c4f948d7e9e7991a212860e79f80750417
(cherry picked from commit c4a484b09ff4dca094ad2c56fd9e519f8ff8599a)

8 months agoxmlsec: signing the document fails the 3rd time (invalid signature)
Tomaž Vajngerl [Wed, 27 Oct 2021 12:15:17 +0000 (27 14:15 +0200)]
xmlsec: signing the document fails the 3rd time (invalid signature)

Signing the document 3 or more times produces an invalid signature.
The cause of this is that xmlsec is confused because we have 3
signatures, which all have the same SignedProperties with the ID
"idSignedProperties", but it expect them to be unique.

This issue is fixed by making the ID unique with adding the ID of
the Signature to the SignedProperties ID, so this makes them unique
inside the same Signature.

Also UnsignedProperties have a unique ID usign the same approach,
but they aren't referenced - luckily.

Change-Id: I53c7249a82fc0623586548db9fa25bdc0e7c4101
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124278
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit fd5463343ab7f784070f1ab87a345eed20803d07)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124327
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
8 months ago[cp] fix 'requires' of dict-kmr-Latn and dict-ko
Andras Timar [Wed, 27 Oct 2021 20:19:06 +0000 (27 22:19 +0200)]
[cp] fix 'requires' of dict-kmr-Latn and dict-ko

Change-Id: I725ff19772dd675adb831099ba7cc20b9fc16d35

8 months ago[cp] fix packaganame of dict-kmr-Latn and dict-ko
Andras Timar [Wed, 27 Oct 2021 14:45:29 +0000 (27 16:45 +0200)]
[cp] fix packaganame of dict-kmr-Latn and dict-ko

Change-Id: I6d32a5ea75a0ec8c59856862fbef1eb273aad3dd

8 months agoremove useless check from SfxViewShell::GetFirst()/GetNext()
Luboš Luňák [Tue, 26 Oct 2021 10:41:34 +0000 (26 12:41 +0200)]
remove useless check from SfxViewShell::GetFirst()/GetNext()

This comes from https://bz.apache.org/ooo/show_bug.cgi?id=62084 ,
but it's unclear to me what the steps to reproduce actually mean.
If it's print preview, then I can't reproduce, and all tests work
fine too. This code is called very often from LOK code in a loop,
and this check makes it O(n^2), so remove it under the assumption
that the problem no longer exists, only keep an assert just in case.

Change-Id: I0e7ed03ef370aa32f2064c587b242e1ffaff73b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124208
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months agouse boost flat_map for faster map
Luboš Luňák [Mon, 25 Oct 2021 20:48:28 +0000 (25 22:48 +0200)]
use boost flat_map for faster map

setUpdatedTypePerViewId() gets called so often that even unordered_map
lookup and allocations show up in profiling. It seems that flat_map
can do better.

Change-Id: Id2e4f0c40d6973b51e557f84a08bf12feb58b3ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124191
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months agoBump version to 21.06.5.2cp-21.06.5-2
Andras Timar [Tue, 26 Oct 2021 13:01:22 +0000 (26 15:01 +0200)]
Bump version to 21.06.5.2

Change-Id: Iaba9c6c6de7554a920e70a8e532697f1433981c7

8 months agoFix Nesting Level Bug in ProfileZone
Gopi Krishna Menon [Thu, 29 Jul 2021 09:51:13 +0000 (29 15:21 +0530)]
Fix Nesting Level Bug in ProfileZone

Moves the profile zone global nesting variable into the source from header and makes it threadlocal

Change-Id: I97751f5c532d8e0e36adb7d9d383bd88f752953f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119662
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 74f4a1796f94477d459c71d0a0aaa8f4a430e208)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119618
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
8 months agotdf#138531: Also update DDE tables, not only fieldsco-21.06.5-1
Bjoern Michaelsen [Sun, 24 Oct 2021 21:17:24 +0000 (24 23:17 +0200)]
tdf#138531: Also update DDE tables, not only fields

Change-Id: I0cbf8ce355b460b2f7ea73c8fae653641c980979
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124129
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 98247b039baea4697e6c387025afcf6a2963c043)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124020

8 months agoRun testODFX509CertificateChain first because otherwise it fails on my Mac
Tor Lillqvist [Wed, 20 Oct 2021 08:56:54 +0000 (20 11:56 +0300)]
Run testODFX509CertificateChain first because otherwise it fails on my Mac

Sure, it would be better to figure out why it fails.

Change-Id: I4c9e8aa0a9a3cd421de08ec9c9ea2dcb1a242ab1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123875
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit fd7f17ca580888044050fbf25df65354ba12d4ca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124023
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
8 months agouse pull model also for LOK text selection
Luboš Luňák [Thu, 7 Oct 2021 16:02:12 +0000 (7 18:02 +0200)]
use pull model also for LOK text selection

Make LOK_CALLBACK_TEXT_SELECTION, LOK_CALLBACK_TEXT_SELECTION_START,
LOK_CALLBACK_TEXT_SELECTION_END and LOK_CALLBACK_TEXT_VIEW_SELECTION
also use pull model, i.e. LO core will only set a flag and when
CallbackFlushHandler needs the actual data it'll use getLOKPayload().
This again avoids a large number of messages passed to
CallbackFlushHandler only for them to be sooner or later discarded.

Change-Id: Ia7528039be996a6e9e8491b4eba3f4133582fa56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124147
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months agotest: upgrade test NSS database from dbm: to sql:
Michael Stahl [Thu, 14 Oct 2021 11:44:14 +0000 (14 13:44 +0200)]
test: upgrade test NSS database from dbm: to sql:

Fedora nss-3.69.0-1.fc34.x86_64 and Debian libnss3:amd64 2:3.70-1 no
longer support the old BerekelyDB databases, so convert them to the new
SQLite format for the benefit of --with-system-nss builds.

This worked to do the upgrade:

> certutil -N -d sql:test/new --empty-password
> LD_LIBRARY_PATH=instdir/program workdir/UnpackedTarball/nss/dist/out/bin/certutil --merge -d sql:test/new --source-dir dbm:test/signing-keys

Builds would fail running tests added in commit
40d70d427edddb589eda64fafc2e56536953d274

  signing.cxx:551:Assertion
  Test name: testODFX509CertificateChain::TestBody
  equality assertion failed
  - Expected: 0
  - Actual  : 1

Change-Id: I00aa20703e117ebf583c3331b84e966c2cfc78cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123586
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit d09cbdc12ef5af6d98f62c06056f36306c247cfe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123644
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
8 months agoRevert incompatible ScriptEditor change
Stephan Bergmann [Mon, 18 Oct 2021 12:37:05 +0000 (18 14:37 +0200)]
Revert incompatible ScriptEditor change

...from interface to abstract class, in 1c42afc194da2288c5a738b727952e80c323885c
"Respect DisableMacrosExecution option in javascript editor".  It caused 3rd-
party code like ScriptProviderForooRexx.oxt to fail to install.

Change-Id: I532f27fdce806e471a8551646adbb3aecf80bcee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123745
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit d425cd604cb4d30862640851b11a31e742d81336)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123770
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
8 months agoremove slow wrappers for std::vector
Luboš Luňák [Fri, 8 Oct 2021 06:36:45 +0000 (8 08:36 +0200)]
remove slow wrappers for std::vector

Noel has already done this in master in a number of commits,
this one changes those that make SfxViewShell:GetFirst/Next slower.

Change-Id: I69dcb026ce969731071be55f36d3c6d42daa89e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124116
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months agoclang does not support -flto=<number>
Luboš Luňák [Mon, 11 Oct 2021 20:28:06 +0000 (11 22:28 +0200)]
clang does not support -flto=<number>

This may happen when building with GCC when Clang is used for Skia
and --with-parallelism is in effect.

Change-Id: Ic52dbbcf53253ed73413af4ea8254b000eee72d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123430
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit 5b2848413883565c48d312c96daf8fbca25405d8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124017
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
8 months agochange some LOK internal updates to be pull model instead of push
Luboš Luňák [Fri, 15 Oct 2021 06:43:23 +0000 (15 08:43 +0200)]
change some LOK internal updates to be pull model instead of push

Some LOK messages may get called very often, such as updates about
cursor position. And since only the last one matters, they get
generated every time, which costs some time, and then later except
for one they get all discard again from CallbackFlushHandler queue,
which again costs time.

Change the model to instead only set an 'updated' flag, and
CallbackFlushHandler will request the actual message payload only
before flushing.

This commit changes LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR and
LOK_CALLBACK_INVALIDATE_VIEW_CURSOR to work this way.

Change-Id: I376be63176c0b4b5cb492fbf529c21ed01b35481
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124084
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months ago[cp] Fix of Win32 MSP creation
Andras Timar [Fri, 22 Oct 2021 20:30:01 +0000 (22 22:30 +0200)]
[cp] Fix of Win32 MSP creation

Change-Id: Id7743b45958a53fa5e3034836ba280dfddcc2e2e

8 months agouse LTO to build hunspell if LTO is enabled
Luboš Luňák [Tue, 12 Oct 2021 23:41:33 +0000 (13 01:41 +0200)]
use LTO to build hunspell if LTO is enabled

Without this, LTO gcc build may fail while linking libmerged because
of an undefined reference to `std::string::append(char const*)',
which looks like a gcc bug because std::string should be a template,
but whatever, this makes it build.

Change-Id: I173cc0c773d5957a0c4a9cecc74c1ab33afad7db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123541
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124082
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
8 months agoMSVC LTO does not like mixing 32bit and 64 code
Luboš Luňák [Tue, 12 Oct 2021 21:22:31 +0000 (12 23:22 +0200)]
MSVC LTO does not like mixing 32bit and 64 code

So disable LTO for x64 code when building for 32bit.

Change-Id: I8445d8307b3b797b78cea12e6322e0d792c71dfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123537
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124081
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
8 months agosvx: Don't end text edit mode for all views
Tomaž Vajngerl [Thu, 7 Oct 2021 14:48:46 +0000 (7 16:48 +0200)]
svx: Don't end text edit mode for all views

This allows multiple views to not disturb each other editing inside
a impress document. With the ending of text edit for all views still
enabled, one view can cancel other views text editing just by moving
or resizing a unrelated shape in the document.

To make this possible we also need a view-local undo manager for
the text edit mode, which is independent of the document undo
manager. When the text edit mode ends, all the changes will be
added as one change to the document undo stack. This prevents any
conflicts in the undo stack that could be made when 2 views are
editing the same document at the same time.

This also adds the test for the new use case and changes the existing
tests to reflect the change.

Change-Id: I04edb4f91d7e111a490c946f7121cbca75f818d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123220
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit c175c1dc19d0edc8ca66e39f0b4b8af04e3d6c87)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123951

8 months agohdiutil flatten/unflatten was removed in macOS 11
Andras Timar [Fri, 22 Oct 2021 19:47:31 +0000 (22 21:47 +0200)]
hdiutil flatten/unflatten was removed in macOS 11

Change-Id: If5a1a70f8a7428d81668704f93fa7a1f45058b68

8 months agotdf#140022 sd: fix inteaction between multi-col shape text and automatic height
Miklos Vajna [Thu, 21 Oct 2021 14:49:53 +0000 (21 16:49 +0200)]
tdf#140022 sd: fix inteaction between multi-col shape text and automatic height

Multi-column shape text works by assuming a fixed height, then flowing
content to a next column once the current one is full.

Automatic height works by first laying out the text and then resizing
the shape to have a matching height.

When both are enabled, then we used to first calculate the automatic
height and then lay out the multi-col text using that height. PowerPoint
takes the height from the file format and lays out the multi-col text
using that fixed height, and only editing modifies the automatic height.

Fix the problem by not updating the automatic height when we have
multiple columns, this is meant to improve the stability of the layout
anyway.

Manual testing shows that editing the text on the UI still updates the
automatic height, as probably expected.

Based on Mike Kaganski's research - thanks! :-)

Change-Id: Iaf46c6008018b4bf26310322f25788a49c1d27f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124048
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 7e74c6cf8d0a56cc061f48e1c6f397d393165220)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124062
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
8 months agoproperly flush LOK invalidations in tests
Luboš Luňák [Wed, 20 Oct 2021 09:32:17 +0000 (20 11:32 +0200)]
properly flush LOK invalidations in tests

This should be done always before doing something with a flag
related to the invalidations. Use an idle timer for simplicity,
tests already usually process to idle.

Change-Id: I979900da28061cc690ecbcce023dbb769239f205
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124027
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months agoignore invalidations in Writer when doing tiled painting
Luboš Luňák [Thu, 21 Oct 2021 13:07:27 +0000 (21 15:07 +0200)]
ignore invalidations in Writer when doing tiled painting

That's done by ignoreLibreOfficeKitViewCallback() called from
SfxViewShell::libreOfficeKitViewInvalidateTilesCallback(),
but in case Writer delays invalidations to compress them, the tiled
painting flag may be already reset by the time
flushPendingLOKInvalidateTiles() gets called, so handle that
explicitly. SwTiledRenderingTest::testTablePaintInvalidate()
would otherwise fail with my follow-up commit that makes
TestLokCallbackWrapper flush the invalidations.

Change-Id: I915ae4e40bc7a82b3e48498f7e5513420dd64522
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124006
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months agobetter name for a function overload
Luboš Luňák [Thu, 21 Oct 2021 10:20:52 +0000 (21 12:20 +0200)]
better name for a function overload

It's better to add to the name what the overload does rather than
just have a "mysterious" extra int.

Change-Id: Iff89679c4a978a4596ac662ef74e934cdefefc9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124005
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months agorevert unittests to use plain text-based LibreOfficeKitCallback
Luboš Luňák [Thu, 21 Oct 2021 10:09:56 +0000 (21 12:09 +0200)]
revert unittests to use plain text-based LibreOfficeKitCallback

At least for now it seems that the more complex
SfxLokCallbackInterface is just an unnecessary complication for unit
tests. The performance doesn't matter, and handling all the
specialized callbacks makes things more complicated. In the future
it'd be also useful to make the tests (optionally?) use also
CallbackFlushHandler as the provider of the messages, in order
to test CallbackFlushHandler more thoroughly, so perhaps in the end
it makes more sense to keep unit tests using the plain text interface.

This reverts unittest-related parts of 3b729db05553c1a6d461fb41c89
and adds a smaller wrapper callback class that converts messages
from SfxLokCallbackInterface to LibreOfficeKitCallback format.

Change-Id: I6c14f0be4ed7b777444b131140be54188d309cca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124004
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
8 months agoMove SalInstanceImage decl to header file
Szymon Kłos [Wed, 20 Oct 2021 08:53:53 +0000 (20 10:53 +0200)]
Move SalInstanceImage decl to header file

Change-Id: Ic71e10a9cb296e8fed366b7dd622d8875d68f2d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123876
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agojsdialog: export common properties for Image
Szymon Kłos [Wed, 20 Oct 2021 10:28:08 +0000 (20 12:28 +0200)]
jsdialog: export common properties for Image

Change-Id: Id01686106477cc1911fb5ec345ffcff5537e0de6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123884
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
8 months agolok: fix formula mode after reference dialog was used
Szymon Kłos [Tue, 19 Oct 2021 09:09:32 +0000 (19 11:09 +0200)]
lok: fix formula mode after reference dialog was used

m_nCurRefDlgId is a global variable which can be used by many views.
It should be deglobalized in LOK case in the furture.

For now let's fallback when we didn't get child window for
remembered value of m_nCurRefDlgId. It fixes following case:

1. opened pivot table dialog and in destination section selected
   "selection", selected a range, closed dialog
2. tried to type formula in the cell and point any cell to add
   reference

before this patch formula mode was closed, after it adds correctly
the selected range to the formula

Change-Id: I4d6756f08207f78a6033865203905bc2fed59fb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123803
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
8 months agosw: fix crash in SwXTextDocument::postMouseEvent()
Miklos Vajna [Thu, 21 Oct 2021 06:25:55 +0000 (21 08:25 +0200)]
sw: fix crash in SwXTextDocument::postMouseEvent()

From crashreport:

SIG   Fatal signal received: SIGSEGV

SwXTextDocument::postMouseEvent(int, int, int, int, int, int)
sw/source/uibase/uno/unotxdoc.cxx:3559
doc_postMouseEvent
desktop/source/lib/init.cxx:4245

Make sure we don't crash when a mouse event is posted on a disposed
document.

Change-Id: I3fb123460b21bf8fe21406d1745f43270102af33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123947
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124044
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
8 months agosvx: add "m" prefix to some member variables in SdrObjEditView
Tomaž Vajngerl [Tue, 28 Sep 2021 17:12:40 +0000 (28 19:12 +0200)]
svx: add "m" prefix to some member variables in SdrObjEditView

Change-Id: I2877f63d97ff6d15f08bd2dbaee6128b8a689cc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123219
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 93115d2c54d645bcf2f80fde325e3ede39dee4d5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123950
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
8 months agoResolves: tdf#145235 TEXTJOIN() clear last string also for referenced empty
Eike Rathke [Wed, 20 Oct 2021 11:41:03 +0000 (20 13:41 +0200)]
Resolves: tdf#145235 TEXTJOIN() clear last string also for referenced empty

Change-Id: If6d20a1629e001708c700c5c25bef8a75fa34e25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123889
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit f4f2c94513e7d06691a73d9f12707c33d131d537)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123865
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
8 months agoFix gpgmepp build with glibc
Mike Kaganski [Fri, 8 Oct 2021 14:06:01 +0000 (8 17:06 +0300)]
Fix gpgmepp build with glibc

posix-io.c: In function '_gpgme_io_spawn':
posix-io.c:492:23: error: void value not ignored as it ought to be
  492 |             while ((i = closefrom (fd)) && errno == EINTR)
      |                       ^
make[1]: *** [Makefile:964: posix-io.lo] Error 1

Change-Id: I0e7abc33200ca7436c72e925447e681fd241c6a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123259
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit f60214a1ad45f947d063e4cfdbeb86bd819ab87c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123927
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
8 months agoxmlsecurity: fix --without-system-nss usage of NSS_SetAlgorithmPolicy
Michael Stahl [Tue, 19 Oct 2021 14:00:53 +0000 (19 16:00 +0200)]
xmlsecurity: fix --without-system-nss usage of NSS_SetAlgorithmPolicy

The problem with commit ff572d9222ec16ffd679ae907a0bf4a8900265e1
is that it's using the wrong library; NSS_SetAlgorithmPolicy is actually
in libnssutil3.so.

This causes a linking problem when upgrading the internal NSS to a
version that has NSS_USE_ALG_IN_ANY_SIGNATURE.

Change-Id: I954d88062c38881bc721bdf052db4f7b55888aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123819
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 395c0c0bbaceadf909e0189af99c6358487c7978)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123848
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
8 months agoxmlsecurity: fix test failing because NSS policy forbids SHA1
Michael Stahl [Fri, 15 Oct 2021 18:52:47 +0000 (15 20:52 +0200)]
xmlsecurity: fix test failing because NSS policy forbids SHA1

With Fedora's nss-3.71.0-1.fc34.x86_64 there is the problem that
8 tests including testODFGood in CppunitTest/xmlsecurity_signing
fail because the crypto policy disallows SHA1 for signatures.

Apparently this particular policy bit was added in NSS 3.59:
https://bugzilla.mozilla.org/show_bug.cgi?id=1670835

For signatures, maybe it's not a good idea to override system policy
for product builds, so do it locally in the tests, at least for now.

If similar problems turn up for encrypted documents in the future,
that should be fixed in product builds too of course, as encrypted
documents must always be decryptable.

Change-Id: I4f634cf5da1707fb628e63cd0cdafebdf4fc903f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123768
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
8 months agoxmlsecurity: add tests for multiple X509Data/X509Certificate
Michael Stahl [Fri, 26 Feb 2021 16:29:37 +0000 (26 17:29 +0100)]
xmlsecurity: add tests for multiple X509Data/X509Certificate

Change-Id: If50ae8156f81c1053aa8fbfc3148da64bb8e1442
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111666
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
(cherry picked from commit 40d70d427edddb589eda64fafc2e56536953d274)

This commit also contains:

xmlsecurity: fix new tests on WNT

Tests added in commit 40d70d427edddb589eda64fafc2e56536953d274 don't
actually run on WNT but that wasn't obvious because commit
149df1fec6472e30582162e17e04c75aee91d26a prevented running them in
Jenkins on master, they failed only in the libreoffice-7-1 backport.

  xmlsecurity/qa/unit/signing/signing.cxx(631) : error : Assertion
  Test name: testODFDoubleX509Certificate::TestBody
  assertion failed
  - Expression: (nActual == SignatureState::NOTVALIDATED || nActual == SignatureState::OK)
  - 2

This is an oddity where NSS claims the signature in the document is
valid but CryptoAPI claims it is invalid; the hashes passed into the
validation functions are the same.  Just allow BROKEN as an additional
result value on WNT.

  xmlsecurity/qa/unit/signing/signing.cxx(550) : error : Assertion
  Test name: testODFX509CertificateChain::TestBody
  equality assertion failed
  - Expected: 0
  - Actual  : 1

The problem here is that with NSS the tests use a custom NSS database
in test/signing-keys so we need to make these certificates available for
CryptoAPI too.

The following one-liner converts the NSS database to a PKCS#7 that can
be loaded by CrytpAPI:

> openssl crl2pkcs7 -nocrl -certfile <(certutil -d sql:test/signing-keys -L | awk '/^[^ ].*,[^ ]*,/ { printf "%s", $1; for (i = 2; i < NF; i++) { printf " %s", $i; } printf "\n"; }' | while read name; do certutil -L -d sql:test/signing-keys -a -n "${name}" ; done) > test/signing-keys/test.p7b

Then one might naively assume that something like this would allow these
certificates to be added temporarily as trusted CAs:

+                HCERTSTORE hRoot = CertOpenSystemStoreW( 0, L"Root" ) ;
+                HCERTSTORE const hExtra = CertOpenStore(
+                        CERT_STORE_PROV_FILENAME_A,
+                        PKCS_7_ASN_ENCODING | X509_ASN_ENCODING,
+                        NULL,
+                        CERT_STORE_OPEN_EXISTING_FLAG | CERT_STORE_READONLY_FLAG,
+                        path);
+                if (hExtra != NULL && hRoot != NULL)
+                {
+                    BOOL ret = CertAddStoreToCollection(
+                        hRoot,
+                        hExtra,
+                        CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG,
+                        0);
+                    SAL_DEBUG("XXX hExtra done " << ret);
+                }

There is no error from this, but it doesn't work.

Instead, check if CertGetCertificateChain() sets the
CERT_TRUST_IS_UNTRUSTED_ROOT flag and then look up the certificate
manually in the extra PKCS#7 store.

Change-Id: Ic9865e0b5783211c2128ce0327c4583b7784ff62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123667
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 7d664ec788acdc378506a7ff8b1120cea24a6770)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123646
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
8 months agocomphelper: fix bad error handling in CreatePackageEncryptionData()
Michael Stahl [Fri, 15 Oct 2021 08:38:10 +0000 (15 10:38 +0200)]
comphelper: fix bad error handling in CreatePackageEncryptionData()

Not sure if rtl_digest_SHA1 can realistically return an error but avoid
out-of-bounds write in this case.

(regression from commit 9188ea83c346fdc2f668178ae7538665a1b09c02)

Change-Id: If5f134cbcd9236338d1938242a469d7c79e87f06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123649
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 62128c09237152d9e0585abe2fc88f0a13274b34)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123630
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
8 months agotdf#134426 tdf#138873 sw: Revert "tdf#79717 ...
Justin Luth [Wed, 13 Oct 2021 12:56:44 +0000 (13 14:56 +0200)]
tdf#134426 tdf#138873 sw:  Revert "tdf#79717 ...

...save/restore character format on selection overwrite"
which might also fix tdf#144638 as well.

This reverts LO 6.3 commit 6abed0ea006f3616e40faf2ae782cf64f8ac2914.

This 6.3 fix for bug 79717 has caused too many other problems
that are not being looked at, so it should just be reverted.
It is spamming documents with direct formatting which
is a terrible thing to have happen by accident.
It completely wrecks the proper use of styles.

Also revert asscoiated follow-up commits:
Revert "tdf#79717 save/restore character style on selection overwrite"
This reverts commit 6.3 04bd1925706360414438b814046b543c5e317d0a.

Revert "tdf#79717: sw_uiwriter: Add unittest"
This reverts commit 7.1 b05955b480fe4d32852e7be8a118d46ca7e6dbfa.

These effectively revert 7.0.4 12eac5bcbc9b71bf00cb88b918988826229cca35
but its unit test is left intact.

Change-Id: Ideced4d38bfdf4c82f1744534afbaad29689fded
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123566
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123577
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
8 months agolok: invalidate sheet-geometry sizes on clip paste
Dennis Francis [Mon, 18 Oct 2021 06:39:07 +0000 (18 12:09 +0530)]
lok: invalidate sheet-geometry sizes on clip paste

Change-Id: Ie2b308f970673381dfa354620e3394acb44f971f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123869
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
9 months agowriterfilter: give up if body text is missing
Miklos Vajna [Fri, 15 Oct 2021 06:40:22 +0000 (15 08:40 +0200)]
writerfilter: give up if body text is missing

Crashreport trace:

writerfilter::dmapper::DomainMapper_Impl::DomainMapper_Impl(writerfilter::dmapper::DomainMapper&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, writerfilter::dmapper::SourceDocumentType, utl::MediaDescriptor const&)
        writerfilter/source/dmapper/DomainMapper_Impl.cxx:359 (discriminator 2)
writerfilter::dmapper::DomainMapper::DomainMapper(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, bool, writerfilter::dmapper::SourceDocumentType, utl::MediaDescriptor const&)
        writerfilter/source/dmapper/DomainMapper.cxx:113
writerfilter::dmapper::DomainMapperFactory::createMapper(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, bool, writerfilter::dmapper::SourceDocumentType, utl::MediaDescriptor const&)
        writerfilter/source/dmapper/domainmapperfactory.cxx:34
ollaboraoffice6.4/program/../program/libwriterfilterlo.so
RtfFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
        writerfilter/source/filter/RtfFilter.cxx:152

I.e. we end up in a situation where the insert position does not have a
containing XText. It's hard to continue from that point and this is in
the ctor of the dmapper, so we didn't start the import. Just throw an
exception to avoid further crashes.

Change-Id: Idb5c06186a82c00b838d0b3330260340eb4218b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123616
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123737
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
9 months agoLOK: maintain blocked command list per view
Pranam Lashkari [Fri, 17 Sep 2021 13:43:15 +0000 (17 19:13 +0530)]
LOK: maintain blocked command list per view

Change-Id: I7c621accd84f49447ab3e08a4bb662a9b91b834a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122253
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
9 months agoLOK: unify freemium APIs and uno command restriction APIs
Pranam Lashkari [Wed, 15 Sep 2021 18:09:32 +0000 (15 23:39 +0530)]
LOK: unify freemium APIs and uno command restriction APIs

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I3badb038822331ab5cb30df6a66ce9a0640cf340
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122162
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
9 months agoLOK: introduce way to restrict uno commands
Pranam Lashkari [Mon, 13 Sep 2021 17:35:40 +0000 (13 23:05 +0530)]
LOK: introduce way to restrict uno commands

With this new API we can define which uno commands to restrict their functionality

Change-Id: I9f3fd659d373e56542c5323922a53564f1cfb27b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122049
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
9 months ago[cp] Restore light document border for writer part2
Pedro Pinto Silva [Fri, 15 Oct 2021 16:06:26 +0000 (15 18:06 +0200)]
[cp] Restore light document border for writer part2

- Make shadow not so harsh
- Add border radius

fixes https://github.com/CollaboraOnline/online/issues/3403

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5a46915ca4db7b484d5e816985e834b2777a9786
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123672
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months ago--enable-lto for CP distro configs that use --enable-mergelibs
Luboš Luňák [Thu, 14 Oct 2021 12:31:37 +0000 (14 14:31 +0200)]
--enable-lto for CP distro configs that use --enable-mergelibs

It's a couple of percent better performance at the cost of build
time. It should build properly, but if something breaks for whatever
reason, shout and I'll fix it.

Change-Id: I37b7e90eecc0d7b503db88ad18fcbf2ae5f22a98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123587
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
9 months agodelay, collect and compress LOK invalidations for Writer views
Luboš Luňák [Tue, 12 Oct 2021 12:24:44 +0000 (12 14:24 +0200)]
delay, collect and compress LOK invalidations for Writer views

Due the to way views are updated on any document change, invalidations
are at least O(n^2), and since LOK may use a number of views and
for each view the entire document is considered to be the view area,
this can lead to a huge number of invalidations that are mostly
the same repeated rectangles.

Change-Id: I63682958d2fc388344641dcd19fa1d2b39054b51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123618
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
9 months agodo not use text-based LOK callback internally
Luboš Luňák [Fri, 24 Sep 2021 09:25:27 +0000 (24 11:25 +0200)]
do not use text-based LOK callback internally

CallbackFlushHandler post-processes LOK messages, but for things
like dropping useless invalidations it needs to know the rectangle
or the view id, and since the only data it gets are string messages,
it needs to convert those back to binary form. Which is slow
with large numbers of messages.

Add internal LOK callback variant that allows also passing
specific data in the original binary form. And then use directly
the binary data in CallbackFlushHandler.

Change-Id: I8dd30d2ff9c09feadebc31a44d8e6a8ccc306504
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123627
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
9 months agotdf#145016 calc: don't show selection from other split panes
Szymon Kłos [Tue, 12 Oct 2021 09:00:10 +0000 (12 11:00 +0200)]
tdf#145016 calc: don't show selection from other split panes

Change-Id: I636d98b5b95bb7ad51b39c6328440686f0bfd030
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123407
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
9 months ago[cp] Restore light document border for writer
Szymon Kłos [Thu, 14 Oct 2021 05:45:50 +0000 (14 07:45 +0200)]
[cp] Restore light document border for writer

to apply use
make postprocess.clean && make postprocess

fixes https://github.com/CollaboraOnline/online/issues/3403

Change-Id: I3d0d12a60eacc73ace3f614360bc86a8a44f28a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123572
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agouse ThinLTO for Clang everywhere
Luboš Luňák [Fri, 8 Oct 2021 10:52:54 +0000 (8 12:52 +0200)]
use ThinLTO for Clang everywhere

No idea why it should be used only on Apple platforms and normal LTO
elsewhere. ThinLTO should build faster and the result should perform
roughly the same.

Change-Id: Ie93cf0ba810ee5bb2309fcbd3548a4847587b3d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123256
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit cca8c5ad553e21bd55aef93757cd31626f9beba1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123521
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
9 months agoT602 is an obsolete format, don't assume .txt files are T602
Jan Holesovsky [Thu, 7 Oct 2021 13:12:18 +0000 (7 15:12 +0200)]
T602 is an obsolete format, don't assume .txt files are T602

Without this, when the user tries to open a 0-bytes .txt file, they are
asked for a Save As operation after they hit the Save button.

When we remove the 'txt' from the T602 detection, it rather asks if the
user wants to use ODT or Plain text (and lose formatting).

Change-Id: Ic48fa61064a9ed78c64d56bc8864f0e12528e072
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123216
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit d602c433a08c6df28198ceb61b95f5c6d85d1a87)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123402
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
9 months agofix MSVC mergelibs build
Luboš Luňák [Mon, 11 Oct 2021 06:41:12 +0000 (11 08:41 +0200)]
fix MSVC mergelibs build

Linker complains about duplicate symbols for the template, seems
to be a case of
https://codesynthesis.com/~boris/blog/2010/01/18/dll-export-cxx-templates/

Change-Id: Iaffa3ba55edf4e54c62757c64d6b340b55a514cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123362
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit bbe9bfee56ce395c5fa1c1173e9909925a3a6393)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123520
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
9 months agoBump version to 21.06.5.1cp-21.06.5-1
Andras Timar [Thu, 14 Oct 2021 11:40:56 +0000 (14 13:40 +0200)]
Bump version to 21.06.5.1

Change-Id: I5c589aafa81853d9a8f35adc57d37a37f18e6ee9

9 months agoUpdate git submodules
Christian Lohmaier [Thu, 14 Oct 2021 10:50:06 +0000 (14 12:50 +0200)]
Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to 199bc9df9e0c79c47767cf6abb24e7b4aa116c6f
  - update translations for 7.1.7 rc1

    and force-fix errors using pocheck

    Change-Id: I190d7d75d9c53fcf3e09553f6a30ec788aaf3561

9 months agoxmlsecurity: add test for timestamps
Michael Stahl [Fri, 26 Feb 2021 16:24:10 +0000 (26 17:24 +0100)]
xmlsecurity: add test for timestamps

Change-Id: I6ce64ca7c59639684779144ed0ed8d36c4aca32b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111665
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit e5a0acda428fed64b9ba69365d6a54fbffa0727b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123404
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
9 months agoAdapt to Bison 3.8 internal yyn -> yyrule rename
Stephan Bergmann [Tue, 14 Sep 2021 10:20:48 +0000 (14 12:20 +0200)]
Adapt to Bison 3.8 internal yyn -> yyrule rename

see
<https://git.savannah.gnu.org/cgit/bison.git/commit/?id=f30067ed51f23802fc91761ede1506dfa72b2865>
"glr2.cc: log the execution of deferred actions" including "Rename argument yyn
as yyrule for clarity."

YYBISON was defined as 1 rather than as a representation of the Bison version
prior to
<https://git.savannah.gnu.org/cgit/bison.git/commit/?id=21c147b6e5372563b7c4741deadaddb9354f4b09>
"yacc.c: provide the Bison version as an integral macro", which shouldn't be a
problem here.  And YYBISON is apparently completely undefined with
/usr/bin/bison on macOS.

(The preceding comment always mentioned "yyi" and "yyrmap" in apparent mismatch
with the actually used "yyn" and "yyr1" ever since
c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just leave it
untouched.)

Change-Id: I4f901407aa21ed4abec84e661d813ee7599f02f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122082
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 45227d9b79dc4f2a2aa6874cd4e3c02b7934b197)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123408
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
9 months agoupdate credits
Christian Lohmaier [Wed, 6 Oct 2021 00:00:03 +0000 (6 02:00 +0200)]
update credits

Change-Id: I434832c8b4395e8a8e0df44ad056e07cce6585d4
(cherry picked from commit 372005419f68eff13f526b3f1bf4a344370ef4c2)

9 months agoScRangeList::UpdateReference() join all ranges properly (tdf#140901)
Luboš Luňák [Wed, 6 Oct 2021 10:57:15 +0000 (6 12:57 +0200)]
ScRangeList::UpdateReference() join all ranges properly (tdf#140901)

This is basically a revert of 6eb8634a9f62bfe486ecd2f46, which
made this Join() just the last range, probably under the assumption
that the function is always called with just one range to update,
or to avoid the possibility that Join() removes several items
from the list, breaking the next step of the loop. But DeleteArea()
may split several ranges, so we need to make sure to Join()
all of them.

Change-Id: Iea124142335ccdc8fa578344cddce8670c27573d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123135
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit e7ec79fe36a0f22f10167806da80e3c1f30b36e8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123519
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
9 months agoavoid repeated calls to SfxNotebookBar::IsActive()
Luboš Luňák [Tue, 5 Oct 2021 13:11:43 +0000 (5 15:11 +0200)]
avoid repeated calls to SfxNotebookBar::IsActive()

The call reads configuration, and so is a bit expensive when
called in a loop.

Change-Id: I62398bcfdc856f02f6e2d928bac2f144bc47424d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123103
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit e304383b88d271b0e140946af201099c8314dd0a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123410
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
9 months agoavoid O(n^2) in VclEventListeners::Call() if possible
Luboš Luňák [Mon, 11 Oct 2021 13:23:00 +0000 (11 15:23 +0200)]
avoid O(n^2) in VclEventListeners::Call() if possible

The list seems to only rarely change.

Change-Id: Ib1263c696619908a2792c67ff04c5a0c5f0a7858
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123414
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit 9402579be9d9a8888af03291edd2478a716f901a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123399
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
9 months agolok: sc: focus gridwin before use
Szymon Kłos [Mon, 11 Oct 2021 12:50:49 +0000 (11 14:50 +0200)]
lok: sc: focus gridwin before use

commit ef29f8c57dbb73ee3bd2e09ea557b86bf3eacfa6
lok: sc: update ScModelObj::postMouseEvent

introduced Drag&drop for online. One missing thing was
getting the focus for gridwin before mouse event processing
like it is done in LOKPostAsyncEvent

Change-Id: I4063340985f7dcc91cf5382631615119e28ea3f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123391
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agoRevert "tdf#136141 Sidebar wrap section visible like popupmenu"
Szymon Kłos [Mon, 11 Oct 2021 10:09:52 +0000 (11 12:09 +0200)]
Revert "tdf#136141 Sidebar wrap section visible like popupmenu"

This reverts commit 8280491bec32fea5bbdad23f000538d000ed2f24.

Wrap options are not available for Shapes, Media files etc.
When we insert a shape and select any wrap option from the sidebar - app
crashes.
This feature should be implemented first in the code before beeing
visible.

Change-Id: I1110939e9ee40509e380d003665478889e7a2c24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123374
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: sc: unit test drag & drop
Henry Castro [Fri, 10 Sep 2021 11:16:04 +0000 (10 07:16 -0400)]
lok: sc: unit test drag & drop

..

Change-Id: I774ece93e5c439c65df50e6a67d1447a062708b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121898
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: sc: update ScModelObj::postMouseEvent
Henry Castro [Wed, 23 Jun 2021 12:50:46 +0000 (23 08:50 -0400)]
lok: sc: update ScModelObj::postMouseEvent

It is intended to process the drag & drop functionality
in Calc.

Change-Id: I501cd94e309dabf8472e5c5aa9661e7273cd0dae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118879
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: reset and cancel properly Drag & Drop action
Szymon Kłos [Wed, 23 Jun 2021 12:18:08 +0000 (23 08:18 -0400)]
lok: reset and cancel properly Drag & Drop action

used patch from Henry as a template:
https://gerrit.libreoffice.org/c/core/+/118844/17

but without custom actions invocation

Change-Id: I8bce66deffee0de16f3c24f009cfee077eb26e82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123243
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: test: fix testSheetSelections
Henry Castro [Mon, 4 Oct 2021 12:45:18 +0000 (4 08:45 -0400)]
lok: test: fix testSheetSelections

The unit test is selecting again range,
it will conflict with the drag & drop
because it will drop to new cell address.

The unit test will fail, the removed code
will be used to a new unit test for drag & drop.

Change-Id: I896f5cd7e6b671f3fac95c8ae76e7558fa8dd1d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123062
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: send drag overlay
Szymon Kłos [Fri, 8 Oct 2021 06:18:50 +0000 (8 08:18 +0200)]
lok: send drag overlay

Change-Id: I1e134fd99dffc4962bacbba97456365ab9347e37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123242
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: deglobalize SetDragObject
Szymon Kłos [Wed, 6 Oct 2021 16:22:36 +0000 (6 18:22 +0200)]
lok: deglobalize SetDragObject

and other Drag and Drop related functions

Change-Id: Idbaec91c0ed396da9888c8ed562d2eff35686cca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123209
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: sc: simplify drag & drop functions
Henry Castro [Thu, 15 Jul 2021 15:31:21 +0000 (15 11:31 -0400)]
lok: sc: simplify drag & drop functions

The ScDragData is a global use for private drag & drop
in a desktop case, it will be used by tiled rendering
case to pass its own local ScDragData per user.

Change-Id: I0bca8e6d5c0eab82b69374a67425e2a8d746ef4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118990
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agosfx2: introduce SfxBindings::QuerySlotId
Henry Castro [Mon, 4 Oct 2021 18:14:32 +0000 (4 14:14 -0400)]
sfx2: introduce SfxBindings::QuerySlotId

In order to invoke QueryState with the slot id,
which it is easier to invoke UNO command states in unit test.

Change-Id: I36d72a4381ff8386b1f1af33284ce674cf26acd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123063
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: sc: handle all local mouse tracking for Calc
Henry Castro [Thu, 24 Jun 2021 11:48:19 +0000 (24 07:48 -0400)]
lok: sc: handle all local mouse tracking for Calc

Change-Id: I11f3477c0f966d403e076fc73b7e5507ad6597f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118877
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agoFix build in BeginDrag
Szymon Kłos [Wed, 6 Oct 2021 16:22:11 +0000 (6 18:22 +0200)]
Fix build in BeginDrag

Change-Id: I47b77fa87649cde9fa57e80da97642fb1647004f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123208
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agoFix build error in ImplLOKHandleMouseEvent
Szymon Kłos [Wed, 6 Oct 2021 16:21:59 +0000 (6 18:21 +0200)]
Fix build error in ImplLOKHandleMouseEvent

Change-Id: I15ec283593c7e5ab05ac5423eed4e4d08f576800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123207
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: sc: apply local mouse tracking only for Calc
Henry Castro [Thu, 24 Jun 2021 11:41:14 +0000 (24 07:41 -0400)]
lok: sc: apply local mouse tracking only for Calc

Change-Id: I6c3d4c3c59652f20596e32d3f31c5357b7ed61eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118873
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: fix sending mouse pointer
Henry Castro [Wed, 30 Jun 2021 00:15:36 +0000 (29 20:15 -0400)]
lok: fix sending mouse pointer

The ScGridWindow is a document window, but the Parent
is not the notifier, fix it to send mouse pointer when
action is drag & drop.

Change-Id: I5071dce2566331ce0268a96e023ffd61a1f09e56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118870
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: sc: introduce LocalStartDrag method
Henry Castro [Wed, 30 Jun 2021 22:45:38 +0000 (30 18:45 -0400)]
lok: sc: introduce LocalStartDrag method

Update the mouse mode to start drag,
otherwise it will conflict with normal cell selection.

Change-Id: I6d4939b704114e7de1c9c051459fd02100a7536c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118874
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
9 months agolok: add drag & drop functionality
Henry Castro [Tue, 6 Jul 2021 14:12:41 +0000 (6 10:12 -0400)]
lok: add drag & drop functionality

In the desktop case, the drag over and drag drop events are
handled external like GTK framework. In tiled rendering case,
we do not have it, so handle the drag and drop events in the
cloned ImplLOKHandleMouseEvent function.

Change-Id: Ib41232b3b9d5d6d859b2c965311b87af5d193ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118869
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>