bump product version to 4.1.6.2
[LibreOffice.git] / sd / source / ui / inc / ViewClipboard.hxx
blob505bddfdb4fc5a1e0af6585c1597dd1082e8d007
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SD_VIEW_CLIPBOARD_HXX
21 #define SD_VIEW_CLIPBOARD_HXX
23 #include <tools/solar.h>
25 class SdPage;
26 class SdTransferable;
28 namespace sd {
30 class View;
33 /** Handle clipboard related tasks for the draw view.
35 class ViewClipboard
37 public:
38 ViewClipboard (::sd::View& rView);
39 virtual ~ViewClipboard (void);
41 /** Handle the drop of a drag-and-drop action where the transferable
42 contains a set of pages.
44 virtual void HandlePageDrop (const SdTransferable& rTransferable);
46 protected:
47 ::sd::View& mrView;
49 /** Return the first master page of the given transferable. When the
50 bookmark list of the transferable contains at least one non-master
51 page then NULL is returned.
53 SdPage* GetFirstMasterPage (const SdTransferable& rTransferable);
55 /** Assign the (first) master page of the given transferable to the
56 (...) slide.
58 virtual void AssignMasterPage (
59 const SdTransferable& rTransferable,
60 SdPage* pMasterPage);
62 /** Return an index of a page after which the pages of the transferable
63 are to be inserted into the target document.
65 virtual sal_uInt16 DetermineInsertPosition (
66 const SdTransferable& rTransferable);
68 /** Insert the slides in the given transferable behind the last selected
69 slide or, when the selection is empty, behind the last slide.
70 @param rTransferable
71 This transferable defines which pages to insert.
72 @param nInsertPosition
73 The pages of the transferable will be inserted behind the page
74 with this index.
75 @return
76 Returns the number of inserted slides.
78 virtual sal_uInt16 InsertSlides (
79 const SdTransferable& rTransferable,
80 sal_uInt16 nInsertPosition);
83 } // end of namespace ::sd
85 #endif
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */