LibreOffice.git
5 months agoBump version to 21.06.15.1co-21.06.15-1
Andras Timar [Thu, 3 Feb 2022 20:38:31 +0000 (3 21:38 +0100)]
Bump version to 21.06.15.1

Change-Id: I96d3d1ada903b22b4334536970b30acc540b08ef

5 months agoRevert "[cp] create debuginfo packages in one round"
Andras Timar [Thu, 3 Feb 2022 20:36:42 +0000 (3 21:36 +0100)]
Revert "[cp] create debuginfo packages in one round"

This reverts commit 9bf6834fa685b7b33883dfbf93d3e68ed74f1c96.
I do not understand why the debuginfo packages were not generated on
build host, while there was not problem on my local PC. Reverting now
just for this Collabora Office 21.06.15 release.

5 months agoHack to fix size of conditional icon sizes in desktop Calc
Andras Timar [Thu, 3 Feb 2022 20:34:30 +0000 (3 21:34 +0100)]
Hack to fix size of conditional icon sizes in desktop Calc

Change-Id: I78f7fba71f07ab7a255de14686f5fb09351aef19

5 months agooptimize Bitmap::Mirror()
Luboš Luňák [Fri, 19 Feb 2021 12:21:52 +0000 (19 13:21 +0100)]
optimize Bitmap::Mirror()

For the usual bitmap pixel formats it's much faster to just move
around pixel data rather than call the pixel-set/get functions.

Change-Id: Ie99b3ea1431d965b110ec08d269e163d9f108cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111213
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129411
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
5 months agolok: add 'dropdown' dialog type
Henry Castro [Fri, 24 Dec 2021 19:25:30 +0000 (24 15:25 -0400)]
lok: add 'dropdown' dialog type

The position of the dropdwon is absolute to screen so
add this type so we can transform correct position on the client side.

Change-Id: I9e2faeb532e313a1a4043d4044f71ada2e7225a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127439
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129461
Reviewed-by: Henry Castro <hcastro@collabora.com>
5 months agoAdded master slide handling in getPart* functions of SdXImpressDocument
Pranam Lashkari [Thu, 3 Feb 2022 18:02:40 +0000 (3 23:32 +0530)]
Added master slide handling in getPart* functions of SdXImpressDocument

There was no option to get the master slide info from SdXImpressDocument

Change-Id: Ic42a4c541c406a50ec26ec2113174ab25675a074
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129423
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
5 months agoRevert "vcl: move Alpha through BitmapColor for various 32bit formats."
Luboš Luňák [Thu, 3 Feb 2022 11:27:46 +0000 (3 12:27 +0100)]
Revert "vcl: move Alpha through BitmapColor for various 32bit formats."

This reverts commit 7c06f84cdb2267068fba7c7e193f882cbe0b096f.

Reason for revert: Breaks color picker icons (T33230).

Change-Id: I3a1b2ee5a5b1d482c5246b339cd8a9cc3ce11fe3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129343
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
5 months agolok: render image preview with lower resolution
Szymon Kłos [Mon, 31 Jan 2022 16:15:21 +0000 (31 17:15 +0100)]
lok: render image preview with lower resolution

renderShapeSelection callback is used to render
image previews which are later used during
eg. rotation.

Do not render preview with original size which
slows down app a lot. Use 1280x720 max.

Change-Id: Ia8365a67d87cea869ef74cb70ce4830439a523b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129376
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
5 months agoUse unique id for FN_UNO_TRANSFORMED_GRAPHIC
Szymon Kłos [Mon, 31 Jan 2022 13:25:43 +0000 (31 14:25 +0100)]
Use unique id for FN_UNO_TRANSFORMED_GRAPHIC

Change-Id: I1425fbbe843534adba8b87f9c7b23461cc6049c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129375
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
5 months agospeed up bitmap rotation
Noel Grandin [Wed, 2 Feb 2022 08:47:22 +0000 (2 10:47 +0200)]
speed up bitmap rotation

(*) use more cache-dense temporary arrays
(*) use float instead of double - I cannot see a difference in results
(*) tools::Long->sal_Int32, we don't need more than 32-bits for x/y
    coordinates

Change-Id: I81a1da573735f183a7d2a117f6170cf373433e4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129324
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 8165c629be4e70ea188f3ccf2b8e913feec75da1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129335
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
5 months agodisable ScPosWnd completely in LOK mode
Luboš Luňák [Tue, 7 Dec 2021 13:42:47 +0000 (7 14:42 +0100)]
disable ScPosWnd completely in LOK mode

366e328dc7f36061971c549c2d33d365026b65ca already mostly disabled it,
but the instance was still created, and it sets up listening that
results in ScPosWnd::FillRangeNames() getting called on every
SfxLokHelper::setView(), which forms the major cost of the view
switching.

Change-Id: Ic16da4bdfb678d53a79da57e9bbdcb7fc59c576d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126444
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
5 months agoBump version to 21.06.14.1co-21.06.14-1
Andras Timar [Wed, 2 Feb 2022 08:17:49 +0000 (2 09:17 +0100)]
Bump version to 21.06.14.1

Change-Id: Icb76f2cff1e2b8e6b7cf44ff16191622fd93cc51

5 months agofix std::min() used instead of std::max()
Luboš Luňák [Tue, 1 Feb 2022 10:19:11 +0000 (1 11:19 +0100)]
fix std::min() used instead of std::max()

In 534fc16a9f8cd01bb88485e2cf6b9cd33aed3745 I got this backwards,
if the value is not supposed to be 0, then it should be at least
the small value, not at most.

Change-Id: Ic55d2b2402985d26e77be0d1605b9ba5985b5ac7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129299
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Aron Budea <aron.budea@collabora.com>
5 months agoupgrade to expat 2.4.4
Caolán McNamara [Sun, 30 Jan 2022 19:28:23 +0000 (30 19:28 +0000)]
upgrade to expat 2.4.4

Change-Id: Ie141268793dc4332d8c253bec4e986894682c7a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129179
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
5 months agovba: fix registering shortcuts keys defined by the vba macros
Tomaž Vajngerl [Mon, 31 Jan 2022 06:35:38 +0000 (31 15:35 +0900)]
vba: fix registering shortcuts keys defined by the vba macros

On issue with registering was that the registering happened when
the macro source was in the process to be read into the library,
which is just a bit too early, because the macro wasn't found and
not registered.
Another issue was with searching for the macro method (hasMacro),
which doesn't search the same when the module name is known and
when it isn't. This was changed so we just iterate through the
modules and call the same "FindMethod" method without any extra
restrictions.

