diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-20 14:06:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-20 14:06:49 +0200 |
commit | 3aff028b8f8c62d948d0d6f29a8bd4d169d1e762 (patch) | |
tree | 19ec9ef7c059bf8a6621f5999253843e3255b56e /dbaccess/source/filter | |
parent | 19a61ea8e11eab4a3fa2f3afa0c176d066732cf4 (diff) |
loplugin:unusedfields in dbaccess
Change-Id: I563c3727c1719fe21acced269e5469c2de7112e8
Diffstat (limited to 'dbaccess/source/filter')
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.cxx | 35 |
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& ) |