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