Change-Id: I2f4f2f6d8186b289867456ebdccad27ce8eee231
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129197
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
5 months agodesktop lok, export options: allow passing through a JSON string as-is
Miklos Vajna [Wed, 26 Jan 2022 07:38:59 +0000 (26 08:38 +0100)]
desktop lok, export options: allow passing through a JSON string as-is

setFormatSpecificFilterData() sets useful defaults, but the PDF export
code has the (sane) behavior of preferring FilterData over
FilterOptions, so in case we explicitly got a JSON string in
FilterOptions to in fact set FilterData, then leave FilterData empty.

(cherry picked from commit d0451dcf96508bf4d75c8147168f974ad3ebf03f)

Change-Id: I20e8094bf431782fe0f5d68e3ec630e1274e30c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129226
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
5 months agoPDF export: allow setting filter data keys from the cmdline
Miklos Vajna [Mon, 24 Jan 2022 07:28:21 +0000 (24 08:28 +0100)]
PDF export: allow setting filter data keys from the cmdline

Follow-up improvement to commit 3eb9eb9906c9 (lok: add pdf version
option for export, 2021-11-15), possibilities are endless.

For example, to skip the first page of a Draw document:

soffice --convert-to 'pdf:draw_pdf_Export:{"PageRange":{"type":"string","value":"2-"}}' test.odg

Add watermark:

soffice --convert-to 'pdf:draw_pdf_Export:{"TiledWatermark":{"type":"string","value":"draft"}}' test.odg

Encrypt:

soffice --convert-to 'pdf:draw_pdf_Export:{"EncryptFile":{"type":"boolean","value":"true"},"DocumentOpenPassword":{"type":"string","value":"secret"}}' test.odg

Version 1.5 (instead of the default 1.6):

soffice --convert-to 'pdf:draw_pdf_Export:{"SelectPdfVersion":{"type":"long","value":"15"}}' test.odg

The cost of the verbose syntax is probably smaller than the benefit of
having this 1:1 mapping from string to PropertyValues.

(cherry picked from commit 0c3b8792b712e939d2ad524d554f96616b4844be)

Change-Id: I2093a3a787a9578dd02a154593b7a020f4a0ba31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129225
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
5 months agocomphelper: move JsonToPropertyValues() from desktop/
Miklos Vajna [Thu, 20 Jan 2022 20:02:35 +0000 (20 21:02 +0100)]
comphelper: move JsonToPropertyValues() from desktop/

Because filter/ code will need this in a bit, and that can't depend on
desktop/.

(cherry picked from commit 4871cae48c1c9f522a0c0cc85a852b0568ca31e6)

Conflicts:
desktop/source/lib/init.cxx

Change-Id: I07f0f8ef30942a2d11388c6721c7f277e117bfba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129224
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
5 months agofix the orientation combobox in the print dialog
Luboš Luňák [Mon, 31 Jan 2022 19:27:54 +0000 (31 20:27 +0100)]
fix the orientation combobox in the print dialog

Changing the orientation value to anything else than 'Automatic'
didn't do anything by default. This was because by default
neither isPaperSizeFromUser() nor getPapersizeFromSetup()
were set, so PrintDialog::setPaperOrientation() did nothing.
It looks to me like 8cbdc6a068ad88fc43a98bd0f88 that introduced it
was rather broken (not just this bug, but also e.g. the ugly
modifying of the paper sizes by non-const reference from a const
function). In fact this whole stuff still looks broken to me, why
does it change paper size instead of just setting the orientation?
It seems like the orientation gets reset, or maybe the setting
was just a band-aid. I don't know how to fix that all though.

Change-Id: If5fdf4c47e06f2b0797d27126d21b3451b8334cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129241
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
5 months agotdf#129638 print preview: use new paper size after switching page
Justin Luth [Tue, 23 Nov 2021 07:18:20 +0000 (23 09:18 +0200)]
tdf#129638 print preview: use new paper size after switching page

This is a partial revert of LO 6.3
commit 2c23a96f7b6888c0e05fdc2aba57f03cd797b647.

Change-Id: I17525d06d96779671caaa84e1e48629289453ad2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125685
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129240
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
5 months ago[cp] create debuginfo packages in one round
Andras Timar [Sat, 29 Jan 2022 16:42:00 +0000 (29 17:42 +0100)]
[cp] create debuginfo packages in one round

Change-Id: I644af21de7d184daa902f1ef47c813647baa2799

5 months agoDOCX import: handle a subset of <w:ptab w:alignment="left">
Miklos Vajna [Fri, 28 Jan 2022 12:38:20 +0000 (28 13:38 +0100)]
DOCX import: handle a subset of <w:ptab w:alignment="left">

The case when we can map it to a line break. This way the page number is
visually inside the rectangle shape that is behind the field.

The test intentionally uses \n as-is for line-break, because
SwASCWriter::WriteStream() uses \n in the LINEEND_LF case even on
Windows (and not SAL_NEWLINE_STRING), while SAL_NEWLINE_STRING is used
for paragraph-break.

(cherry picked from commit 8bac48991857d222f0e8f0c07b8c4e06649e1632)

Conflicts:
writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx

Change-Id: Ic85e57b2391bfac73507727b17240f4d85fc2698
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129205
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
5 months agosupport for the WebP image format (tdf#114532)
Luboš Luňák [Thu, 13 Jan 2022 14:59:49 +0000 (13 15:59 +0100)]
support for the WebP image format (tdf#114532)

This commit implements a WebP reader and writer for both lossless
and lossy WebP, export dialog options for selecting lossless/lossy
and quality for lossy, and various internal support for the format.

Since writing WebP to e.g. ODT documents would make those images
unreadable by previous versions with no WebP support, support
for that is explicitly disabled in GraphicFilter, to be enabled
somewhen later.

Change-Id: I9b10f6da6faa78a0bb74415a92e9f163c14685f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128978
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
5 months agovba: add tests for scrolling, range selecting, print area
Tomaž Vajngerl [Wed, 26 Jan 2022 07:54:12 +0000 (26 16:54 +0900)]
vba: add tests for scrolling, range selecting, print area

This adds various tests involving scrolling to a particular cell
in the document, selecting whole ranges or ranges o filled cells
and setting the print area.

VBA functions:
ActiveWindow.ScrollColumn
ActiveWindow.ScrollRow
Selection
Selection.End(xlToRight)
ActiveSheet.PageSetup.PrintArea

Change-Id: Iacde9c513b41571e98234c12cc3b42a16de4b833
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129014
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 9a46a203515779ae40b7cfac36dbc22990e23290)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129020
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
5 months agovba: add support for Application.WindowState + test
Tomaž Vajngerl [Wed, 26 Jan 2022 07:50:41 +0000 (26 16:50 +0900)]
vba: add support for Application.WindowState + test

This just delegates the get/set calls to ActiveWindow.WindowState
which is already supported, but calling it directly on Application
is also possible.

Change-Id: Ibf6f55581a5c66a47ec4dd21cc8d0fe3558330ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129013
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 93806a2831c93154981e3a6ef933270d0d5a6021)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129019
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
5 months agovba: test for selcting and hiding columns from a VBA Macro
Tomaž Vajngerl [Tue, 25 Jan 2022 07:14:32 +0000 (25 16:14 +0900)]
vba: test for selcting and hiding columns from a VBA Macro

