Bugzilla – Attachment 68794 Details for
Bug 51023
EDITING: Drag-and-drop slide always moves slide to first position, leading to data corruption and sometimes CRASH
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
git diff -u libreoffice-3.5.3.2..libreoffice-3.5.4.1 -- sd
sd-dnd.diff (text/plain), 4.30 KB, created by
Michael Meeks
on 2012-10-19 11:00:54 UTC
(
hide
)
Description:
git diff -u libreoffice-3.5.3.2..libreoffice-3.5.4.1 -- sd
Filename:
MIME Type:
Creator:
Michael Meeks
Created:
2012-10-19 11:00:54 UTC
Size:
4.30 KB
patch
obsolete
>diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx >index 8788db3..605749c 100644 >--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx >+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx >@@ -261,10 +261,11 @@ public: > MultiSelectionModeHandler ( > SlideSorter& rSlideSorter, > SelectionFunction& rSelectionFunction, >- const Point& rMouseModelPosition, >- const sal_uInt32 nEventCode); >+ const Point& rMouseModelPosition); > virtual ~MultiSelectionModeHandler (void); > >+ void Initialize(const sal_uInt32 nEventCode); >+ > virtual SelectionFunction::Mode GetMode (void) const; > virtual void Abort (void); > virtual void ProcessEvent (SelectionFunction::EventDescriptor& rDescriptor); >@@ -310,11 +311,10 @@ class DragAndDropModeHandler : public SelectionFunction::ModeHandler > public: > DragAndDropModeHandler ( > SlideSorter& rSlideSorter, >- SelectionFunction& rSelectionFunction, >- const Point& rMousePosition, >- ::Window* pWindow); >+ SelectionFunction& rSelectionFunction); > virtual ~DragAndDropModeHandler (void); > >+ void Initialize(const Point& rMousePosition, ::Window* pWindow); > virtual SelectionFunction::Mode GetMode (void) const; > virtual void Abort (void); > >@@ -827,8 +827,13 @@ void SelectionFunction::SwitchToDragAndDropMode (const Point aMousePosition) > { > if (mpModeHandler->GetMode() != DragAndDropMode) > { >- SwitchMode(::boost::shared_ptr<ModeHandler>( >- new DragAndDropModeHandler(mrSlideSorter, *this, aMousePosition, mpWindow))); >+ ::boost::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(aMousePosition, mpWindow); > } > } > >@@ -840,8 +845,14 @@ void SelectionFunction::SwitchToMultiSelectionMode ( > const sal_uInt32 nEventCode) > { > if (mpModeHandler->GetMode() != MultiSelectionMode) >- SwitchMode(::boost::shared_ptr<ModeHandler>( >- new MultiSelectionModeHandler(mrSlideSorter, *this, aMousePosition, nEventCode))); >+ { >+ ::boost::shared_ptr<MultiSelectionModeHandler> handler( >+ new MultiSelectionModeHandler(mrSlideSorter, *this, aMousePosition)); >+ 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); >+ } > } > > >@@ -1558,8 +1569,7 @@ void NormalModeHandler::ResetButtonDownLocation (void) > MultiSelectionModeHandler::MultiSelectionModeHandler ( > SlideSorter& rSlideSorter, > SelectionFunction& rSelectionFunction, >- const Point& rMouseModelPosition, >- const sal_uInt32 nEventCode) >+ const Point& rMouseModelPosition) > : ModeHandler(rSlideSorter, rSelectionFunction, false), > meSelectionMode(SM_Normal), > maSecondCorner(rMouseModelPosition), >@@ -1568,6 +1578,11 @@ MultiSelectionModeHandler::MultiSelectionModeHandler ( > mnSecondIndex(-1), > maButtonBarLock(rSlideSorter) > { >+} >+ >+ >+void MultiSelectionModeHandler::Initialize(const sal_uInt32 nEventCode) >+{ > const Pointer aSelectionPointer (POINTER_TEXT); > mrSlideSorter.GetContentWindow()->SetPointer(aSelectionPointer); > SetSelectionModeFromModifier(nEventCode); >@@ -1807,11 +1822,13 @@ void MultiSelectionModeHandler::UpdateSelection (void) > > DragAndDropModeHandler::DragAndDropModeHandler ( > SlideSorter& rSlideSorter, >- SelectionFunction& rSelectionFunction, >- const Point& rMousePosition, >- ::Window* pWindow) >+ SelectionFunction& rSelectionFunction) > : ModeHandler(rSlideSorter, rSelectionFunction, false) > { >+} >+ >+void DragAndDropModeHandler::Initialize(const Point& rMousePosition, ::Window* pWindow) >+{ > SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag; > if (pDragTransferable==NULL && mrSlideSorter.GetViewShell() != NULL) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 51023
:
63084
|
63176
|
63289
|
63290
|
63300
|
64604
| 68794