summaryrefslogtreecommitdiff
path: root/goodies
diff options
context:
space:
mode:
authorSven Jacobi <sj@openoffice.org>2000-09-28 13:39:24 +0000
committerSven Jacobi <sj@openoffice.org>2000-09-28 13:39:24 +0000
commit80c54e2b71f4e4bc58d1e0c0d6875364879cde81 (patch)
treea7326b44ba430d94dd41c739095db8193249064d /goodies
parent7366530d4cfbb858c806a17fe9daba1ca523eea6 (diff)
#78792# fixed unicode conversion bug
Diffstat (limited to 'goodies')
-rw-r--r--goodies/source/filter.vcl/eos2met/eos2met.cxx8
-rw-r--r--goodies/source/filter.vcl/ios2met/ios2met.cxx16
2 files changed, 11 insertions, 13 deletions
diff --git a/goodies/source/filter.vcl/eos2met/eos2met.cxx b/goodies/source/filter.vcl/eos2met/eos2met.cxx
index 829c8f50d36b..cebcb18a79fb 100644
--- a/goodies/source/filter.vcl/eos2met/eos2met.cxx
+++ b/goodies/source/filter.vcl/eos2met/eos2met.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: eos2met.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:30:12 $
+ * last change: $Author: sj $ $Date: 2000-09-28 14:39:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -438,7 +438,7 @@ void METWriter::CreateChrSet(const Font & rFont)
pCS = new METChrSet;
pCS->pSucc = pChrSetList; pChrSetList=pCS;
pCS->nSet = nNextChrSetId++;
- pCS->aName = ByteString( rFont.GetName(), RTL_TEXTENCODING_UTF8 );
+ pCS->aName = ByteString( rFont.GetName(), gsl_getSystemTextEncoding() );
pCS->eWeight = rFont.GetWeight();
}
}
@@ -1399,7 +1399,7 @@ void METWriter::METPartialArcAtCurPos(Point aCenter, double fMultiplier,
void METWriter::METChrStr( Point aPt, String aUniStr )
{
USHORT nLen,i;
- ByteString aStr( aUniStr, RTL_TEXTENCODING_UTF8 );
+ ByteString aStr( aUniStr, gsl_getSystemTextEncoding() );
nLen = aStr.Len();
WillWriteOrder( 11 + nLen );
*pMET << (BYTE)0xc3 << (BYTE)( 9 + nLen );
diff --git a/goodies/source/filter.vcl/ios2met/ios2met.cxx b/goodies/source/filter.vcl/ios2met/ios2met.cxx
index e03dd1b4ab94..272f3c9173e2 100644
--- a/goodies/source/filter.vcl/ios2met/ios2met.cxx
+++ b/goodies/source/filter.vcl/ios2met/ios2met.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ios2met.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:30:15 $
+ * last change: $Author: sj $ $Date: 2000-09-28 14:39:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1023,9 +1023,8 @@ void OS2METReader::ReadChrStr(BOOL bGivenPos, BOOL bMove, BOOL bExtra, USHORT nO
pChr = new char[nLen+1];
for (i=0; i<nLen; i++)
*pOS2MET >> pChr[i];
- pChr[nLen]=0;
- String aStr( String::CreateFromAscii( pChr ) );
-
+ pChr[nLen] = 0;
+ String aStr( (const sal_Char*)pChr, gsl_getSystemTextEncoding() );
SetRasterOp(aAttr.eChrMix);
if (pVirDev->GetFont()!=aFont)
pVirDev->SetFont(aFont);
@@ -2304,11 +2303,10 @@ void OS2METReader::ReadFont(USHORT nFieldSize)
break;
case 0x08: { // Font Typeface
char str[33];
- String aStr;
pOS2MET->SeekRel(1);
- for (i=0; i<32; i++) *pOS2MET >> str[i];
- str[32]=0;
- aStr = String::CreateFromAscii( str );
+ pOS2MET->Read( &str, 32 );
+ str[ 32 ] = 0;
+ String aStr( (const sal_Char*)str, gsl_getSystemTextEncoding() );
if ( aStr.CompareIgnoreCaseToAscii( "Helv" ) == COMPARE_EQUAL )
aStr = String::CreateFromAscii( "Helvetica" );
pF->aFont.SetName( aStr );