[Libreoffice-commits] core.git: 3 commits - bridges/source shell/source vcl/win

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 10 19:52:02 UTC 2019


 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx     |    2 -
 shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx |   32 +++++-----------
 vcl/win/gdi/salgdi2.cxx                                 |    8 +---
 3 files changed, 14 insertions(+), 28 deletions(-)

New commits:
commit 3e3e2d454ccc907f4a780d7015b6c8941d41648a
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 10 15:31:56 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Dec 10 20:51:14 2019 +0100

    loplugin:unusedmember (clang-cl)
    
    ColorScanlineConverter::meDestinationFormat was unused ever since the code was
    introduced in 6b571ae4608ac15256eb7582f442ce69975370f3 "opengl: change from BGRA
    to  RGBA color arrangement on Windows".
    
    Change-Id: Ieb530e291270d97613176250f126c223aee8faa9
    Reviewed-on: https://gerrit.libreoffice.org/84863
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Jenkins

diff --git a/vcl/win/gdi/salgdi2.cxx b/vcl/win/gdi/salgdi2.cxx
index 9c5c44deb35e..6ccf3140c169 100644
--- a/vcl/win/gdi/salgdi2.cxx
+++ b/vcl/win/gdi/salgdi2.cxx
@@ -72,16 +72,14 @@ class ColorScanlineConverter
 {
 public:
     ScanlineFormat meSourceFormat;
-    ScanlineFormat meDestinationFormat;
 
     int mnComponentSize;
     int mnComponentExchangeIndex;
 
     long mnScanlineSize;
 
-    ColorScanlineConverter(ScanlineFormat eSourceFormat, ScanlineFormat eDestinationFormat, int nComponentSize, long nScanlineSize)
+    ColorScanlineConverter(ScanlineFormat eSourceFormat, int nComponentSize, long nScanlineSize)
         : meSourceFormat(eSourceFormat)
-        , meDestinationFormat(eDestinationFormat)
         , mnComponentSize(nComponentSize)
         , mnComponentExchangeIndex(0)
         , mnScanlineSize(nScanlineSize)
@@ -127,10 +125,10 @@ void convertToWinSalBitmap(SalBitmap& rSalBitmap, WinSalBitmap& rWinSalBitmap)
     std::unique_ptr<ColorScanlineConverter> pConverter;
 
     if (pRead->mnFormat == ScanlineFormat::N24BitTcRgb)
-        pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N24BitTcRgb, ScanlineFormat::N24BitTcBgr,
+        pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N24BitTcRgb,
                                                     3, pRead->mnScanlineSize));
     else if (pRead->mnFormat == ScanlineFormat::N32BitTcRgba)
-        pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N32BitTcRgba, ScanlineFormat::N32BitTcBgra,
+        pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N32BitTcRgba,
                                                     4, pRead->mnScanlineSize));
     if (pConverter)
     {
commit 4b0c05f5c15f460118ef28ce5925a1b732e370c3
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 10 15:25:34 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Dec 10 20:51:00 2019 +0100

    loplugin:unusedmember (clang-cl)
    
    (The struct that is the type of EHExceptionRecord::params does not need a name.)
    
    Change-Id: I372630563dce26c3ac190a9492eabfad9a55a943
    Reviewed-on: https://gerrit.libreoffice.org/84861
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index c725bca543c8..daa0426a2c17 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -793,7 +793,7 @@ bool DetectRethrow(void* ppExcept)
         struct _EXCEPTION_RECORD* ExceptionRecord;
         PVOID ExceptionAddress;
         DWORD NumberParameters;
-        struct alignas(8) EHParameters
+        struct alignas(8)
         {
             DWORD magicNumber;
             PVOID pExceptionObject;
commit 7e5de5480255c830ec8ce88b6fcd39e3a36672e8
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 10 15:21:04 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Dec 10 20:50:41 2019 +0100

    loplugin:unusedmember (clang-cl)
    
    PROPERTYMAP members pszXPathParent and pszValueNodeName were unused ever since
    85e0cc246d4350122b17fbe2bfd15635a190ad77 "dv17: #i70994#: Use property handler
    instead of column info for Windows Vista" introduced the code.  (And removing
    them allowed to simplify the code further in the obvious way.)
    
    Change-Id: Ie1247cbee31a172a15fd57c4b752d74711b1d3a1
    Reviewed-on: https://gerrit.libreoffice.org/84860
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
index ae547afd2973..5b7121bcf333 100644
--- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
+++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
@@ -39,28 +39,16 @@
 long g_DllRefCnt = 0;
 static HINSTANCE g_hModule = nullptr;
 
-namespace {
-
-// Map of property keys to the locations of their value(s) in the .??? XML schema
-struct PROPERTYMAP
-{
-    PROPERTYKEY key;
-    PCWSTR pszXPathParent;
-    PCWSTR pszValueNodeName;
-};
-
-}
-
-const PROPERTYMAP g_rgPROPERTYMAP[] =
+const PROPERTYKEY g_rgPROPERTIES[] =
 {
-    { PKEY_Title,          L"LibreOffice",          L"Title" },
-    { PKEY_Author,         L"LibreOffice",          L"Author" },
-    { PKEY_Subject,        L"LibreOffice",          L"Subject" },
-    { PKEY_Keywords,       L"LibreOffice",          L"Keyword" },
-    { PKEY_Comment,        L"LibreOffice",          L"Comments" },
+    PKEY_Title,
+    PKEY_Author,
+    PKEY_Subject,
+    PKEY_Keywords,
+    PKEY_Comment
 };
 
-size_t const gPropertyMapTableSize = SAL_N_ELEMENTS(g_rgPROPERTYMAP);
+size_t const gPropertyTableSize = SAL_N_ELEMENTS(g_rgPROPERTIES);
 
 
 CPropertyHdl::CPropertyHdl( long nRefCnt ) :
@@ -289,18 +277,18 @@ void CPropertyHdl::LoadProperties( CMetaInfoReader *pMetaInfoReader )
     OutputDebugStringFormatW( L"CPropertyHdl: LoadProperties\n" );
     PROPVARIANT propvarValues;
 
-    for ( UINT i = 0; i < UINT(gPropertyMapTableSize); ++i )
+    for ( UINT i = 0; i < UINT(gPropertyTableSize); ++i )
     {
         PropVariantClear( &propvarValues );
         HRESULT hr = GetItemData( pMetaInfoReader, i, &propvarValues);
         if (hr == S_OK)
         {
             // coerce the value(s) to the appropriate type for the property key
-            hr = PSCoerceToCanonicalValue( g_rgPROPERTYMAP[i].key, &propvarValues );
+            hr = PSCoerceToCanonicalValue( g_rgPROPERTIES[i], &propvarValues );
             if (SUCCEEDED(hr))
             {
                 // cache the value(s) loaded
-                hr = m_pCache->SetValueAndState( g_rgPROPERTYMAP[i].key, &propvarValues, PSC_NORMAL );
+                hr = m_pCache->SetValueAndState( g_rgPROPERTIES[i], &propvarValues, PSC_NORMAL );
             }
         }
     }


More information about the Libreoffice-commits mailing list