LibreOffice Module sd (master) 1
|
Handle clipboard related tasks for the draw view. More...
#include <ViewClipboard.hxx>
Public Member Functions | |
ViewClipboard (::sd::View &rView) | |
virtual | ~ViewClipboard () |
void | HandlePageDrop (const SdTransferable &rTransferable) |
Handle the drop of a drag-and-drop action where the transferable contains a set of pages. More... | |
Protected Member Functions | |
void | AssignMasterPage (const SdTransferable &rTransferable, SdPage const *pMasterPage) |
Assign the (first) master page of the given transferable to the (...) slide. More... | |
virtual sal_uInt16 | DetermineInsertPosition () |
Return an index of a page after which the pages of the transferable are to be inserted into the target document. More... | |
sal_uInt16 | InsertSlides (const SdTransferable &rTransferable, sal_uInt16 nInsertPosition) |
Insert the slides in the given transferable behind the last selected slide or, when the selection is empty, behind the last slide. More... | |
Static Protected Member Functions | |
static SdPage * | GetFirstMasterPage (const SdTransferable &rTransferable) |
Return the first master page of the given transferable. More... | |
Private Attributes | |
::sd::View & | mrView |
Handle clipboard related tasks for the draw view.
Definition at line 33 of file ViewClipboard.hxx.
sd::ViewClipboard::ViewClipboard | ( | ::sd::View & | rView | ) |
Definition at line 39 of file ViewClipboard.cxx.
|
virtual |
Definition at line 44 of file ViewClipboard.cxx.
|
protected |
Assign the (first) master page of the given transferable to the (...) slide.
Definition at line 114 of file ViewClipboard.cxx.
References sd::DrawDocShell::GetDoc(), sd::View::GetDoc(), SdPage::GetLayoutName(), SdrPageView::GetPage(), SdTransferable::GetPageDocShell(), SdrPage::GetPageNum(), SdrPaintView::GetSdrPageView(), SdTransferable::HasPageBookmarks(), mrView, nLength, SD_LT_SEPARATOR, SdDrawDocument::SetMasterPage(), and STR_LAYOUT_OUTLINE.
Referenced by HandlePageDrop().
|
protectedvirtual |
Return an index of a page after which the pages of the transferable are to be inserted into the target document.
Reimplemented in sd::slidesorter::controller::Clipboard.
Definition at line 160 of file ViewClipboard.cxx.
References sd::View::GetDoc(), SdDrawDocument::GetSdPage(), SdDrawDocument::GetSdPageCount(), SdPage::IsSelected(), mrView, and Standard.
Referenced by HandlePageDrop().
|
staticprotected |
Return the first master page of the given transferable.
When the bookmark list of the transferable contains at least one non-master page then NULL is returned.
Definition at line 62 of file ViewClipboard.cxx.
References sd::DrawDocShell::GetDoc(), SdrModel::GetMasterPage(), SdTransferable::GetPageBookmarks(), SdDrawDocument::GetPageByName(), SdTransferable::GetPageDocShell(), SdTransferable::HasPageBookmarks(), SDRPAGE_NOTFOUND, and sName.
Referenced by HandlePageDrop().
void sd::ViewClipboard::HandlePageDrop | ( | const SdTransferable & | rTransferable | ) |
Handle the drop of a drag-and-drop action where the transferable contains a set of pages.
Definition at line 48 of file ViewClipboard.cxx.
References AssignMasterPage(), DetermineInsertPosition(), sd::DrawViewShell::GetEditMode(), GetFirstMasterPage(), sd::View::GetViewShell(), InsertSlides(), mrView, and Page.
Referenced by sd::slidesorter::controller::Clipboard::ExecuteDrop().
|
protected |
Insert the slides in the given transferable behind the last selected slide or, when the selection is empty, behind the last slide.
rTransferable | This transferable defines which pages to insert. |
nInsertPosition | The pages of the transferable will be inserted behind the page with this index. |
Definition at line 179 of file ViewClipboard.cxx.
References vcl::Window::EnterWait(), tools::SvRef< typename T >::get(), sd::ViewShell::GetActiveWindow(), sd::DrawDocShell::GetDoc(), sd::View::GetDoc(), SdTransferable::GetDocShell(), SdTransferable::GetPageBookmarks(), SdTransferable::GetPageDocShell(), SdDrawDocument::GetSdPageCount(), sd::View::GetViewShell(), SdTransferable::HasPageBookmarks(), SdTransferable::HasSourceDoc(), SdDrawDocument::InsertBookmarkAsPage(), vcl::Window::IsWait(), vcl::Window::LeaveWait(), mrView, SD_MOD, and Standard.
Referenced by HandlePageDrop().
|
private |
Definition at line 35 of file ViewClipboard.hxx.
Referenced by AssignMasterPage(), DetermineInsertPosition(), HandlePageDrop(), and InsertSlides().