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 #ifndef CHART2_CHARTTRANSFERABLE_HXX
24 #define CHART2_CHARTTRANSFERABLE_HXX
25 
26 #include <svtools/transfer.hxx>
27 
28 namespace com { namespace sun { namespace star {
29 namespace graphic {
30     class XGraphic;
31 }
32 }}}
33 
34 class SdrModel;
35 class SdrObject;
36 
37 namespace chart
38 {
39 
40 class ChartTransferable : public TransferableHelper
41 {
42 public:
43     explicit ChartTransferable( SdrModel* pDrawModel, SdrObject* pSelectedObj, bool bDrawing = false );
44     virtual ~ChartTransferable();
45 
46 protected:
47 
48     // implementation of TransferableHelper methods
49     virtual void        AddSupportedFormats();
50     virtual sal_Bool    GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
51     virtual sal_Bool    WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
52                                         const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
53 
54 private:
55     ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > m_xMetaFileGraphic;
56     SdrModel* m_pMarkedObjModel;
57     bool m_bDrawing;
58 };
59 
60 } //  namespace chart
61 
62 // CHART2_CHARTTRANSFERABLE_HXX
63 #endif
64