summaryrefslogtreecommitdiff
path: root/svtools/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/filter')
-rw-r--r--svtools/source/filter/wmf/enhwmf.cxx7
-rw-r--r--svtools/source/filter/wmf/winwmf.cxx7
-rw-r--r--svtools/source/filter/wmf/wmfwr.cxx13
3 files changed, 15 insertions, 12 deletions
diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx
index e72e73a59b00..97f1d5cc631c 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -1151,14 +1151,15 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
if ( aText.Len() != nLen )
{
- sal_uInt16 i, j, k;
+ sal_uInt16 i, j;
sal_Int32* pOldDx = pDX;
pDX = new sal_Int32[ aText.Len() ];
for ( i = 0, j = 0; i < aText.Len(); i++ )
{
- ByteString aCharacter( aText.GetChar( i ), pOut->GetCharSet() );
+ sal_Unicode cUniChar = aText.GetChar(i);
+ rtl::OString aCharacter(&cUniChar, 1, pOut->GetCharSet());
pDX[ i ] = 0;
- for ( k = 0; ( k < aCharacter.Len() ) && ( j < nLen ) && ( i < aText.Len() ); k++ )
+ for (sal_Int32 k = 0; ( k < aCharacter.getLength() ) && ( j < nLen ) && ( i < aText.Len() ); ++k)
pDX[ i ] += pOldDx[ j++ ];
}
delete[] pOldDx;
diff --git a/svtools/source/filter/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx
index ae50af7ee654..3b53cbaf5a22 100644
--- a/svtools/source/filter/wmf/winwmf.cxx
+++ b/svtools/source/filter/wmf/winwmf.cxx
@@ -487,10 +487,11 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
*pWMF >> nDx;
if ( nNewTextLen != nOriginalTextLen )
{
- ByteString aTmp( aText.GetChar( i ), pOut->GetCharSet() );
- if ( aTmp.Len() > 1 )
+ sal_Unicode nUniChar = aText.GetChar(i);
+ rtl::OString aTmp(&nUniChar, 1, pOut->GetCharSet());
+ if ( aTmp.getLength() > 1 )
{
- sal_Int32 nDxCount = aTmp.Len() - 1;
+ sal_Int32 nDxCount = aTmp.getLength() - 1;
if ( ( ( nDxCount * 2 ) + pWMF->Tell() ) > nMaxStreamPos )
break;
while ( nDxCount-- )
diff --git a/svtools/source/filter/wmf/wmfwr.cxx b/svtools/source/filter/wmf/wmfwr.cxx
index 0ec3f7332c00..06025f2aa8e6 100644
--- a/svtools/source/filter/wmf/wmfwr.cxx
+++ b/svtools/source/filter/wmf/wmfwr.cxx
@@ -557,7 +557,7 @@ sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String&
{
const sal_Unicode* pBuf = rUniStr.GetBuffer();
const rtl_TextEncoding aTextEncodingOrg = aSrcFont.GetCharSet();
- ByteString aByteStr( rUniStr, aTextEncodingOrg );
+ rtl::OString aByteStr(rtl::OUStringToOString(rUniStr, aTextEncodingOrg));
String aUniStr2( aByteStr, aTextEncodingOrg );
const sal_Unicode* pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion
for ( i = 0; i < nStringLen; i++ )
@@ -579,7 +579,7 @@ sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String&
aTextEncoding = getBestMSEncodingByChar(*pCheckChar); // try the next character
}
- aByteStr = ByteString ( rUniStr, aTextEncoding );
+ aByteStr = rtl::OUStringToOString(rUniStr, aTextEncoding);
aUniStr2 = String ( aByteStr, aTextEncoding );
pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion
for ( i = 0; i < nStringLen; i++ )
@@ -654,7 +654,7 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point & rPoint,
return;
}
rtl_TextEncoding eChrSet = aSrcFont.GetCharSet();
- ByteString aByteString(rString, eChrSet);
+ rtl::OString aByteString(rtl::OUStringToOString(rString, eChrSet));
TrueExtTextOut(rPoint,rString,aByteString,pDXAry);
}
@@ -686,8 +686,9 @@ void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString,
*pWMF << nDx;
if ( nOriginalTextLen < nNewTextLen )
{
- ByteString aTemp( rString.GetChar( i ), aSrcFont.GetCharSet());
- j = aTemp.Len();
+ sal_Unicode nUniChar = rString.GetChar(i);
+ rtl::OString aTemp(&nUniChar, 1, aSrcFont.GetCharSet());
+ j = aTemp.getLength();
while ( --j > 0 )
*pWMF << (sal_uInt16)0;
}
@@ -943,7 +944,7 @@ void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize,
void WMFWriter::WMFRecord_TextOut(const Point & rPoint, const String & rStr)
{
rtl_TextEncoding eChrSet = aSrcFont.GetCharSet();
- ByteString aString( rStr, eChrSet );
+ rtl::OString aString(rtl::OUStringToOString(rStr, eChrSet));
TrueTextOut(rPoint, aString);
}