ByteString->rtl::OStringBuffer

This commit is contained in:
Caolán McNamara 2011-10-05 10:40:50 +01:00
parent 5b42577caf
commit 9a8593e69f
3 changed files with 12 additions and 11 deletions

View File

@ -398,7 +398,7 @@ namespace dbaccess
message.append( "' not found in '" );
message.append( ::rtl::OUStringToOString( SubComponentRecovery::getComponentsStorageName( eComponentType ), RTL_TEXTENCODING_ASCII_US ) );
message.append( "', but required per map file!" );
OSL_FAIL( message.makeStringAndClear() );
OSL_FAIL( message.getStr() );
#endif
continue;
}

View File

@ -37,6 +37,7 @@
#include <xmloff/nmspmap.hxx>
#include "xmlEnums.hxx"
#include "xmlstrings.hrc"
#include <rtl/strbuf.hxx>
#include <tools/debug.hxx>
namespace dbaxml
@ -194,9 +195,9 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
#endif
rImporter.GetMM100UnitConverter().convertBool(bValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
::rtl::OString("OXMLDataSourceSetting::convertString: could not convert \"")
+= ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString("\" into a boolean!"));
::rtl::OStringBuffer("OXMLDataSourceSetting::convertString: could not convert \"")
.append(::rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US))
.append("\" into a boolean!").getStr());
aReturn <<= bValue;
}
break;
@ -209,9 +210,9 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
#endif
rImporter.GetMM100UnitConverter().convertNumber(nValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
::rtl::OString("OXMLDataSourceSetting::convertString: could not convert \"")
+= ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString("\" into an integer!"));
::rtl::OStringBuffer("OXMLDataSourceSetting::convertString: could not convert \"")
.append(::rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US))
.append("\" into an integer!").getStr());
if (TypeClass_SHORT == _rExpectedType.getTypeClass())
aReturn <<= (sal_Int16)nValue;
else
@ -231,9 +232,9 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx
#endif
rImporter.GetMM100UnitConverter().convertDouble(nValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
::rtl::OString("OXMLDataSourceSetting::convertString: could not convert \"")
+= ::rtl::OString(_rReadCharacters.getStr(), _rReadCharacters.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString("\" into a double!"));
::rtl::OStringBuffer("OXMLDataSourceSetting::convertString: could not convert \"")
.append(rtl::OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US))
.append("\" into a double!").getStr());
aReturn <<= (double)nValue;
}
break;

View File

@ -186,7 +186,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue();
}
else
OSL_FAIL(((ByteString("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (") += ByteString((const sal_Unicode*)pArguments->Name, gsl_getSystemTextEncoding()).GetBuffer()) += ") !").GetBuffer());
OSL_FAIL(rtl::OStringBuffer("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (").append(rtl::OUStringToOString(pArguments->Name, gsl_getSystemTextEncoding())).append(") !").getStr());
}
if (!sControlType.getLength())
{