[Libreoffice-commits] core.git: vcl/inc vcl/source vcl/win

Stephan Bergmann sbergman at redhat.com
Thu Oct 20 11:41:17 UTC 2016


 vcl/inc/win/salgdi.h               |    4 ++--
 vcl/source/gdi/CommonSalLayout.cxx |   10 +++++-----
 vcl/win/gdi/winlayout.cxx          |    2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 77e89962a2518962284c76da4d3339a9cd7b4ccb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Oct 20 13:40:34 2016 +0200

    Various loplugin warnings (clang-cl)
    
    Change-Id: I9e3720c86f96abc864a52c0469032132808080a4

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 473d756..9837a06 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -358,7 +358,7 @@ private:
     sal_uLong               GetKernPairs();
 
 public:
-    sal_uLong               GetTable( const char pTagName[5], const unsigned char*&, void*&, IDWriteFontFace*& );
+    static sal_uLong        GetTable( const char pTagName[5], const unsigned char*&, void*&, IDWriteFontFace*& );
     // public SalGraphics methods, the interface to the independent vcl part
 
     // get device resolution
@@ -457,7 +457,7 @@ public:
 
     virtual SalLayout*      GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override;
     virtual void            DrawSalLayout( const CommonSalLayout& ) override;
-    virtual void            DrawServerFontLayout( const GenericSalLayout&, const ServerFont& ) {};
+    virtual void            DrawServerFontLayout( const GenericSalLayout&, const ServerFont& ) override {};
 
     virtual bool            supportsOperation( OutDevSupportType ) const override;
     // Query the platform layer for control support
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index 50d7007..527d827 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -55,7 +55,7 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
 #if defined(_WIN32)
     const unsigned char* pBuffer = nullptr;
     WinSalGraphicsWithIDFace* pWSLWithIDFace = static_cast<WinSalGraphicsWithIDFace*>(pUserData);
-    nLength = (pWSLWithIDFace->mpWSL)->GetTable(pTagName, pBuffer, pWSLWithIDFace->mpTableContext, pWSLWithIDFace->mpIDFace);
+    nLength = WinSalGraphics::GetTable(pTagName, pBuffer, pWSLWithIDFace->mpTableContext, pWSLWithIDFace->mpIDFace);
 #elif defined(MACOSX) || defined(IOS)
     unsigned char* pBuffer = nullptr;
     CoreTextFontFace* pFont = static_cast<CoreTextFontFace*>(pUserData);
@@ -75,9 +75,9 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
     if (pBuffer != nullptr)
 #if defined(_WIN32)
         pBlob = hb_blob_create(reinterpret_cast<const char*>(pBuffer), nLength, HB_MEMORY_MODE_READONLY, pWSLWithIDFace,
-                               [](void* pUserData)
+                               [](void* userData)
                                {
-                                   WinSalGraphicsWithIDFace* pUData = static_cast<WinSalGraphicsWithIDFace*>(pUserData);
+                                   WinSalGraphicsWithIDFace* pUData = static_cast<WinSalGraphicsWithIDFace*>(userData);
                                    pUData->mpIDFace->ReleaseFontTable(pUData->mpTableContext);
                                }
                               );
@@ -172,9 +172,9 @@ void CommonSalLayout::ParseFeatures(const OUString& name)
 
 #if defined(_WIN32)
 CommonSalLayout::CommonSalLayout(WinSalGraphics* WSL, WinFontInstance& rWinFontInstance, const WinFontFace& rWinFontFace)
-:   mhFont((HFONT)GetCurrentObject(WSL->getHDC(), OBJ_FONT)),
+:   mrFontSelData(rWinFontInstance.maFontSelData),
     mhDC(WSL->getHDC()),
-    mrFontSelData(rWinFontInstance.maFontSelData),
+    mhFont(static_cast<HFONT>(GetCurrentObject(WSL->getHDC(), OBJ_FONT))),
     mpD2DRenderer(nullptr)
 {
     mpHbFont = rWinFontFace.GetHbFont();
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 9b78a72..8c16b9d 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -3528,7 +3528,7 @@ IDWriteFontFace* D2DWriteTextOutRenderer::GetDWriteFontFace(HDC hDC) const
     }
     catch (const std::exception& e)
     {
-        SAL_WARN("vcl.gdi.opengl", "Error in dwrite while creating font face: " << e.what());
+        SAL_WARN("vcl.gdi", "Error in dwrite while creating font face: " << e.what());
         return nullptr;
     }
     if(succeeded)


More information about the Libreoffice-commits mailing list