summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-06-16 11:42:41 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-06-16 11:42:41 +0000
commit2cd73655f0e190602655304dcf852fd9cbd79e1e (patch)
tree12c3fa6703c7ddeec70f64f1bf58e4c08ac5ae72 /extensions
parentd615da8014caa9009b82ec01c36d0750fa62ba63 (diff)
INTEGRATION: CWS rptchart02 (1.16.2); FILE MERGED
2008/04/16 09:29:06 oj 1.16.2.1: change order of calls to avoid UnknownPropertyException
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx41
1 files changed, 21 insertions, 20 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index aa4ac5e586bc..7de2dc0f758d 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formcomponenthandler.cxx,v $
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
* This file is part of OpenOffice.org.
*
@@ -228,26 +228,27 @@ namespace pcr
( Reference< XPropertySet > _xComponent, const ::rtl::OUString& _rPropertyName,
const Any& _rPropertyValue )
{
- static ::rtl::OUString aResourceResolverPropName
- = ::rtl::OUString::createFromAscii( "ResourceResolver" );
-
- Reference< resource::XStringResourceResolver > xStringResourceResolver;
- try
- {
- Any aResourceAny( _xComponent->getPropertyValue( aResourceResolverPropName ) );
- aResourceAny >>= xStringResourceResolver;
- }
- catch(UnknownPropertyException&)
- {}
-
Reference< resource::XStringResourceResolver > xRet;
- TypeClass eType = _rPropertyValue.getValueType().getTypeClass();
- if( xStringResourceResolver.is() &&
- xStringResourceResolver->getLocales().getLength() > 0 &&
- (eType == TypeClass_STRING || eType == TypeClass_SEQUENCE) &&
- lcl_isLanguageDependentProperty( _rPropertyName ) )
+ const TypeClass eType = _rPropertyValue.getValueType().getTypeClass();
+ if ( (eType == TypeClass_STRING || eType == TypeClass_SEQUENCE) &&
+ lcl_isLanguageDependentProperty( _rPropertyName ) )
{
- xRet = xStringResourceResolver;
+ static const ::rtl::OUString s_sResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("ResourceResolver"));
+
+ Reference< resource::XStringResourceResolver > xStringResourceResolver;
+ try
+ {
+ xStringResourceResolver.set( _xComponent->getPropertyValue( s_sResourceResolverPropName ),UNO_QUERY);
+ if( xStringResourceResolver.is() &&
+ xStringResourceResolver->getLocales().getLength() > 0 )
+ {
+ xRet = xStringResourceResolver;
+ }
+ }
+ catch(UnknownPropertyException&)
+ {
+ // nii
+ }
}
return xRet;
@@ -257,7 +258,7 @@ namespace pcr
//--------------------------------------------------------------------
Any FormComponentPropertyHandler::impl_getPropertyValue_throw( const ::rtl::OUString& _rPropertyName ) const
{
- PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
+ const PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) );
Any aPropertyValue( m_xComponent->getPropertyValue( _rPropertyName ) );