1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
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
39 OJoinExchangeData m_jxdSourceDescription
;
40 IDragTransferableListener
* m_pDragListener
;
42 virtual ~OJoinExchObj() override
;
45 OJoinExchObj(const OJoinExchangeData
& jxdSource
,bool _bFirstEntry
=false);
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
;
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
);
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();
69 using TransferableHelper::StartDrag
;
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */