summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-27 19:57:17 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-27 20:59:34 +0200
commitba57c3e041bb05ef49a3ea7940a4183f09775a18 (patch)
tree04a00fcec685ccf0a85b4ba90b8f116794e85839
parentResolves: tdf#124975 toggle parent input blocked only in set_modal (diff)
downloadcore-ba57c3e041bb05ef49a3ea7940a4183f09775a18.tar.gz
core-ba57c3e041bb05ef49a3ea7940a4183f09775a18.zip
tdf#120703 PVS: V581 ifs with identical conditions
V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Change-Id: I79c655a072faff0bdb2af031ed1328e684b83aac Reviewed-on: https://gerrit.libreoffice.org/71430 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--cppu/source/uno/lbmap.cxx19
-rw-r--r--cui/source/tabpages/paragrph.cxx7
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx5
-rw-r--r--sd/source/core/sdpage.cxx3
-rw-r--r--sd/source/ui/remotecontrol/Receiver.cxx51
-rw-r--r--sd/source/ui/view/presvish.cxx4
6 files changed, 40 insertions, 49 deletions
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index fc093907c591..6979c74042f9 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -603,21 +603,18 @@ void SAL_CALL uno_getMapping(
if (*ppMapping)
return;
- }
- if (! aRet.is()) // try callback chain
- {
- MutexGuard aGuard( rData.aCallbacksMutex );
- for ( const auto& rCallback : rData.aCallbacks )
+ // try callback chain
{
- (*rCallback)( ppMapping, pFrom, pTo, aAddPurpose.pData );
- if (*ppMapping)
- return;
+ MutexGuard aGuard(rData.aCallbacksMutex);
+ for (const auto& rCallback : rData.aCallbacks)
+ {
+ (*rCallback)(ppMapping, pFrom, pTo, aAddPurpose.pData);
+ if (*ppMapping)
+ return;
+ }
}
- }
- if (! aRet.is())
- {
aRet = loadExternalMapping( aFrom, aTo, aAddPurpose ); // direct try
if (! aRet.is())
aRet = getMediateMapping( aFrom, aTo, aAddPurpose ); // try via uno
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 12372d0127bf..caa7a97b33c3 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -954,27 +954,28 @@ void SvxStdParagraphTabPage::PageCreated(const SfxAllItemSet& aSet)
nWidth = pPageWidthItem->GetValue();
if (pFlagSetItem )
+ {
if (( 0x0001 & pFlagSetItem->GetValue())== 0x0001 )
EnableRelativeMode();
- if (pFlagSetItem)
if (( 0x0002 & pFlagSetItem->GetValue())== 0x0002 )
EnableRegisterMode();
- if (pFlagSetItem)
if ( ( 0x0004 & pFlagSetItem->GetValue())== 0x0004 )
EnableAutoFirstLine();
+ }
if(pLineDistItem)
EnableAbsLineDist(pLineDistItem->GetValue());
if (pFlagSetItem)
+ {
if (( 0x0008 & pFlagSetItem->GetValue()) == 0x0008 )
EnableNegativeMode();
- if (pFlagSetItem)
if (( 0x0010 & pFlagSetItem->GetValue()) == 0x0010 )
EnableContextualMode();
+ }
}
#define LASTLINEPOS_DEFAULT 0
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 43814411a25f..909376cd21be 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -154,11 +154,8 @@ void OReportSection::Paint( vcl::RenderContext& rRenderContext, const tools::Rec
// draw background self using wallpaper
OutputDevice& rTargetOutDev = pTargetPaintWindow->GetTargetOutputDevice();
rTargetOutDev.DrawWallpaper(rRect, Wallpaper(pPgView->GetApplicationDocumentColor()));
- }
- // do paint (unbuffered) and mark repaint end
- if(pPgView)
- {
+ // do paint (unbuffered) and mark repaint end
pPgView->DrawLayer(RPT_LAYER_FRONT, &rRenderContext);
pPgView->GetView().EndDrawLayers(*pTargetPaintWindow, true);
}
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index a5903269364f..e37602afcf9e 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -564,10 +564,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
if( bUndo )
{
pUndoManager->AddUndoAction(getSdrModelFromSdrPage().GetSdrUndoFactory().CreateUndoNewObject(*pSdrObj));
- }
- if( bUndo )
- {
pUndoManager->AddUndoAction( std::make_unique<UndoObjectPresentationKind>( *pSdrObj ) );
pUndoManager->AddUndoAction( std::make_unique<UndoObjectUserCall>(*pSdrObj) );
}
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index 04b50f9a3936..6a987a67e877 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -136,33 +136,32 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
const css::geometry::RealPoint2D pos(x,y);
// std::cerr << "Pointer at ("<<pos.X<<","<<pos.Y<<")" << std::endl;
- if (xSlideShow.is()) try
- {
- // std::cerr << "pointer_coordination in the is" << std::endl;
- xSlideShow->setProperty(
- beans::PropertyValue( "PointerPosition" ,
- -1,
- makeAny( pos ),
- beans::PropertyState_DIRECT_VALUE ) );
- }
- catch ( Exception& )
- {
- SAL_WARN( "sdremote", "sd::SlideShowImpl::setPointerPosition(), "
- "exception caught: " << exceptionToString( cppu::getCaughtException() ));
- }
-
- if (xSlideShow.is()) try
- {
- xSlideShow->setProperty(
- beans::PropertyValue( "PointerVisible" ,
- -1,
- makeAny( true ),
- beans::PropertyState_DIRECT_VALUE ) );
- }
- catch ( Exception& )
+ if (xSlideShow.is())
{
- SAL_WARN( "sdremote", "sd::SlideShowImpl::setPointerMode(), "
- "exception caught: " << exceptionToString( cppu::getCaughtException() ));
+ try
+ {
+ // std::cerr << "pointer_coordination in the is" << std::endl;
+ xSlideShow->setProperty(beans::PropertyValue("PointerPosition", -1, makeAny(pos),
+ beans::PropertyState_DIRECT_VALUE));
+ }
+ catch (Exception&)
+ {
+ SAL_WARN("sdremote", "sd::SlideShowImpl::setPointerPosition(), "
+ "exception caught: "
+ << exceptionToString(cppu::getCaughtException()));
+ }
+
+ try
+ {
+ xSlideShow->setProperty(beans::PropertyValue("PointerVisible", -1, makeAny(true),
+ beans::PropertyState_DIRECT_VALUE));
+ }
+ catch (Exception&)
+ {
+ SAL_WARN("sdremote", "sd::SlideShowImpl::setPointerMode(), "
+ "exception caught: "
+ << exceptionToString(cppu::getCaughtException()));
+ }
}
SAL_INFO( "sdremote", "Pointer started, we display the pointer on screen" );
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx
index 52d92c222301..e1e03875236b 100644
--- a/sd/source/ui/view/presvish.cxx
+++ b/sd/source/ui/view/presvish.cxx
@@ -127,10 +127,10 @@ void PresentationViewShell::Activate( bool bIsMDIActivate )
if( HasCurrentFunction() )
GetCurrentFunction()->Activate();
+
+ ReadFrameViewData(mpFrameView);
}
- if( bIsMDIActivate )
- ReadFrameViewData( mpFrameView );
GetDocSh()->Connect( this );
}