merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / ui / inc / JoinExchange.hxx
blob4e725a1fe1c01b389ec2e3ac41b795cdd3a37bca
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: JoinExchange.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef DBAUI_JOINEXCHANGE_HXX
31 #define DBAUI_JOINEXCHANGE_HXX
33 #ifndef DBAUI_DBEXCHANGE_HXX
34 #include "dbexchange.hxx"
35 #endif
36 #ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
37 #include "TableWindowListBox.hxx"
38 #endif
40 #ifndef _TRANSFER_HXX
41 #include <svtools/transfer.hxx>
42 #endif
43 #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
44 #include <com/sun/star/lang/XUnoTunnel.hpp>
45 #endif
46 #ifndef _CPPUHELPER_IMPLBASE1_HXX_
47 #include <cppuhelper/implbase1.hxx>
48 #endif
50 namespace dbaui
52 //==================================================================
53 // OJoinExchObj :
54 // Zusaetzliche Daten fuer das Erzeugen von Joins in der JoinShell
55 //==================================================================
57 typedef ::cppu::ImplHelper1< ::com::sun::star::lang::XUnoTunnel > OJoinExchObj_Base;
58 class OJoinExchObj
59 :public TransferableHelper
60 ,public OJoinExchObj_Base
62 static String m_sJoinFormat;
63 sal_Bool m_bFirstEntry;
65 protected:
66 OJoinExchangeData m_jxdSourceDescription;
67 IDragTransferableListener* m_pDragListener;
69 virtual ~OJoinExchObj();
70 public:
71 OJoinExchObj(const OJoinExchangeData& jxdSource,sal_Bool _bFirstEntry=sal_False);
74 // XInterface
75 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
76 virtual void SAL_CALL acquire( ) throw();
77 virtual void SAL_CALL release( ) throw();
79 // XUnoTunnel
80 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
82 void StartDrag( Window* pWindow, sal_Int8 nDragSourceActions, IDragTransferableListener* _pListener );
84 static OJoinExchangeData GetSourceDescription(const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& _rxObject);
85 static sal_Bool isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID=SOT_FORMATSTR_ID_SBA_JOIN);
87 protected:
88 virtual void AddSupportedFormats();
89 virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
90 virtual void DragFinished( sal_Int8 nDropAction );
92 static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
94 private:
95 using TransferableHelper::StartDrag;
98 #endif // DBAUI_JOINEXCHANGE_HXX