bridgefactory.cxx (37adc4f0) | bridgefactory.cxx (0848378b) |
---|---|
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 --- 61 unchanged lines hidden (view full) --- 70} 71 72void BridgeFactory::removeBridge( 73 css::uno::Reference< css::bridge::XBridge > const & bridge) 74{ 75 OSL_ASSERT(bridge.is()); 76 rtl::OUString n(bridge->getName()); 77 osl::MutexGuard g(*this); | 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 --- 61 unchanged lines hidden (view full) --- 70} 71 72void BridgeFactory::removeBridge( 73 css::uno::Reference< css::bridge::XBridge > const & bridge) 74{ 75 OSL_ASSERT(bridge.is()); 76 rtl::OUString n(bridge->getName()); 77 osl::MutexGuard g(*this); |
78 if (n.getLength() == 0) { | 78 if ( n.isEmpty() ) { |
79 BridgeList::iterator i( 80 std::find(unnamed_.begin(), unnamed_.end(), bridge)); 81 if (i != unnamed_.end()) { 82 unnamed_.erase(i); 83 } 84 } else { 85 BridgeMap::iterator i(named_.find(n)); 86 if (i != named_.end() && i->second == bridge) { --- 57 unchanged lines hidden (view full) --- 144 throw css::lang::IllegalArgumentException( 145 rtl::OUString( 146 RTL_CONSTASCII_USTRINGPARAM( 147 "BridgeFactory::createBridge: sProtocol != urp ||" 148 " aConnection == null")), 149 static_cast< cppu::OWeakObject * >(this), -1); 150 } 151 b.set(new Bridge(this, sName, aConnection, anInstanceProvider)); | 79 BridgeList::iterator i( 80 std::find(unnamed_.begin(), unnamed_.end(), bridge)); 81 if (i != unnamed_.end()) { 82 unnamed_.erase(i); 83 } 84 } else { 85 BridgeMap::iterator i(named_.find(n)); 86 if (i != named_.end() && i->second == bridge) { --- 57 unchanged lines hidden (view full) --- 144 throw css::lang::IllegalArgumentException( 145 rtl::OUString( 146 RTL_CONSTASCII_USTRINGPARAM( 147 "BridgeFactory::createBridge: sProtocol != urp ||" 148 " aConnection == null")), 149 static_cast< cppu::OWeakObject * >(this), -1); 150 } 151 b.set(new Bridge(this, sName, aConnection, anInstanceProvider)); |
152 if (sName.getLength() == 0) { | 152 if ( sName.isEmpty() ) { |
153 unnamed_.push_back( 154 css::uno::Reference< css::bridge::XBridge >(b.get())); 155 } else { 156 named_[sName] = b.get(); 157 } 158 } 159 b->start(); 160 return css::uno::Reference< css::bridge::XBridge >(b.get()); --- 68 unchanged lines hidden --- | 153 unnamed_.push_back( 154 css::uno::Reference< css::bridge::XBridge >(b.get())); 155 } else { 156 named_[sName] = b.get(); 157 } 158 } 159 b->start(); 160 return css::uno::Reference< css::bridge::XBridge >(b.get()); --- 68 unchanged lines hidden --- |