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 : #ifndef DBAUI_DBEXCHANGE_HXX
20 : #define DBAUI_DBEXCHANGE_HXX
21 :
22 : #include <com/sun/star/beans/PropertyValue.hpp>
23 : #include <com/sun/star/util/XNumberFormatter.hpp>
24 : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
25 : #include <com/sun/star/lang/XEventListener.hpp>
26 : #include <com/sun/star/sdbc/XConnection.hpp>
27 : #include <cppuhelper/implbase1.hxx>
28 : #include <svx/dbaexchange.hxx>
29 : #include <comphelper/uno3.hxx>
30 : #include <vector>
31 :
32 : #include <rtl/ref.hxx>
33 :
34 : namespace dbaui
35 : {
36 :
37 : class ORTFImportExport;
38 : class OHTMLImportExport;
39 :
40 0 : class ODataClipboard : public ::svx::ODataAccessObjectTransferable
41 :
42 : {
43 : ::rtl::Reference< OHTMLImportExport > m_pHtml;
44 : ::rtl::Reference< ORTFImportExport > m_pRtf;
45 :
46 : public:
47 : ODataClipboard(
48 : const ::rtl::OUString& _rDatasource,
49 : const sal_Int32 _nCommandType,
50 : const ::rtl::OUString& _rCommand,
51 : const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
52 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
53 : const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
54 : );
55 :
56 : ODataClipboard(
57 : const ::rtl::OUString& _rDatasource,
58 : const sal_Int32 _nCommandType,
59 : const ::rtl::OUString& _rCommand,
60 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
61 : const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
62 : );
63 :
64 : ODataClipboard(
65 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_rAliveForm,
66 : const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& i_rSelectedRows,
67 : const sal_Bool i_bBookmarkSelection,
68 : const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_rORB
69 : );
70 :
71 : // XEventListener
72 : virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
73 :
74 : protected:
75 : virtual void AddSupportedFormats();
76 : virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
77 : virtual void ObjectReleased();
78 : virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
79 : };
80 : }
81 :
82 : #endif // DBAUI_DBEXCHANGE_HXX
83 :
84 :
85 :
86 :
87 :
88 :
89 :
90 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|