summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-07 09:05:07 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-10 14:09:17 +0100
commit21795eb3d3eca8e3c2eadc1e80dfc2d032a3c861 (patch)
tree5b47d41fd09c08ef9f9f18930047347205010c39 /sd
parent0408b72ae93d7cce9f64c4779f19d645d694df95 (diff)
tdf#120703 PVS: drop dead code.
V547 Expression 'mpTargetSlideSorter != nullptr' is always false. The code wasn't used since commit 4b83a7fe5714eb9a1d208502a18e33da35772ece (initially, mpTargetSlideSorter pointer was compared to a pSlideSorter parameter, which was always nullptr since commit above; then commit f946e905c6c6bb041ae580b14b711c6964af97bd removed the const parameter). Change-Id: I70047ae3e7ef39419be0012e375856d8a50d5793 Reviewed-on: https://gerrit.libreoffice.org/63229 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx15
-rw-r--r--sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx10
3 files changed, 7 insertions, 20 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
index 9990d9182746..770fb1ba6cf5 100644
--- a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
@@ -66,7 +66,7 @@ DragAndDropContext::DragAndDropContext (SlideSorter& rSlideSorter)
DragAndDropContext::~DragAndDropContext() COVERITY_NOEXCEPT_FALSE
{
- SetTargetSlideSorter (Point(0,0));
+ SetTargetSlideSorter();
}
void DragAndDropContext::Dispose()
@@ -111,8 +111,7 @@ void DragAndDropContext::UpdatePosition (
}
}
-void DragAndDropContext::SetTargetSlideSorter(
- const Point& rMousePosition)
+void DragAndDropContext::SetTargetSlideSorter()
{
if (mpTargetSlideSorter != nullptr)
{
@@ -122,16 +121,6 @@ void DragAndDropContext::SetTargetSlideSorter(
}
mpTargetSlideSorter = nullptr;
-
- if (mpTargetSlideSorter != nullptr)
- {
- mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->Start(
- false/*bIsOverSourceView*/);
- mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->UpdatePosition(
- rMousePosition,
- InsertionIndicatorHandler::UnknownMode);
-
- }
}
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
index 1b36791d2ff5..3a2ed06f9fb4 100644
--- a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
@@ -60,7 +60,7 @@ public:
const InsertionIndicatorHandler::Mode eMode,
const bool bAllowAutoScroll);
- void SetTargetSlideSorter(const Point& rMousePosition);
+ void SetTargetSlideSorter();
private:
SlideSorter* mpTargetSlideSorter;
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 002c924916fe..4a3b066665b1 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -1162,11 +1162,9 @@ bool NormalModeHandler::ProcessMotionEvent (
{
if (maButtonDownLocation)
{
- const sal_Int32 nDistance (maButtonDownLocation
- ? ::std::max (
- std::abs(maButtonDownLocation->X() - rDescriptor.maMousePosition.X()),
- std::abs(maButtonDownLocation->Y() - rDescriptor.maMousePosition.Y()))
- : 0);
+ const sal_Int32 nDistance(std::max(
+ std::abs(maButtonDownLocation->X() - rDescriptor.maMousePosition.X()),
+ std::abs(maButtonDownLocation->Y() - rDescriptor.maMousePosition.Y())));
if (nDistance > 3)
StartDrag(rDescriptor.maMousePosition);
}
@@ -1499,7 +1497,7 @@ DragAndDropModeHandler::~DragAndDropModeHandler()
if (mpDragAndDropContext)
{
// Disconnect the substitution handler from this selection function.
- mpDragAndDropContext->SetTargetSlideSorter(Point(0,0));
+ mpDragAndDropContext->SetTargetSlideSorter();
mpDragAndDropContext.reset();
}
mrSlideSorter.GetController().GetInsertionIndicatorHandler()->End(Animator::AM_Animated);