xref: /AOO42X/main/svx/inc/svx/xmlexchg.hxx (revision 9bce9b0d387299c68bd81d539e1478357a103de5)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SVX_XMLEXCHG_HXX_
25 #define _SVX_XMLEXCHG_HXX_
26 
27 #include <svtools/transfer.hxx>
28 #include "svx/svxdllapi.h"
29 
30 namespace com {
31     namespace sun {
32         namespace star {
33             namespace beans {
34                 class SAL_NO_VTABLE XPropertySet;
35             }
36         }
37     }
38 }
39 
40 //........................................................................
41 namespace svx
42 {
43 //........................................................................
44 
45 
46     //====================================================================
47     //= OXFormsDescriptor
48     //====================================================================
49 
50     struct SVX_DLLPUBLIC OXFormsDescriptor {
51 
52         String szName;
53         String szServiceName;
54         ::com::sun::star::uno::Reference
55             < ::com::sun::star::beans::XPropertySet >
56                 xPropSet;
57 
OXFormsDescriptorsvx::OXFormsDescriptor58         inline OXFormsDescriptor( void ) {}
OXFormsDescriptorsvx::OXFormsDescriptor59         inline OXFormsDescriptor( const OXFormsDescriptor &rhs ) { *this=rhs; }
operator =svx::OXFormsDescriptor60         inline OXFormsDescriptor &operator = ( const OXFormsDescriptor &rhs ) {
61             szName = rhs.szName;
62             szServiceName = rhs.szServiceName;
63             xPropSet = rhs.xPropSet;
64             return (*this);
65         }
66     };
67 
68     //====================================================================
69     //= OXFormsTransferable
70     //====================================================================
71     class SVX_DLLPUBLIC OXFormsTransferable : public TransferableHelper {
72 
73         protected:
74 
75             // TransferableHelper overridables
76             virtual void        AddSupportedFormats();
77             virtual sal_Bool    GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
78 
79             static sal_uInt32   getDescriptorFormatId();
80 
81             OXFormsDescriptor m_aDescriptor;
82 
83         public:
84 
85             /** construct the transferable
86             */
87             OXFormsTransferable( const OXFormsDescriptor &rhs );
88 
89             /** extracts an xform descriptor from the transferable given
90             */
91             static const OXFormsDescriptor &extractDescriptor( const TransferableDataHelper& _rData );
92     };
93 
94 
95 //........................................................................
96 }   // namespace svx
97 //........................................................................
98 
99 #endif // _SVX_XMLEXCHG_HXX_
100