Change-Id: Ib954a98e3cf91253c416f358a114bf6b6eb549b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129012
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit cfa4867b0b66b0d4fb3aee52ca40d380e50de9ef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129018
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
5 months agotdf#118246 add support for Application.GetOpenFilename func.
Tomaž Vajngerl [Thu, 20 Jan 2022 12:13:26 +0000 (20 21:13 +0900)]
tdf#118246 add support for Application.GetOpenFilename func.

Opens the file dialog and returns the selected filename.

Change-Id: I4eccd34a7fbb892c0950b2f7c34977cf2aad6f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128721
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 571438a34ad9aba0d496a89e8345851331740fbd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129017
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
5 months agosc: fix VBA Copy-Paste using same and separate document
Tomaž Vajngerl [Tue, 18 Jan 2022 06:34:49 +0000 (18 15:34 +0900)]
sc: fix VBA Copy-Paste using same and separate document

This fixes 2 issues with VBA copy-paste:
- VBA command Range(..).Copy issue where the range wasn't selected
when copying and the copied cells were from the previous selection.
The Copy command now does the same selection as the Cut command.

- VBA PasteSpecial issue where the wrong view was used to get the
clip document.

- VBA Workbooks.Add issue where the new workbook wasn't activated
after it was created, which causes an issue when running tests, but
not when running in LO application. The Add command does now the same
as the Workbooks.Open command.

All the issues are supported by new test cases.

Change-Id: I36ec45c01f18f7f76e4f95a25a28402a6ee0e2e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128720
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 0c6ee963e1f089cb73e0c68a28af29d0f8d9e0df)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128950
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
5 months agoupgrade expat to 2.4.3 + CVE-2022-23852 and CVE-2022-23990
Caolán McNamara [Fri, 28 Jan 2022 19:40:40 +0000 (28 19:40 +0000)]
upgrade expat to 2.4.3 + CVE-2022-23852 and CVE-2022-23990

wget https://github.com/libexpat/libexpat/pull/550.patch -O CVE-2022-23852.patch
wget https://github.com/libexpat/libexpat/pull/551.patch -O CVE-2022-23990.patch

Change-Id: I1f2694abd9f577e0b4fedbf27118b52be8a1a688

5 months agofix loading file with very large number of styles
Noel Grandin [Fri, 28 Jan 2022 14:32:35 +0000 (28 16:32 +0200)]
fix loading file with very large number of styles

where nCurrentPosition was wrapping around

Change-Id: I839215f3138d58884f03509b6341147ef28edb4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129108
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 7f3682ecb8a40fe85b6525be9e73d49d76bb308b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129074
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
5 months agotdf#119952 DOCX import: fix negative page margins
Attila Szűcs [Fri, 25 Jun 2021 08:37:47 +0000 (25 10:37 +0200)]
tdf#119952 DOCX import: fix negative page margins

DOCX body text can overlap with header/footer, if top/bottom
page margin is negative. To support this, convert header/footer
text content to textbox anchored to header/footer, if needed.

Note: possible improvements:

1) Skip this hack, if the header is small enough to not overlap with
the body, calculate only the height of the header at the import time.

2) This hack does not fix the case when the top of the header
is under the top of the body. (A problem in DOC import, too.)
This could be achieved by repositioning the dummy header to the top,
and lower the textbox by the same amount. (This would still not
resolve the extreme situation, when the body start from 0 mm
(in LibreOffice, header must be at least 1 mm).

3) Import of VertOrientation::BOTTOM property seems to be bad,
or at least the footer loses this property after a DOCX round-trip,
resulting bad footer position.

4) after a round-trip, the 1 mm height of the dummy header
increases to 1 line height. Also the "Autofit height" and
"Use dynamic spacing" settings are changed, likely related
to their missing DOCX export.

Co-authored-by: Tibor Nagy (NISZ)
(cherry picked from commit d656191ec308d4280b93c7169372e543a255d108)

Change-Id: I8319c93c6c5a980878ee9956c8ab2953da60409e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129102
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
5 months agotdf#95806 tdf#125877 tdf#141172 DOCX: fix tables in footnotes
László Németh [Fri, 26 Mar 2021 15:28:03 +0000 (26 16:28 +0100)]
tdf#95806 tdf#125877 tdf#141172 DOCX: fix tables in footnotes

and endnotes by converting them to floating tables during the
import, and removing floating at the DOCX export.

