summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2019-02-28 14:43:14 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2019-03-04 14:40:44 +0100
commit8643f6d64d387ebdb75b79db941d8ea1f8fa2f66 (patch)
tree055f2d4b084f9411e79e417df44f97c5fe56dc25 /sd
parent14dca9a2197f1b43bf547ee47517e76e58309b93 (diff)
tdf#120774: remove 7-year-old workaround of now non-existent bug
Fix of tdf#41996 is a workaround of kde4-specific condition and has been since disabled on OS X (as tdf#51023). kde5 comes with a new implementation of DnD and slide sorter in Impress now exhibits exactly the same symptoms as on OS X in tdf#51023 Since kde4 is unsupported and remaining platforms (gtk[23], Win) never had issues with DnD in slide sorter, kill the workaround with fire (= disable it globally) Change-Id: Ib9482dd5371ce73cdb86c3e5bbc5e46af65b9905 Reviewed-on: https://gerrit.libreoffice.org/68674 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx57
1 files changed, 1 insertions, 56 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index d079aea862f3..672cee854962 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -226,17 +226,10 @@ public:
MultiSelectionModeHandler (
SlideSorter& rSlideSorter,
SelectionFunction& rSelectionFunction,
-#ifndef MACOSX
- const Point& rMouseModelPosition);
-#else
const Point& rMouseModelPosition,
const sal_uInt32 nEventCode);
-#endif
- virtual ~MultiSelectionModeHandler() override;
-#ifndef MACOSX
- void Initialize(const sal_uInt32 nEventCode);
-#endif
+ virtual ~MultiSelectionModeHandler() override;
virtual SelectionFunction::Mode GetMode() const override;
virtual void Abort() override;
@@ -282,19 +275,11 @@ class DragAndDropModeHandler : public SelectionFunction::ModeHandler
public:
DragAndDropModeHandler (
SlideSorter& rSlideSorter,
-#ifndef MACOSX
- SelectionFunction& rSelectionFunction);
-#else
SelectionFunction& rSelectionFunction,
const Point& rMousePosition,
vcl::Window* pWindow);
-#endif
virtual ~DragAndDropModeHandler() override;
-#ifndef MACOSX
- void Initialize(const Point& rMousePosition, vcl::Window* pWindow);
-#endif
-
virtual SelectionFunction::Mode GetMode() const override;
virtual void Abort() override;
@@ -686,18 +671,8 @@ void SelectionFunction::SwitchToDragAndDropMode (const Point& rMousePosition)
if (mpModeHandler->GetMode() == DragAndDropMode)
return;
-#ifndef MACOSX
- std::shared_ptr<DragAndDropModeHandler> handler(
- new DragAndDropModeHandler(mrSlideSorter, *this));
- SwitchMode(handler);
- // Delayed initialization, only after mpModeHanler is set, otherwise DND initialization
- // could already trigger DND events, which would recursively trigger this code again,
- // and without mpModeHandler set it would again try to set a new handler.
- handler->Initialize(rMousePosition, mpWindow);
-#else
SwitchMode(std::shared_ptr<ModeHandler>(
new DragAndDropModeHandler(mrSlideSorter, *this, rMousePosition, mpWindow)));
-#endif
}
void SelectionFunction::SwitchToMultiSelectionMode (
@@ -705,19 +680,8 @@ void SelectionFunction::SwitchToMultiSelectionMode (
const sal_uInt32 nEventCode)
{
if (mpModeHandler->GetMode() != MultiSelectionMode)
-#ifndef MACOSX
- {
- std::shared_ptr<MultiSelectionModeHandler> handler(
- new MultiSelectionModeHandler(mrSlideSorter, *this, rMousePosition));
- SwitchMode(handler);
- // Delayed initialization, only after mpModeHanler is set, the handle ctor
- // is non-trivial, so it could possibly recurse just like the DND handler above.
- handler->Initialize(nEventCode);
- }
-#else
SwitchMode(std::shared_ptr<ModeHandler>(
new MultiSelectionModeHandler(mrSlideSorter, *this, rMousePosition, nEventCode)));
-#endif
}
void SelectionFunction::SwitchMode (const std::shared_ptr<ModeHandler>& rpHandler)
@@ -1234,12 +1198,8 @@ void NormalModeHandler::ResetButtonDownLocation()
MultiSelectionModeHandler::MultiSelectionModeHandler (
SlideSorter& rSlideSorter,
SelectionFunction& rSelectionFunction,
-#ifndef MACOSX
- const Point& rMouseModelPosition)
-#else
const Point& rMouseModelPosition,
const sal_uInt32 nEventCode)
-#endif
: ModeHandler(rSlideSorter, rSelectionFunction, false),
meSelectionMode(SM_Normal),
maSecondCorner(rMouseModelPosition),
@@ -1248,12 +1208,7 @@ MultiSelectionModeHandler::MultiSelectionModeHandler (
mnAnchorIndex(-1),
mnSecondIndex(-1)
{
-#ifndef MACOSX
-}
-void MultiSelectionModeHandler::Initialize(const sal_uInt32 nEventCode)
-{
-#endif
mrSlideSorter.GetContentWindow()->SetPointer(PointerStyle::Text);
SetSelectionModeFromModifier(nEventCode);
}
@@ -1461,21 +1416,11 @@ void MultiSelectionModeHandler::UpdateSelection()
DragAndDropModeHandler::DragAndDropModeHandler (
SlideSorter& rSlideSorter,
-#ifndef MACOSX
- SelectionFunction& rSelectionFunction)
-#else
SelectionFunction& rSelectionFunction,
const Point& rMousePosition,
vcl::Window* pWindow)
-#endif
: ModeHandler(rSlideSorter, rSelectionFunction, false)
{
-#ifndef MACOSX
-}
-
-void DragAndDropModeHandler::Initialize(const Point& rMousePosition, vcl::Window* pWindow)
-{
-#endif
SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
if (pDragTransferable==nullptr && mrSlideSorter.GetViewShell() != nullptr)
{