summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-11-26 12:38:47 +0900
committerAndras Timar <andras.timar@collabora.com>2020-11-26 10:33:59 +0100
commite2dfc4e3d1c5913c8686f2c80f78514b0eb37a03 (patch)
treef852b5243f4abc0d0de33b29efca756c9de3672b /vcl/qa
parent26a79bc2dd2666c718a1ee09373f636fc5116009 (diff)
pdf: workaround to disable swapping of PDF graphic files
This is needed so that swapping doesn't create excesive amount of swap files, where each includes the original PDF file, which would take a lot of temp disk space. This happens because each graphic object swaps out the original PDF and we create one graphic object per page. In a problematic PDF this means it took 20MB (PDF file) * 700 (pages) ~ 14 GB ob disk space. Change-Id: Id5f720946ce6b3f5aca92bc6d1af388fe8dbcc64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106651 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index a2629902241f..98533c972f15 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -438,12 +438,14 @@ void GraphicTest::testSwappingPageNumber()
CPPUNIT_ASSERT_EQUAL(false, aGraphic.ImplGetImpGraphic()->ImplIsSwapOut());
// Swapping out
- CPPUNIT_ASSERT_EQUAL(true, aGraphic.ImplGetImpGraphic()->ImplSwapOut());
- CPPUNIT_ASSERT_EQUAL(true, aGraphic.ImplGetImpGraphic()->ImplIsSwapOut());
- CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+ // Following checks were commented out because of the PDF swap issues
+ // with PDF graphic where a lot of swap files were created.
+ //CPPUNIT_ASSERT_EQUAL(true, aGraphic.ImplGetImpGraphic()->ImplSwapOut());
+ //CPPUNIT_ASSERT_EQUAL(true, aGraphic.ImplGetImpGraphic()->ImplIsSwapOut());
+ //CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
// Let's swap in
- CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
+ //CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.ImplGetImpGraphic()->ImplIsSwapOut());