diff options
Diffstat (limited to 'extensions/source/abpilot/fieldmappingimpl.cxx')
-rw-r--r-- | extensions/source/abpilot/fieldmappingimpl.cxx | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index c7af76636362..88c6c4747d71 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -61,16 +61,14 @@ namespace abp //--------------------------------------------------------------------- static const ::rtl::OUString& lcl_getDriverSettingsNodeName() { - static const ::rtl::OUString s_sDriverSettingsNodeName = - ::rtl::OUString::createFromAscii( "/org.openoffice.Office.DataAccess/DriverSettings/com.sun.star.comp.sdbc.MozabDriver" ); + static const ::rtl::OUString s_sDriverSettingsNodeName(RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.DataAccess/DriverSettings/com.sun.star.comp.sdbc.MozabDriver" )); return s_sDriverSettingsNodeName; } //--------------------------------------------------------------------- static const ::rtl::OUString& lcl_getAddressBookNodeName() { - static const ::rtl::OUString s_sAddressBookNodeName = - ::rtl::OUString::createFromAscii( "/org.openoffice.Office.DataAccess/AddressBook" ); + static const ::rtl::OUString s_sAddressBookNodeName(RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.DataAccess/AddressBook" )); return s_sAddressBookNodeName; } @@ -99,22 +97,22 @@ namespace abp // the parent window Reference< XWindow > xDialogParent = VCLUnoHelper::GetInterface( _pParent ); - *pArguments++ <<= PropertyValue(::rtl::OUString::createFromAscii( "ParentWindow" ), -1, makeAny( xDialogParent ), PropertyState_DIRECT_VALUE); + *pArguments++ <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" )), -1, makeAny( xDialogParent ), PropertyState_DIRECT_VALUE); // the data source to use - *pArguments++ <<= PropertyValue(::rtl::OUString::createFromAscii( "DataSource" ), -1, makeAny( _rxDataSource ), PropertyState_DIRECT_VALUE); - *pArguments++ <<= PropertyValue(::rtl::OUString::createFromAscii( "DataSourceName" ), -1, makeAny( (sal_Bool)_rSettings.bRegisterDataSource ? _rSettings.sRegisteredDataSourceName : _rSettings.sDataSourceName ), PropertyState_DIRECT_VALUE); + *pArguments++ <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataSource" )), -1, makeAny( _rxDataSource ), PropertyState_DIRECT_VALUE); + *pArguments++ <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataSourceName" )), -1, makeAny( (sal_Bool)_rSettings.bRegisterDataSource ? _rSettings.sRegisteredDataSourceName : _rSettings.sDataSourceName ), PropertyState_DIRECT_VALUE); // the table to use - *pArguments++ <<= PropertyValue(::rtl::OUString::createFromAscii( "Command" ), -1, makeAny( _rSettings.sSelectedTable ), PropertyState_DIRECT_VALUE); + *pArguments++ <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Command" )), -1, makeAny( _rSettings.sSelectedTable ), PropertyState_DIRECT_VALUE); // the title ::rtl::OUString sTitle = String( ModuleRes( RID_STR_FIELDDIALOGTITLE ) ); - *pArguments++ <<= PropertyValue(::rtl::OUString::createFromAscii( "Title" ), -1, makeAny( sTitle ), PropertyState_DIRECT_VALUE); + *pArguments++ <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" )), -1, makeAny( sTitle ), PropertyState_DIRECT_VALUE); // ........................................................ // create an instance of the dialog service - static ::rtl::OUString s_sAdressBookFieldAssignmentServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.ui.AddressBookSourceDialog" ); + static ::rtl::OUString s_sAdressBookFieldAssignmentServiceName(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.AddressBookSourceDialog" )); Reference< XExecutableDialog > xDialog( _rxORB->createInstanceWithArguments( s_sAdressBookFieldAssignmentServiceName, aArguments ), UNO_QUERY @@ -135,7 +133,7 @@ namespace abp #ifdef DBG_UTIL sal_Bool bSuccess = #endif - xDialogProps->getPropertyValue( ::rtl::OUString::createFromAscii( "FieldMapping" ) ) >>= aMapping; + xDialogProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FieldMapping" )) ) >>= aMapping; DBG_ASSERT( bSuccess, "fieldmapping::invokeDialog: invalid property type for FieldMapping!" ); // and copy it into the map @@ -201,7 +199,7 @@ namespace abp // access the configuration information which the driver uses for determining it's column names ::rtl::OUString sDriverAliasesNodeName = lcl_getDriverSettingsNodeName(); - sDriverAliasesNodeName += ::rtl::OUString::createFromAscii( "/ColumnAliases" ); + sDriverAliasesNodeName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/ColumnAliases" )); // create a config node for this OConfigurationTreeRoot aDriverFieldAliasing = OConfigurationTreeRoot::createWithServiceFactory( @@ -261,15 +259,15 @@ namespace abp OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithServiceFactory( _rxORB, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE); - OConfigurationNode aFields = aAddressBookSettings.openNode( ::rtl::OUString::createFromAscii( "Fields" ) ); + OConfigurationNode aFields = aAddressBookSettings.openNode( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Fields" )) ); // loop through all existent fields Sequence< ::rtl::OUString > aExistentFields = aFields.getNodeNames(); const ::rtl::OUString* pExistentFields = aExistentFields.getConstArray(); const ::rtl::OUString* pExistentFieldsEnd = pExistentFields + aExistentFields.getLength(); - const ::rtl::OUString sProgrammaticNodeName = ::rtl::OUString::createFromAscii( "ProgrammaticFieldName" ); - const ::rtl::OUString sAssignedNodeName = ::rtl::OUString::createFromAscii( "AssignedFieldName" ); + const ::rtl::OUString sProgrammaticNodeName(RTL_CONSTASCII_USTRINGPARAM( "ProgrammaticFieldName" )); + const ::rtl::OUString sAssignedNodeName(RTL_CONSTASCII_USTRINGPARAM( "AssignedFieldName" )); for ( ; pExistentFields != pExistentFieldsEnd; ++pExistentFields ) { @@ -338,9 +336,9 @@ namespace abp OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithServiceFactory( _rxORB, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE); - aAddressBookSettings.setNodeValue( ::rtl::OUString::createFromAscii( "DataSourceName" ), makeAny( _rDataSourceName ) ); - aAddressBookSettings.setNodeValue( ::rtl::OUString::createFromAscii( "Command" ), makeAny( _rTableName ) ); - aAddressBookSettings.setNodeValue( ::rtl::OUString::createFromAscii( "CommandType" ), makeAny( (sal_Int32)CommandType::TABLE ) ); + aAddressBookSettings.setNodeValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataSourceName" )), makeAny( _rDataSourceName ) ); + aAddressBookSettings.setNodeValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Command" )), makeAny( _rTableName ) ); + aAddressBookSettings.setNodeValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CommandType" )), makeAny( (sal_Int32)CommandType::TABLE ) ); // commit the changes done aAddressBookSettings.commit(); @@ -357,7 +355,7 @@ namespace abp _rxORB, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE); // set the flag - aAddressBookSettings.setNodeValue( ::rtl::OUString::createFromAscii( "AutoPilotCompleted" ), makeAny( (sal_Bool)sal_True ) ); + aAddressBookSettings.setNodeValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AutoPilotCompleted" )), makeAny( (sal_Bool)sal_True ) ); // commit the changes done aAddressBookSettings.commit(); |