[Libreoffice-commits] core.git: vcl/qt5

Stephan Bergmann sbergman at redhat.com
Tue Nov 14 10:42:06 UTC 2017


 vcl/qt5/Qt5Graphics.hxx      |    2 +-
 vcl/qt5/Qt5Graphics_Text.cxx |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 34efaa8a7508ea73f7aa6e41e6ff4682f2772af3
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Nov 14 11:40:50 2017 +0100

    Adapt Library_vclplug_qt5
    
    ...to 8f54136caa786523fd224f6c98fc8e7c45cd805d "use std::unique_ptr for
    SalLayout"
    
    Change-Id: Ibf8962de1b43881c70a1bad1881df61bf4b551a4

diff --git a/vcl/qt5/Qt5Graphics.hxx b/vcl/qt5/Qt5Graphics.hxx
index daf1ff0bb748..6e8332356d49 100644
--- a/vcl/qt5/Qt5Graphics.hxx
+++ b/vcl/qt5/Qt5Graphics.hxx
@@ -184,7 +184,7 @@ public:
     virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override;
     virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override;
 
-    virtual SalLayout* GetTextLayout(ImplLayoutArgs&, int nFallbackLevel) override;
+    virtual std::unique_ptr<SalLayout> GetTextLayout(ImplLayoutArgs&, int nFallbackLevel) override;
     virtual void DrawTextLayout(const CommonSalLayout&) override;
 
     // Native control support
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index cc69ae956ef0..ab9e1afb78d7 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -137,11 +137,11 @@ bool Qt5Graphics::GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) { retur
 
 bool Qt5Graphics::GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) { return false; }
 
-SalLayout* Qt5Graphics::GetTextLayout(ImplLayoutArgs&, int nFallbackLevel)
+std::unique_ptr<SalLayout> Qt5Graphics::GetTextLayout(ImplLayoutArgs&, int nFallbackLevel)
 {
     if (m_pTextStyle[nFallbackLevel])
-        return new CommonSalLayout(*m_pTextStyle[nFallbackLevel]);
-    return nullptr;
+        return std::unique_ptr<SalLayout>(new CommonSalLayout(*m_pTextStyle[nFallbackLevel]));
+    return std::unique_ptr<SalLayout>();
 }
 
 void Qt5Graphics::DrawTextLayout(const CommonSalLayout&) {}


More information about the Libreoffice-commits mailing list