summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-19 22:19:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-12-21 10:10:58 +0000
commitd00fc0e293852cfc019ffaffa65bee327397677b (patch)
tree3b28b98fb451bee33eff7c06a93dbb4063f07554 /dbaccess
parent92f396733ebc518bcb7a9eae2dd3169d333b82b9 (diff)
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;
}