[Libreoffice-commits] core.git: 2 commits - chart2/source sc/source svx/source sw/source toolkit/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 11 06:08:17 UTC 2019
chart2/source/view/axes/VCartesianAxis.cxx | 2 +-
sc/source/ui/vba/vbaapplication.cxx | 4 +++-
svx/source/engine3d/view3d.cxx | 4 ++--
svx/source/sdr/contact/viewcontactofe3dscene.cxx | 2 +-
sw/source/ui/vba/vbatabstops.cxx | 2 +-
sw/source/uibase/uiview/view1.cxx | 2 +-
toolkit/source/awt/vclxmenu.cxx | 2 +-
7 files changed, 10 insertions(+), 8 deletions(-)
New commits:
commit 3165146f6deef86eb408837275ec3f7edda0183b
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Feb 7 14:40:49 2019 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Feb 11 07:08:08 2019 +0100
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I62cb3b8927d664b3d5359ee6ac7db30d354f4821
Reviewed-on: https://gerrit.libreoffice.org/67496
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index e058101524df..2a9b592b46cb 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -1101,7 +1101,7 @@ B2DVector VCartesianAxis::getScreenPosition( double fLogicX, double fLogicY, dou
drawing::Position3D aScenePos = m_pPosHelper->transformLogicToScene( fLogicX, fLogicY, fLogicZ, true );
if(m_nDimension==3)
{
- if( m_xLogicTarget.is() && m_pPosHelper && m_pShapeFactory )
+ if (m_xLogicTarget.is() && m_pShapeFactory)
{
tPropertyNameMap aDummyPropertyNameMap;
Reference< drawing::XShape > xShape3DAnchor = m_pShapeFactory->createCube( m_xLogicTarget
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index e3def1a409f6..a3b3af4d41b7 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -823,12 +823,12 @@ void E3dView::ImpCreate3DObject(E3dScene* pScene, SdrObject* pObj, bool bExtrude
ImpCreateSingle3DObjectFlat(pScene, pNewObj2, bExtrude, fDepth, rLatheMat);
// delete object in between
- if(pNewObj2 != pObj && pNewObj2 != pNewObj1 && pNewObj2)
+ if (pNewObj2 != pObj && pNewObj2 != pNewObj1)
SdrObject::Free( pNewObj2 );
}
// delete object in between
- if(pNewObj1 != pObj && pNewObj1)
+ if (pNewObj1 != pObj)
SdrObject::Free( pNewObj1 );
}
}
diff --git a/svx/source/sdr/contact/viewcontactofe3dscene.cxx b/svx/source/sdr/contact/viewcontactofe3dscene.cxx
index 86ca5f0ed09c..46ceeb6b7e45 100644
--- a/svx/source/sdr/contact/viewcontactofe3dscene.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dscene.cxx
@@ -119,7 +119,7 @@ void createSubPrimitive3DVector(
bVisible = rE3dObject.GetSelected();
}
- if(bVisible && o_pVisibleTarget)
+ if (bVisible)
{
// add to visible target vector
o_pVisibleTarget->append(xPrimitive3DSeq);
diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx
index 0c2ee09dea33..2f18e784dcb8 100644
--- a/sw/source/ui/vba/vbatabstops.cxx
+++ b/sw/source/ui/vba/vbatabstops.cxx
@@ -207,7 +207,7 @@ uno::Reference< word::XTabStop > SAL_CALL SwVbaTabStops::Add( float Position, co
style::TabStop* pOldTab = aOldTabs.getArray();
style::TabStop* pNewTab = aNewTabs.getArray();
pNewTab[0] = aTab;
- for( sal_Int32 nIndex = 0; nIndex < nTabs && !bOverWriter; nIndex++ )
+ for (sal_Int32 nIndex = 0; nIndex < nTabs; nIndex++)
{
if( pOldTab[nIndex].Position == nPosition )
{
diff --git a/sw/source/uibase/uiview/view1.cxx b/sw/source/uibase/uiview/view1.cxx
index e985721e78e5..556899c1e416 100644
--- a/sw/source/uibase/uiview/view1.cxx
+++ b/sw/source/uibase/uiview/view1.cxx
@@ -193,7 +193,7 @@ void SwView::StateFormatPaintbrush(SfxItemSet &rSet)
if(!m_pFormatClipboard)
return;
- bool bHasContent = m_pFormatClipboard && m_pFormatClipboard->HasContent();
+ const bool bHasContent = m_pFormatClipboard->HasContent();
if( !bHasContent &&
!SwFormatClipboard::CanCopyThisType( GetWrtShell().GetSelectionType())
)
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index d9ec3a6487f7..716eec4a0105 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -303,7 +303,7 @@ void VCLXMenu::removeItem(
return;
sal_Int32 nItemCount = static_cast<sal_Int32>(mpMenu->GetItemCount());
- if ( ( nCount > 0 ) && ( nPos >= 0 ) && ( nPos < nItemCount ) && ( nItemCount > 0 ))
+ if ((nCount > 0) && (nPos >= 0) && (nPos < nItemCount))
{
sal_Int16 nP = sal::static_int_cast< sal_Int16 >(
std::min( static_cast<int>(nPos+nCount), static_cast<int>(nItemCount) ));
commit 774cc7e0930f223fded1a774e0b71e6b68d48f5f
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Feb 7 12:20:14 2019 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Feb 11 07:07:55 2019 +0100
tdf#120703 PVS: The check must be before assignment
V560 A part of conditional expression is always false:
nType != m_nDialogType.
Change-Id: I9182ec170aa41516208f97bb8543d348990f046d
Reviewed-on: https://gerrit.libreoffice.org/67488
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index e58b643a076d..9a139117454c 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -373,9 +373,11 @@ ScVbaApplication::FileDialog( const uno::Any& DialogType )
sal_Int32 nType = 0;
DialogType >>= nType;
- m_nDialogType = nType;
if( !m_xFileDialog || nType != m_nDialogType )
+ {
+ m_nDialogType = nType;
m_xFileDialog = uno::Reference<excel::XFileDialog> ( new ScVbaFileDialog( this, mxContext, nType ));
+ }
return uno::Any( m_xFileDialog );
}
More information about the Libreoffice-commits
mailing list