Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : :
20 : : #ifndef _REPORT_RPTUICLIP_HXX
21 : : #define _REPORT_RPTUICLIP_HXX
22 : :
23 : : #include <svtools/transfer.hxx>
24 : : #include <com/sun/star/beans/NamedValue.hpp>
25 : :
26 : : namespace rptui
27 : : {
28 : : //============================================================================
29 : : // OReportExchange
30 : : //============================================================================
31 : : /** \class OReportExchange
32 : : * \brief defines a clipboard fromat for copying selection elements.
33 : : * \ingroup reportdesign_source_ui_report
34 : : *
35 : : *
36 : : */
37 : 0 : class OReportExchange : public TransferableHelper
38 : : {
39 : : public:
40 : : typedef ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > TSectionElements;
41 : :
42 : : /** Constructs a new exchange object with section elements
43 : : *
44 : : * \param _rCopyElements the elements to copy. Each section is one entry. The value must be a sequence of elements.
45 : : * \return
46 : : */
47 : : OReportExchange( const TSectionElements& _rCopyElements);
48 : :
49 : : /** checks whether or not a descriptor can be extracted from the data flavor vector given
50 : : *
51 : : * \param _rFlavors
52 : : available flavors
53 : : * \return
54 : : */
55 : : static sal_Bool canExtract(const DataFlavorExVector& _rFlavors);
56 : :
57 : : /** extract the section elements
58 : : *
59 : : * \param _rData the clipboard data
60 : : * \return the copied elements
61 : : */
62 : : static TSectionElements extractCopies(const TransferableDataHelper& _rData);
63 : :
64 : : /** returns the format id.
65 : : *
66 : : * \return the registered format id
67 : : */
68 : : static sal_uInt32 getDescriptorFormatId();
69 : :
70 : : protected:
71 : : // TransferableHelper overridables
72 : : virtual void AddSupportedFormats();
73 : : virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
74 : : private:
75 : : TSectionElements m_aCopyElements;
76 : : };
77 : : }
78 : : #endif // _REPORT_RPTUICLIP_HXX
79 : :
80 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|