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 INCLUDED_DBACCESS_SOURCE_UI_INC_DBEXCHANGE_HXX
20 : #define INCLUDED_DBACCESS_SOURCE_UI_INC_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 com { namespace sun { namespace star { namespace uno {
35 : class XComponentContext;
36 : } } } }
37 :
38 : namespace dbaui
39 : {
40 :
41 : class ORTFImportExport;
42 : class OHTMLImportExport;
43 :
44 0 : class ODataClipboard : public ::svx::ODataAccessObjectTransferable
45 :
46 : {
47 : ::rtl::Reference< OHTMLImportExport > m_pHtml;
48 : ::rtl::Reference< ORTFImportExport > m_pRtf;
49 :
50 : public:
51 : ODataClipboard(
52 : const OUString& _rDatasource,
53 : const sal_Int32 _nCommandType,
54 : const OUString& _rCommand,
55 : const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
56 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
57 : const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
58 : );
59 :
60 : ODataClipboard(
61 : const OUString& _rDatasource,
62 : const sal_Int32 _nCommandType,
63 : const OUString& _rCommand,
64 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
65 : const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
66 : );
67 :
68 : ODataClipboard(
69 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_rAliveForm,
70 : const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& i_rSelectedRows,
71 : const sal_Bool i_bBookmarkSelection,
72 : const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rORB
73 : );
74 :
75 : // XEventListener
76 : virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
77 :
78 : protected:
79 : virtual void AddSupportedFormats() SAL_OVERRIDE;
80 : virtual bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
81 : virtual void ObjectReleased() SAL_OVERRIDE;
82 : virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE;
83 : };
84 : }
85 :
86 : #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_DBEXCHANGE_HXX
87 :
88 :
89 :
90 :
91 :
92 :
93 :
94 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|