[Libreoffice-commits] core.git: include/svtools svtools/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Jan 13 18:23:20 UTC 2017


 include/svtools/grfmgr.hxx        |    2 +-
 svtools/source/graphic/grfmgr.cxx |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 24fa5d0570b997cc92f1fdf412f517f8d4021207
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Jan 13 14:15:23 2017 +0200

    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 at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index 18af820..b39e691 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 ffaa93a..f818bad 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


More information about the Libreoffice-commits mailing list