Commit graph

479365 commits

Author SHA1 Message Date
Luboš Luňák
c443a02ec9 reduce opencl copy&paste and fix in op_financial.cxx
Change-Id: Ia1cd64f68b75f445c15ec5f8088e9202fa39768e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140185
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:43:37 +02:00
Sarper Akdemir
9ecc76988e tdf#89928 pptx import: implement import of BiLevel threshold
Implement import BiLevel effect's threshold value.
If threshold isn't exactly 50%, we can't map it to the doc model.

Therefore as a workaround apply the BiLevel (Black/White) effect with
specified threshold directly to the graphic.

Change-Id: Ib24d149d74b103d926560708c68bb937b02c4cfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140136
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-09-20 08:29:29 +02:00
Miklos Vajna
4616f006df sw: document SwUndoInsDoc
Also reachable via UNO in SwUnoCursorHelper::InsertFile().

Change-Id: I72564e62cfd9e9d7ebfbf23a55964885b0fe3ebf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140200
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-09-20 08:26:37 +02:00
Adolfo Jayme Barrientos
6af41e0e55 tdf#151070 Leverage UI layout to show relation between buddy options
And this is why LibreOffice is found by users to be hard to use:
because we suck at layouting. Just by swapping a checkbox and
a combobox, the relation between the two magically becomes INTUITIVE.

Change-Id: Id3801015a6e75d1372d46f1e2d99cfb3a662496d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140213
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-09-20 08:25:48 +02:00
Sarper Akdemir
79ea27ec44 tdf#94122 pptx export: fix automatic text color export
MS Powerpoint doesn't have automatic colors unlike Word or Excel.

Therefore on export the automatic text color should be first resolved
and then exported.

Change-Id: Ied2c3a4235da403350d8518a3414ff6a372b57a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140059
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-09-20 08:23:01 +02:00
Julien Nabet
5a6914af46 Simplify a bit by using sal_uInt16 in vcl/BitmapPopArtFilter
Since we're in the "if (bRet)" block, it means
 22     bool bRet = isPalettePixelFormat(aBitmap.getPixelFormat())
 23                 || aBitmap.Convert(BmpConversion::N8BitColors);
is verified.

isPalettePixelFormat implementation is:
29  constexpr bool isPalettePixelFormat(PixelFormat ePixelFormat)
30  {
31      assert(ePixelFormat != PixelFormat::INVALID);
32      return sal_uInt16(ePixelFormat) <= 8;
33  }

So we know we're using 8 bits max and this line:
pWriteAcc->GetBitCount()
can't give more than 8 and we can safely declare nEntryCount as sal_uInt16 (idem for "n" just below)

Since "nFirstEntry" and "nLastEntry" are related to "nEntryCount", idem for mnIndex
they can also be sal_uInt16.

Thanks to these, we can avoid all sal::static_int_cast<sal_uInt16> conversions.

Change-Id: I8cac2d01f00be33c86058c7a6eb7b9e25fb2635e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140206
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-20 08:18:21 +02:00
Rizal Muttaqin
39addcb4de tdf#151071 Revise Sifr to follow upstream
Change-Id: Ie72cbfc50c323b4d44b08440945ea171b4a4330d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140212
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-09-20 08:17:09 +02:00
Noel Grandin
b5e1a1d160 simplify usage of TempFile in sd
TempFile already handles the stream. And not touching the URL
means we stay on the fast path for temp files.

Change-Id: I8672c5749f1e0dc95e59cd9d713015586301ae34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140202
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-20 08:08:20 +02:00
Noel Grandin
3e095961ad simplify usage of TempFile in sc
TempFile already handles the stream. And not touching the URL
means we stay on the fast path for temp files.

Change-Id: Icab41d12ab7846b8901a92c11fee05952b98fafc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140201
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-20 08:07:35 +02:00
Jim Raykowski
e79741488c tdf#112237 Show tooltips for Assigned Commands in Customize dialog
Change-Id: Iff1946d5d6ac7f2046d36df8fbd76e32edf371c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140142
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-09-20 00:41:04 +02:00
Adolfo Jayme Barrientos
032e1aee7a Update git submodules
* Update helpcontent2 from branch 'master'
  to 80034ff19535b6320a8ea113a9cf2f068e6aea31
  - Wrong words
    
    Change-Id: I391a5fd97005fcffac324581856bbdb8a48f1ae9
