path: root/svx/source
diff options
authorMiklos Vajna <>2020-02-25 11:28:44 +0100
committerMiklos Vajna <>2020-02-25 16:20:51 +0100
commitc7af36a6504a192f72fcd3a30712ca8c14e12fa5 (patch)
treea050d9364896cdb1604ba0e0411023dfb3bcda81 /svx/source
parente0122fc683157b5f41724b9514e072f0ce5e5c15 (diff)
SVG export: try to reuse original bitmap data for JPG and PNG bitmaps
This has a number of benefits: 1) For a sample JPG photo, the SVG output is now 4,9MB, not 20MB. 2) Even the first export to SVG is fast, see commit 570be56b37e4ff105649e604ff4c8a6c368e2e79 (svx: cache PNG export of graphic shapes, 2020-02-25) for exact numbers. 3) Allow using less memory as the SdrGrafObj doesn't have to store a PNG result till the document is closed. We still require matching checksums, so in case anything problematic happens with the bitmap (grayscale filter applied, etc), then the optimization is meant to not help, but still produces correct output. Change-Id: Id3bc359a8dcc4c4d12d3b66ffb512cfa71939a26 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
Diffstat (limited to 'svx/source')
1 files changed, 0 insertions, 22 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index f7c089d2232e..127de6a0c6f5 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1276,26 +1276,4 @@ void SdrGrafObj::addCropHandles(SdrHdlList& rTarget) const
rTarget.AddHdl(std::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::LowerRight, fShearX, fRotate));
-void SdrGrafObj::SetPNGPreviewChecksum(BitmapChecksum nPNGPreviewChecksum)
- mnPNGPreviewChecksum = nPNGPreviewChecksum;
-BitmapChecksum SdrGrafObj::GetPNGPreviewChecksum() const
- return mnPNGPreviewChecksum;
-void SdrGrafObj::SetPNGPreviewData(SvMemoryStream& rPNGPreviewData)
- rPNGPreviewData.Seek(0);
- maPNGPreviewData.resize(rPNGPreviewData.remainingSize());
- rPNGPreviewData.ReadBytes(, maPNGPreviewData.size());
-const std::vector<sal_Int8>& SdrGrafObj::GetPNGPreviewData() const
- return maPNGPreviewData;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */