summaryrefslogtreecommitdiff
path: root/sd
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 /sd
parent3ffb0373695a7b3a7f8cab8f2b8bf259c4300a7e (diff)
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>
Diffstat (limited to 'sd')
-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
3 files changed, 27 insertions, 31 deletions
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 );
}