2022-09-19 23:52:15 +02:00
Xisco Fauli
3e65f33d45 tdf#132519: sc_ucalc_formula: Add unittest
Change-Id: Ie2ff5a8961556cf21ca75a58d46f37754e0bb61b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140183
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-09-19 23:48:15 +02:00
Xisco Fauli
dfa01bb05c tdf#151046: sc_subsequent_filters: Add unittest
Change-Id: I552d53f511373b170985185361621d8e149e582b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140184
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-09-19 23:40:19 +02:00
Stephan Bergmann
e9262729e6 loplugin:unreffun (clang-cl)
...and with ScopedFontHDC::fsp gone, there appears to be no reason to keep
ScopedFontHDC::m_aFSP alive for the whole lifetime of the ScopedFontHDC
instance

Change-Id: I1028bc24f49f3bbaf6e23c09aef4459418267154
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140100
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-19 23:14:05 +02:00
Caolán McNamara
2f1ad90831 tdf#151052 set Windows darkmode "ToolTextColor" to same as "WindowTextColor"
they are the same in light mode, so do the same in darkmode

Change-Id: Ib0186383fcd7f8d74c7ada6826c6955a747e4ecd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140195
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-19 22:25:54 +02:00
Noel Grandin
8cc530b1ec size this OUStringBuffer at initial construction
Change-Id: I6414281cef5eedf1e797139695bf05c72c300447
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140181
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19 21:29:10 +02:00
Justin Luth
648f06e583 crashtesting: "unknown cell text: element" assert for text:bookmark #2
since...

commit 690a35680a
Date:   Sat Sep 10 16:32:46 2022 -0400

    tdf#103829 ods import: parse <text:tab/>

From documentation, it looks like we can also have
bookmark-start and bookmark-end, so adding these
even though no examples found.

I looked for how to insert bookmarks in calc - basically
no UI or menu (except one notebookbar, no calc documentation,
no abandoned bookmark code removal, no bookmark import code.

IIUC, in writer a bookmark is basically a field.
Perhaps it is similar in Calc? In any case, with this
limited wealth of information, I don't plan on trying
to fix the LO 4.1 loss of bookmark.

Change-Id: I44708a5c7d69ce37f688ec7beb243e08844dbfa8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140197
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
2022-09-19 21:22:39 +02:00
Andrea Gelmini
c6c3e36469 Fix typos
Change-Id: If24b9756d7fd8f6346580b4da84fac4f5ab1d3ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140198
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-19 21:21:21 +02:00
Andrea Gelmini
31640cce53 Fix typos
Change-Id: If33ae9acbc1ed17398584efa3574566b2d854b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140149
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-19 21:20:17 +02:00
Miklos Vajna
2e6144fc35 sw HTML import: fix height of images when it is missing and width is relative
This is similar to commit 456abae730 (sw
HTML import: fix height of OLE objs when it is missing and width is
relative, 2022-09-06), but this is for images, while that was for OLE
objects.

The idea is still that in case only axis is specified in the HTML and
that's a relative percentage, then the ratio should be taken from the
bitmap and it should be kept.

Change-Id: I36184ff6531bff2775013462cd8cc711e1a249c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140178
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-09-19 21:14:41 +02:00
Justin Luth
60585bb653 tdf#75702 sc: unit test for preserving text:line-break
Change-Id: Id61e46ba4e0b3e2b534cf9f8bafe03fba10cd355
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140182
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2022-09-19 21:10:39 +02:00
Olivier Hallot
43864dd892 Update git submodules
* Update helpcontent2 from branch 'master'
  to 4b86dd440667832cd5510a1bd31ff35514532d06
  - tdf#119421 Add sample files for conditional formatting
    
    Change-Id: Id5826f32bd2de2e286eecf57dc817f4b60a2599b
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/140196
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-09-19 19:57:09 +02:00
Samuel Mehrbrodt
6238758d80 tdf#150650 Fix changing fill style to None via Sidebar
Regression from 5491a82854

Change-Id: I17cfb037f2064a508317090e6b66f20e253a9436
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140150
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-09-19 19:51:51 +02:00
Noel Grandin
716a810425 no need to use an OUStringBuffer here
can just return the substring we need

Change-Id: I9d605cb809f58fcf60c0ae2e29aaff17baa9faa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140177
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19 18:44:53 +02:00
Noel Grandin
c3ea4a8025 use optional in processEntry
which means we save the cost of initialising an OUString

Change-Id: Ib139383b43f6d49303e20368ce4177b068c38ed9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140176
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19 18:44:42 +02:00
Olivier Hallot
0b6ea30e58 Update git submodules
* Update helpcontent2 from branch 'master'
  to 9abe3f66a8951fef89d79b5125931773778cda22
  - tdf#119421 Enchancements to Conditional Format pages
    
    Add icons and how-to-get
    
    Change-Id: I1fb78ac737bc37745ee76d4508116edadd283938
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/140130
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-09-19 18:34:01 +02:00
Caolán McNamara
6352710e02 try harder to remove "OSL_PIPE" pipe on SIGTERM
a) When oosplash got SIGTERM it used SIGKILL on soffice.bin, (concealed
behind osl_terminateProcess) so soffice.bin has no chance to cleanup.

