diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-04-02 11:32:42 -0400 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-03-23 17:18:28 +0100 |
commit | a81e009846058918046ea8f89b8b403db79d5dc7 (patch) | |
tree | fb9b048d3f5d9b2bbf64bd4d9f82dfbe6a8965cb /vcl | |
parent | 571755b3653bb06586e7cae232d1ca943719a732 (diff) |
sd: unit-test to check that PDF stream is shared among Graphic instances
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)
Reviewed-on: https://gerrit.libreoffice.org/77693
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 5a3f794219dade812ec29ea9971680058b4bade9)
Change-Id: Iebd85e5e60c76e6d0756d15e1fa6107a3fcc837d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90845
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/impgraph.hxx | 1 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index c01b28334ce5..4b13463c949f 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -199,6 +199,7 @@ private: bool ImplIsSwapOut() const { return mbSwapOut;} bool ImplIsDummyContext() const { return mbDummyContext; } void ImplSetLink( const std::shared_ptr<GfxLink>& ); + std::shared_ptr<GfxLink> ImplGetSharedGfxLink() const; GfxLink ImplGetLink(); bool ImplIsLink() const; diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 0599091f8996..421ef1a0b09e 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -534,6 +534,11 @@ void Graphic::SetGfxLink( const std::shared_ptr<GfxLink>& rGfxLink ) mxImpGraphic->ImplSetLink( rGfxLink ); } +std::shared_ptr<GfxLink> Graphic::GetSharedGfxLink() const +{ + return mxImpGraphic->ImplGetSharedGfxLink(); +} + GfxLink Graphic::GetGfxLink() const { return mxImpGraphic->ImplGetLink(); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index c700358312c5..e885e2a103e5 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1620,6 +1620,11 @@ void ImpGraphic::ImplSetLink(const std::shared_ptr<GfxLink>& rGfxLink) mpGfxLink->SwapOut(); } +std::shared_ptr<GfxLink> ImpGraphic::ImplGetSharedGfxLink() const +{ + return mpGfxLink; +} + GfxLink ImpGraphic::ImplGetLink() { ensureAvailable(); |