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 _SVX_XMLEXCHG_HXX_
21 : #define _SVX_XMLEXCHG_HXX_
22 :
23 : #include <svtools/transfer.hxx>
24 : #include "svx/svxdllapi.h"
25 :
26 : namespace com {
27 : namespace sun {
28 : namespace star {
29 : namespace beans {
30 : class SAL_NO_VTABLE XPropertySet;
31 : }
32 : }
33 : }
34 : }
35 :
36 : //........................................................................
37 : namespace svx
38 : {
39 : //........................................................................
40 :
41 :
42 : //====================================================================
43 : //= OXFormsDescriptor
44 : //====================================================================
45 :
46 0 : struct SVX_DLLPUBLIC OXFormsDescriptor {
47 :
48 : String szName;
49 : String szServiceName;
50 : ::com::sun::star::uno::Reference
51 : < ::com::sun::star::beans::XPropertySet >
52 : xPropSet;
53 :
54 0 : inline OXFormsDescriptor( void ) {}
55 0 : inline OXFormsDescriptor( const OXFormsDescriptor &rhs ) { *this=rhs; }
56 0 : inline OXFormsDescriptor &operator = ( const OXFormsDescriptor &rhs ) {
57 0 : szName = rhs.szName;
58 0 : szServiceName = rhs.szServiceName;
59 0 : xPropSet = rhs.xPropSet;
60 0 : return (*this);
61 : }
62 : };
63 :
64 : //====================================================================
65 : //= OXFormsTransferable
66 : //====================================================================
67 0 : class SVX_DLLPUBLIC OXFormsTransferable : public TransferableHelper {
68 :
69 : protected:
70 :
71 : // TransferableHelper overridables
72 : virtual void AddSupportedFormats();
73 : virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
74 :
75 : OXFormsDescriptor m_aDescriptor;
76 :
77 : public:
78 :
79 : /** construct the transferable
80 : */
81 : OXFormsTransferable( const OXFormsDescriptor &rhs );
82 :
83 : /** extracts an xform descriptor from the transferable given
84 : */
85 : static const OXFormsDescriptor &extractDescriptor( const TransferableDataHelper& _rData );
86 : };
87 :
88 :
89 : //........................................................................
90 : } // namespace svx
91 : //........................................................................
92 :
93 : #endif // _SVX_XMLEXCHG_HXX_
94 :
95 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|