diff options
Diffstat (limited to 'sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx')
-rw-r--r-- | sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx index 554c2fb1911f..10b3167af563 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx @@ -132,6 +132,21 @@ public: */ void RemoveSelectionChangeListener (const Link& rListener); + /** Return the position where to insert pasted slides based on the + current selection. When there is a selection then the insert + position is behind the last slide. When the selection is empty then + most of the time the insert position is at the end of the document. + There is an exception right after the display of a popup-menu. The + position of the associated insertion marker is stored here and reset + the next time the selection changes. + */ + sal_Int32 GetInsertionPosition (void) const; + + /** Store an insertion position temporarily. It is reset when the + selection changes the next time. + */ + void SetInsertionPosition (const sal_Int32 nInsertionPosition); + private: SlideSorter& mrSlideSorter; SlideSorterController& mrController; @@ -149,6 +164,12 @@ private: */ bool mbIsMakeSelectionVisiblePending; + /** The insertion position is only temporarily valid. Negative values + indicate that the explicit insertion position is not valid. In this + case GetInsertionPosition() calculates it from the current selection. + */ + sal_Int32 mnInsertionPosition; + /** Delete the given list of normal pages. This method is a helper function for DeleteSelectedPages(). @param rSelectedNormalPages @@ -187,7 +208,6 @@ private: const model::SharedPageDescriptor& rpFirst, const model::SharedPageDescriptor& rpLast, const SelectionHint eSelectionHint); - }; } } } // end of namespace ::sd::slidesorter::controller |