accessibility/source/standard/vclxaccessiblebox.cxx |    2 +-
 dbaccess/source/core/api/column.cxx                 |    2 +-
 dtrans/source/win32/dtobj/XTDataObject.cxx          |    2 +-
 package/source/zippackage/ZipPackage.cxx            |    2 +-
 sd/qa/unit/tiledrendering/tiledrendering.cxx        |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 14301589d796b60eb219d52575ff89b629f67f26
Author: Jochen Nitschke <j.nitschke+loger...@ok.de>
Date:   Mon Nov 7 14:49:07 2016 +0100

    style fix for cppcheck redundantCondition
    
    Change-Id: I5d02c6f4c6b411c23a6de43374884a76e1c408fe
    Reviewed-on: https://gerrit.libreoffice.org/30667
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx 
b/accessibility/source/standard/vclxaccessiblebox.cxx
index ddc12ec..9af428e 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -353,7 +353,7 @@ sal_Int16 SAL_CALL VCLXAccessibleBox::getAccessibleRole() 
throw (RuntimeExceptio
     // VCL list boxes in DropDown-Mode else <const>PANEL</const>.
     // This way the Java bridge has not to handle both independently.
     //return m_bIsDropDownBox ? AccessibleRole::COMBO_BOX : 
AccessibleRole::PANEL;
-    if (m_bIsDropDownBox || (!m_bIsDropDownBox && m_aBoxType == COMBOBOX ))
+    if (m_bIsDropDownBox || (m_aBoxType == COMBOBOX))
         return AccessibleRole::COMBO_BOX;
     else
         return AccessibleRole::PANEL;
diff --git a/dbaccess/source/core/api/column.cxx 
b/dbaccess/source/core/api/column.cxx
index 1ee7537..2bc0b5d 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -282,7 +282,7 @@ Any SAL_CALL OColumns::queryInterface( const Type & rType ) 
throw(RuntimeExcepti
             aRet = TXChild::queryInterface( rType);
         return aRet;
     }
-    else if(!m_pTable || (m_pTable && !m_pTable->isNew()))
+    else if(!m_pTable || !m_pTable->isNew())
     {
         if(!m_bAddColumn    && rType == cppu::UnoType<XAppend>::get())
             return Any();
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx 
b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 2ddaf31..3ca9325 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -148,7 +148,7 @@ void SAL_CALL renderDataAndSetupStgMedium(
     const sal_Int8* lpStorage, const FORMATETC& fetc, sal_uInt32 nInitStgSize,
     sal_uInt32 nBytesToTransfer, STGMEDIUM& stgmedium )
 {
-    OSL_PRECOND( !nInitStgSize || nInitStgSize && (nInitStgSize >= 
nBytesToTransfer),
+    OSL_PRECOND( !nInitStgSize || (nInitStgSize >= nBytesToTransfer),
                  "Memory size less than number of bytes to transfer" );
 
     CStgTransferHelper stgTransfHelper( AUTO_INIT );
diff --git a/package/source/zippackage/ZipPackage.cxx 
b/package/source/zippackage/ZipPackage.cxx
index c35eb8a..d17fee0 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -622,7 +622,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< 
Any >& aArguments )
                     // kind of optimization: treat empty files as nonexistent 
files
                     // and write to such files directly. Note that "Size" 
property is optional.
                     bool bHasSizeProperty = aAny >>= aSize;
-                    if( !bHasSizeProperty || ( bHasSizeProperty && aSize ) )
+                    if( !bHasSizeProperty || aSize )
                     {
                         uno::Reference < XActiveDataSink > xSink = new 
ZipPackageSink;
                         if ( aContent.openStream ( xSink ) )
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index f930df8..e3e48f7 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1235,7 +1235,7 @@ void SdTiledRenderingTest::testCreateViewTextCursor()
     {
         auto itVisibility = 
aView1.m_aViewCursorVisibilities.find(rInvalidation.first);
         // For each cursor invalidation: if there is no visibility or the 
visibility is true, that's a problem.
-        if (itVisibility == aView1.m_aViewCursorVisibilities.end() || 
(itVisibility != aView1.m_aViewCursorVisibilities.end() && 
itVisibility->second))
+        if (itVisibility == aView1.m_aViewCursorVisibilities.end() || 
itVisibility->second)
         {
             bFoundCursor = true;
             break;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to