1*2e2212a7SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2e2212a7SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2e2212a7SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2e2212a7SAndrew Rist * distributed with this work for additional information 6*2e2212a7SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2e2212a7SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2e2212a7SAndrew Rist * "License"); you may not use this file except in compliance 9*2e2212a7SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*2e2212a7SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*2e2212a7SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2e2212a7SAndrew Rist * software distributed under the License is distributed on an 15*2e2212a7SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2e2212a7SAndrew Rist * KIND, either express or implied. See the License for the 17*2e2212a7SAndrew Rist * specific language governing permissions and limitations 18*2e2212a7SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*2e2212a7SAndrew Rist *************************************************************/ 21*2e2212a7SAndrew Rist 22*2e2212a7SAndrew Rist 23cdf0e10cSrcweir #ifndef DBAUI_JOINEXCHANGE_HXX 24cdf0e10cSrcweir #define DBAUI_JOINEXCHANGE_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #ifndef DBAUI_DBEXCHANGE_HXX 27cdf0e10cSrcweir #include "dbexchange.hxx" 28cdf0e10cSrcweir #endif 29cdf0e10cSrcweir #ifndef DBAUI_TABLEWINDOWLISTBOX_HXX 30cdf0e10cSrcweir #include "TableWindowListBox.hxx" 31cdf0e10cSrcweir #endif 32cdf0e10cSrcweir 33cdf0e10cSrcweir #ifndef _TRANSFER_HXX 34cdf0e10cSrcweir #include <svtools/transfer.hxx> 35cdf0e10cSrcweir #endif 36cdf0e10cSrcweir #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ 37cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp> 38cdf0e10cSrcweir #endif 39cdf0e10cSrcweir #ifndef _CPPUHELPER_IMPLBASE1_HXX_ 40cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 41cdf0e10cSrcweir #endif 42cdf0e10cSrcweir 43cdf0e10cSrcweir namespace dbaui 44cdf0e10cSrcweir { 45cdf0e10cSrcweir //================================================================== 46cdf0e10cSrcweir // OJoinExchObj : 47cdf0e10cSrcweir // Zusaetzliche Daten fuer das Erzeugen von Joins in der JoinShell 48cdf0e10cSrcweir //================================================================== 49cdf0e10cSrcweir 50cdf0e10cSrcweir typedef ::cppu::ImplHelper1< ::com::sun::star::lang::XUnoTunnel > OJoinExchObj_Base; 51cdf0e10cSrcweir class OJoinExchObj 52cdf0e10cSrcweir :public TransferableHelper 53cdf0e10cSrcweir ,public OJoinExchObj_Base 54cdf0e10cSrcweir { 55cdf0e10cSrcweir static String m_sJoinFormat; 56cdf0e10cSrcweir sal_Bool m_bFirstEntry; 57cdf0e10cSrcweir 58cdf0e10cSrcweir protected: 59cdf0e10cSrcweir OJoinExchangeData m_jxdSourceDescription; 60cdf0e10cSrcweir IDragTransferableListener* m_pDragListener; 61cdf0e10cSrcweir 62cdf0e10cSrcweir virtual ~OJoinExchObj(); 63cdf0e10cSrcweir public: 64cdf0e10cSrcweir OJoinExchObj(const OJoinExchangeData& jxdSource,sal_Bool _bFirstEntry=sal_False); 65cdf0e10cSrcweir 66cdf0e10cSrcweir 67cdf0e10cSrcweir // XInterface 68cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); 69cdf0e10cSrcweir virtual void SAL_CALL acquire( ) throw(); 70cdf0e10cSrcweir virtual void SAL_CALL release( ) throw(); 71cdf0e10cSrcweir 72cdf0e10cSrcweir // XUnoTunnel 73cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException); 74cdf0e10cSrcweir 75cdf0e10cSrcweir void StartDrag( Window* pWindow, sal_Int8 nDragSourceActions, IDragTransferableListener* _pListener ); 76cdf0e10cSrcweir 77cdf0e10cSrcweir static OJoinExchangeData GetSourceDescription(const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& _rxObject); 78cdf0e10cSrcweir static sal_Bool isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID=SOT_FORMATSTR_ID_SBA_JOIN); 79cdf0e10cSrcweir 80cdf0e10cSrcweir protected: 81cdf0e10cSrcweir virtual void AddSupportedFormats(); 82cdf0e10cSrcweir virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); 83cdf0e10cSrcweir virtual void DragFinished( sal_Int8 nDropAction ); 84cdf0e10cSrcweir 85cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId(); 86cdf0e10cSrcweir 87cdf0e10cSrcweir private: 88cdf0e10cSrcweir using TransferableHelper::StartDrag; 89cdf0e10cSrcweir }; 90cdf0e10cSrcweir } 91cdf0e10cSrcweir #endif // DBAUI_JOINEXCHANGE_HXX 92cdf0e10cSrcweir 93cdf0e10cSrcweir 94