Writer core doesn't support non-floating tables in footnotes
and endnotes officially, (flowfrm:cxx: "Tables in footnotes
are not truly supported"), so their DOCX import resulted
serious problems:

– missing table paint (tdf#95806);

– table loss during saving to ODT (tdf#125877);

– table loss during copying them or their footnotes and
  endnotes in the document (this resulted the regression
  of the optimized footnote and endnote import: tdf#141172);

– table loss during changing the order of the chapters in
  the Navigator.

(cherry picked from commit e11c51eefe8c3210cef2b5850f401ba67a401d01)

Conflicts:
sw/qa/extras/odfexport/odfexport.cxx
writerfilter/source/dmapper/PropertyMap.cxx

Change-Id: Ife8af41936ae3ab003a3a9ad33b98c1d813e9c82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129101
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
5 months agovcl: move Alpha through BitmapColor for various 32bit formats.
Michael Meeks [Wed, 19 Jan 2022 11:37:17 +0000 (19 11:37 +0000)]
vcl: move Alpha through BitmapColor for various 32bit formats.

Change-Id: I891d263a3e7fff728a9118ac436164d4544c65ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128607
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
5 months agomake sure to not divide by zero when computing miter limit
Luboš Luňák [Wed, 26 Jan 2022 19:07:48 +0000 (26 20:07 +0100)]
make sure to not divide by zero when computing miter limit

The minimal angle is valid only if the line join style is miter,
and e.g. FileDefinitionWidgetDraw can call these with round join
style and 0 angle, which would divide by 0. So either clamp
the value or compute it only when needed.

Change-Id: I2a2c71481490c03ec6d01b8e33cab991400adb35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129010
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
5 months agoDOCX import: fix <wp:anchor layoutInCell="1"> with <wp:wrapNone>
Miklos Vajna [Mon, 24 Jan 2022 11:53:25 +0000 (24 12:53 +0100)]
DOCX import: fix <wp:anchor layoutInCell="1"> with <wp:wrapNone>

If wrap is set to none ("in front of text"), then <wp:positionH
relativeFrom="column"> ignores layoutInCell="1" in Word. But in case
relativeFrom is something else (e.g. page) or wrap is not none, then the
old behavior is OK.

Adjust our import so that Writer's layout also allows this shape to
leave the cell.

(cherry picked from commit e993638d5ecd33783f2eebdccfa87a81e5a8a2c5)

Conflicts:
writerfilter/source/dmapper/GraphicImport.cxx

Change-Id: I6ca7511d46d7a70df11a65dc67c182f4fff4ae69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128972
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
5 months agodo not require that an image type has a 3-character extension
Luboš Luňák [Thu, 13 Jan 2022 14:52:38 +0000 (13 15:52 +0100)]
do not require that an image type has a 3-character extension

WebP does not (AFAIK) have any other extension other than .webp,
so do require that. It's probably some old idea from the times
when files were expected to have 3-character extensions.

Change-Id: I64db137e1f5345f12d27ad85d83b715f6e10167d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128977
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
5 months agolok: fix regression "WeldEditView::DoPaint" for dialog tunneling
Henry Castro [Wed, 19 Jan 2022 16:00:21 +0000 (19 12:00 -0400)]
lok: fix regression "WeldEditView::DoPaint" for dialog tunneling

Change-Id: I1cb345b3911d03dc90acef2a17705d654a06deb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128622
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
5 months agotdf#143591 DOCX import: handle anchored objects as at-char
Miklos Vajna [Mon, 20 Sep 2021 17:56:37 +0000 (20 19:56 +0200)]
tdf#143591 DOCX import: handle anchored objects as at-char

This partially reverts cc8f8ae55f681755f5da3bf64e4c30bb713f0383 (DOCX
drawingML shape import: wp:anchor's behindDoc attribute, 2013-11-19), it
seems to be more important to be consistent with the DOC import than
with the VML import which is no longer used for DOCX shapes crated with
Word >= 2010.

Change-Id: I631da010bce1b4d3c392645e0ae3797a03665a42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122367
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128927
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
5 months agoTake layoutInCell into consideration when placing graphic in table
Tor Lillqvist [Mon, 24 Jan 2022 14:48:04 +0000 (24 16:48 +0200)]
Take layoutInCell into consideration when placing graphic in table

Set our IsFollowingTextFlow property accordingly.

Thanks to Miklos for doing most of the work.

Change-Id: I67d214d6ed41c19dcb2f3ad2db9be94ca77c5842
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128880
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128912
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
5 months agosvgexport: fix: attribute id redefined
Rash419 [Mon, 24 Jan 2022 10:26:15 +0000 (24 15:56 +0530)]
svgexport: fix: attribute id redefined

If there is a id for empty paragraph exist we need to create a empty
text paragraph to accomodate the id if we don't do that then we
get multiple id attribute on same element for example:
<tspan id="id14" id="id15" id="id17" class="TextParagraph">

Change-Id: I41c21dc94deef93e423aaff2248f6931fa6ca8de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128856
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
5 months agoFix MSVC warning C4309: 'initializing': truncation of constant value
Tor Lillqvist [Mon, 24 Jan 2022 17:41:39 +0000 (24 19:41 +0200)]
Fix MSVC warning C4309: 'initializing': truncation of constant value

Change-Id: I71e47fa48fd4aea334a95dab8e2321c889b28a89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128881
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
5 months agoFix autoconf>=2.70 gcc-wrapper breakage
Thorsten Behrens [Tue, 28 Dec 2021 16:22:29 +0000 (28 17:22 +0100)]
Fix autoconf>=2.70 gcc-wrapper breakage

Re-generated configure file gets confused & claims not finding C89-
compatible compiler for gcc-wrapper-building libassuan with msvc
underneath.

Work-around the problem by telling toolchain right off that this
_is_ a std c compliant compiler.

Change-Id: I4fa23673b790bc70a9294951df545c27f5236f81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127641
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128876
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
5 months agoDOCX import: floating table with negative top margin has to be a fly frame
Miklos Vajna [Fri, 21 Jan 2022 09:06:02 +0000 (21 10:06 +0100)]
DOCX import: floating table with negative top margin has to be a fly frame

The bugdoc has a large header, then part of the table goes into the
whitespace of the header by specifying a negative vertical position.

Keep this as a floating table as normal tables can't have negative top
margins.

(cherry picked from commit 3eb6d764b3023500f2299d36bf1860bc8e67db9f)

Conflicts:
writerfilter/source/dmapper/PropertyMap.cxx

Change-Id: I95299051f004976778765965971428d9764bef08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128858
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
5 months agolok: use focused tab page help
Szymon Kłos [Mon, 24 Jan 2022 13:16:31 +0000 (24 14:16 +0100)]
lok: use focused tab page help

When we open dialog with tab pages, help should open
website for corresponding tab.

Use focused window - but not global which can be modified
by other view in lok case.

followup for:
commit 70f2fc7a10f41204e353bd3487377983a1018b53
lok: don't use focus window to request help

Change-Id: Ib7544a91696ce2f2c8ab01e62a47d279d2c5c655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128863
Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
5 months agoRTL: lok: render correctly interim windows
Szymon Kłos [Mon, 17 Jan 2022 12:11:19 +0000 (17 13:11 +0100)]
RTL: lok: render correctly interim windows

Change-Id: Iec23fba24464c6d29ecb63d3d2018ded8d9937f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128500
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
5 months agotdf#146728 lok: IME: preset formatting in the new paragraph
Szymon Kłos [Fri, 17 Dec 2021 12:19:28 +0000 (17 13:19 +0100)]
tdf#146728 lok: IME: preset formatting in the new paragraph

When we wrote something using Heading or Title style and
then moved to the next paragraph by pressing enter
we should get "Text Body" style in the new line.

Do not copy style. Use NOHINTEXPAND when inserting initially
so we can use EMPTYEXPAND later - at the end of composing -
and use correct styling.

followup for:
lok: IME: directly copy formatting for inserted text
d8dbd123bfa7f39489ceb15ac83142635531fd43

https://cgit.freedesktop.org/libreoffice/core/commit/?id=d8dbd123bfa7f39489ceb15ac83142635531fd43

Change-Id: I55b764068337e125eea3fba641edb6486b2ac9d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127875
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
5 months ago[cp] set w1T.xzdio rpm compression in bin/pack-debug, too
Andras Timar [Sun, 23 Jan 2022 11:17:50 +0000 (23 12:17 +0100)]
[cp] set w1T.xzdio rpm compression in bin/pack-debug, too

Change-Id: I6d808c9ba9b5353dd74e41fced2f134f1ad70501

5 months agochange rpm compression algorithm to multi threaded xz
Andras Timar [Sat, 22 Jan 2022 21:00:56 +0000 (22 22:00 +0100)]
change rpm compression algorithm to multi threaded xz

Our baseline is CentOS 7, it's safe to switch to xz that is supported there.
Here is my measurement on rpm package build time and package size on a
48 core machine, however 48 cores were never used (8-10 max). Compared to
reference w9.gzdio which was used before the patch.

Compression   Build     Package
method        time %    size %
w9.gzdio      100%      100%
w7T.xzdio      69%       66%
w6T.xzdio      62%       67%
w5T.xzdio      55%       67%
w4T.xzdio      41%       70%
w3T.xzdio      31%       73%
w2T.xzdio      26%       75%
w1T.xzdio      24%       77%

Conclusion: we'd like to optimize rather for the build time, therefore
w1T.xzdio was picked. The package size was still smaller than the reference
size, and the build time was 4x faster (in this measurement 18m16 -> 4m26).
That makes a difference.

Change-Id: Iabb532628d38a2d5091fa41fd08bfee69007d0ca

5 months agosc: ubsan - initialize D&D pointers properly.
Michael Meeks [Thu, 20 Jan 2022 15:02:11 +0000 (20 15:02 +0000)]
sc: ubsan - initialize D&D pointers properly.

Change-Id: I95c6a9b55ed25cc6d51f9f4544cb9fc016bbec64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128687
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
5 months agolok: avoid reundant progress bar messages.
Michael Meeks [Thu, 20 Jan 2022 15:03:00 +0000 (20 15:03 +0000)]
lok: avoid reundant progress bar messages.

Change-Id: I9e04f428dbfafd98d1b08a549bb2758b9cc60eff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128688
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
5 months ago[cp] use pigz (parallellized compression) instead of gzip, if we can
Andras Timar [Sat, 22 Jan 2022 19:35:00 +0000 (22 20:35 +0100)]
[cp] use pigz (parallellized compression) instead of gzip, if we can

Change-Id: I3f97702a6febd3ac0cbbd16a0932d74ea6659bf3

5 months agoMake installer compression tool configurable
Thorsten Behrens [Sat, 15 Jan 2022 15:24:33 +0000 (15 16:24 +0100)]
Make installer compression tool configurable

So we can use pigz or other parallelizable tools if available. Shaves
off noticeable build time when packaging install sets.

- figure out if pigz is available (fallback to gzip otherwise)
- pass compression tool down into make_installer
- and handle as one of many global options there

Change-Id: Ia9d1ea27a9f990874238b6f0be3e1fd30a662ec6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128469
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
5 months agoUpdate git submodules
Andras Timar [Fri, 21 Jan 2022 12:02:36 +0000 (21 13:02 +0100)]
Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to 546deb42a615099a3a46532bd611b6819db6985c
  - Update Arabic translations (from libreoffice-7-3-0)

    Change-Id: Iad1856ff1458b34ab694b1cd9fa4c707dfeac06b

5 months agotdf#146690: pptx export: fix endParaRPr size value for empty paragraphs
Sarper Akdemir [Mon, 10 Jan 2022 23:06:52 +0000 (11 02:06 +0300)]
tdf#146690: pptx export: fix endParaRPr size value for empty paragraphs

Fixes paragraphs made from a single new line, not getting the
correct sz(text size) value in EndParagraphRunProperties on pptx
export

Change-Id: I31ebb5735ad392e081aa2f43b0b60a845e4de9c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128280
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
5 months agoUpdate git submodules
Andras Timar [Thu, 20 Jan 2022 15:44:19 +0000 (20 16:44 +0100)]
Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to 7444b582e9db67868909675606439a1a53da9750
  - Updated Arabic translation

    Change-Id: I1626379e214d65796a9ab36ef6003e5b53ef4b60

5 months agolok: Set pasted text rect pos to 0, 0
Mert Tumer [Wed, 19 Jan 2022 11:23:52 +0000 (19 14:23 +0300)]
lok: Set pasted text rect pos to 0, 0

Rect size change according to the length of the text
however, this can make the text inserted in the negative coordinates
and half of it becomes invisible.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
5 months agosw: fix unexpected paragraph border inside table cells
Miklos Vajna [Tue, 18 Jan 2022 16:04:14 +0000 (18 17:04 +0100)]
sw: fix unexpected paragraph border inside table cells

The bug document has a table cell, which contains a paragraph with
borders. Its left/right/bottom borders are rendered in Writer, but not
in Word.

The reason for the left/right border is that it's outside the
paragraph's frame area, which is not rendered in Word. Fix this by
clipping the rendered borders so they don't go outside the paragraph's
frame area. (Normally the frame area is the larger rectangle, and then
margins may cause a smaller "print area", but in this case we have a
negative right margin, so clipping the print area to fit into the frame
area actually does something.)

This is quite similar to what commit
1e21902106cbe57658bed03ed24d4d0863685cfd (tdf#117884: intersect border
with paint area of upper frame., 2018-05-26) did for table borders.

The bottom border is a different problem: the cell has a fixed height
and enough content so the paragraph is cut off vertically. This means
that technically the bottom border would be inside the frame area, but
Word cuts it off, because they apply clipping on the not-yet-cut-off
rectangle. Fix this by dropping the bottom margin when the frame is cut
off.

(cherry picked from commit 4a7281fa206c0a82cfc2ba23f25c31ae775d8777)

Conflicts:
sw/qa/core/layout/layout.cxx
sw/source/core/layout/paintfrm.cxx

Change-Id: I7f65b68997330b247db65839db8a484e74f78c64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128611
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
5 months agolok: avoid duplicate notification of tab-stop and ruler changes.
Michael Meeks [Fri, 14 Jan 2022 21:17:14 +0000 (14 21:17 +0000)]
lok: avoid duplicate notification of tab-stop and ruler changes.

We get far too many of these, one per key-stroke sometimes.

Change-Id: Ifecffe0a82c6eef6809e3a49883bb3f17cb4d170
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128571
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
6 months agoFix typo in SAL_WARN() call
Tor Lillqvist [Wed, 19 Jan 2022 09:12:27 +0000 (19 11:12 +0200)]
Fix typo in SAL_WARN() call

Change-Id: Idce259d582101901f6a9abf553c58039d05c694f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128593
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
6 months agoAdd sanity check to avoid crash in the Collabora Online server
Tor Lillqvist [Tue, 18 Jan 2022 13:33:04 +0000 (18 15:33 +0200)]
Add sanity check to avoid crash in the Collabora Online server

Make sure some coordinates don't become huge negative numbers. This
doesn't fix the unknown root cause of course.

Change-Id: I28e343271b3f80ac203b52db1be58d2add89eecd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128558
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
6 months agoset active element to -1 when no selection for fontnamebox
Mert Tumer [Tue, 18 Jan 2022 09:57:16 +0000 (18 12:57 +0300)]
set active element to -1 when no selection for fontnamebox

FontNameBox sets the currentVal to emptystring when there's
a mixed font-name selection on the text but does not update
the active_element which is incorrect whereas other comboboxes such
as FontSize does it correctly.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Iff86bba64c2ab564ff5c5fa979eb846af9651a11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128551
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
6 months agoSVG export: fix missing custom bullets
Miklos Vajna [Mon, 17 Jan 2022 10:47:14 +0000 (17 11:47 +0100)]
SVG export: fix missing custom bullets

It seems this was broken since b76628acb1ae4fc06f8c1b70ec2e0cf39356deef
(text export support for bullets and hyperlinks, 2012-08-11), the
problem is that SVGFilter::implEmbedBulletGlyphs() has a fixed list of
characters that are typically used as bullets, but e.g. "-" is missing
from that list.

Fix this by improving SVGTextWriter::implWriteBulletChars() to continue
working from those shared glyph paths when the glyph is in the fixed
list, but otherwise call GetTextOutline() to look up the path for the
custom bullet.

(cherry picked from commit bbc4360b5beb012adf1e2652328d3e18d66224aa)

Change-Id: I3de8fab8dc6c78e273629d13566d1f9f289eb752
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128501
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
6 months agosvx-lok: incomplete invalidation when resizing/deleting...cp-21.06.13-1
Dennis Francis [Mon, 17 Jan 2022 06:06:24 +0000 (17 11:36 +0530)]
svx-lok: incomplete invalidation when resizing/deleting...

shapes in writer. The problematic commit is

5e37acbaaa0b0891829907331ecacd2d3b67526d
lokCalcRTL: shapes: do not send negative(X) invalidations

The above change forced the lok mode to use the second branch hence avoid the
view-transformation based invalidation. This patch restores the old
branching condition, but do the negation of invalidation rectangle in
case of lok-calc-rtl mode(IsNegativeX).

Change-Id: I679473f0610d2edabeb6071edbb32a63a436d053
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128491
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
6 months agoUpdate git submodules
Andras Timar [Mon, 17 Jan 2022 13:22:04 +0000 (17 14:22 +0100)]
Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to fde42484b7a512b3ea5b8c3bde79a5aa6e4cb5f0
  - Updated Arabic translation

    Change-Id: I3f130007d2183575bc7c99ee7499dcbb761c8e53

6 months agoRTL: lok: draw mirrored native widgets from file definition
Szymon Kłos [Fri, 14 Jan 2022 10:59:43 +0000 (14 11:59 +0100)]
RTL: lok: draw mirrored native widgets from file definition

Change-Id: I66318e4cb605a1882f557e53c03185cc767683b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128394
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
6 months agoRTL: lok: mirror cursor position when needed
Szymon Kłos [Thu, 13 Jan 2022 18:58:34 +0000 (13 19:58 +0100)]
RTL: lok: mirror cursor position when needed

Change-Id: I3e574e1b1d5e26528794c39cb631d8f5cf60e927
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128390
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
6 months agoRTL: lok: render tunneled dialogs mirrored
Szymon Kłos [Thu, 13 Jan 2022 10:04:36 +0000 (13 11:04 +0100)]
RTL: lok: render tunneled dialogs mirrored

Change-Id: I14d33706eddb99167cf5537f6ece379124187bf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128371
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
6 months agoRTL: lok: handle mirrored mouse coordinates
Szymon Kłos [Wed, 12 Jan 2022 16:19:41 +0000 (12 17:19 +0100)]
RTL: lok: handle mirrored mouse coordinates

Change-Id: Ib881b92f691e250f150db1d02c48dd465c622fb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128370
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
6 months agoUpdate git submodules
Andras Timar [Sun, 16 Jan 2022 20:19:36 +0000 (16 21:19 +0100)]
Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to 01fad3f3f64f74bf3ee4fb884a6a6bd4013ede74
  - fix: source/ar/sd/messages.po:4281: end-of-line within string

    Change-Id: I4a19ef59b6595ea7305b95920a9e2567465ac5ed

6 months agoBump version to 21.06.13.1
Andras Timar [Sun, 16 Jan 2022 20:06:24 +0000 (16 21:06 +0100)]
Bump version to 21.06.13.1

Change-Id: I5b98d1236285f0e2837dc442353cc413db7b9e67

6 months agoUpdate git submodules
Andras Timar [Sun, 16 Jan 2022 18:58:41 +0000 (16 19:58 +0100)]
Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to 16814729583b6d0179eca9e520ce09c24cbbaf15
  - Updated Arabic translation

    Change-Id: I7af3893248270bd9241ed34efe291e5daa9ea9c7

6 months agopreload configmgr data for COOL
Noel Grandin [Mon, 10 Jan 2022 13:27:48 +0000 (10 15:27 +0200)]
preload configmgr data for COOL

touch all the config data we need during LOK pre-init.
This means that most of the keys we need should become cached by
ConfigurationWrapper in comphelper.
Which means that the child processes we fork should be able to use the
shared pages and not allocate their own.

Change-Id: Iea8b1c4beaba67b6310b20cc161061ccf9a0db89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128247
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 8de8abc5d26bfd0b3d7006d33a2231001ed77161)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128241
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
6 months agolok: remove residue text selection when there's none in the core
Mert Tumer [Wed, 12 Jan 2022 16:02:23 +0000 (12 19:02 +0300)]
lok: remove residue text selection when there's none in the core

Residue selection can stay at the browser even after changing the cellcursor pos
make sure to clean it up if there is no selection rectangle in reality
to be synced with core.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I1b06b6ec84ae195936d12dc986ef4a19b26dbc8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128351
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
6 months agoFix ambiguous error in VS
Szymon Kłos [Thu, 13 Jan 2022 15:09:24 +0000 (13 16:09 +0100)]
Fix ambiguous error in VS

Change-Id: If18ef06f5a27a4266b21df4ba07bd5bc01255f55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128381
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
6 months agoUpdate git submodules
Andras Timar [Wed, 12 Jan 2022 16:48:04 +0000 (12 17:48 +0100)]
Update git submodules

* Update translations from branch 'distro/collabora/co-2021'
  to d76f14f896fc608ae1c1d427d9ab5ed6d77cedc8
  - Updated Arabic translation

    Change-Id: Ib92390270fa7dc07821fb4175cf7a4071560899d

6 months agoBump version to 21.06.12.1cp-21.06.12-1
Andras Timar [Tue, 11 Jan 2022 20:29:25 +0000 (11 21:29 +0100)]
Bump version to 21.06.12.1

Change-Id: I7684599864becb805c5e0f8441debd227417671c

6 months agoLOK android: Fix csv sheet name becomes temp name
Mert Tumer [Wed, 29 Dec 2021 13:34:38 +0000 (29 16:34 +0300)]
LOK android: Fix csv sheet name becomes temp name

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: If43d7a995a5e53734fc7ecdcbf9b750b4886dc45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127684
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
6 months agosc: fix cond. format icon size, when we work with pixels
Tomaž Vajngerl [Mon, 10 Jan 2022 05:43:38 +0000 (10 14:43 +0900)]
sc: fix cond. format icon size, when we work with pixels

This is the case when the device is bWorksInPixels is true, which
is the case when running LOKit.

Change-Id: If7293d95589f52d46f24bc7254f1eeb6f50729b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128199
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
6 months agosc: make icon size of cond. formatting same as font size
Tomaž Vajngerl [Sun, 9 Jan 2022 04:04:18 +0000 (9 13:04 +0900)]
sc: make icon size of cond. formatting same as font size

This makes the behavior of the Calc te same as other spreadsheet
programs, where the icon size of the conditional formatting is
the same as the font size and not the actual cell height (as it
is the behaviour now).

Change-Id: I00c96ad83458cd31f67c0b6f566e3d01dd8cd47b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128186
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
6 months agoediteng: avoid writing past the end of of pLine->GetCharPosArray()
Miklos Vajna [Mon, 10 Jan 2022 12:38:46 +0000 (10 13:38 +0100)]
editeng: avoid writing past the end of of pLine->GetCharPosArray()

Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
0x00007ffff6df4951 in ?? () from /usr/lib64/libstdc++.so.6
(gdb) bt 10
#0  0x00007ffff6df4951 in  () at /usr/lib64/libstdc++.so.6
#1  0x00007ffff6df5792 in __gnu_debug::_Error_formatter::_M_error() const () at /usr/lib64/libstdc++.so.6
#2  0x00007ffff47384bf in std::__debug::vector<int, std::allocator<int> >::operator[](unsigned long) (this=0x6b3dca0, __n=7) at /usr/include/c++/7/debug/vector:417
#3  0x00007ffff47b5440 in ImpEditEngine::ImpBreakLine(ParaPortion*, EditLine*, TextPortion const*, int, long, bool) (this=
    0x1ce0040, pParaPortion=0x206a010, pLine=0x6b3dca0, pPortion=0x6b3e480, nPortionStart=0, nRemainingWidth=5093, bCanHyphenate=false)
    at editeng/source/editeng/impedit3.cxx:2041
#4  0x00007ffff47b1fb6 in ImpEditEngine::CreateLines(int, unsigned int) (this=0x1ce0040, nPara=0, nStartPosY=0)
    at editeng/source/editeng/impedit3.cxx:1352
#5  0x00007ffff47ad0c2 in ImpEditEngine::FormatDoc() (this=0x1ce0040) at editeng/source/editeng/impedit3.cxx:387
#6  0x00007ffff47bf516 in ImpEditEngine::FormatAndLayout(EditView*, bool) (this=0x1ce0040, pCurView=0x0, bCalledFromUndo=false)
    at editeng/source/editeng/impedit3.cxx:4190
#7  0x00007ffff47be333 in ImpEditEngine::SetUpdateLayout(bool, EditView*, bool) (this=0x1ce0040, bUp=true, pCurView=0x0, bForceUpdate=false)
    at editeng/source/editeng/impedit3.cxx:3927
#8  0x00007ffff46f059e in EditEngine::SetUpdateLayout(bool, bool) (this=0x1ce2b20, bUpdate=true, bRestoring=false)
    at editeng/source/editeng/editeng.cxx:1472
#9  0x00007ffff48ce5e3 in Outliner::SetText(OutlinerParaObject const&) (this=0x1ce0cc0, rPObj=...) at editeng/source/outliner/outliner.cxx:586
(More stack frames follow...)
(gdb) frame 3
#3  0x00007ffff47b5440 in ImpEditEngine::ImpBreakLine (this=0x1ce0040, pParaPortion=0x206a010, pLine=0x6b3dca0, pPortion=0x6b3e480, nPortionStart=0, nRemainingWidth=5093,
    bCanHyphenate=false) at editeng/source/editeng/impedit3.cxx:2041
2041            pLine->GetCharPosArray()[ nPosInArray ] = rTP.GetSize().Width();
(gdb) print pLine->GetCharPosArray()
[Thread 0x7fffd2010700 (LWP 5008) exited]
$1 = std::__debug::vector of length 7, capacity 7 = {707, 1414, 2121, 2828, 3535, 4242, 4949}
(gdb) print nPosInArray
$2 = 7

Change-Id: I3a8121c0c0a3b0949e91eb53c0468f7e629b146f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128224
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
6 months agolokCalcRTL: fix chart insertion position
Dennis Francis [Mon, 10 Jan 2022 06:33:54 +0000 (10 12:03 +0530)]
lokCalcRTL: fix chart insertion position

Change-Id: I573cb19643d7a048f3313aba90fa9b5514c9cc74

6 months agolokCalcRTL: trim invalidation rect to ensure +ve X
Dennis Francis [Thu, 6 Jan 2022 09:42:16 +0000 (6 15:12 +0530)]
lokCalcRTL: trim invalidation rect to ensure +ve X

Change-Id: Ifecb52167e3cddee036e1e1e9bd5782a1138b654

6 months agolok: setClientZoom: check PPTX/Y approx equality too
Dennis Francis [Thu, 6 Jan 2022 09:22:56 +0000 (6 14:52 +0530)]
lok: setClientZoom: check PPTX/Y approx equality too

This is needed because the initial PPTX/Y on document load does not
match the implied PPTX/Y corresponding to the client requested zoomX/Y.

For instance when document is loaded by LOK client and 100% zoom is
requested, the correct PPTX/Y should be (1/15 = 0.0666667) but the
initial PPTX/Y on the ScViewData is 0.0647702

Change-Id: I996e9f003abd269df0994f3d114e42f84bb2bb20

6 months agolokCalcRTL: fix rendering of charts in edit mode
Dennis Francis [Thu, 6 Jan 2022 05:24:49 +0000 (6 10:54 +0530)]
lokCalcRTL: fix rendering of charts in edit mode

Inform Sfx2InPlaceClient and LokChartHelper when negated X coordinates
are used. Ensure that invalidation rectangles have positive coordinates
in all cases.

Change-Id: I8f5440718e288d8f0d379c8da5f49a29e51f6940

6 months agolokCalcRTL: negate mouse event X for chart and controls
Dennis Francis [Tue, 4 Jan 2022 08:50:41 +0000 (4 14:20 +0530)]
lokCalcRTL: negate mouse event X for chart and controls

Change-Id: I389047140d1a3d2c67a861a3e20f799206d937b6

6 months agolokCalcRTL: fix editing of shape text
Dennis Francis [Tue, 4 Jan 2022 07:25:45 +0000 (4 12:55 +0530)]
lokCalcRTL: fix editing of shape text

Inform editeng that negated document x coordinates are used in this case
and ensure that editeng generated invalidation rectangles always have
positive X coordinates.

Change-Id: I2e450707ce02f7bcd8e4d299f857c37ebbd5e2c6

6 months agolokCalcRTL: shapes: negate mouse-event x coordinate
Dennis Francis [Mon, 6 Dec 2021 08:25:43 +0000 (6 13:55 +0530)]
lokCalcRTL: shapes: negate mouse-event x coordinate

Change-Id: I153334940b41859e6fd9dee64217925627f0f292

6 months agolokCalcRTL: shapes: do not send negative(X) invalidations
Dennis Francis [Mon, 6 Dec 2021 08:12:27 +0000 (6 13:42 +0530)]
lokCalcRTL: shapes: do not send negative(X) invalidations

LOK client expects tile invalidations in positive document coordinates
irrespective of RTL flags.

For this introduce a flag mbNegativeX in svx class SdrMarkView to
indicate the case when all x coordinates are negated (this happens only
for the LOK + Calc + RTL mode). Use this flag to counter negate the
x coordinates before sending invalidation rectangles.

Change-Id: I35d8142718b538e55b668a8ee18f3dd1fe433951

6 months agolokCalcRTL: negate the +ve shape handle X coordinate...
Dennis Francis [Tue, 30 Nov 2021 10:36:51 +0000 (30 16:06 +0530)]
lokCalcRTL: negate the +ve shape handle X coordinate...

...from lok client as all shape X coordinates are negative in lok-RTL
mode.

Change-Id: Ic4ba064888901109c85760bb0afda609b5d5942c

6 months agolokCalcRTL: RTL negation for shape insertion
Dennis Francis [Tue, 30 Nov 2021 08:12:33 +0000 (30 13:42 +0530)]
lokCalcRTL: RTL negation for shape insertion

Change-Id: I8e3bb21fadd05a7b67acce34bfdc354fefba076b

6 months agolokCalcRTL: shape selection: negate mouse X...
Dennis Francis [Thu, 25 Nov 2021 12:08:14 +0000 (25 17:38 +0530)]
lokCalcRTL: shape selection: negate mouse X...

as in LOK RTL mode draw objects have negated document X coordinate.

Change-Id: Ie4c00fc0d1aa458a0aa6dd502be227cd6f82be3e

6 months agolokCalcRTL: ensure +ve X coords in shape handles/selections msgs
Dennis Francis [Mon, 13 Dec 2021 06:06:53 +0000 (13 11:36 +0530)]
lokCalcRTL: ensure +ve X coords in shape handles/selections msgs

LOK client expects all coordinates to be in +ve document coordinates, so
negate the negative X coordinates of LOK RTL shapes before sending the
selection/handles messages.

Change-Id: I683581370c5b115efbe315224d6218ec2e74c7f1

6 months agolokCalcRTL: adjustments for shapes rendering
Dennis Francis [Thu, 25 Nov 2021 10:32:35 +0000 (25 16:02 +0530)]
lokCalcRTL: adjustments for shapes rendering

In LOK-RTL mode GetScrPos() always returns document pixel coordinates
and not something mirrored w.r.t gridwindow width.

* Grid offset must have the opposite sign since the SdrObjects/ranges
  have negative coordinates with no offset.

* Drawing area rectangle and the pixel-offset for tile rendering device
  also needs adjustments when painting the drawing layers.

Change-Id: I987a6876983aee129c06b3577918dbc62d6e7c4c

6 months agolokCalcRTL: fix autofilter popup position
Dennis Francis [Wed, 24 Nov 2021 12:14:30 +0000 (24 17:44 +0530)]
lokCalcRTL: fix autofilter popup position

Change-Id: Iecf41c286e28f849f77da47a0c5f73cbbc02986a

6 months agolokCalcRTL: fix autofilter button hit detection
Dennis Francis [Wed, 24 Nov 2021 11:29:47 +0000 (24 16:59 +0530)]
lokCalcRTL: fix autofilter button hit detection

No mirroring needed when not in tile painting mode. All positions are
in document coordinates.

Change-Id: I45425e2ddce7f5ddc5086dcdce31bb6d081edc41

6 months agolokCalcRTL: Workaround to avoid DrawPoly ghost drawings
Dennis Francis [Wed, 24 Nov 2021 10:42:32 +0000 (24 16:12 +0530)]
lokCalcRTL: Workaround to avoid DrawPoly ghost drawings

Change-Id: Ib6c794766fe68305566a293892c9123d64a2fc47

6 months agolokCalcRTL: draw autofilter buttons at correct coordinates
Dennis Francis [Wed, 24 Nov 2021 10:39:29 +0000 (24 16:09 +0530)]
lokCalcRTL: draw autofilter buttons at correct coordinates

Factor out the transformation from document coordinates to tile device
coordinates in ScLokRTLContext.

Change-Id: I426a179bff253233f6d45b67ddfde8b3bb1344a1

6 months agolokCalcRTL: selection coords should be mirrored w.r.t output area
Dennis Francis [Mon, 22 Nov 2021 11:04:32 +0000 (22 16:34 +0530)]
lokCalcRTL: selection coords should be mirrored w.r.t output area

Change-Id: I52bbbd4ca69a599c90c00d25513064b025f72bf4

6 months agolokCalcRTL: fix editcell painting from other views as well
Dennis Francis [Mon, 22 Nov 2021 08:59:05 +0000 (22 14:29 +0530)]
lokCalcRTL: fix editcell painting from other views as well

Change-Id: Iac431996570f1f7eb091809442d8781ea60aa9b5

6 months agolokCalcRTL: edit cell painting: avoid indent...
Dennis Francis [Mon, 22 Nov 2021 08:44:10 +0000 (22 14:14 +0530)]
lokCalcRTL: edit cell painting: avoid indent...

to match the behaviour in desktop Calc.

Change-Id: I615255635500edf375b237abcab0a21ba6153cce