Kaydet (Commit) 38e7f933 authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#120703 PVS: V581 ifs with identical conditions

V581 The conditional expressions of the 'if' statements situated
     alongside each other are identical.

Change-Id: I11fa13677c7980e6ac17fc4358406472ee784e41
Reviewed-on: https://gerrit.libreoffice.org/71446
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 3159ba99
......@@ -850,9 +850,8 @@ void SplineCalculater::CalculateBSplines(
--r;
}
}
} // aPointsIn contains the control points now.
if (bIsSuccessful)
{
// aPointsIn contains the control points now.
// calculate the intermediate points according given resolution
// using deBoor-Cox algorithm
lcl_tSizeType nNewSize = nResolution * n + 1;
......
......@@ -727,8 +727,7 @@ void SAL_CALL SlideShow::end()
if( mpCurrentViewShellBase )
{
ViewShell* pViewShell = mpCurrentViewShellBase->GetMainViewShell().get();
if( pViewShell )
if (ViewShell* const pViewShell = mpCurrentViewShellBase->GetMainViewShell().get())
{
// invalidate the view shell so the presentation slot will be re-enabled
// and the rehearsing will be updated
......@@ -773,12 +772,13 @@ void SAL_CALL SlideShow::end()
}
}
}
}
//Fire the acc focus event when focus is switched back. The above method mpCurrentViewShellBase->GetWindow()->GrabFocus() will
//set focus to WorkWindow instead of the sd::window, so here call Shell's method to fire the focus event
if (pViewShell)
// Fire the acc focus event when focus is switched back. The above method
// mpCurrentViewShellBase->GetWindow()->GrabFocus() will set focus to WorkWindow
// instead of the sd::window, so here call Shell's method to fire the focus event
pViewShell->SwitchActiveViewFireFocus();
}
}
mpCurrentViewShellBase = nullptr;
}
......
......@@ -665,15 +665,10 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
if (eEditMode == EditMode::MasterPage)
{
// Disable some slots when in master page mode.
rSet.DisableItem(SID_ASSIGN_LAYOUT);
rSet.DisableItem(SID_INSERTPAGE);
}
// Disable some slots when in master page mode.
if (eEditMode == EditMode::MasterPage)
{
if (rSet.GetItemState(SID_INSERTPAGE) == SfxItemState::DEFAULT)
rSet.DisableItem(SID_INSERTPAGE);
if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SfxItemState::DEFAULT)
rSet.DisableItem(SID_DUPLICATE_PAGE);
}
......
......@@ -993,8 +993,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode )
//Set right on mpRightMost from pChild
mpRightMost->SetRight( bodyLeft );
}
}
if( pSubSup ) {
pChild = pSubSup->GetSubSup( LSUB );
if( pChild ) {
//Create position in front of pChild
......@@ -1005,8 +1004,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode )
//Set right on mpRightMost from pChild
mpRightMost->SetRight( bodyLeft );
}
}
if( pSubSup ) {
pChild = pSubSup->GetSubSup( CSUP );
if ( pChild ) {//TO
//Create position in front of pChild
......@@ -1017,8 +1015,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode )
//Set right on mpRightMost from pChild
mpRightMost->SetRight( bodyLeft );
}
}
if( pSubSup ) {
pChild = pSubSup->GetSubSup( CSUB );
if( pChild ) { //FROM
//Create position in front of pChild
......@@ -1029,8 +1026,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode )
//Set right on mpRightMost from pChild
mpRightMost->SetRight( bodyLeft );
}
}
if( pSubSup ) {
pChild = pSubSup->GetSubSup( RSUP );
if ( pChild ) {
//Create position in front of pChild
......@@ -1041,8 +1037,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode )
//Set right on mpRightMost from pChild
mpRightMost->SetRight( bodyLeft );
}
}
if( pSubSup ) {
pChild = pSubSup->GetSubSup( RSUB );
if ( pChild ) {
//Create position in front of pChild
......
......@@ -266,10 +266,7 @@ sal_uInt32 SvParser<T>::GetNextChar()
cUC = (sal_Unicode(c1) << 8) | c2;
else
cUC = (sal_Unicode(c2) << 8) | c1;
}
if( !bErr )
{
c = cUC;
}
}
......
......@@ -1537,9 +1537,6 @@ namespace sdr { namespace contact {
Reference< XControlModel > xControlModel( rViewContactOfUnoControl.GetSdrUnoObj().GetUnoControlModel() );
const ControlHolder& rControl( m_pVOCImpl->getExistentControl() );
if ( !bHadControl && rControl.is() && rControl.isVisible() )
rControl.invalidate();
if ( !bHadControl && rControl.is() && rControl.isVisible() )
rControl.invalidate();
......
......@@ -456,11 +456,10 @@ bool SdrEditView::IsDismantlePossible(bool bMakeLines) const
void SdrEditView::CheckPossibilities()
{
if (mbSomeObjChgdFlag)
m_bPossibilitiesDirty=true;
if (mbSomeObjChgdFlag)
{
m_bPossibilitiesDirty = true;
// This call IS necessary to correct the MarkList, in which
// no longer to the model belonging objects still can reside.
// These ones need to be removed.
......
......@@ -1966,8 +1966,11 @@ void SdrEditView::ImpConvertTo(bool bPath, bool bLineToArea)
}
}
EndUndo();
if (bMrkChg) AdjustMarkHdl();
if (bMrkChg) MarkListHasChanged();
if (bMrkChg)
{
AdjustMarkHdl();
MarkListHasChanged();
}
}
}
......
......@@ -121,9 +121,8 @@ void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext
if (!aMatchCase)
nFlags |= TransliterationFlags::IGNORE_CASE;
if (aCTLOptions.IsCTLFontEnabled())
nFlags |= TransliterationFlags::IGNORE_DIACRITICS_CTL;
if (aCTLOptions.IsCTLFontEnabled())
nFlags |= TransliterationFlags::IGNORE_KASHIDA_CTL;
nFlags |= TransliterationFlags::IGNORE_DIACRITICS_CTL
| TransliterationFlags::IGNORE_KASHIDA_CTL;
auto aArgs( comphelper::InitPropertySequence( {
{ "SearchItem.SearchString", css::uno::makeAny( sFindText ) },
......
......@@ -859,19 +859,16 @@ bool Window::AcquireGraphics() const
}
}
// update global LRU list of wingraphics
if ( mpGraphics )
{
// update global LRU list of wingraphics
mpNextGraphics = pSVData->maGDIData.mpFirstWinGraphics;
pSVData->maGDIData.mpFirstWinGraphics = const_cast<vcl::Window*>(this);
if ( mpNextGraphics )
mpNextGraphics->mpPrevGraphics = const_cast<vcl::Window*>(this);
if ( !pSVData->maGDIData.mpLastWinGraphics )
pSVData->maGDIData.mpLastWinGraphics = const_cast<vcl::Window*>(this);
}
if ( mpGraphics )
{
mpGraphics->SetXORMode( (RasterOp::Invert == meRasterOp) || (RasterOp::Xor == meRasterOp), RasterOp::Invert == meRasterOp );
mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment