diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-13 14:15:23 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-05 08:17:46 -0500 |
commit | 4d6750e789c4dd6d75398021b9f804dcd5aab78f (patch) | |
tree | 7fff504fcff0b0603f8b5cb8daec611519e6c51e | |
parent | 377c7dce522514528c80d4466de2faad7f6d2c00 (diff) |
better fix for tdf#101563: Export to PDF creates huge PDF files
Change-Id: Idda6a5ac824090e620fc6577fc82d5c5f1234b7e
Reviewed-on: https://gerrit.libreoffice.org/33037
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 24fa5d0570b997cc92f1fdf412f517f8d4021207)
(cherry picked from commit df7e1cb393083b30b7a1dd25539f0f3831b80ba2)
-rw-r--r-- | include/svtools/grfmgr.hxx | 2 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx index abd8b2928d0a..c1e165c1ed1a 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -387,7 +387,7 @@ public: bool HasLink() const { return !maLink.isEmpty(); } void SetLink(); void SetLink( const OUString& rLink ); - OUString GetLink() const { return maLink; } + const OUString& GetLink() const { return maLink; } bool HasUserData() const { return !maUserData.isEmpty(); } void SetUserData(); diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index ffaa93a0abc1..f818bad6d96c 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -647,8 +647,11 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC void GraphicObject::SetGraphic( const Graphic& rGraphic, const OUString& rLink ) { + // in case we are called from a situation where rLink and maLink are the same thing, + // we need a copy because SetGraphic clears maLink + OUString sLinkCopy = rLink; SetGraphic( rGraphic ); - maLink = rLink; + maLink = sLinkCopy; } Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMode& rDestMap, const GraphicAttr& rAttr ) const |