diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-19 21:50:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-19 21:50:47 +0100 |
commit | aea73ba0af0bcf626306ffd0e7b00042c13c2dac (patch) | |
tree | 61f4031f84b1b0dbf1c8c2787da470211bceb71d /dbaccess/source/ui/dlg/dbfindex.cxx | |
parent | 8bcda4b58a531824a839d03db51c706347ca044b (diff) |
ByteString::CreateFromAscii->rtl::OStringBuffer::valueOffeature/layout
Diffstat (limited to 'dbaccess/source/ui/dlg/dbfindex.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/dbfindex.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 9a593cd26..6403be25f 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -42,6 +42,7 @@ #include <unotools/pathoptions.hxx> #include <ucbhelper/content.hxx> #include <svl/filenotation.hxx> +#include <rtl/strbuf.hxx> //......................................................................... @@ -493,14 +494,13 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const // Erst einmal alle Tabellenindizes loeschen ByteString aNDX; sal_uInt16 nKeyCnt = aInfFile.GetKeyCount(); - ByteString aKeyName; ByteString aEntry; sal_uInt16 nKey = 0; while( nKey < nKeyCnt ) { // Verweist der Key auf ein Indexfile?... - aKeyName = aInfFile.GetKeyName( nKey ); + ByteString aKeyName = aInfFile.GetKeyName( nKey ); aNDX = aKeyName.Copy(0,3); //...wenn ja, Indexfile loeschen, nKey steht dann auf nachfolgendem Key @@ -521,10 +521,13 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const ++aIndex, ++nPos ) { - aKeyName = "NDX"; + rtl::OStringBuffer aKeyName(RTL_CONSTASCII_STRINGPARAM("NDX")); if( nPos > 0 ) // Erster Index erhaelt keine Ziffer - aKeyName += ByteString::CreateFromInt32( nPos ); - aInfFile.WriteKey( aKeyName, ByteString(aIndex->GetIndexFileName(), gsl_getSystemTextEncoding()) ); + aKeyName.append(static_cast<sal_Int32>(nPos)); + aInfFile.WriteKey( + aKeyName.makeStringAndClear(), + rtl::OUStringToOString(aIndex->GetIndexFileName(), + gsl_getSystemTextEncoding())); } aInfFile.Flush(); |