1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_vcl.hxx" 26 27 #include "osl/diagnose.h" 28 29 #include "vcl/svapp.hxx" 30 31 #include "aqua/saldata.hxx" 32 #include "aqua/salinst.h" 33 34 #include "DragSource.hxx" 35 #include "DropTarget.hxx" 36 #include "aqua_clipboard.hxx" 37 38 using namespace ::osl; 39 using namespace ::rtl; 40 using namespace ::com::sun::star; 41 using namespace ::com::sun::star::uno; 42 using namespace ::cppu; 43 using namespace ::com::sun::star::lang; 44 using namespace ::com::sun::star::datatransfer::clipboard; 45 46 CreateClipboard(const Sequence<Any> & i_rArguments)47uno::Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< Any >& i_rArguments ) 48 { 49 if ( Application::IsHeadlessModeEnabled() ) 50 return SalInstance::CreateClipboard( i_rArguments ); 51 52 SalData* pSalData = GetSalData(); 53 if( ! pSalData->mxClipboard.is() ) 54 pSalData->mxClipboard = uno::Reference<XInterface>(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY); 55 return pSalData->mxClipboard; 56 } 57 CreateDragSource()58uno::Reference<XInterface> AquaSalInstance::CreateDragSource() 59 { 60 if ( Application::IsHeadlessModeEnabled() ) 61 return SalInstance::CreateDragSource(); 62 63 return uno::Reference<XInterface>(static_cast< XInitialization* >(new DragSource()), UNO_QUERY); 64 } 65 CreateDropTarget()66uno::Reference<XInterface> AquaSalInstance::CreateDropTarget() 67 { 68 if ( Application::IsHeadlessModeEnabled() ) 69 return SalInstance::CreateDropTarget(); 70 71 return uno::Reference<XInterface>(static_cast< XInitialization* >(new DropTarget()), UNO_QUERY); 72 } 73 74