sync master with lastest vba changes
[ooovba.git] / reportdesign / source / ui / inc / dlgedclip.hxx
blob907965a7571f86465c00fae572cf5f4e995ee4a3
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: dlgedclip.hxx,v $
10 * $Revision: 1.3 $
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 _REPORT_RPTUICLIP_HXX
32 #define _REPORT_RPTUICLIP_HXX
34 #include <svtools/transfer.hxx>
35 #include <com/sun/star/beans/NamedValue.hpp>
37 namespace rptui
39 //============================================================================
40 // OReportExchange
41 //============================================================================
42 /** \class OReportExchange
43 * \brief defines a clipboard fromat for copying selection elements.
44 * \ingroup reportdesign_source_ui_report
48 class OReportExchange : public TransferableHelper
50 public:
51 typedef ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > TSectionElements;
53 /** Constructs a new exchange object with section elements
55 * \param _rCopyElements the elements to copy. Each section is one entry. The value must be a sequence of elements.
56 * \return
58 OReportExchange( const TSectionElements& _rCopyElements);
60 /** checks whether or not a descriptor can be extracted from the data flavor vector given
62 * \param _rFlavors
63 available flavors
64 * \return
66 static sal_Bool canExtract(const DataFlavorExVector& _rFlavors);
68 /** extract the section elements
70 * \param _rData the clipboard data
71 * \return the copied elements
73 static TSectionElements extractCopies(const TransferableDataHelper& _rData);
75 /** returns the format id.
77 * \return the registered format id
79 static sal_uInt32 getDescriptorFormatId();
81 protected:
82 // TransferableHelper overridables
83 virtual void AddSupportedFormats();
84 virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
85 private:
86 TSectionElements m_aCopyElements;
89 #endif // _REPORT_RPTUICLIP_HXX