summaryrefslogtreecommitdiff
path: root/dbaccess/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/filter')
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx35
1 files changed, 6 insertions, 29 deletions
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 25fafb18dea2..14bf274a63af 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -612,36 +612,13 @@ void ODBExport::exportConnectionData()
Reference< XPropertySet > xDataSourceSettings( xProp->getPropertyValue( PROPERTY_SETTINGS ), UNO_QUERY_THROW );
Reference< XPropertySetInfo > xSettingsInfo( xDataSourceSettings->getPropertySetInfo(), UNO_SET_THROW );
- struct PropertyMap
- {
- const sal_Char* pAsciiPropertyName;
- sal_uInt16 nAttributeId;
-
- PropertyMap( const sal_Char* _pAsciiPropertyName, const sal_uInt16 _nAttributeId )
- :pAsciiPropertyName( _pAsciiPropertyName )
- ,nAttributeId( _nAttributeId )
- {
- }
- };
- PropertyMap aProperties[] =
- {
- PropertyMap( "LocalSocket", XML_LOCAL_SOCKET )
- //PropertyMap( "NamedPipe", 0 /* TODO */ )
- };
-
- for ( size_t i=0;
- i < sizeof( aProperties ) / sizeof( aProperties[0] );
- ++i
- )
+
+ const OUString sPropertyName = "LocalSocket";
+ if ( xSettingsInfo->hasPropertyByName( sPropertyName ) )
{
- const OUString sPropertyName = OUString::createFromAscii( aProperties[i].pAsciiPropertyName );
- if ( xSettingsInfo->hasPropertyByName( sPropertyName ) )
- {
- OUString sPropertyValue;
- if ( ( xDataSourceSettings->getPropertyValue( sPropertyName ) >>= sPropertyValue ) && !sPropertyValue.isEmpty() )
- AddAttribute( XML_NAMESPACE_DB, XML_LOCAL_SOCKET, sPropertyValue );
-
- }
+ OUString sPropertyValue;
+ if ( ( xDataSourceSettings->getPropertyValue( sPropertyName ) >>= sPropertyValue ) && !sPropertyValue.isEmpty() )
+ AddAttribute( XML_NAMESPACE_DB, XML_LOCAL_SOCKET, sPropertyValue );
}
}
catch( const Exception& )