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 "targetdragcontext.hxx"
29cdf0e10cSrcweir 
30cdf0e10cSrcweir extern rtl_StandardModuleCount g_moduleCount;
TargetDragContext(DropTarget * p)31cdf0e10cSrcweir TargetDragContext::TargetDragContext( DropTarget* p)
32cdf0e10cSrcweir {
33cdf0e10cSrcweir 	g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
34cdf0e10cSrcweir 	m_pDropTarget= p;
35cdf0e10cSrcweir 	p->acquire();
36cdf0e10cSrcweir }
37cdf0e10cSrcweir 
~TargetDragContext()38cdf0e10cSrcweir TargetDragContext::~TargetDragContext()
39cdf0e10cSrcweir {
40cdf0e10cSrcweir 	m_pDropTarget->release();
41cdf0e10cSrcweir 	g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
42cdf0e10cSrcweir }
43cdf0e10cSrcweir 
acceptDrag(sal_Int8 dragOperation)44cdf0e10cSrcweir void SAL_CALL TargetDragContext::acceptDrag( sal_Int8 dragOperation )
45cdf0e10cSrcweir 	throw( RuntimeException)
46cdf0e10cSrcweir {
47cdf0e10cSrcweir 	m_pDropTarget->_acceptDrag( dragOperation, static_cast<XDropTargetDragContext*>( this) );
48cdf0e10cSrcweir 
49cdf0e10cSrcweir }
rejectDrag()50cdf0e10cSrcweir void SAL_CALL TargetDragContext::rejectDrag( )
51cdf0e10cSrcweir 	throw( RuntimeException)
52cdf0e10cSrcweir {
53cdf0e10cSrcweir 	m_pDropTarget->_rejectDrag( static_cast<XDropTargetDragContext*>( this) );
54cdf0e10cSrcweir }
55cdf0e10cSrcweir 
56