1*48123e16SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*48123e16SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*48123e16SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*48123e16SAndrew Rist * distributed with this work for additional information 6*48123e16SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*48123e16SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*48123e16SAndrew Rist * "License"); you may not use this file except in compliance 9*48123e16SAndrew Rist * with the License. You may obtain a copy of the License at 10*48123e16SAndrew Rist * 11*48123e16SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*48123e16SAndrew Rist * 13*48123e16SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*48123e16SAndrew Rist * software distributed under the License is distributed on an 15*48123e16SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*48123e16SAndrew Rist * KIND, either express or implied. See the License for the 17*48123e16SAndrew Rist * specific language governing permissions and limitations 18*48123e16SAndrew Rist * under the License. 19*48123e16SAndrew Rist * 20*48123e16SAndrew Rist *************************************************************/ 21*48123e16SAndrew Rist 22*48123e16SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_dtrans.hxx" 26cdf0e10cSrcweir #include <rtl/unload.h> 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include "targetdropcontext.hxx" 29cdf0e10cSrcweir 30cdf0e10cSrcweir using namespace ::com::sun::star::datatransfer::dnd; 31cdf0e10cSrcweir using namespace ::cppu; 32cdf0e10cSrcweir using namespace ::com::sun::star::uno; 33cdf0e10cSrcweir using namespace ::com::sun::star::lang; 34cdf0e10cSrcweir 35cdf0e10cSrcweir extern rtl_StandardModuleCount g_moduleCount; TargetDropContext(DropTarget * p)36cdf0e10cSrcweirTargetDropContext::TargetDropContext( DropTarget* p) 37cdf0e10cSrcweir { 38cdf0e10cSrcweir g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); 39cdf0e10cSrcweir m_pDropTarget= p; 40cdf0e10cSrcweir p->acquire(); 41cdf0e10cSrcweir } 42cdf0e10cSrcweir ~TargetDropContext()43cdf0e10cSrcweirTargetDropContext::~TargetDropContext() 44cdf0e10cSrcweir { 45cdf0e10cSrcweir m_pDropTarget->release(); 46cdf0e10cSrcweir g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); 47cdf0e10cSrcweir } 48cdf0e10cSrcweir acceptDrop(sal_Int8 dropOperation)49cdf0e10cSrcweirvoid SAL_CALL TargetDropContext::acceptDrop( sal_Int8 dropOperation ) 50cdf0e10cSrcweir throw( RuntimeException) 51cdf0e10cSrcweir { 52cdf0e10cSrcweir m_pDropTarget->_acceptDrop( dropOperation, static_cast<XDropTargetDropContext*>( this) ); 53cdf0e10cSrcweir } 54cdf0e10cSrcweir rejectDrop()55cdf0e10cSrcweirvoid SAL_CALL TargetDropContext::rejectDrop( ) 56cdf0e10cSrcweir throw( RuntimeException) 57cdf0e10cSrcweir { 58cdf0e10cSrcweir m_pDropTarget->_rejectDrop( static_cast<XDropTargetDropContext*>( this) ); 59cdf0e10cSrcweir } 60cdf0e10cSrcweir dropComplete(sal_Bool success)61cdf0e10cSrcweirvoid SAL_CALL TargetDropContext::dropComplete( sal_Bool success ) 62cdf0e10cSrcweir throw( RuntimeException) 63cdf0e10cSrcweir { 64cdf0e10cSrcweir m_pDropTarget->_dropComplete( success, static_cast<XDropTargetDropContext*>( this) ); 65cdf0e10cSrcweir } 66