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>
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>
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>
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>
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>
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>
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>
* Update helpcontent2 from branch 'master'
to 80034ff19535b6320a8ea113a9cf2f068e6aea31
- Wrong words
Change-Id: I391a5fd97005fcffac324581856bbdb8a48f1ae9
...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>
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>
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>
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
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>
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>
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>
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>
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>
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>
... 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
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>
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>
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
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>
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>
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>
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>
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>
- 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