Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / dbaccess / source / ui / inc / dbexchange.hxx
blobb79d9c7e38e1713865992186a6bebc7f27164de0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_DBEXCHANGE_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_DBEXCHANGE_HXX
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>
32 #include <rtl/ref.hxx>
34 namespace com { namespace sun { namespace star { namespace uno {
35 class XComponentContext;
36 } } } }
38 namespace dbaui
41 class ORTFImportExport;
42 class OHTMLImportExport;
44 class ODataClipboard : public svx::ODataAccessObjectTransferable
47 ::rtl::Reference< OHTMLImportExport > m_pHtml;
48 ::rtl::Reference< ORTFImportExport > m_pRtf;
50 public:
51 ODataClipboard(
52 const OUString& _rDatasource,
53 const sal_Int32 _nCommandType,
54 const OUString& _rCommand,
55 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
56 const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter,
57 const css::uno::Reference< css::uno::XComponentContext >& _rxORB
60 ODataClipboard(
61 const OUString& _rDatasource,
62 const sal_Int32 _nCommandType,
63 const OUString& _rCommand,
64 const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter,
65 const css::uno::Reference< css::uno::XComponentContext >& _rxORB
68 ODataClipboard(
69 const css::uno::Reference< css::beans::XPropertySet >& i_rAliveForm,
70 const css::uno::Sequence< css::uno::Any >& i_rSelectedRows,
71 const bool i_bBookmarkSelection,
72 const css::uno::Reference< css::uno::XComponentContext >& i_rORB
75 // XEventListener
76 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override;
78 protected:
79 virtual void AddSupportedFormats() override;
80 virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
81 virtual void ObjectReleased() override;
82 virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override;
86 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_DBEXCHANGE_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */