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( "' not found in '" );
message.append( ::rtl::OUStringToOString( SubComponentRecovery::getComponentsStorageName( eComponentType ), RTL_TEXTENCODING_ASCII_US ) ); message.append( ::rtl::OUStringToOString( SubComponentRecovery::getComponentsStorageName( eComponentType ), RTL_TEXTENCODING_ASCII_US ) );
message.append( "', but required per map file!" ); message.append( "', but required per map file!" );
OSL_FAIL( message.makeStringAndClear() ); OSL_FAIL( message.getStr() );
#endif #endif
continue; continue;
} }

View File

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