Age | Commit message (Collapse) | Author | Files | Lines |
|
where if the resize triggers a copy, the pCopy pointer is now
pointing to a block of memory that has been freed.
Change-Id: I2ecfe6ad30f85b4c9e8c85f6296ac03ed4f04c8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164485
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I913c25e0ab4fb593e6d85805ed677dbe4db94c35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164127
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ic1e636c9d4e5a531113f26e147427fb75ce3591c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163185
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
reduce the number of allocations we need to do for OStringBuffer
Shaves 2% off the convert time.
Change-Id: I0852c870b3c9e1941213f80f359d00cb8ee391df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162879
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and
cid#1546004 COPY_INSTEAD_OF_MOVE
cid#1545934 COPY_INSTEAD_OF_MOVE
cid#1545563 COPY_INSTEAD_OF_MOVE
cid#1545533 COPY_INSTEAD_OF_MOVE
cid#1545529 COPY_INSTEAD_OF_MOVE
cid#1545502 COPY_INSTEAD_OF_MOVE
cid#1545499 COPY_INSTEAD_OF_MOVE
cid#1545479 COPY_INSTEAD_OF_MOVE
cid#1545344 COPY_INSTEAD_OF_MOVE
cid#1545324 COPY_INSTEAD_OF_MOVE
cid#1545313 COPY_INSTEAD_OF_MOVE
cid#1545252 COPY_INSTEAD_OF_MOVE
cid#1545186 COPY_INSTEAD_OF_MOVE
Change-Id: I44a783876699f88c769f239ae84eb5cae44d5f07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161879
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
and try something a bit more generic
Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
(*) Make all of it use a "Scoped" paradigm
(*) pass by value, no need to allocate on heap
(*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods.
(*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places.
Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Having it subclass Bitmap encourages confusion in passing it around, and
I need the extra type-safety for my work on merged-alpha
Change-Id: I35819f9b8ee609cbdaf865563c78531e397b529b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160235
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia9e958deec9716e38381a027451d5ee821efe23d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160095
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Change-Id: I2a9d5383d1831d8bf61e5280d66556d71fccae52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159666
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
There seems to be no reason why SE child OBJR dictionaries are separate
objects, they could just be inline.
Change-Id: I9e4fcdf56d9b7454325f9d3ef7ba55bdc090f948
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158838
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
|
|
Change-Id: Ica75be2fa238fdf2a40e274f1175710923b281e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156468
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
with lots of images, we seem to spend lots of time calculating
CRC. Replace the vcl checksum/CRC with rtl_crc32 in sal/, which
forwards to the zlib implementation, which has all kinds of
nice SIMD code for performance.
Change-Id: I295e2ee91b3450fa558b06e67aac0fbb20b85f52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158529
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
These need to generate multiple elements in
SwTextPainter::PaintMultiPortion() and it's not altogether obvious.
Change-Id: Ib5fd36c3ea8e15dff93a87bb231c3cc4f78b0089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158398
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
There seems to be no reason why SE attribute dictionaries are separate
objects, they could just be inline, which saves a little space (1%)
and more importantly the PDF file is easier to read with less clutter.
Change-Id: Iaaea2432313c0b710edabecae32545205f4f495e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158392
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
OutputDevice is not where text layout should be done. There are a number
of text layout functions that are used across the text layout classes,
so I have moved them into TextLayoutHelper and made the text layout
classes rely on this. I have made TextLayoutHelper implement the
ITextLayout interface because this is still useful to new classes that
need to implement new text layout functionality.
Change-Id: Ic137a938576e7a6a64db0e5780bbbdd8342ef421
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157362
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
The size of an embedded PDF files is multiplied by
PDF_INSERT_MAGIC_SCALE_FACTOR for platforms like macOS so undo that
by adjusting the size and scale factor.
For some unknown reason, when exporting the following PDF, the
estimated size of embedded PDF charts are 20x larger than expected.
This only occurs on macOS so possibly there is some special conversion
from MapUnit::MapPoint to MapUnit::MapTwip elsewhere in the code:
https://bugs.documentfoundation.org/attachment.cgi?id=190109
Change-Id: Id0563466fea3d7a3a0419787ec9da45f0c1d2e0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157852
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
|
|
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
|
|
For some unknown reason, the scale is 8 times larger than for
non-external PDF XObjects.
This fix also allows the CppunitTest_vcl_pdfexport to run
successfully on macOS.
Change-Id: I166914e6ac575c50985efba3fb7a38ec758dea1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157090
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
It should be the index of the last glyph in the subset, so nGlyphs - 1.
Change-Id: I62853a27b602d7b3e6b6265555542dd417438fcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156630
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Adds support for exporting, editing in the UI and storage in
ODF for the dublin core attributes listed below.
Contributor (http://purl.org/dc/elements/1.1/contributor)
Coverage (http://purl.org/dc/elements/1.1/coverage)
Identifier (http://purl.org/dc/elements/1.1/identifier)
Publisher (http://purl.org/dc/elements/1.1/publisher)
Relation (http://purl.org/dc/elements/1.1/relation)
Rights (http://purl.org/dc/elements/1.1/rights)
Source (http://purl.org/dc/elements/1.1/source)
Type (http://purl.org/dc/elements/1.1/type)
Introduces XDocumentProperties2 to extend XDocumentProperties interface.
Change-Id: Ie2e0b1fbbbd00b66aef477ba1bf4e4f61c03a3b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156330
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
|
|
Adds export of pdf:PDFVersion metadata.
Change-Id: Ic4c3eec3672839d0d125b64dfca6149912cd2458
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156329
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
|
|
for pdf export xmp:CreateDate should be the modification
date instead of the creation date.
Change-Id: I2a86f30cb528cb2bd5e0f9e7c9a8a8b8d2993f50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156327
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
|
|
Fix this build failure seen with a gcc 13.2.0 `--enable-werror`
build on Debian testing:
.../vcl/source/gdi/pdfwriter_impl.cxx: In member function ‘bool vcl::PDFWriterImpl::emitType3Font(const vcl::font::PhysicalFontFace*, const vcl::pdf::FontSubset&, std::__debug::map<int, int>&)’:
.../vcl/source/gdi/pdfwriter_impl.cxx:2719:47: error: moving a temporary object prevents copy elision [-Werror=pessimizing-move]
2719 | BitmapEx aBitmapEx = std::move(aReader.read());
| ~~~~~~~~~^~~~~~~~~~~~~~~~
.../vcl/source/gdi/pdfwriter_impl.cxx:2719:47: note: remove ‘std::move’ call
cc1plus: all warnings being treated as errors
make[1]: *** [.../solenv/gbuild/LinkTarget.mk:337: .../workdir/CxxObject/vcl/source/gdi/pdfwriter_impl.o] Error 1
Change-Id: I9f0ba1afd0dee2a8aaa4708672c755ab3a97e5a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156021
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Emoji bitmaps need to have their alpha mask inverted like is done
with transparent images and shapes. So, invert the alpha mask of
Type 3 font bitmaps.
Also, add links to test documents for future development and testing.
Regression from:
commit 81994cb2b8b32453a92bcb011830fcb884f22ff3
Date: Fri Apr 16 20:33:10 2021 +0200
Convert internal vcl bitmap formats transparency->alpha (II)
Change-Id: I18223a231ab751945883ede029d660949a406f7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155960
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Reviewed-by: Patrick Luby <plubius@neooffice.org>
|
|
This reverts commit 3e20c3e73cbd10e8323f0997e3a6536abd11e2bd.
Reason for revert: This breaks every single fix that I have made for exporting alpha masks to PDF. A different solution is needed as the invert needs to be where it was to snapshot the AlphaMask.
Change-Id: I5f743b67067dff43a2324d6ca9bc1f444e245a12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155917
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Tested-by: Patrick Luby <plubius@neooffice.org>
|
|
Adobe Acrobat seems to have a bug with Type 3 fonts with unusual UPEM,
the common 1000 and 2048 UPEM work fine, but Sitka has 2250 UPEM and
Acrobat handles the advance widths in this case incorrectly and
everything gets cramped up with gaps when we re-start glyph positioning.
Workaround this by always using 0.001 scale in FontMatrix (equivalent to
1000 UPEM) and scale everything if the font’s UPEM is different.
Change-Id: I80d25a16456f04bb00304b22b967688fa8260a83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155935
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Move the alpha inversion down to createBitmapEmit() so that it gets
applied to any bitmap embedded in the PDF, especially since embedded
color bitmap glyphs don't go through the higher level code path.
Regression from:
commit 81994cb2b8b32453a92bcb011830fcb884f22ff3
Date: Fri Apr 16 20:33:10 2021 +0200
Convert internal vcl bitmap formats transparency->alpha (II)
Change-Id: I68601a7a0d9ac01f5e8054f074f8e18fcbdea1be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155930
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Change-Id: Ibb8637e4648f56d7f9895a31df006915df8f8fdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155517
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The map mode wasn't set when current page's user unit was 1, which meant
that it used the unchanged value from the previous page, where it could
be different.
Change-Id: Id1f1515dceac25cddc12081a86fabf8b32d633f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155025
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
and
cid#1538887 Improper use of negative value
Change-Id: I0d62fb6b3650351dbe6c3cbbc0809b145afc2f4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154934
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
It has been always typedef'd to basegfx::B2DPoint since:
commit 5e218b5c51f7d9cd10bd9db832879efca41b9c75
Date: Wed Jan 12 21:19:32 2022 +0000
always use B2DPoint for DevicePoint
Change-Id: I9f5202d5a71c77dd79f1759923917c26bf68a9af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154632
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Change how glyph coordinates are represented inside VCL to use floating
point instead of integers. Should make no functional difference because
we are still rounding them.
Change-Id: I5480ee3dec3afab50194954095fd6829ebaa4a22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154499
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
The first form annotation is missing /StructParent.
The invalid value is -1, not 0. Typically 0 is the index of the MCIDs
entry (m_aMCIDParents) in the ParentTree /Nums, but if there is not a
single MCID in the document, this is omitted and 0 may be a valid
annotation then.
Change-Id: I9885d176eae272d98000f9d9f0ffae82558c0ea0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154668
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
... should be below their anchor paragraph in the structure tree.
Refactor SwEnhancedPDFExportHelper (etc.) to use the new
EnsureStructureElement()/InitStructureElement() functions instead of
SetCurrentStructureElement() for the frames, and allow it for flys that
don't have their anchor paragraphs created yet because the hell layer is
exported before the document body.
Change-Id: I1be3b54002e8196772e6f9d81dd0fd0c85b6e34b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154399
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
... into 3 parts:
EnsureStructureElement/InitStructureElement/BeginStructureElement
So EnsureStructureElement and BeginStructureElement/EndStructureElement
can be called multiple times for the same object, passing in a unique
key and PDFExtOutDevData will only create the element once.
InitStructureElement will be used exactly once for each object when its
actual content is exported.
In PDFExtOutDevData rely on the indexes being the same here and in
PDFWriterImpl, because then only PDFExtOutDevData needs to maintain the
map from key to index.
Change-Id: Idea6e34627fe559038cf13cf01dafe84b759e3c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154357
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: Ie3e6e7e947d9322f3999cf3274a6c10ea717afe2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154276
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Old version 3 of PAC throws exceptions if these are capitalized;
presumably this is case sensitive, and all-lowercase unlike everything
else.
Change-Id: Ifc0cef38e333123e810376ab6a7630443d253841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154282
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
ever since
commit 4160be791daaef1a0c059a248f678cbad6408a69
Author: Caolán McNamara <caolanm@redhat.com>
Date: Tue Jan 10 20:55:31 2023 +0000
no more X11SalBitmap
Change-Id: I9dd55acdde6af1bf7501a71e92725ab739801b0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154060
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
We were always assuming the default 720 DPI, but this is not always true
when printing to file as the DPI would depend on printer settings in
this case.
Change-Id: I747f8e24f0942ecb94eb8acfc1dd9972d83ba0e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153978
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Change-Id: I64e57a832678be935b69a5cea328cc252a4bf29d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153951
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Like we do with underline color, so that color does not leak from
elsewhere.
Change-Id: I3716a117a0d0a1260e47cbfed2242f401a09d7b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153877
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
... is also Artifact.
The problem is that ImpEditEngine::Paint() always produces tags,
it can't easily check if it's inside a layout environment that is an
Artifact.
But it looks like PDFWriterImpl::beginStructureElement() already wants
to handle and suppress a structure element inside a NonStruct, except
that it calls endStructureElementMCSeq() before checkEmitStructure(),
so no structure marked content sequence is produced, but the content is
outside the Artifact marked content sequence, and possibly a second
Artifact marked content sequence will be opened once the structure
element is finished.
(btw, it's allowed to nest marked content sequences in PDF, but
nesting a structure element inside an Artifact appears dubious)
Change-Id: Ib3eef9c611e28242854c712ce974fd8cfecd8ac2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153810
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
A regression from the commit below caused the resources dictionary of
the Type 3 font to be omitted making the images inaccessible:
commit 845fbfcce9091e541bab657163b026aad8648261
Author: Khaled Hosny <khaled@libreoffice.org>
Date: Thu Jun 15 06:27:38 2023 +0300
Don’t add empty Fonts dictionary to Type 3 font resources
Change-Id: I479ca328bd1b1228ba722678d3d9686c8456b350
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153780
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
This aligns the code in PDF writer with
OutputDevice::ImplDrawEmphasisMarks().
Change-Id: I404beda30ff0eb1d6c59d971a7daa59b559ef70f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153326
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
Change-Id: Ia307f398260343fe388965673da42d9404195224
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153117
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
If the Type 3 font does not use any other fonts, skip writing Fonts to
its Resources dictionary.
Change-Id: I1d0489debeb9f0e24022316551eb234b279381c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153100
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
|
|
and share similar code
Change-Id: I7729a46d40845893f577c273c1ab340f69ebb51b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151230
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151754
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Added suport to import FreeText annotations. Added some suport to export
graphical annotations. Fixed some color issues to be more inline with
the pdfium library.
Change-Id: I7371595ebb95594ee765ae532ca7c7d4f0499592
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152606
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
|