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_extensions.hxx" 26 #include "propertyhandler.hxx" 27 #include "formmetadata.hxx" 28 #include "formbrowsertools.hxx" 29 #include "handlerhelper.hxx" 30 #include "formstrings.hxx" 31 32 /** === begin UNO includes === **/ 33 #include <com/sun/star/beans/PropertyAttribute.hpp> 34 #include <com/sun/star/lang/NullPointerException.hpp> 35 #include <com/sun/star/util/XModifiable.hpp> 36 /** === end UNO includes === **/ 37 38 #include <tools/debug.hxx> 39 #include <unotools/confignode.hxx> 40 #include <unotools/localedatawrapper.hxx> 41 #include <unotools/syslocale.hxx> 42 #include <toolkit/helper/vclunohelper.hxx> 43 44 #include <algorithm> 45 46 //........................................................................ 47 namespace pcr 48 { 49 //........................................................................ 50 51 using namespace ::com::sun::star::uno; 52 using namespace ::com::sun::star::awt; 53 using namespace ::com::sun::star::beans; 54 using namespace ::com::sun::star::script; 55 using namespace ::com::sun::star::lang; 56 using namespace ::com::sun::star::util; 57 using namespace ::com::sun::star::frame; 58 using namespace ::com::sun::star::inspection; 59 using namespace ::comphelper; 60 61 //==================================================================== 62 //= PropertyHandler 63 //==================================================================== DBG_NAME(PropertyHandler)64 DBG_NAME( PropertyHandler ) 65 //-------------------------------------------------------------------- 66 PropertyHandler::PropertyHandler( const Reference< XComponentContext >& _rxContext ) 67 :PropertyHandler_Base( m_aMutex ) 68 ,m_bSupportedPropertiesAreKnown( false ) 69 ,m_aPropertyListeners( m_aMutex ) 70 ,m_aContext( _rxContext ) 71 ,m_pInfoService ( new OPropertyInfoService ) 72 { 73 DBG_CTOR( PropertyHandler, NULL ); 74 75 m_xTypeConverter = Reference< XTypeConverter >( 76 m_aContext.createComponent( "com.sun.star.script.Converter" ), 77 UNO_QUERY_THROW 78 ); 79 } 80 81 //-------------------------------------------------------------------- ~PropertyHandler()82 PropertyHandler::~PropertyHandler() 83 { 84 DBG_DTOR( PropertyHandler, NULL ); 85 } 86 87 //-------------------------------------------------------------------- inspect(const Reference<XInterface> & _rxIntrospectee)88 void SAL_CALL PropertyHandler::inspect( const Reference< XInterface >& _rxIntrospectee ) 89 { 90 if ( !_rxIntrospectee.is() ) 91 throw NullPointerException(); 92 93 ::osl::MutexGuard aGuard( m_aMutex ); 94 95 Reference< XPropertySet > xNewComponent( _rxIntrospectee, UNO_QUERY ); 96 if ( xNewComponent == m_xComponent ) 97 return; 98 99 // remove all old property change listeners 100 ::std::auto_ptr< ::cppu::OInterfaceIteratorHelper > removeListener = m_aPropertyListeners.createIterator(); 101 ::std::auto_ptr< ::cppu::OInterfaceIteratorHelper > readdListener = m_aPropertyListeners.createIterator(); // will copy the container as needed 102 while ( removeListener->hasMoreElements() ) 103 removePropertyChangeListener( static_cast< XPropertyChangeListener* >( removeListener->next() ) ); 104 OSL_ENSURE( m_aPropertyListeners.empty(), "PropertyHandler::inspect: derived classes are expected to forward the removePropertyChangeListener call to their base class (me)!" ); 105 106 // remember the new component, and give derived classes the chance to react on it 107 m_xComponent = xNewComponent; 108 onNewComponent(); 109 110 // add the listeners, again 111 while ( readdListener->hasMoreElements() ) 112 addPropertyChangeListener( static_cast< XPropertyChangeListener* >( readdListener->next() ) ); 113 } 114 115 //-------------------------------------------------------------------- onNewComponent()116 void PropertyHandler::onNewComponent() 117 { 118 if ( m_xComponent.is() ) 119 m_xComponentPropertyInfo = m_xComponent->getPropertySetInfo(); 120 else 121 m_xComponentPropertyInfo.clear(); 122 123 m_bSupportedPropertiesAreKnown = false; 124 m_aSupportedProperties.realloc( 0 ); 125 } 126 127 //-------------------------------------------------------------------- getSupportedProperties()128 Sequence< Property > SAL_CALL PropertyHandler::getSupportedProperties() 129 { 130 ::osl::MutexGuard aGuard( m_aMutex ); 131 if ( !m_bSupportedPropertiesAreKnown ) 132 { 133 m_aSupportedProperties = doDescribeSupportedProperties(); 134 m_bSupportedPropertiesAreKnown = true; 135 } 136 return (Sequence< Property >)m_aSupportedProperties; 137 } 138 139 //-------------------------------------------------------------------- getSupersededProperties()140 Sequence< ::rtl::OUString > SAL_CALL PropertyHandler::getSupersededProperties( ) 141 { 142 return Sequence< ::rtl::OUString >(); 143 } 144 145 //-------------------------------------------------------------------- getActuatingProperties()146 Sequence< ::rtl::OUString > SAL_CALL PropertyHandler::getActuatingProperties( ) 147 { 148 return Sequence< ::rtl::OUString >(); 149 } 150 151 //-------------------------------------------------------------------- convertToPropertyValue(const::rtl::OUString & _rPropertyName,const Any & _rControlValue)152 Any SAL_CALL PropertyHandler::convertToPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rControlValue ) 153 { 154 ::osl::MutexGuard aGuard( m_aMutex ); 155 PropertyId nPropId = m_pInfoService->getPropertyId( _rPropertyName ); 156 Property aProperty( impl_getPropertyFromName_throw( _rPropertyName ) ); 157 158 Any aPropertyValue; 159 if ( !_rControlValue.hasValue() ) 160 // NULL is converted to NULL 161 return aPropertyValue; 162 163 if ( ( m_pInfoService->getPropertyUIFlags( nPropId ) & PROP_FLAG_ENUM ) != 0 ) 164 { 165 ::rtl::OUString sControlValue; 166 OSL_VERIFY( _rControlValue >>= sControlValue ); 167 ::rtl::Reference< IPropertyEnumRepresentation > aEnumConversion( 168 new DefaultEnumRepresentation( *m_pInfoService, aProperty.Type, nPropId ) ); 169 // TODO/UNOize: cache those converters? 170 aEnumConversion->getValueFromDescription( sControlValue, aPropertyValue ); 171 } 172 else 173 aPropertyValue = PropertyHandlerHelper::convertToPropertyValue( 174 m_aContext.getContext(),m_xTypeConverter, aProperty, _rControlValue ); 175 return aPropertyValue; 176 } 177 178 //-------------------------------------------------------------------- convertToControlValue(const::rtl::OUString & _rPropertyName,const Any & _rPropertyValue,const Type & _rControlValueType)179 Any SAL_CALL PropertyHandler::convertToControlValue( const ::rtl::OUString& _rPropertyName, const Any& _rPropertyValue, const Type& _rControlValueType ) 180 { 181 ::osl::MutexGuard aGuard( m_aMutex ); 182 PropertyId nPropId = m_pInfoService->getPropertyId( _rPropertyName ); 183 184 if ( ( m_pInfoService->getPropertyUIFlags( nPropId ) & PROP_FLAG_ENUM ) != 0 ) 185 { 186 DBG_ASSERT( _rControlValueType.getTypeClass() == TypeClass_STRING, "PropertyHandler::convertToControlValue: ENUM, but not STRING?" ); 187 188 ::rtl::Reference< IPropertyEnumRepresentation > aEnumConversion( 189 new DefaultEnumRepresentation( *m_pInfoService, _rPropertyValue.getValueType(), nPropId ) ); 190 // TODO/UNOize: cache those converters? 191 return makeAny( aEnumConversion->getDescriptionForValue( _rPropertyValue ) ); 192 } 193 194 return PropertyHandlerHelper::convertToControlValue( 195 m_aContext.getContext(),m_xTypeConverter, _rPropertyValue, _rControlValueType ); 196 } 197 198 //-------------------------------------------------------------------- getPropertyState(const::rtl::OUString &)199 PropertyState SAL_CALL PropertyHandler::getPropertyState( const ::rtl::OUString& /*_rPropertyName*/ ) 200 { 201 return PropertyState_DIRECT_VALUE; 202 } 203 204 //-------------------------------------------------------------------- describePropertyLine(const::rtl::OUString & _rPropertyName,const Reference<XPropertyControlFactory> & _rxControlFactory)205 LineDescriptor SAL_CALL PropertyHandler::describePropertyLine( const ::rtl::OUString& _rPropertyName, 206 const Reference< XPropertyControlFactory >& _rxControlFactory ) 207 { 208 if ( !_rxControlFactory.is() ) 209 throw NullPointerException(); 210 211 ::osl::MutexGuard aGuard( m_aMutex ); 212 PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) ); 213 const Property& rProperty( impl_getPropertyFromId_throw( nPropId ) ); 214 215 LineDescriptor aDescriptor; 216 if ( ( m_pInfoService->getPropertyUIFlags( nPropId ) & PROP_FLAG_ENUM ) != 0 ) 217 { 218 aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( 219 _rxControlFactory, m_pInfoService->getPropertyEnumRepresentations( nPropId ), 220 PropertyHandlerHelper::requiresReadOnlyControl( rProperty.Attributes ), sal_False ); 221 } 222 else 223 PropertyHandlerHelper::describePropertyLine( rProperty, aDescriptor, _rxControlFactory ); 224 225 aDescriptor.HelpURL = HelpIdUrl::getHelpURL( m_pInfoService->getPropertyHelpId( nPropId ) ); 226 aDescriptor.DisplayName = m_pInfoService->getPropertyTranslation( nPropId ); 227 228 if ( ( m_pInfoService->getPropertyUIFlags( nPropId ) & PROP_FLAG_DATA_PROPERTY ) != 0 ) 229 aDescriptor.Category = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Data" ) ); 230 else 231 aDescriptor.Category = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "General" ) ); 232 return aDescriptor; 233 } 234 235 //-------------------------------------------------------------------- isComposable(const::rtl::OUString & _rPropertyName)236 ::sal_Bool SAL_CALL PropertyHandler::isComposable( const ::rtl::OUString& _rPropertyName ) 237 { 238 ::osl::MutexGuard aGuard( m_aMutex ); 239 return m_pInfoService->isComposeable( _rPropertyName ); 240 } 241 242 //-------------------------------------------------------------------- onInteractivePropertySelection(const::rtl::OUString &,sal_Bool,Any &,const Reference<XObjectInspectorUI> &)243 InteractiveSelectionResult SAL_CALL PropertyHandler::onInteractivePropertySelection( const ::rtl::OUString& /*_rPropertyName*/, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/ ) 244 { 245 DBG_ERROR( "PropertyHandler::onInteractivePropertySelection: not implemented!" ); 246 return InteractiveSelectionResult_Cancelled; 247 } 248 249 //-------------------------------------------------------------------- actuatingPropertyChanged(const::rtl::OUString &,const Any &,const Any &,const Reference<XObjectInspectorUI> &,sal_Bool)250 void SAL_CALL PropertyHandler::actuatingPropertyChanged( const ::rtl::OUString& /*_rActuatingPropertyName*/, const Any& /*_rNewValue*/, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/, sal_Bool /*_bFirstTimeInit*/ ) 251 { 252 DBG_ERROR( "PropertyHandler::actuatingPropertyChanged: not implemented!" ); 253 } 254 255 //-------------------------------------------------------------------- addPropertyChangeListener(const Reference<XPropertyChangeListener> & _rxListener)256 void SAL_CALL PropertyHandler::addPropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) 257 { 258 ::osl::MutexGuard aGuard( m_aMutex ); 259 if ( !_rxListener.is() ) 260 throw NullPointerException(); 261 m_aPropertyListeners.addListener( _rxListener ); 262 } 263 264 //-------------------------------------------------------------------- removePropertyChangeListener(const Reference<XPropertyChangeListener> & _rxListener)265 void SAL_CALL PropertyHandler::removePropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) 266 { 267 ::osl::MutexGuard aGuard( m_aMutex ); 268 m_aPropertyListeners.removeListener( _rxListener ); 269 } 270 271 //-------------------------------------------------------------------- suspend(sal_Bool)272 sal_Bool SAL_CALL PropertyHandler::suspend( sal_Bool /*_bSuspend*/ ) 273 { 274 return sal_True; 275 } 276 277 //-------------------------------------------------------------------- IMPLEMENT_FORWARD_XCOMPONENT(PropertyHandler,PropertyHandler_Base)278 IMPLEMENT_FORWARD_XCOMPONENT( PropertyHandler, PropertyHandler_Base ) 279 //-------------------------------------------------------------------- 280 void SAL_CALL PropertyHandler::disposing() 281 { 282 m_xComponent.clear(); 283 m_aPropertyListeners.clear(); 284 m_xTypeConverter.clear(); 285 m_aSupportedProperties.realloc( 0 ); 286 } 287 288 //-------------------------------------------------------------------- firePropertyChange(const::rtl::OUString & _rPropName,PropertyId _nPropId,const Any & _rOldValue,const Any & _rNewValue)289 void PropertyHandler::firePropertyChange( const ::rtl::OUString& _rPropName, PropertyId _nPropId, const Any& _rOldValue, const Any& _rNewValue ) SAL_THROW(()) 290 { 291 PropertyChangeEvent aEvent; 292 aEvent.Source = m_xComponent; 293 aEvent.PropertyHandle = _nPropId; 294 aEvent.PropertyName = _rPropName; 295 aEvent.OldValue = _rOldValue; 296 aEvent.NewValue = _rNewValue; 297 m_aPropertyListeners.notify( aEvent, &XPropertyChangeListener::propertyChange ); 298 } 299 300 //-------------------------------------------------------------------- impl_getPropertyFromId_nothrow(PropertyId _nPropId) const301 const Property* PropertyHandler::impl_getPropertyFromId_nothrow( PropertyId _nPropId ) const 302 { 303 const_cast< PropertyHandler* >( this )->getSupportedProperties(); 304 const Property* pFound = ::std::find_if( m_aSupportedProperties.begin(), m_aSupportedProperties.end(), 305 FindPropertyByHandle( _nPropId ) 306 ); 307 if ( pFound != m_aSupportedProperties.end() ) 308 return &(*pFound); 309 return NULL; 310 } 311 312 //-------------------------------------------------------------------- impl_getPropertyFromId_throw(PropertyId _nPropId) const313 const Property& PropertyHandler::impl_getPropertyFromId_throw( PropertyId _nPropId ) const 314 { 315 const Property* pProperty = impl_getPropertyFromId_nothrow( _nPropId ); 316 if ( !pProperty ) 317 throw UnknownPropertyException(); 318 319 return *pProperty; 320 } 321 322 //-------------------------------------------------------------------- impl_getPropertyFromName_throw(const::rtl::OUString & _rPropertyName) const323 const Property& PropertyHandler::impl_getPropertyFromName_throw( const ::rtl::OUString& _rPropertyName ) const 324 { 325 const_cast< PropertyHandler* >( this )->getSupportedProperties(); 326 StlSyntaxSequence< Property >::const_iterator pFound = ::std::find_if( m_aSupportedProperties.begin(), m_aSupportedProperties.end(), 327 FindPropertyByName( _rPropertyName ) 328 ); 329 if ( pFound == m_aSupportedProperties.end() ) 330 throw UnknownPropertyException(); 331 332 return *pFound; 333 } 334 335 //-------------------------------------------------------------------- implAddPropertyDescription(::std::vector<Property> & _rProperties,const::rtl::OUString & _rPropertyName,const Type & _rType,sal_Int16 _nAttribs) const336 void PropertyHandler::implAddPropertyDescription( ::std::vector< Property >& _rProperties, const ::rtl::OUString& _rPropertyName, const Type& _rType, sal_Int16 _nAttribs ) const 337 { 338 _rProperties.push_back( Property( 339 _rPropertyName, 340 m_pInfoService->getPropertyId( _rPropertyName ), 341 _rType, 342 _nAttribs 343 ) ); 344 } 345 346 //------------------------------------------------------------------------ impl_getDefaultDialogParent_nothrow() const347 Window* PropertyHandler::impl_getDefaultDialogParent_nothrow() const 348 { 349 return PropertyHandlerHelper::getDialogParentWindow( m_aContext ); 350 } 351 352 //------------------------------------------------------------------------ impl_getPropertyId_throw(const::rtl::OUString & _rPropertyName) const353 PropertyId PropertyHandler::impl_getPropertyId_throw( const ::rtl::OUString& _rPropertyName ) const 354 { 355 PropertyId nPropId = m_pInfoService->getPropertyId( _rPropertyName ); 356 if ( nPropId == -1 ) 357 throw UnknownPropertyException(); 358 return nPropId; 359 } 360 361 //------------------------------------------------------------------------ impl_setContextDocumentModified_nothrow() const362 void PropertyHandler::impl_setContextDocumentModified_nothrow() const 363 { 364 Reference< XModifiable > xModifiable( impl_getContextDocument_nothrow(), UNO_QUERY ); 365 if ( xModifiable.is() ) 366 xModifiable->setModified( sal_True ); 367 } 368 369 //------------------------------------------------------------------------ impl_componentHasProperty_throw(const::rtl::OUString & _rPropName) const370 bool PropertyHandler::impl_componentHasProperty_throw( const ::rtl::OUString& _rPropName ) const 371 { 372 return m_xComponentPropertyInfo.is() && m_xComponentPropertyInfo->hasPropertyByName( _rPropName ); 373 } 374 375 //-------------------------------------------------------------------- impl_getDocumentMeasurementUnit_throw() const376 sal_Int16 PropertyHandler::impl_getDocumentMeasurementUnit_throw() const 377 { 378 FieldUnit eUnit = FUNIT_NONE; 379 380 Reference< XServiceInfo > xDocumentSI( impl_getContextDocument_nothrow(), UNO_QUERY ); 381 OSL_ENSURE( xDocumentSI.is(), "PropertyHandlerHelper::impl_getDocumentMeasurementUnit_throw: No context document - where do I live?" ); 382 if ( xDocumentSI.is() ) 383 { 384 // determine the application type we live in 385 ::rtl::OUString sConfigurationLocation; 386 ::rtl::OUString sConfigurationProperty; 387 if ( xDocumentSI->supportsService( SERVICE_WEB_DOCUMENT ) ) 388 { // writer 389 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.WriterWeb/Layout/Other" ) ); 390 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MeasureUnit" ) ); 391 } 392 else if ( xDocumentSI->supportsService( SERVICE_TEXT_DOCUMENT ) ) 393 { // writer 394 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Writer/Layout/Other" ) ); 395 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MeasureUnit" ) ); 396 } 397 else if ( xDocumentSI->supportsService( SERVICE_SPREADSHEET_DOCUMENT ) ) 398 { // calc 399 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Calc/Layout/Other/MeasureUnit" ) ); 400 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) ); 401 } 402 else if ( xDocumentSI->supportsService( SERVICE_DRAWING_DOCUMENT ) ) 403 { 404 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Draw/Layout/Other/MeasureUnit" ) ); 405 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) ); 406 } 407 else if ( xDocumentSI->supportsService( SERVICE_PRESENTATION_DOCUMENT ) ) 408 { 409 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Impress/Layout/Other/MeasureUnit" ) ); 410 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) ); 411 } 412 413 // read the measurement unit from the configuration 414 if ( sConfigurationLocation.getLength() && sConfigurationProperty.getLength() ) 415 { 416 ::utl::OConfigurationTreeRoot aConfigTree( ::utl::OConfigurationTreeRoot::createWithServiceFactory( 417 m_aContext.getLegacyServiceFactory(), sConfigurationLocation, -1, ::utl::OConfigurationTreeRoot::CM_READONLY ) ); 418 sal_Int32 nUnitAsInt = (sal_Int32)FUNIT_NONE; 419 aConfigTree.getNodeValue( sConfigurationProperty ) >>= nUnitAsInt; 420 421 // if this denotes a valid (and accepted) unit, then use it 422 if ( ( nUnitAsInt > FUNIT_NONE ) && ( nUnitAsInt <= FUNIT_100TH_MM ) ) 423 eUnit = static_cast< FieldUnit >( nUnitAsInt ); 424 } 425 } 426 427 if ( FUNIT_NONE == eUnit ) 428 { 429 MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); 430 eUnit = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH; 431 } 432 433 return VCLUnoHelper::ConvertToMeasurementUnit( eUnit, 1 ); 434 } 435 436 //==================================================================== 437 //= PropertyHandlerComponent 438 //==================================================================== 439 //------------------------------------------------------------------------ PropertyHandlerComponent(const Reference<XComponentContext> & _rxContext)440 PropertyHandlerComponent::PropertyHandlerComponent( const Reference< XComponentContext >& _rxContext ) 441 :PropertyHandler( _rxContext ) 442 { 443 } 444 445 //-------------------------------------------------------------------- IMPLEMENT_FORWARD_XINTERFACE2(PropertyHandlerComponent,PropertyHandler,PropertyHandlerComponent_Base)446 IMPLEMENT_FORWARD_XINTERFACE2( PropertyHandlerComponent, PropertyHandler, PropertyHandlerComponent_Base ) 447 IMPLEMENT_FORWARD_XTYPEPROVIDER2( PropertyHandlerComponent, PropertyHandler, PropertyHandlerComponent_Base ) 448 449 //-------------------------------------------------------------------- 450 ::sal_Bool SAL_CALL PropertyHandlerComponent::supportsService( const ::rtl::OUString& ServiceName ) 451 { 452 StlSyntaxSequence< ::rtl::OUString > aAllServices( getSupportedServiceNames() ); 453 return ::std::find( aAllServices.begin(), aAllServices.end(), ServiceName ) != aAllServices.end(); 454 } 455 456 //........................................................................ 457 } // namespace pcr 458 //........................................................................ 459