build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / dbaccess / source / ui / inc / JoinExchange.hxx
blob8e16380d495479d3889bf48f028553a4c91f65ad
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_JOINEXCHANGE_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_JOINEXCHANGE_HXX
22 #include "dbexchange.hxx"
23 #include "TableWindowListBox.hxx"
25 #include <svtools/transfer.hxx>
26 #include <com/sun/star/lang/XUnoTunnel.hpp>
27 #include <cppuhelper/implbase1.hxx>
29 namespace dbaui
31 // OJoinExchObj: Additional data to create Joins in the JoinShell
33 typedef ::cppu::ImplHelper1< css::lang::XUnoTunnel > OJoinExchObj_Base;
34 class OJoinExchObj : public TransferableHelper, public OJoinExchObj_Base
36 bool m_bFirstEntry;
38 protected:
39 OJoinExchangeData m_jxdSourceDescription;
40 IDragTransferableListener* m_pDragListener;
42 virtual ~OJoinExchObj() override;
44 public:
45 OJoinExchObj(const OJoinExchangeData& jxdSource,bool _bFirstEntry=false);
48 // XInterface
49 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw(css::uno::RuntimeException, std::exception) override;
50 virtual void SAL_CALL acquire( ) throw() override;
51 virtual void SAL_CALL release( ) throw() override;
53 // XUnoTunnel
54 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(css::uno::RuntimeException, std::exception) override;
56 void StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions, IDragTransferableListener* _pListener );
58 static OJoinExchangeData GetSourceDescription(const css::uno::Reference< css::datatransfer::XTransferable >& _rxObject);
59 static bool isFormatAvailable( const DataFlavorExVector& _rFormats ,SotClipboardFormatId _nSlotID=SotClipboardFormatId::SBA_JOIN);
61 protected:
62 virtual void AddSupportedFormats() override;
63 virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
64 virtual void DragFinished( sal_Int8 nDropAction ) override;
66 static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
68 private:
69 using TransferableHelper::StartDrag;
72 #endif
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */