summaryrefslogtreecommitdiff
path: root/oox/source/helper
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-07-01 11:15:12 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-07-01 11:15:12 +0000
commit9a3017794c834671ebcc2a925e7f7edd06bad6ad (patch)
tree021dcad5b0db4af942c38371263d2e86c6ab1bc6 /oox/source/helper
parent8e871fd4ee5917426489fabe15ee726af4f84b8d (diff)
INTEGRATION: CWS xmlfilter05 (1.2.18); FILE MERGED
2008/05/06 09:28:25 hbrinkm 1.2.18.5: removed duplicate of setProperties 2008/05/02 11:24:36 hbrinkm 1.2.18.4: RESYNC: (1.2-1.4); FILE MERGED 2008/04/17 09:45:46 dr 1.2.18.3: #i86546# #i86549# #i86560# support all file types and templates 2008/04/02 12:41:59 hbrinkm 1.2.18.2: merged changes from xmlfilter04 to xmlfilter05 2008/04/01 15:38:22 hbrinkm 1.2.18.1: 'Merged xmlfilter04'
Diffstat (limited to 'oox/source/helper')
-rw-r--r--oox/source/helper/propertyset.cxx47
1 files changed, 24 insertions, 23 deletions
diff --git a/oox/source/helper/propertyset.cxx b/oox/source/helper/propertyset.cxx
index 99ddbb2751cd..438495f92363 100644
--- a/oox/source/helper/propertyset.cxx
+++ b/oox/source/helper/propertyset.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: propertyset.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
@@ -83,26 +83,26 @@ bool PropertySet::getBoolProperty( const OUString& rPropName ) const
void PropertySet::getProperties( Sequence< Any >& orValues, const Sequence< OUString >& rPropNames ) const
{
- try
+ if( mxMultiPropSet.is() ) // first try the XMultiPropertySet
{
- if( mxMultiPropSet.is() ) // first try the XMultiPropertySet
+ try
{
orValues = mxMultiPropSet->getPropertyValues( rPropNames );
}
- else if( mxPropSet.is() )
+ catch( Exception& )
{
- sal_Int32 nLen = rPropNames.getLength();
- const OUString* pPropName = rPropNames.getConstArray();
- const OUString* pPropNameEnd = pPropName + nLen;
- orValues.realloc( nLen );
- Any* pValue = orValues.getArray();
- for( ; pPropName != pPropNameEnd; ++pPropName, ++pValue )
- *pValue = mxPropSet->getPropertyValue( *pPropName );
+ OSL_ENSURE( false, "PropertySet::getProperties - cannot get all property values" );
}
}
- catch( Exception& )
+ else if( mxPropSet.is() )
{
- OSL_ENSURE( false, "PropertySet::getProperties - cannot get all property values" );
+ sal_Int32 nLen = rPropNames.getLength();
+ const OUString* pPropName = rPropNames.getConstArray();
+ const OUString* pPropNameEnd = pPropName + nLen;
+ orValues.realloc( nLen );
+ Any* pValue = orValues.getArray();
+ for( ; pPropName != pPropNameEnd; ++pPropName, ++pValue )
+ getAnyProperty( *pValue, *pPropName );
}
}
@@ -126,24 +126,25 @@ void PropertySet::setProperties( const Sequence< OUString >& rPropNames, const S
{
OSL_ENSURE( rPropNames.getLength() == rValues.getLength(),
"PropertySet::setProperties - length of sequences different" );
- try
+
+ if( mxMultiPropSet.is() ) // first try the XMultiPropertySet
{
- if( mxMultiPropSet.is() ) // first try the XMultiPropertySet
+ try
{
mxMultiPropSet->setPropertyValues( rPropNames, rValues );
}
- else if( mxPropSet.is() )
+ catch( Exception& )
{
- const OUString* pPropName = rPropNames.getConstArray();
- const OUString* pPropNameEnd = pPropName + rPropNames.getLength();
- const Any* pValue = rValues.getConstArray();
- for( ; pPropName != pPropNameEnd; ++pPropName, ++pValue )
- mxPropSet->setPropertyValue( *pPropName, *pValue );
+ OSL_ENSURE( false, "PropertySet::setProperties - cannot set all property values" );
}
}
- catch( Exception& )
+ else if( mxPropSet.is() )
{
- OSL_ENSURE( false, "PropertySet::setAnyProperty - cannot set all property values" );
+ const OUString* pPropName = rPropNames.getConstArray();
+ const OUString* pPropNameEnd = pPropName + rPropNames.getLength();
+ const Any* pValue = rValues.getConstArray();
+ for( ; pPropName != pPropNameEnd; ++pPropName, ++pValue )
+ setAnyProperty( *pPropName, *pValue );
}
}