xref: /AOO41X/main/dbaccess/source/ui/inc/dbexchange.hxx (revision 2e2212a7c22e96cf6f6fab0dd042c34a45a64bd6)
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 DBAUI_DBEXCHANGE_HXX
24 #define DBAUI_DBEXCHANGE_HXX
25 
26 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
27 #include <com/sun/star/beans/PropertyValue.hpp>
28 #endif
29 #ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
30 #include <com/sun/star/util/XNumberFormatter.hpp>
31 #endif
32 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
33 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
34 #endif
35 #ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_
36 #include <com/sun/star/lang/XEventListener.hpp>
37 #endif
38 #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
39 #include <com/sun/star/sdbc/XConnection.hpp>
40 #endif
41 #ifndef _CPPUHELPER_IMPLBASE1_HXX_
42 #include <cppuhelper/implbase1.hxx>
43 #endif
44 #ifndef _SVX_DBAEXCHANGE_HXX_
45 #include <svx/dbaexchange.hxx>
46 #endif
47 #ifndef _COMPHELPER_UNO3_HXX_
48 #include <comphelper/uno3.hxx>
49 #endif
50 #include <vector>
51 
52 #include <rtl/ref.hxx>
53 
54 namespace dbaui
55 {
56 
57     class ORTFImportExport;
58     class OHTMLImportExport;
59 
60     class ODataClipboard : public ::svx::ODataAccessObjectTransferable
61 
62     {
63         ::rtl::Reference< OHTMLImportExport >   m_pHtml;
64         ::rtl::Reference< ORTFImportExport >    m_pRtf;
65 
66     public:
67         ODataClipboard(
68             const ::rtl::OUString&  _rDatasource,
69             const sal_Int32         _nCommandType,
70             const ::rtl::OUString&  _rCommand,
71             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
72             const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
73             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
74         );
75 
76         ODataClipboard(
77             const ::rtl::OUString&  _rDatasource,
78             const sal_Int32         _nCommandType,
79             const ::rtl::OUString&  _rCommand,
80             const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
81             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
82         );
83 
84         ODataClipboard(
85             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_rAliveForm,
86             const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& i_rSelectedRows,
87             const sal_Bool i_bBookmarkSelection,
88             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_rORB
89         );
90 
91         // XEventListener
92         virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
93 
94     protected:
95         virtual void        AddSupportedFormats();
96         virtual sal_Bool    GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
97         virtual void        ObjectReleased();
98         virtual sal_Bool    WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
99     };
100 }
101 
102 #endif //  DBAUI_DBEXCHANGE_HXX
103 
104 
105 
106 
107 
108 
109 
110