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_sw.hxx" 26 27 #include "TextCursorHelper.hxx" 28 #include "unobaseclass.hxx" 29 30 31 using namespace ::com::sun::star; 32 /* -----------------------------03.03.03 11:07-------------------------------- 33 34 ---------------------------------------------------------------------------*/ getUnoTunnelId()35const uno::Sequence< sal_Int8 > & OTextCursorHelper::getUnoTunnelId() 36 { 37 static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId(); 38 return aSeq; 39 } 40 /* -----------------------------03.03.03 11:07-------------------------------- 41 42 ---------------------------------------------------------------------------*/ 43 //XUnoTunnel getSomething(const uno::Sequence<sal_Int8> & rId)44sal_Int64 SAL_CALL OTextCursorHelper::getSomething( 45 const uno::Sequence< sal_Int8 >& rId ) 46 throw(uno::RuntimeException) 47 { 48 if( rId.getLength() == 16 49 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), 50 rId.getConstArray(), 16 ) ) 51 { 52 return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); 53 } 54 return 0; 55 } 56 // ----------------------------------------------------------------------------- 57 58