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 ) throw (RuntimeException, NullPointerException)
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() throw (RuntimeException)
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( ) throw (RuntimeException)
141     {
142         return Sequence< ::rtl::OUString >();
143     }
144 
145     //--------------------------------------------------------------------
getActuatingProperties()146     Sequence< ::rtl::OUString > SAL_CALL PropertyHandler::getActuatingProperties( ) throw (RuntimeException)
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 ) throw (UnknownPropertyException, RuntimeException)
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 ) throw (UnknownPropertyException, RuntimeException)
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*/ ) throw (UnknownPropertyException, RuntimeException)
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         throw (UnknownPropertyException, NullPointerException, RuntimeException)
208     {
209         if ( !_rxControlFactory.is() )
210             throw NullPointerException();
211 
212         ::osl::MutexGuard aGuard( m_aMutex );
213         PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
214         const Property& rProperty( impl_getPropertyFromId_throw( nPropId ) );
215 
216         LineDescriptor aDescriptor;
217         if ( ( m_pInfoService->getPropertyUIFlags( nPropId ) & PROP_FLAG_ENUM ) != 0 )
218         {
219             aDescriptor.Control = PropertyHandlerHelper::createListBoxControl(
220                 _rxControlFactory, m_pInfoService->getPropertyEnumRepresentations( nPropId ),
221                 PropertyHandlerHelper::requiresReadOnlyControl( rProperty.Attributes ), sal_False );
222         }
223         else
224             PropertyHandlerHelper::describePropertyLine( rProperty, aDescriptor, _rxControlFactory );
225 
226         aDescriptor.HelpURL = HelpIdUrl::getHelpURL( m_pInfoService->getPropertyHelpId( nPropId ) );
227         aDescriptor.DisplayName = m_pInfoService->getPropertyTranslation( nPropId );
228 
229         if ( ( m_pInfoService->getPropertyUIFlags( nPropId ) & PROP_FLAG_DATA_PROPERTY ) != 0 )
230             aDescriptor.Category = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Data" ) );
231         else
232             aDescriptor.Category = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "General" ) );
233         return aDescriptor;
234     }
235 
236     //--------------------------------------------------------------------
isComposable(const::rtl::OUString & _rPropertyName)237     ::sal_Bool SAL_CALL PropertyHandler::isComposable( const ::rtl::OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException)
238     {
239         ::osl::MutexGuard aGuard( m_aMutex );
240         return m_pInfoService->isComposeable( _rPropertyName );
241     }
242 
243     //--------------------------------------------------------------------
onInteractivePropertySelection(const::rtl::OUString &,sal_Bool,Any &,const Reference<XObjectInspectorUI> &)244     InteractiveSelectionResult SAL_CALL PropertyHandler::onInteractivePropertySelection( const ::rtl::OUString& /*_rPropertyName*/, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/ ) throw (UnknownPropertyException, NullPointerException, RuntimeException)
245     {
246         DBG_ERROR( "PropertyHandler::onInteractivePropertySelection: not implemented!" );
247         return InteractiveSelectionResult_Cancelled;
248     }
249 
250     //--------------------------------------------------------------------
actuatingPropertyChanged(const::rtl::OUString &,const Any &,const Any &,const Reference<XObjectInspectorUI> &,sal_Bool)251     void SAL_CALL PropertyHandler::actuatingPropertyChanged( const ::rtl::OUString& /*_rActuatingPropertyName*/, const Any& /*_rNewValue*/, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/, sal_Bool /*_bFirstTimeInit*/ ) throw (NullPointerException, RuntimeException)
252     {
253         DBG_ERROR( "PropertyHandler::actuatingPropertyChanged: not implemented!" );
254     }
255 
256     //--------------------------------------------------------------------
addPropertyChangeListener(const Reference<XPropertyChangeListener> & _rxListener)257     void SAL_CALL PropertyHandler::addPropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) throw (RuntimeException)
258     {
259         ::osl::MutexGuard aGuard( m_aMutex );
260         if ( !_rxListener.is() )
261             throw NullPointerException();
262         m_aPropertyListeners.addListener( _rxListener );
263     }
264 
265     //--------------------------------------------------------------------
removePropertyChangeListener(const Reference<XPropertyChangeListener> & _rxListener)266     void SAL_CALL PropertyHandler::removePropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) throw (RuntimeException)
267     {
268         ::osl::MutexGuard aGuard( m_aMutex );
269         m_aPropertyListeners.removeListener( _rxListener );
270     }
271 
272     //--------------------------------------------------------------------
suspend(sal_Bool)273     sal_Bool SAL_CALL PropertyHandler::suspend( sal_Bool /*_bSuspend*/ ) throw (RuntimeException)
274     {
275         return sal_True;
276     }
277 
278     //--------------------------------------------------------------------
IMPLEMENT_FORWARD_XCOMPONENT(PropertyHandler,PropertyHandler_Base)279     IMPLEMENT_FORWARD_XCOMPONENT( PropertyHandler, PropertyHandler_Base )
280     //--------------------------------------------------------------------
281     void SAL_CALL PropertyHandler::disposing()
282     {
283         m_xComponent.clear();
284         m_aPropertyListeners.clear();
285         m_xTypeConverter.clear();
286         m_aSupportedProperties.realloc( 0 );
287     }
288 
289     //--------------------------------------------------------------------
firePropertyChange(const::rtl::OUString & _rPropName,PropertyId _nPropId,const Any & _rOldValue,const Any & _rNewValue)290     void PropertyHandler::firePropertyChange( const ::rtl::OUString& _rPropName, PropertyId _nPropId, const Any& _rOldValue, const Any& _rNewValue ) SAL_THROW(())
291     {
292         PropertyChangeEvent aEvent;
293         aEvent.Source = m_xComponent;
294         aEvent.PropertyHandle = _nPropId;
295         aEvent.PropertyName = _rPropName;
296         aEvent.OldValue = _rOldValue;
297         aEvent.NewValue = _rNewValue;
298         m_aPropertyListeners.notify( aEvent, &XPropertyChangeListener::propertyChange );
299     }
300 
301     //--------------------------------------------------------------------
impl_getPropertyFromId_nothrow(PropertyId _nPropId) const302     const Property* PropertyHandler::impl_getPropertyFromId_nothrow( PropertyId _nPropId ) const
303     {
304         const_cast< PropertyHandler* >( this )->getSupportedProperties();
305         const Property* pFound = ::std::find_if( m_aSupportedProperties.begin(), m_aSupportedProperties.end(),
306             FindPropertyByHandle( _nPropId )
307         );
308         if ( pFound != m_aSupportedProperties.end() )
309             return &(*pFound);
310         return NULL;
311     }
312 
313     //--------------------------------------------------------------------
impl_getPropertyFromId_throw(PropertyId _nPropId) const314     const Property& PropertyHandler::impl_getPropertyFromId_throw( PropertyId _nPropId ) const
315     {
316         const Property* pProperty = impl_getPropertyFromId_nothrow( _nPropId );
317         if ( !pProperty )
318             throw UnknownPropertyException();
319 
320         return *pProperty;
321     }
322 
323     //--------------------------------------------------------------------
impl_getPropertyFromName_throw(const::rtl::OUString & _rPropertyName) const324     const Property& PropertyHandler::impl_getPropertyFromName_throw( const ::rtl::OUString& _rPropertyName ) const
325     {
326         const_cast< PropertyHandler* >( this )->getSupportedProperties();
327         StlSyntaxSequence< Property >::const_iterator pFound = ::std::find_if( m_aSupportedProperties.begin(), m_aSupportedProperties.end(),
328             FindPropertyByName( _rPropertyName )
329         );
330         if ( pFound == m_aSupportedProperties.end() )
331             throw UnknownPropertyException();
332 
333         return *pFound;
334     }
335 
336     //--------------------------------------------------------------------
implAddPropertyDescription(::std::vector<Property> & _rProperties,const::rtl::OUString & _rPropertyName,const Type & _rType,sal_Int16 _nAttribs) const337     void PropertyHandler::implAddPropertyDescription( ::std::vector< Property >& _rProperties, const ::rtl::OUString& _rPropertyName, const Type& _rType, sal_Int16 _nAttribs ) const
338     {
339         _rProperties.push_back( Property(
340             _rPropertyName,
341             m_pInfoService->getPropertyId( _rPropertyName ),
342             _rType,
343             _nAttribs
344         ) );
345     }
346 
347     //------------------------------------------------------------------------
impl_getDefaultDialogParent_nothrow() const348     Window* PropertyHandler::impl_getDefaultDialogParent_nothrow() const
349     {
350         return PropertyHandlerHelper::getDialogParentWindow( m_aContext );
351     }
352 
353     //------------------------------------------------------------------------
impl_getPropertyId_throw(const::rtl::OUString & _rPropertyName) const354     PropertyId PropertyHandler::impl_getPropertyId_throw( const ::rtl::OUString& _rPropertyName ) const
355     {
356         PropertyId nPropId = m_pInfoService->getPropertyId( _rPropertyName );
357         if ( nPropId == -1 )
358             throw UnknownPropertyException();
359         return nPropId;
360     }
361 
362     //------------------------------------------------------------------------
impl_setContextDocumentModified_nothrow() const363     void PropertyHandler::impl_setContextDocumentModified_nothrow() const
364     {
365         Reference< XModifiable > xModifiable( impl_getContextDocument_nothrow(), UNO_QUERY );
366         if ( xModifiable.is() )
367 			xModifiable->setModified( sal_True );
368     }
369 
370     //------------------------------------------------------------------------
impl_componentHasProperty_throw(const::rtl::OUString & _rPropName) const371     bool PropertyHandler::impl_componentHasProperty_throw( const ::rtl::OUString& _rPropName ) const
372     {
373         return m_xComponentPropertyInfo.is() && m_xComponentPropertyInfo->hasPropertyByName( _rPropName );
374     }
375 
376 	//--------------------------------------------------------------------
impl_getDocumentMeasurementUnit_throw() const377     sal_Int16 PropertyHandler::impl_getDocumentMeasurementUnit_throw() const
378     {
379         FieldUnit eUnit = FUNIT_NONE;
380 
381         Reference< XServiceInfo > xDocumentSI( impl_getContextDocument_nothrow(), UNO_QUERY );
382         OSL_ENSURE( xDocumentSI.is(), "PropertyHandlerHelper::impl_getDocumentMeasurementUnit_throw: No context document - where do I live?" );
383         if ( xDocumentSI.is() )
384         {
385             // determine the application type we live in
386             ::rtl::OUString sConfigurationLocation;
387             ::rtl::OUString sConfigurationProperty;
388             if ( xDocumentSI->supportsService( SERVICE_WEB_DOCUMENT ) )
389             {   // writer
390                 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.WriterWeb/Layout/Other" ) );
391                 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MeasureUnit" ) );
392             }
393             else if ( xDocumentSI->supportsService( SERVICE_TEXT_DOCUMENT ) )
394             {   // writer
395                 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Writer/Layout/Other" ) );
396                 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MeasureUnit" ) );
397             }
398             else if ( xDocumentSI->supportsService( SERVICE_SPREADSHEET_DOCUMENT ) )
399             {   // calc
400                 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Calc/Layout/Other/MeasureUnit" ) );
401                 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) );
402             }
403             else if ( xDocumentSI->supportsService( SERVICE_DRAWING_DOCUMENT ) )
404             {
405                 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Draw/Layout/Other/MeasureUnit" ) );
406                 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) );
407             }
408             else if ( xDocumentSI->supportsService( SERVICE_PRESENTATION_DOCUMENT ) )
409             {
410                 sConfigurationLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Impress/Layout/Other/MeasureUnit" ) );
411                 sConfigurationProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) );
412             }
413 
414             // read the measurement unit from the configuration
415             if ( sConfigurationLocation.getLength() && sConfigurationProperty.getLength() )
416             {
417                 ::utl::OConfigurationTreeRoot aConfigTree( ::utl::OConfigurationTreeRoot::createWithServiceFactory(
418                     m_aContext.getLegacyServiceFactory(), sConfigurationLocation, -1, ::utl::OConfigurationTreeRoot::CM_READONLY ) );
419                 sal_Int32 nUnitAsInt = (sal_Int32)FUNIT_NONE;
420                 aConfigTree.getNodeValue( sConfigurationProperty ) >>= nUnitAsInt;
421 
422                 // if this denotes a valid (and accepted) unit, then use it
423                 if  ( ( nUnitAsInt > FUNIT_NONE ) && ( nUnitAsInt <= FUNIT_100TH_MM ) )
424                     eUnit = static_cast< FieldUnit >( nUnitAsInt );
425             }
426         }
427 
428         if ( FUNIT_NONE == eUnit )
429         {
430             MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
431             eUnit = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH;
432         }
433 
434         return VCLUnoHelper::ConvertToMeasurementUnit( eUnit, 1 );
435     }
436 
437     //====================================================================
438 	//= PropertyHandlerComponent
439 	//====================================================================
440     //------------------------------------------------------------------------
PropertyHandlerComponent(const Reference<XComponentContext> & _rxContext)441     PropertyHandlerComponent::PropertyHandlerComponent( const Reference< XComponentContext >& _rxContext )
442         :PropertyHandler( _rxContext )
443     {
444     }
445 
446     //--------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2(PropertyHandlerComponent,PropertyHandler,PropertyHandlerComponent_Base)447     IMPLEMENT_FORWARD_XINTERFACE2( PropertyHandlerComponent, PropertyHandler, PropertyHandlerComponent_Base )
448     IMPLEMENT_FORWARD_XTYPEPROVIDER2( PropertyHandlerComponent, PropertyHandler, PropertyHandlerComponent_Base )
449 
450     //--------------------------------------------------------------------
451     ::sal_Bool SAL_CALL PropertyHandlerComponent::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException)
452     {
453         StlSyntaxSequence< ::rtl::OUString > aAllServices( getSupportedServiceNames() );
454         return ::std::find( aAllServices.begin(), aAllServices.end(), ServiceName ) != aAllServices.end();
455     }
456 
457 //........................................................................
458 }   // namespace pcr
459 //........................................................................
460 
461