summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg/dbfindex.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 18:30:24 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 18:30:24 +0200
commit923db2bcda1f61c96e483986bdfe99bb8a49fe67 (patch)
tree3bb777e709f51bb32536e9f361a39dbedd234fda /dbaccess/source/ui/dlg/dbfindex.cxx
parented7c0e3aba79e0d428f62b0f3168ba28346bebff (diff)
parent93e5a0b1324bbbd0d68278ffe85ed05f3b848580 (diff)
resyncing to master
Diffstat (limited to 'dbaccess/source/ui/dlg/dbfindex.cxx')
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 464aba52b7df..f9c7ec0fed77 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();