Age | Commit message (Collapse) | Author |
|
Change-Id: Iecbae3570851784f0da75fd2899daf620c8e4c06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145994
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
just pass a reference instead and spread that around to some similar
cases
Change-Id: Ifb2dee8c7bf02a9f01982b928c90666cbbdd84fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115759
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This adds support to create a Graphic with only a GfxLink and the
Graphic is in a swapped-out state. This is similar to the prepared
state, but the prepared state is a special state of the Graphic.
In the future, all loading will probably be done in this way and
prepared state will go away, but for now this is only supported
for PDF and is used in PDFium import only.
The main reason is to avoid that a multi-page PDF is immediately
swapped out after loading, which just does unneeded work and
freezes the application for a while.
Change-Id: I409741d27a4ad309264cdf27b2ba03f2cf37ead9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109600
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
ReadImpGraphic and WriteImpGraphic have been reimplemented in the
TypeSerializer some time ago, but the code has not yet been moved
to use that class. This commits does that and changes all the code
using those 2 methods and removes them. With this implemented in
the TypeSerializer, it is easier to handle
In addition it also removes ImplExportNative (and the method on
the Graphic interface). This was really used only in one method,
and it could be implemented in the mthod itself.
Change-Id: I0982429d1c1d5ed7ef07627d87ed9a08df43f040
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108256
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If7fbb25037343e18081a8ee7064840d75e9a45a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104010
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie429a10a8f54c6779d437ee4bc75a5ea0c427848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100727
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
excluding the UDK headers of course
Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Friend GraphicObject doesn't seem to be needed anymore.
Change-Id: I629ddaabf0c1802e986af42b457cd6322d2fd04d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92949
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
There is no need to hide std::shared_ptr<VectorGraphicData> type
under an alias name. It doesn't make the code more understandble
and it usually is the exact opposite because we know with what
type we are dealing with.
Change-Id: Iec80ee99697ff2fe3a8275fc2787b5370510ebe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92069
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Moving PDF to use VectorGraphicData in Graphic has temporary
removed the support for showing different PDF pages when opening
the PDF using pdfium (LO_IMPORT_USE_PDFIUM=1).
This adds the support for back by specifying whcih PDF page to
render when creating the VectorGraphicData (and can't be changd
afterwards), which is used to create a Graphic and contains the
PDF source data array.
Change-Id: Ib915216b8d4c0c063d0fead44ff156b1915a35d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90562
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
In principle, the current Svg/Emf/Wmf and PDF handling is trying to
achieve the same thing: Keep the original stream untouched, provide a
replacement graphics, and a kind of rendering.
To hold the data, the Svg/Emf/Wmf and PDF were using different structures
though. This commit consolidatates that, and makes the Insert
-> Image... (for PDF) actually using the VectorGraphicData to hold the
original stream.
This breaks loading the PDF as a document via PDFium - I'll fix it in
the next commit(s).
Change-Id: Iac102f32b757390a03438c165e430283851cc10b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90561
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
This reverts commit 59887868da3499c68d5f259cfa48178354397448.
Change-Id: I0f3f6a7680c78103a559a0f881badc8211b97ace
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90544
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
I just made the mistake of creating one but then forgetting to use it,
warn about that.
Change-Id: Ie7e6e34eb234468d4a255e438b9551c81a9d2fe2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90459
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
GetContext is a very generic method name, so rename it to a more
specific GetReaderContext name. It is easier to find references.
Change-Id: Ieb05ac63080598357107dc3e485b481910cd79cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89929
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: Id78995bfb8e8308a388ed542690ad85e4d19ce12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88425
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
improve the script, but it still generates some false positives
Change-Id: If8ee1cba8c04ac0be11f73220149e6de15f24f44
Reviewed-on: https://gerrit.libreoffice.org/81929
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Project stock names through XGraphic via origin URL.
(cherry picked from commit 77b88eebaadebb626108172e4f2de36c60960051)
Change-Id: Ib445694f7c142a163ef7e7bc0beea39b88b99e14
Reviewed-on: https://gerrit.libreoffice.org/79420
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I11fdc9a0dcf745dacd516cfc8540a8fb67c45b6c
Reviewed-on: https://gerrit.libreoffice.org/78106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Reviewed-on: https://gerrit.libreoffice.org/70162
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit d3a9bdd982ad1ed17cb6fef91885fc4dcf442fdb)
Change-Id: Iebd85e5e60c76e6d0756d15e1fa6107a3fcc837d
Reviewed-on: https://gerrit.libreoffice.org/77693
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
Change-Id: Iff6acef712c5b95c8cc222fc5293c9304b1c03ec
(cherry picked from commit c0a3f61ef5c42d6cfa7484a2c759e7638da2c096)
Reviewed-on: https://gerrit.libreoffice.org/77692
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
This fixes the destruction of the static cache of the PDF data; without
this, there were already missing uno runtime info.
(cherry picked from commit 20055ebe1b27f716a2acf1f0f4dda2864ae811bf)
Change-Id: I877c9ccf96c4b7eabf3d643e17f324d86d987f94
Reviewed-on: https://gerrit.libreoffice.org/77691
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
This should enable using move semantics where possible e.g. in standard
containers.
According to https://en.cppreference.com/w/cpp/language/move_constructor:
To make strong exception guarantee possible, user-defined move
constructors should not throw exceptions. For example, std::vector
relies on std::move_if_noexcept to choose between move and copy
when the elements need to be relocated.
Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb
Reviewed-on: https://gerrit.libreoffice.org/77957
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I20545527b117c9562b91076b748fb3e2659d2497
Reviewed-on: https://gerrit.libreoffice.org/77944
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The problem here is that we never actually hit the maExportGraphics
cache in SvXMLGraphicHelper, even though we are passing the same image
down repeatedly.
There are two bugs here:
(1) BitmapEx::operator== does not return true if we instantiate 2
Graphic objects from the same XGraphic, so change it to use the more
expensive operator==. To mitigate the cost, move the expensive checks to
the bottom of the method.
(2) in order to use an object in std::unordered_map, the object must
implement an equality function and a hash function. If two objects are
equal THEY MUST have the same hash value. Using the Impl* as the hash
value does not satisfy that condition, so rather use the checksum, which
does.
After these fixes, the save time drops to less than a second.
Also make the checksum method look more like the operator== method,
and add a checksum calculation method for SVG data that more accurately
reflects the underlying SVG data.
Change-Id: I4ca0c7bee60b2efa6fe42301e582c7b278022b46
Reviewed-on: https://gerrit.libreoffice.org/72615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which tends to interact in very weird ways with other code, for example
it makes Graphic appear to have an operator<
Change-Id: I335fe8f3644b710bc61291e625cbca7334a37716
Reviewed-on: https://gerrit.libreoffice.org/71532
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
This is the first step of refactoring Animation where it is needed
to separate AnimationBitmap(s) from the Animation class, which
is also responsible for displaying of animation.
General idea is to make Graphic work only with AnimationBitmaps,
which can be freely be swapped out and in, make copies - all
transparantly from the actually displaying them and possibly it
will also remove the need to copy the animation objects.
Change-Id: If5d55ac1a5b26c3880d4f7602be57742b086f9da
Reviewed-on: https://gerrit.libreoffice.org/71406
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ice2eb8c5994bf2ccb88972332ca4a1d3ed41752a
Reviewed-on: https://gerrit.libreoffice.org/63826
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I1072642be4fdfa720e61f2d7bad3c2701eb81610
Reviewed-on: https://gerrit.libreoffice.org/60430
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
When importing PDF as images, we store the
PDF stream in the GfxLink. For large PDFs
storing a copy of the full PDF with each
page is overkill. For example a 10MB PDF
with 200 pages will consume 2GB of memory!
Change-Id: I99913514cf5c562683080bc817668095bee69427
Reviewed-on: https://gerrit.libreoffice.org/55571
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
Change-Id: I58f2fd973a731b148f40b37139cd74bac097a7d2
|
|
LOK now opens PDFs as images using Pdfium,
which has a superior accuracy and support
to poppler, the default pdf reader.
Change-Id: Ifbbecf7f048f001836fb98886705cba47e6bed4e
|
|
Change-Id: I8146aa4e206788afff71142e1877fd7a885f4652
|
|
so that we flush out various code using Bitmap, in favour of using
BitmapEx.
This is part of the process of making Bitmap largely an internal detail
of vcl
Change-Id: Iaf2ead5e3d9960838723fb55b812b97108093d74
Reviewed-on: https://gerrit.libreoffice.org/55062
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
When a document is loaded it takes a lot of time and memory to
load the graphic that are in the documet, so avoid that and just
store the compressed graphic into a temporary file (handeled by
GfxLink) and load when we really need to show the graphic.
GraphicObject cached some attributes from Graphic, but this
attributes now aren't available immediately so this attributes
are removed form GraphicObject and now delegate to the Graphic
itself. GetSizeBytes attribute however was removed as it is
only used in some tests.
GfxLink initial values were moved to the constructor and are
not set in the header file anymore (as it is the recommended
way to do it).
The SdImportTest::testDocumentLayout failed as it looks like the
dump sometimes didn't include the width and height of the null
bitmap (which is set to 32x32) of the FillBitmap in some
situations, but then in other situations it did include this
attributes. With this change the width and height are always
included for the FillBitmap which looks like it is more correct.
Change-Id: Ia1218f93b1735402b7828404f65660e2d4acf32f
Reviewed-on: https://gerrit.libreoffice.org/53016
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I16b162f86d6221d120f6355f9a52c1abfcd0ac73
Reviewed-on: https://gerrit.libreoffice.org/52911
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
The main reason is to differentiate when we have the GfxLink from
other (url, file) links which use the same terminology.
Change-Id: I805c61e7fb231062340562c51c25a189b2cfc7f7
Reviewed-on: https://gerrit.libreoffice.org/52245
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: If81127e0589b504909801bcbf392d2dec3a3efc1
Reviewed-on: https://gerrit.libreoffice.org/52244
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Also remove some GraphicObjectTest because they call into
GraphicManager which now doesn't exist anymore.
Change-Id: Ia434736d8611df629af3e897c878a7fb8bbe4706
Reviewed-on: https://gerrit.libreoffice.org/52243
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: Iec236538271b33eb9e6dcfd98903657c1198476e
Reviewed-on: https://gerrit.libreoffice.org/50332
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I73e7377c2049211de0b464efff03058dc5de33a6
Reviewed-on: https://gerrit.libreoffice.org/49554
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I58547ad90d1aba6b1734a547c8138d1476c4b813
Reviewed-on: https://gerrit.libreoffice.org/49072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
Reviewed-on: https://gerrit.libreoffice.org/41237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
all this foo is ultimately animated gifs and the count there is
limited to unsigned 16bit
Change-Id: Ib6e6dde7355f3619bb7735743e686e6338a235ee
|
|
First steps to organize an importer that can read/interpret
wmf/emf/emf+ and deliver a primitive representation for
the content by parsing it. Use the same mechanisms as
already applied for Svg, so to reuse abilities to keep
original binary data to allow save again and embedding in
files and have an implemented replacement bitmap based
representation. For this, unify the used helper classes
to handle more than just Svg. For 1st try, add test code
and static bool switches
Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
|
|
Split the import into two:
1) Just create the bitmap, this part is not thread-safe (e.g.
OpenGLContext::makeCurrent() is called when OpenGL is enabled).
2) Import the image into an existing bitmap.
The point is that the second part takes much more time than the first,
and in the future that part may be executed on a thread, while without
such a split the whole ImportJPEG() can't do that. For now
GraphicFilter::ImportGraphic() simply invokes the two parts after each
other, so no real functional changes yet.
Change-Id: Iee742a2cd3c581aeaf1a1ed9f55cd543955a85e0
Reviewed-on: https://gerrit.libreoffice.org/37397
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: Idcbc8655108ff57c06c33bbcabd652387bf3c4ec
Reviewed-on: https://gerrit.libreoffice.org/32948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|