28#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
29#include <osl/diagnose.h>
33using namespace ::com::sun::star::datatransfer::dnd::DNDConstants;
39 mpInsertionIndicatorOverlay(
std::
make_shared<view::InsertionIndicatorOverlay>(rSlideSorter)),
41 mbIsInsertionTrivial(false),
44 mbIsOverSourceView(true),
104 if ((nDndAction & ACTION_MOVE) != 0)
106 else if ((nDndAction & ACTION_COPY) != 0)
113 const Point& rMouseModelPosition,
126 const Point& rMouseModelPosition,
179 const sal_Int32 nInsertionIndex,
180 const Mode eMode)
const
193 sal_Int32 nCurrentIndex = -1;
194 sal_Int32 nFirstIndex = -1;
195 sal_Int32 nLastIndex = -1;
204 const sal_Int32 nPageNumber (pDescriptor->GetPageIndex());
205 if (nCurrentIndex>=0 && nPageNumber>(nCurrentIndex+1))
208 nCurrentIndex = nPageNumber;
211 if (nFirstIndex == -1)
212 nFirstIndex = nPageNumber;
213 nLastIndex = nPageNumber;
220 return nInsertionIndex >= nFirstIndex && nInsertionIndex <= (nLastIndex+1);
231 std::shared_ptr<InsertionIndicatorHandler> pHandler)
SlideSorter & mrSlideSorter
Show previews for all the slides in a document and allow the user to insert or delete slides and modi...
model::SlideSorterModel & GetModel() const
view::SlideSorterView & GetView() const
AnimationMode
In some circumstances we have to avoid animation and jump to the final animation state immediately.
const std::shared_ptr< InsertionIndicatorHandler > mpHandler
ForceShowContext(std::shared_ptr< InsertionIndicatorHandler > pHandler)
~ForceShowContext() COVERITY_NOEXCEPT_FALSE
InsertionIndicatorHandler(SlideSorter &rSlideSorter)
sal_Int32 GetInsertionPageIndex() const
Return the insertion index that corresponds with the current graphical location of the insertion indi...
std::shared_ptr< view::InsertAnimator > const & GetInsertAnimator()
void UpdatePosition(const Point &rMouseModelPosition, const Mode eMode)
Set the position of the insertion marker to the given coordinates.
void ForceShow()
Make the insertion indicator visible (that is the show part) and keep it visible, even when the mouse...
void SetPosition(const Point &rPoint, const Mode eMode)
std::shared_ptr< view::InsertionIndicatorOverlay > mpInsertionIndicatorOverlay
bool mbIsInsertionTrivial
void End(const controller::Animator::AnimationMode eMode)
Deactivate the insertion marker.
bool IsInsertionTrivial(const sal_Int32 nInsertionIndex, const Mode eMode) const
Determine whether moving the current selection to the current position of the insertion marker would ...
void UpdateIndicatorIcon(const SdTransferable *pTransferable)
Update the indicator icon from the current transferable (from the clipboard or an active drag and dro...
std::shared_ptr< view::InsertAnimator > mpInsertAnimator
void Start(const bool bIsOverSourceView)
Activate the insertion marker at the given coordinates.
view::InsertPosition maInsertPosition
SlideSorter & mrSlideSorter
~InsertionIndicatorHandler() COVERITY_NOEXCEPT_FALSE
static Mode GetModeFromDndAction(const sal_Int8 nDndAction)
static PageEnumeration CreateSelectedPagesEnumeration(const SlideSorterModel &rModel)
The returned enumeration of slides iterates over the currently selected slides of the given model.
Public class of page enumerations that delegates its calls to an implementation object that can filte...
virtual SharedPageDescriptor GetNextElement() override
Return the next element of the enumeration.
virtual bool HasMoreElements() const override
Return <TRUE> when the enumeration has more elements, i.e.
Collect all values concerning the logical and visual properties of the insertion position that is use...
const Point & GetLocation() const
sal_Int32 GetIndex() const
Calculate the size and position of page objects displayed by a slide sorter.
InsertPosition GetInsertPosition(const Point &rModelPosition, const Size &rIndicatorSize, model::SlideSorterModel const &rModel) const
Return an object that describes the logical and visual properties of where to do an insert operation ...
view::Layouter & GetLayouter()
HandlerSharedPtrT mpHandler
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
std::shared_ptr< T > make_shared(Args &&... args)
std::shared_ptr< PageDescriptor > SharedPageDescriptor