update dev300-m58
[ooovba.git] / sd / source / ui / inc / ViewClipboard.hxx
blob497045a2067830328c3f083ddda84a0dea878d1a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ViewClipboard.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SD_VIEW_CLIPBOARD_HXX
32 #define SD_VIEW_CLIPBOARD_HXX
34 #include <tools/solar.h>
36 class SdPage;
37 class SdTransferable;
39 namespace sd {
41 class View;
44 /** Handle clipboard related tasks for the draw view.
46 class ViewClipboard
48 public:
49 ViewClipboard (::sd::View& rView);
50 virtual ~ViewClipboard (void);
52 /** Handle the drop of a drag-and-drop action where the transferable
53 contains a set of pages.
55 virtual void HandlePageDrop (const SdTransferable& rTransferable);
57 protected:
58 ::sd::View& mrView;
60 /** Return the first master page of the given transferable. When the
61 bookmark list of the transferable contains at least one non-master
62 page then NULL is returned.
64 SdPage* GetFirstMasterPage (const SdTransferable& rTransferable);
66 /** Assign the (first) master page of the given transferable to the
67 (...) slide.
69 virtual void AssignMasterPage (
70 const SdTransferable& rTransferable,
71 SdPage* pMasterPage);
73 /** Return an index of a page after which the pages of the transferable
74 are to be inserted into the target document.
76 virtual USHORT DetermineInsertPosition (
77 const SdTransferable& rTransferable);
79 /** Insert the slides in the given transferable behind the last selected
80 slide or, when the selection is empty, behind the last slide.
81 @param rTransferable
82 This transferable defines which pages to insert.
83 @param nInsertPosition
84 The pages of the transferable will be inserted behind the page
85 with this index.
86 @return
87 Returns the number of inserted slides.
89 virtual USHORT InsertSlides (
90 const SdTransferable& rTransferable,
91 USHORT nInsertPosition);
94 } // end of namespace ::sd
96 #endif