Try SIGTERM, followed by SIGKILL if that doesn't work, to give
soffice.bin a chance.

b) java intercepts SIGTERM so if JNI_CreateJavaVM was called then
our SIGTERM handler doesn't get called. Add -Xrs to jvm args to
avoid this.

Change-Id: I09f93d8093bc7c094482eda73b4eadc5a6cebb83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140152
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-19 18:28:33 +02:00
Luboš Luňák
bbc07c964e move code out of formulagroupcl.cxx to op_math* and opbase*
formulagroupcl.cxx is already large enough, move away code that
implements some operations and also move some type declarations
to a header.

Change-Id: I28fe59275f4fb89c3e530d77b08e7f2fcad02781
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139971
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-19 17:29:58 +02:00
Julien Nabet
b0ad8a9175 tdf#150992: fix crash popart filter to an SVG image
part of bt:
6  0x00007f018c80186f in BitmapPalette::operator[](unsigned short) const (this=0x5576a198fe48, nIndex=176) at vcl/source/bitmap/bitmappalette.cxx:139
7  0x00007f018c3d1fce in BitmapInfoAccess::GetPaletteColor(unsigned short) const (this=0x5576a2bbc520, nColor=176) at include/vcl/BitmapInfoAccess.hxx:121
8  0x00007f018c85b63f in BitmapPopArtFilter::execute(BitmapEx const&) const (this=0x7fffb7394728, rBitmapEx=...) at vcl/source/bitmap/BitmapPopArtFilter.cxx:73
9  0x00007f018c83e66b in BitmapFilter::Filter(BitmapEx&, BitmapFilter const&) (rBmpEx=..., rFilter=...) at vcl/source/bitmap/bitmapfilter.cxx:22
10 0x00007f01905e5bd4 in SvxGraphicFilter::ExecuteGrfFilterSlot(SfxRequest const&, GraphicObject&) (rReq=..., rFilterObject=...) at svx/source/dialog/grfflt.cxx:202

some gdb info
(gdb) p nIndex
$1 = 176
(gdb) p mpImpl->GetBitmapData().size()
$2 = 34

full bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=182499

See https://bugs.documentfoundation.org/show_bug.cgi?id=150992#c2 for some comments

