df-libreoffice:private/Ashod/cd-5.3-3.2_import_unloaded_share_GfxLink

Last commit made on 2018-06-18
Get this branch:
git clone -b private/Ashod/cd-5.3-3.2_import_unloaded_share_GfxLink https://git.launchpad.net/df-libreoffice
Members of The Document Foundation can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
private/Ashod/cd-5.3-3.2_import_unloaded_share_GfxLink
Repository:
lp:df-libreoffice

Recent commits

13577d3... by Ashod Nakashian <email address hidden>

vcl: maintain shared PdfData across swap-in and -out

Change-Id: I6e434e5b5db0ddcd2fb4d1e522ffdb1c963c1f34

d271bb6... by Ashod Nakashian <email address hidden>

vcl: sd: import PDF as unloaded images

Change-Id: Ibf9afeab2cb580a245af666b906310de1c9b351f

f8c6813... by Ashod Nakashian <email address hidden>

vcl: load the correct page when swapping-in a PDF Graphic

Change-Id: I00ffb9f76e763e1c4cd65c5dcea061d6d94d1d6a

0026d3c... by Ashod Nakashian <email address hidden>

vcl: share GfxLink

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

1e47e0a... by =?utf-8?q?Toma=C5=BE_Vajngerl?= <email address hidden>

Function to load graphic swapped out (loaded on demand)

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.

Reviewed-on: https://gerrit.libreoffice.org/53016
Tested-by: Jenkins <email address hidden>
Reviewed-by: Tomaž Vajngerl <email address hidden>
(cherry picked from commit 7b355669c6ddeab2e6cec692d6afdff41c61d0fb)

Change-Id: Ia1218f93b1735402b7828404f65660e2d4acf32f

b2b0209... by Miklos Vajna <email address hidden>

vcl: split jpeg import into two parts

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.

Reviewed-on: https://gerrit.libreoffice.org/37397
Reviewed-by: Miklos Vajna <email address hidden>
Tested-by: Jenkins <email address hidden>
(cherry picked from commit e8a05109d91bb9e82fcec5204514766f4bdbbee8)

Change-Id: Iee742a2cd3c581aeaf1a1ed9f55cd543955a85e0

84fcdce... by Noel Grandin <email address hidden>

convert GfxLink::IsEqual to operator==

exactly one use site

Change-Id: Id0a75d46c459be213e81b47aa6c1194c87aec848
Reviewed-on: https://gerrit.libreoffice.org/42891
Reviewed-by: Noel Grandin <email address hidden>
Tested-by: Noel Grandin <email address hidden>
(cherry picked from commit ce301dadcbbf8d0f0a71c7eaebca9bfad2e08801)

636f44b... by =?utf-8?q?Toma=C5=BE_Vajngerl?= <email address hidden>

vcl: Add a internal (memory) manager for Graphic objects

This adds vcl::graphic::Manager which is a manager singleton that
tracks all the creation fo graphic objects and swaps them out on
a time and allocation basis.

Time based - every number of seconds it looks for Graphics that
weren't used for a time.

Allocation based - when creating a new Graphic and the total of
Graphic uses more than the total amount of memory for Graphics
defined in configuration, it tries to release the Graphics that
weren't used for a time.

Reviewed-on: https://gerrit.libreoffice.org/52396
Tested-by: Jenkins <email address hidden>
Reviewed-by: Tomaž Vajngerl <email address hidden>
(cherry picked from commit a2b53fece14f745853bcfe1a300c3dceb580e148)

Change-Id: I5dbf74db4a6455d32c4abcbad7be21c7f0534642

80d57f9... by =?utf-8?q?Toma=C5=BE_Vajngerl?= <email address hidden>

Move (and rename) graphic stuff from svtools to vcl

This is preparing to change how GraphicManager works where it
won't base itself around GraphicObject anymore but Graphic. No
functional or cosmetic change was made to the classes, only
changes that were needed because of the move and rename.

The only thing that wasn't moved is the GraphicRenderer as it
is not needed in vcl for now (but makes sense to move it in the
future to keep graphic stuff together).

grfmgr was renamed to GraphicObject as the GraphicManager will be
changed a lot and most likely moved out, so the name grfmgr won't
make any sense anymore.

All the UNO implementations were renamed with a prefix Uno and
used the same name as the class name. This is made to be more
specific which are the Uno objects (for example graphic.cxx
contained the implementation of XGraphic, which is similar to
graph.cxx contains Graphic).

Reviewed-on: https://gerrit.libreoffice.org/51068
Tested-by: Jenkins <email address hidden>
Reviewed-by: Tomaž Vajngerl <email address hidden>
(cherry picked from commit 7fbb96c2fbf99c47eca6f493f54fc3974f55cf86)

Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137

a41f48f... by Jens Carl <email address hidden>

Remove obsolete sc_condformats unit test

Remove the special snowflake sc_condformats because it's
now covert by xsheetconditionalentries (see commit
44e9640748791f602edb22cbc499200283466e1e).

Reviewed-on: https://gerrit.libreoffice.org/44523
Tested-by: Jenkins <email address hidden>
Reviewed-by: Jens Carl <email address hidden>
(cherry picked from commit d31fdb27583f5f594e8424bf061a74fde5cf2704)

Change-Id: Ibdae392533605b56cf9b9c28f8c419ea0d32c0d8