diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-13 14:15:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-13 18:22:58 +0000 |
commit | 24fa5d0570b997cc92f1fdf412f517f8d4021207 (patch) | |
tree | aa0a011f2c150c04b0a2e3cd8e95f91325d1b63b | |
parent | 9e3d5996b919dfaacc152fd055e6d2250f56de47 (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>
-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 18af8206f31c..b39e69102486 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -386,7 +386,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 |