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_stoc.hxx" 26 #include "base.hxx" 27 28 namespace stoc_rdbtdp 29 { ~TypedefTypeDescriptionImpl()30TypedefTypeDescriptionImpl::~TypedefTypeDescriptionImpl() 31 { 32 g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); 33 } 34 35 // XTypeDescription 36 //__________________________________________________________________________________________________ getTypeClass()37TypeClass TypedefTypeDescriptionImpl::getTypeClass() 38 throw(::com::sun::star::uno::RuntimeException) 39 { 40 return TypeClass_TYPEDEF; 41 } 42 //__________________________________________________________________________________________________ getName()43OUString TypedefTypeDescriptionImpl::getName() 44 throw(::com::sun::star::uno::RuntimeException) 45 { 46 return _aName; 47 } 48 49 // XIndirectTypeDescription 50 //__________________________________________________________________________________________________ getReferencedType()51Reference< XTypeDescription > TypedefTypeDescriptionImpl::getReferencedType() 52 throw(::com::sun::star::uno::RuntimeException) 53 { 54 if (!_xRefTD.is() && _aRefName.getLength()) 55 { 56 try 57 { 58 Reference< XTypeDescription > xRefTD; 59 if (_xTDMgr->getByHierarchicalName( _aRefName ) >>= xRefTD) 60 { 61 MutexGuard aGuard( getMutex() ); 62 if (! _xRefTD.is()) 63 _xRefTD = xRefTD; 64 return _xRefTD; 65 } 66 } 67 catch (NoSuchElementException &) 68 { 69 } 70 // never try again, if no base td was found 71 _aRefName = OUString(); 72 } 73 return _xRefTD; 74 } 75 76 } 77 78 79