the main thing that makes me think that the order is reversed is the "nLastEntry" treatment.
Indeed with the current sort, mnCount with 0 come first nLastEntry = nEntryCount - 1 (unless there's no color at all)

Change-Id: I3b89f2f4d6f115ea9f6752c49bad776a33f0b020
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140153
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-19 17:12:25 +02:00
Noel Grandin
8db47ac6d5 can return by const& in PopString
and avoid some ref-counting

Change-Id: Id1e6fc09d1c517ce168cebb7a225aa6df48e72c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140138
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19 16:42:45 +02:00
Alain Romedenne
cc48e6f880 Update git submodules
* Update helpcontent2 from branch 'master'
  to 30682f2fa484e9a831ac20c26bfd19aab6c42a82
  - Reuse and sync help content
    
    Change-Id: Ia95c3da543efd8dddfdcfa635d316b3c10fa52eb
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/139569
    Tested-by: Jenkins
    Reviewed-by: Alain Romedenne <alain.romedenne@libreoffice.org>
2022-09-19 16:36:55 +02:00
Armin Le Grand (allotropia)
1b0ff1c166 tdf#150402 Correct wrong Bound of Shape in Slideshow
Added and use mbContainsPageField that gets set in
prepareHyperlinkIndices() which has to be run anyways,
so this will cause no change in execution speed.

It lets us detect the potential error case that a
PageField is contained in the Text of the Shape.
That is a hint that maBounds contains the wrong Range
and needs to be corrected.

For more backgrund information please refer to
tdf#150402, Comment 16.

Change-Id: Ifee01fffdb6e2f5915aa705afc7b5842781aae91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140144
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-09-19 16:24:46 +02:00
Samuel Mehrbrodt
29cba5c6fd tdf#150802 Fix setting gradient from Sidebar
Regression from adc536e9ef

Change-Id: I37db76373a3b9b4a1084e830233561abc4b1e6d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140151
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-09-19 16:15:00 +02:00
Eike Rathke
4da1b6a049 Update language-subtag-registry to 2022-08-08
Change-Id: I08609e88c1bdb62f778db25156363fbc6d2adff6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140148
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2022-09-19 15:48:11 +02:00
László Németh
7462f728df tdf#147507 sw: fix crash with Reject All around not content nodes
Regression from commit f3bec764dd
"tdf144058 sw track changes: fix table deletion at paragraph join".

Change-Id: If08a2b85c3db9fe92ad623d3d7cb30f2feaaab36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140145
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2022-09-19 14:39:09 +02:00
Eike Rathke
4cb347ae1c Resolves: tdf#151046 INDIRECT() try named expressions and DB range names first
... as older 1K columns allowed names that would now match a 16k
columns cell address, which ConvertSingleRef() would already
resolve.

Change-Id: I9322732e554da20c81856c0a30c41a246356f65b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140147
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2022-09-19 14:09:09 +02:00
Khaled Hosny
4c501d4352 vcl: Handle alpha in Type 3 glyphs
Change-Id: Ic21089ae8aeca1402fd5c4c46851dcd06a480723
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140146
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19 14:03:01 +02:00
Khaled Hosny
e5a797a9be vcl: Fix Type 3 glyph widths
It seems we need the values to be in unscaled font units not PS units.
Modify LogicalFontInstance::GetGlyphWidth() to return unscaled values
when requested and the TT-to-PS conversion conditionally in PDFWriter.

Change-Id: I94e7cdc0ecf842a0cf87fddaa4467966f698ae3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140126
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19 13:38:52 +02:00
Khaled Hosny
bf41b120b7 vcl: tdf#104403 PDF export for layered color fonts
Support color fonts using color layers from OpenType COLR table and
color palettes from CPAL table.

This uses PDF Type 3 fonts to wrap the layers into individual glyphs
that can be drawn normally. Type 3 glyphs can use arbitrary PDF code, so
here we output the layers in the regular font subset and then draw then
in the Type 3 glyph with colors applied to them.

This supports only version 0 of COLR table (solid colors only), the new
but more powerful version 1 of the table is not yet supported.

Change-Id: I4bf36f5b608a0ac15411104d8a6af893fb69a5c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140125
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19 13:38:30 +02:00
Khaled Hosny
8453d7ea1f vcl: Add PhysicalFontFace::UnitsPerEm()
Change-Id: I9239085aabe450499193e74ac91d6a16437545c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140124
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19 13:38:17 +02:00
Ilhan Yesil
ba164651bb tdf#149797 Change highlight background color in some controls
The highlight and highlighttext colors can be set for some
controls. So as example a selected item in a listbox can now
be paint with anothers colors then the standard blue. Controls
are: listbox, combobox, edit field and some special edit
fields like date, currency and others.

Change-Id: Iace2dd9a1a61abb7819b6c81eb0b8030912db32b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136691
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2022-09-19 13:30:15 +02:00
Noel Grandin
891d618bfd make OUString::operator=(OUString&&) a little faster
one function call instead of two, and this function is pretty hot

Change-Id: Ibb09ad9b930f337706fa392a1644077c82dbc61e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140140
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19 13:03:04 +02:00
Noel Grandin
d5e1a11b02 get_value is cheaper than at() in toRefCell()
and we expect the position to be valid here, so throwing an exception is
no better than a segment violation

Change-Id: I20e4849c95da57e6a5fc0937c4f61fbe004d11d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140139
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19 13:02:16 +02:00
Caolán McNamara
946f67cfc9 Resolves: tdf#151017 we now want the background to be the stock widget bg
Change-Id: I44a800748ffafe91f3b6169617be30ef87919267
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140141
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-19 12:54:15 +02:00
Khaled Hosny
dac60206ff vcl: Add PhysicalFontFace API to get color layers
Change-Id: Ic221582a04982f0b1565089fa0beff1b34a749d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140123
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19 12:24:20 +02:00
Khaled Hosny
92d67d4d32 vcl: Don’t use temporary files for CreateFontSubset()
The callers pass a path to a temporary file for the function to write
to, then they immediately read from it. This change cuts the unnecessary
use of temporary files and passes the subset font data around instead.

The CFF subsetting code really wants files and needs more invasive
change, so it still uses a temporary files but this is hidden from its
caller.

Change-Id: I2a2117e967b76fb903ff0d32c435925049bc6e56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140122
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19 12:23:47 +02:00
Noel Grandin
54e84cf2f7 small opt in FormulaTokenIterator
cheaper to init the stack with the first element, rather than calling
Push

Change-Id: Ia34f88b6534a663fae2ed08d0499d04d2f458847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140137
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19 11:59:03 +02:00
Samuel Mehrbrodt
467085bfb0 Rename MouseNotifyEvent to NotifyEventType
Also contains keyboard and focus events, not only mouse events

Change-Id: Iec1d6c341b01a489ba80fe9634ea3579afb02ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139970
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-09-19 11:42:59 +02:00
Miklos Vajna
de90c192cb sw content controls, plain text: enable DOCX filter with data binding
- writerfilter/ had explicit code to not map plain text SDT to Writer content
  controls if it has data bindings specified, lift this limitation and set the
  value of content control from data binding, like Word does and Writer did it
  for input fields since b5c616d10b (tdf#104823:
  support for sdt plain text fields, 2021-11-24)

- call DocxExport::AddSdtData() on the export side to do the opposite on export

- give up on the idea to export content controls to DOCX by finding the text
  attribute in SwWW8AttrIter::OutAttrWithRange(): this needs buffering in both
  directions (need to start the SDT before the start of the run, need to end it
  after the end of the run), and solving this using marks and merges at a
  fast-serializer level looks like hacks on top of hacks. To be more specific,
  CppunitTest_sw_ooxmlexport7's testSdtAndShapeOverlapping seems to be very hard
  to fix with this design

- instead, give not only the start position but also the length of the run to
  DocxAttributeOutput::EndRun(), which has random access to the doc model and can
  look up if there is a content control start or end that needs writing at the
  current position of the XML output, without any buffering, which also
  means less code

- adapt CppunitTest_sw_ooxmlfieldexport's testSdtBeforeField, which didn't like
  the empty run at the start of content controls, which seems to be harmless
  otherwise

- fix CppunitTest_sw_ooxmlfieldexport CPPUNIT_TEST_NAME=testSdtDateDuplicate by
  disabling the "set content control value from data binding" logic for date
  pickers because that logic in writerfilter/ sets the value as-is and it has to
  consider the requested date format before this can be enabled

As a side effect, this gives PDF export for plain text SDTs, even if they have
data binding set. CppunitTest_sw_ooxmlfieldexport's testTdf104823 is now
updated to ensure that we import such SDTs as Writer content controls.

Change-Id: I749a845b5a25454c51066b8ded892682f523b6b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140134
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-09-19 11:31:05 +02:00
Tor Lillqvist
b20a64ce05 Ignore also when a font has been substituted by itself with an empty style
Change-Id: I40fbce716a11b010323ac07e0dacdc114f7d2320
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140135
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-09-19 10:44:36 +02:00