summaryrefslogtreecommitdiffstats
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-21 10:45:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-12-21 13:44:52 +0000
commit5c24789ca33d7b2b0c39626208cf0708fb470d95 (patch)
treea58015a4f6cafb9d567ca24831a442a4e976d972 /dbaccess
parentconvert ReadByteString/WriteByteString from ByteString to OString (diff)
downloadcore-5c24789ca33d7b2b0c39626208cf0708fb470d95.tar.gz
core-5c24789ca33d7b2b0c39626208cf0708fb470d95.zip
disentangle Read/WriteByteString OUString variants
The ones which use a definite 8-bit encoding read/write pascal-style strings with a 16bit length prefix. The ones which use a definite 16-bit encoding read/write pascal-style UTF-16 strings with a 32bit length prefix, i.e. not ByteStrings at all The "I dunno" ones might be UTF-16 strings or 8-bit strings, depending on the charset. Rename to ReadUniOrByteString like the other similar horrors to flag this misery
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/tabledesign/TableRow.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index b4ed28a4f0f4..35be52c28521 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -128,9 +128,9 @@ namespace dbaui
if(pFieldDesc)
{
_rStr << (sal_Int32)1;
- _rStr.WriteByteString(pFieldDesc->GetName());
- _rStr.WriteByteString(pFieldDesc->GetDescription());
- _rStr.WriteByteString(pFieldDesc->GetHelpText());
+ _rStr.WriteUniOrByteString(pFieldDesc->GetName(), _rStr.GetStreamCharSet());
+ _rStr.WriteUniOrByteString(pFieldDesc->GetDescription(), _rStr.GetStreamCharSet());
+ _rStr.WriteUniOrByteString(pFieldDesc->GetHelpText(), _rStr.GetStreamCharSet());
double nValue = 0.0;
Any aValue = pFieldDesc->GetControlDefault();
if ( aValue >>= nValue )
@@ -141,7 +141,7 @@ namespace dbaui
else
{
_rStr << sal_Int32(2);
- _rStr.WriteByteString(::comphelper::getString(aValue));
+ _rStr.WriteUniOrByteString(::comphelper::getString(aValue), _rStr.GetStreamCharSet());
}
_rStr << pFieldDesc->GetType();
@@ -170,12 +170,12 @@ namespace dbaui
OFieldDescription* pFieldDesc = new OFieldDescription();
_rRow.m_pActFieldDescr = pFieldDesc;
String sValue;
- _rStr.ReadByteString(sValue);
+ _rStr.ReadUniOrByteString(sValue, _rStr.GetStreamCharSet());
pFieldDesc->SetName(sValue);
- _rStr.ReadByteString(sValue);
+ _rStr.ReadUniOrByteString(sValue, _rStr.GetStreamCharSet());
pFieldDesc->SetDescription(sValue);
- _rStr.ReadByteString(sValue);
+ _rStr.ReadUniOrByteString(sValue, _rStr.GetStreamCharSet());
pFieldDesc->SetHelpText(sValue);
_rStr >> nValue;
@@ -190,7 +190,7 @@ namespace dbaui
break;
}
case 2:
- _rStr.ReadByteString(sValue);
+ _rStr.ReadUniOrByteString(sValue, _rStr.GetStreamCharSet());
aControlDefault <<= ::rtl::OUString(sValue);
break;
}