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

Stephan Bergmann sbergman at redhat.com
Fri Apr 20 06:53:58 UTC 2018


 svtools/source/uno/unogridcolumnfacade.cxx |    4 ++--
 vcl/win/window/salframe.cxx                |   14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit a7d559014835769d4f214cee7b7a4e4958c7efda
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 20 08:52:41 2018 +0200

    loplugin:sallogareas (clang-cl)
    
    Change-Id: I2509f0c165de0f0754d93482825603da4644009a

diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx
index eb25262c96dd..3669c59ccea4 100644
--- a/svtools/source/uno/unogridcolumnfacade.cxx
+++ b/svtools/source/uno/unogridcolumnfacade.cxx
@@ -62,7 +62,7 @@ namespace svt { namespace table
             }
             catch( const Exception& )
             {
-                DBG_UNHANDLED_EXCEPTION();
+                DBG_UNHANDLED_EXCEPTION("svtools.uno");
             }
         }
 
@@ -76,7 +76,7 @@ namespace svt { namespace table
             }
             catch( const Exception& )
             {
-                DBG_UNHANDLED_EXCEPTION();
+                DBG_UNHANDLED_EXCEPTION("svtools.uno");
             }
             return value;
         }
commit 7d84c8c80c5703d69a79388886c9768e916b0410
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 20 08:52:19 2018 +0200

    loplugin:simplifybool (clang-cl)
    
    Change-Id: Ic63ebe497d9b9598be389d58cff294df2136ce2f

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index a70262fc68ac..7186fc2953e9 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -3292,9 +3292,9 @@ bool WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangT
             // Menu key    - this key is used to display context menu
             // AltGr key   - probably it has no sense
             rKeyCode = vcl::KeyCode( ImplSalGetKeyCode( vkeycode ),
-                (shiftstate & 0x01) ? true : false,     // shift
-                (shiftstate & 0x02) ? true : false,     // ctrl
-                (shiftstate & 0x04) ? true : false,     // alt
+                (shiftstate & 0x01) != 0,     // shift
+                (shiftstate & 0x02) != 0,     // ctrl
+                (shiftstate & 0x04) != 0,     // alt
                 false );
             bRet = true;
         }
@@ -3552,7 +3552,7 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
                     aKeyEvt.mnCode &= ~(KEY_MOD1 | KEY_MOD2);
                 }
 
-                bIgnoreCharMsg = bCharPeek ? true : false;
+                bIgnoreCharMsg = bCharPeek;
                 bool nRet = pFrame->CallCallback( nEvent, &aKeyEvt );
                 // independent part only reacts on keyup but Windows does not send
                 // keyup for VK_HANJA
@@ -4483,9 +4483,9 @@ static LRESULT ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
         COLORREF clrPrevText, clrPrevBkgnd;
         HFONT hfntOld;
         HBRUSH hbrOld;
-        bool    fChecked = (pDI->itemState & ODS_CHECKED) ? true : false;
-        bool    fSelected = (pDI->itemState & ODS_SELECTED) ? true : false;
-        bool    fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED)) ? true : false;
+        bool    fChecked = (pDI->itemState & ODS_CHECKED);
+        bool    fSelected = (pDI->itemState & ODS_SELECTED);
+        bool    fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED));
 
         // Set the appropriate foreground and background colors.
         RECT aRect = pDI->rcItem;


More information about the Libreoffice-commits mailing list