summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-10 22:43:04 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-04-10 23:13:32 +0200
commit5fe96b6dcec8f0ccb7c606fa8e981112e6160e7e (patch)
tree7c19b02613c6c573c5bf577fb3cae94df6df5078 /vcl
parent5dba03b200564e2f891fc7e75e948f93ea769c10 (diff)
Drop SvStream::WriteCharPtr
WriteOString is a better replacement Change-Id: Ic431b9aeb98d19fe61cff71360eee555105cc2bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150192 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/skia/SkiaHelper.cxx6
-rw-r--r--vcl/source/filter/eps/eps.cxx88
-rw-r--r--vcl/source/filter/ipdf/pdfdocument.cxx174
-rw-r--r--vcl/source/fontsubset/sft.cxx100
-rw-r--r--vcl/source/opengl/win/WinDeviceInfo.cxx4
-rw-r--r--vcl/source/treelist/imap.cxx2
6 files changed, 187 insertions, 187 deletions
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index 905baba98775..a6189a36dc1b 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -66,9 +66,9 @@ static OUString getCacheFolder()
static void writeToLog(SvStream& stream, const char* key, const char* value)
{
- stream.WriteCharPtr(key);
- stream.WriteCharPtr(": ");
- stream.WriteCharPtr(value);
+ stream.WriteOString(key);
+ stream.WriteOString(": ");
+ stream.WriteOString(value);
stream.WriteChar('\n');
}
diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx
index c22a109a3ce2..8a4c140ee82d 100644
--- a/vcl/source/filter/eps/eps.cxx
+++ b/vcl/source/filter/eps/eps.cxx
@@ -442,7 +442,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
void PSWriter::ImplWriteProlog( const Graphic* pPreview )
{
ImplWriteLine( "%!PS-Adobe-3.0 EPSF-3.0 " );
- mpPS->WriteCharPtr( "%%BoundingBox: " ); // BoundingBox
+ mpPS->WriteOString( "%%BoundingBox: " ); // BoundingBox
ImplWriteLong( 0 );
ImplWriteLong( 0 );
Size aSizePoint = OutputDevice::LogicToLogic( pMTF->GetPrefSize(),
@@ -463,7 +463,7 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
// defaults
- mpPS->WriteCharPtr( "%%LanguageLevel: " ); // Language level
+ mpPS->WriteOString( "%%LanguageLevel: " ); // Language level
ImplWriteLong( mnLevel, PS_RET );
if ( !mbGrayScale && mnLevel == 1 )
ImplWriteLine( "%%Extensions: CMYK" ); // CMYK extension is to set in color mode in level 1
@@ -477,10 +477,10 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
BitmapReadAccess* pAcc = aTmpBitmap.AcquireReadAccess();
if ( pAcc )
{
- mpPS->WriteCharPtr( "%%BeginPreview: " ); // BoundingBox
+ mpPS->WriteOString( "%%BeginPreview: " ); // BoundingBox
ImplWriteLong( aSizeBitmap.Width() );
ImplWriteLong( aSizeBitmap.Height() );
- mpPS->WriteCharPtr( "1 " );
+ mpPS->WriteOString( "1 " );
sal_Int32 nLines = aSizeBitmap.Width() / 312;
if ( ( nLines * 312 ) != aSizeBitmap.Width() )
nLines++;
@@ -498,7 +498,7 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
if ( !nCount2 )
{
ImplExecMode( PS_RET );
- mpPS->WriteCharPtr( "%" );
+ mpPS->WriteOString( "%" );
nCount2 = 312;
}
nVal <<= 1;
@@ -1285,12 +1285,12 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
ImplAddPath( aPolyPoly.GetObject( i ) );
if ( ++i < nPolyCount )
{
- mpPS->WriteCharPtr( "p" );
+ mpPS->WriteOString( "p" );
mnCursorPos += 2;
ImplExecMode( PS_RET );
}
}
- mpPS->WriteCharPtr( "p ef" );
+ mpPS->WriteOString( "p ef" );
mnCursorPos += 4;
ImplExecMode( PS_RET );
}
@@ -1416,7 +1416,7 @@ void PSWriter::ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3
ImplWritePoint( rP1 );
ImplWritePoint( rP2 );
ImplWritePoint( rP3 );
- mpPS->WriteCharPtr( "ct " );
+ mpPS->WriteOString( "ct " );
ImplExecMode( nMode );
}
@@ -1448,11 +1448,11 @@ void PSWriter::ImplRect( const tools::Rectangle & rRect )
ImplWriteLineColor( PS_SPACE );
ImplMoveTo( rRect.TopLeft() );
ImplWriteDouble( nWidth );
- mpPS->WriteCharPtr( "0 rl 0 " );
+ mpPS->WriteOString( "0 rl 0 " );
ImplWriteDouble( nHeight );
- mpPS->WriteCharPtr( "rl " );
+ mpPS->WriteOString( "rl " );
ImplWriteDouble( nWidth );
- mpPS->WriteCharPtr( "neg 0 rl " );
+ mpPS->WriteOString( "neg 0 rl " );
ImplClosePathDraw();
}
mpPS->WriteUChar( 10 );
@@ -1467,12 +1467,12 @@ void PSWriter::ImplRectFill( const tools::Rectangle & rRect )
ImplWriteFillColor( PS_SPACE );
ImplMoveTo( rRect.TopLeft() );
ImplWriteDouble( nWidth );
- mpPS->WriteCharPtr( "0 rl 0 " );
+ mpPS->WriteOString( "0 rl 0 " );
ImplWriteDouble( nHeight );
- mpPS->WriteCharPtr( "rl " );
+ mpPS->WriteOString( "rl " );
ImplWriteDouble( nWidth );
- mpPS->WriteCharPtr( "neg 0 rl ef " );
- mpPS->WriteCharPtr( "p ef" );
+ mpPS->WriteOString( "neg 0 rl ef " );
+ mpPS->WriteOString( "p ef" );
mnCursorPos += 2;
ImplExecMode( PS_RET );
}
@@ -1508,7 +1508,7 @@ void PSWriter::ImplIntersect( const tools::PolyPolygon& rPolyPoly )
ImplAddPath( rPolyPoly.GetObject( i ) );
if ( ++i < nPolyCount )
{
- mpPS->WriteCharPtr( "p" );
+ mpPS->WriteOString( "p" );
mnCursorPos += 2;
ImplExecMode( PS_RET );
}
@@ -1543,12 +1543,12 @@ void PSWriter::ImplPolyPoly( const tools::PolyPolygon & rPolyPoly, bool bTextOut
ImplAddPath( rPolyPoly.GetObject( i ) );
if ( ++i < nPolyCount )
{
- mpPS->WriteCharPtr( "p" );
+ mpPS->WriteOString( "p" );
mnCursorPos += 2;
ImplExecMode( PS_RET );
}
}
- mpPS->WriteCharPtr( "p ef" );
+ mpPS->WriteOString( "p ef" );
mnCursorPos += 4;
ImplExecMode( PS_RET );
}
@@ -1736,14 +1736,14 @@ void PSWriter::ImplBmp( Bitmap const * pBitmap, Bitmap const * pMaskBitmap, cons
{
ImplWriteLong( nWidth );
ImplWriteLong( nHeight );
- mpPS->WriteCharPtr( "8 [" );
+ mpPS->WriteOString( "8 [" );
ImplWriteLong( nWidth );
- mpPS->WriteCharPtr( "0 0 " );
+ mpPS->WriteOString( "0 0 " );
ImplWriteLong( -nHeight );
ImplWriteLong( 0 );
ImplWriteLong( nHeight );
ImplWriteLine( "]" );
- mpPS->WriteCharPtr( "{currentfile " );
+ mpPS->WriteOString( "{currentfile " );
ImplWriteLong( nWidth );
ImplWriteLine( "string readhexstring pop}" );
ImplWriteLine( "image" );
@@ -1764,15 +1764,15 @@ void PSWriter::ImplBmp( Bitmap const * pBitmap, Bitmap const * pMaskBitmap, cons
ImplWriteLine( "/DeviceGray setcolorspace" );
ImplWriteLine( "<<" );
ImplWriteLine( "/ImageType 1" );
- mpPS->WriteCharPtr( "/Width " );
+ mpPS->WriteOString( "/Width " );
ImplWriteLong( nWidth, PS_RET );
- mpPS->WriteCharPtr( "/Height " );
+ mpPS->WriteOString( "/Height " );
ImplWriteLong( nHeight, PS_RET );
ImplWriteLine( "/BitsPerComponent 8" );
ImplWriteLine( "/Decode[0 1]" );
- mpPS->WriteCharPtr( "/ImageMatrix[" );
+ mpPS->WriteOString( "/ImageMatrix[" );
ImplWriteLong( nWidth );
- mpPS->WriteCharPtr( "0 0 " );
+ mpPS->WriteOString( "0 0 " );
ImplWriteLong( -nHeight );
ImplWriteLong( 0 );
ImplWriteLong( nHeight, PS_NONE );
@@ -1829,15 +1829,15 @@ void PSWriter::ImplBmp( Bitmap const * pBitmap, Bitmap const * pMaskBitmap, cons
ImplWriteLine( "] setcolorspace" );
ImplWriteLine( "<<" );
ImplWriteLine( "/ImageType 1" );
- mpPS->WriteCharPtr( "/Width " );
+ mpPS->WriteOString( "/Width " );
ImplWriteLong( nWidth, PS_RET );
- mpPS->WriteCharPtr( "/Height " );
+ mpPS->WriteOString( "/Height " );
ImplWriteLong( nHeight, PS_RET );
ImplWriteLine( "/BitsPerComponent 8" );
ImplWriteLine( "/Decode[0 255]" );
- mpPS->WriteCharPtr( "/ImageMatrix[" );
+ mpPS->WriteOString( "/ImageMatrix[" );
ImplWriteLong( nWidth );
- mpPS->WriteCharPtr( "0 0 " );
+ mpPS->WriteOString( "0 0 " );
ImplWriteLong( -nHeight );
ImplWriteLong( 0);
ImplWriteLong( nHeight, PS_NONE );
@@ -1878,15 +1878,15 @@ void PSWriter::ImplBmp( Bitmap const * pBitmap, Bitmap const * pMaskBitmap, cons
ImplWriteLine( "/DeviceRGB setcolorspace" );
ImplWriteLine( "<<" );
ImplWriteLine( "/ImageType 1" );
- mpPS->WriteCharPtr( "/Width " );
+ mpPS->WriteOString( "/Width " );
ImplWriteLong( nWidth, PS_RET );
- mpPS->WriteCharPtr( "/Height " );
+ mpPS->WriteOString( "/Height " );
ImplWriteLong( nHeight, PS_RET );
ImplWriteLine( "/BitsPerComponent 8" );
ImplWriteLine( "/Decode[0 1 0 1 0 1]" );
- mpPS->WriteCharPtr( "/ImageMatrix[" );
+ mpPS->WriteOString( "/ImageMatrix[" );
ImplWriteLong( nWidth );
- mpPS->WriteCharPtr( "0 0 " );
+ mpPS->WriteOString( "0 0 " );
ImplWriteLong( -nHeight );
ImplWriteLong( 0 );
ImplWriteLong( nHeight, PS_NONE );
@@ -2025,7 +2025,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, KernArra
if ( nRotation )
{
ImplWriteF( nRotation.get(), 1 );
- mpPS->WriteCharPtr( "r " );
+ mpPS->WriteOString( "r " );
}
for (auto const& elem : aPolyPolyVec)
ImplPolyPoly( elem, true );
@@ -2069,7 +2069,7 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint )
maLastFont = maFont;
aSize = maFont.GetFontSize();
ImplWriteDouble( aSize.Height() );
- mpPS->WriteCharPtr( "sf " );
+ mpPS->WriteOString( "sf " );
}
if ( eTextAlign != ALIGN_BASELINE )
{ // PostScript does not know about FontAlignment
@@ -2081,29 +2081,29 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint )
ImplMoveTo( aPoint );
if ( nRotation )
{
- mpPS->WriteCharPtr( "gs " );
+ mpPS->WriteOString( "gs " );
ImplWriteF( nRotation.get(), 1 );
- mpPS->WriteCharPtr( "r " );
+ mpPS->WriteOString( "r " );
}
}
void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic )
{
mpPS->WriteUChar( '/' ); //convert the font pOriginalName using ISOLatin1Encoding
- mpPS->WriteCharPtr( pOriginalName );
+ mpPS->WriteOString( pOriginalName );
switch ( maFont.GetWeight() )
{
case WEIGHT_SEMIBOLD :
case WEIGHT_BOLD :
case WEIGHT_ULTRABOLD :
case WEIGHT_BLACK :
- mpPS->WriteCharPtr( "-Bold" );
+ mpPS->WriteOString( "-Bold" );
if ( maFont.GetItalic() != ITALIC_NONE )
- mpPS->WriteCharPtr( pItalic );
+ mpPS->WriteOString( pItalic );
break;
default:
if ( maFont.GetItalic() != ITALIC_NONE )
- mpPS->WriteCharPtr( pItalic );
+ mpPS->WriteOString( pItalic );
break;
}
ImplWriteLine( " f" );
@@ -2111,14 +2111,14 @@ void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic )
void PSWriter::ImplClosePathDraw()
{
- mpPS->WriteCharPtr( "pc" );
+ mpPS->WriteOString( "pc" );
mnCursorPos += 2;
ImplExecMode( PS_RET );
}
void PSWriter::ImplPathDraw()
{
- mpPS->WriteCharPtr( "ps" );
+ mpPS->WriteOString( "ps" );
mnCursorPos += 2;
ImplExecMode( PS_RET );
}
@@ -2166,7 +2166,7 @@ void PSWriter::ImplWriteColor( NMode nMode )
ImplWriteB1 ( aColor.GetGreen() );
ImplWriteB1 ( aColor.GetBlue() );
}
- mpPS->WriteCharPtr( "c" ); // ( c is defined as setrgbcolor or setgray )
+ mpPS->WriteOString( "c" ); // ( c is defined as setrgbcolor or setgray )
ImplExecMode( nMode );
}
diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx
index c6638ec201eb..148f0bb45cf8 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -256,8 +256,8 @@ sal_Int32 PDFDocument::WriteAppearanceObject(tools::Rectangle& rSignatureRectang
// Write the object content.
SvMemoryStream aEditBuffer;
aEditBuffer.WriteUInt32AsString(nAppearanceId);
- aEditBuffer.WriteCharPtr(" 0 obj\n");
- aEditBuffer.WriteCharPtr("<</Type/XObject\n/Subtype/Form\n");
+ aEditBuffer.WriteOString(" 0 obj\n");
+ aEditBuffer.WriteOString("<</Type/XObject\n/Subtype/Form\n");
PDFObjectCopier aCopier(*this);
if (!aContentStreams.empty())
@@ -268,11 +268,11 @@ sal_Int32 PDFDocument::WriteAppearanceObject(tools::Rectangle& rSignatureRectang
aEditBuffer.WriteOString(aBuffer);
}
- aEditBuffer.WriteCharPtr("/BBox[0 0 ");
+ aEditBuffer.WriteOString("/BBox[0 0 ");
aEditBuffer.WriteOString(OString::number(rSignatureRectangle.getOpenWidth()));
- aEditBuffer.WriteCharPtr(" ");
+ aEditBuffer.WriteOString(" ");
aEditBuffer.WriteOString(OString::number(rSignatureRectangle.getOpenHeight()));
- aEditBuffer.WriteCharPtr("]\n/Length ");
+ aEditBuffer.WriteOString("]\n/Length ");
// Add the object to the doc-level edit buffer and update the offset.
SvMemoryStream aStream;
@@ -288,15 +288,15 @@ sal_Int32 PDFDocument::WriteAppearanceObject(tools::Rectangle& rSignatureRectang
aEditBuffer.WriteOString(" /Filter/FlateDecode");
}
- aEditBuffer.WriteCharPtr("\n>>\n");
+ aEditBuffer.WriteOString("\n>>\n");
- aEditBuffer.WriteCharPtr("stream\n");
+ aEditBuffer.WriteOString("stream\n");
// Copy the original page streams to the form XObject stream.
aStream.Seek(0);
aEditBuffer.WriteStream(aStream);
- aEditBuffer.WriteCharPtr("\nendstream\nendobj\n\n");
+ aEditBuffer.WriteOString("\nendstream\nendobj\n\n");
aEditBuffer.Seek(0);
XRefEntry aAppearanceEntry;
@@ -322,30 +322,30 @@ sal_Int32 PDFDocument::WriteAnnotObject(PDFObjectElement const& rFirstPage, sal_
aAnnotEntry.SetDirty(true);
m_aXRef[nAnnotId] = aAnnotEntry;
m_aEditBuffer.WriteUInt32AsString(nAnnotId);
- m_aEditBuffer.WriteCharPtr(" 0 obj\n");
- m_aEditBuffer.WriteCharPtr("<</Type/Annot/Subtype/Widget/F 132\n");
- m_aEditBuffer.WriteCharPtr("/Rect[0 0 ");
+ m_aEditBuffer.WriteOString(" 0 obj\n");
+ m_aEditBuffer.WriteOString("<</Type/Annot/Subtype/Widget/F 132\n");
+ m_aEditBuffer.WriteOString("/Rect[0 0 ");
m_aEditBuffer.WriteOString(OString::number(rSignatureRectangle.getOpenWidth()));
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteOString(OString::number(rSignatureRectangle.getOpenHeight()));
- m_aEditBuffer.WriteCharPtr("]\n");
- m_aEditBuffer.WriteCharPtr("/FT/Sig\n");
- m_aEditBuffer.WriteCharPtr("/P ");
+ m_aEditBuffer.WriteOString("]\n");
+ m_aEditBuffer.WriteOString("/FT/Sig\n");
+ m_aEditBuffer.WriteOString("/P ");
m_aEditBuffer.WriteUInt32AsString(rFirstPage.GetObjectValue());
- m_aEditBuffer.WriteCharPtr(" 0 R\n");
- m_aEditBuffer.WriteCharPtr("/T(Signature");
+ m_aEditBuffer.WriteOString(" 0 R\n");
+ m_aEditBuffer.WriteOString("/T(Signature");
m_aEditBuffer.WriteUInt32AsString(nNextSignature);
- m_aEditBuffer.WriteCharPtr(")\n");
- m_aEditBuffer.WriteCharPtr("/V ");
+ m_aEditBuffer.WriteOString(")\n");
+ m_aEditBuffer.WriteOString("/V ");
m_aEditBuffer.WriteUInt32AsString(nSignatureId);
- m_aEditBuffer.WriteCharPtr(" 0 R\n");
- m_aEditBuffer.WriteCharPtr("/DV ");
+ m_aEditBuffer.WriteOString(" 0 R\n");
+ m_aEditBuffer.WriteOString("/DV ");
m_aEditBuffer.WriteUInt32AsString(nSignatureId);
- m_aEditBuffer.WriteCharPtr(" 0 R\n");
- m_aEditBuffer.WriteCharPtr("/AP<<\n/N ");
+ m_aEditBuffer.WriteOString(" 0 R\n");
+ m_aEditBuffer.WriteOString("/AP<<\n/N ");
m_aEditBuffer.WriteInt32AsString(nAppearanceId);
- m_aEditBuffer.WriteCharPtr(" 0 R\n>>\n");
- m_aEditBuffer.WriteCharPtr(">>\nendobj\n\n");
+ m_aEditBuffer.WriteOString(" 0 R\n>>\n");
+ m_aEditBuffer.WriteOString(">>\nendobj\n\n");
return nAnnotId;
}
@@ -369,7 +369,7 @@ bool PDFDocument::WritePageObject(PDFObjectElement& rFirstPage, sal_Int32 nAnnot
m_aXRef[nAnnotsId].SetOffset(m_aEditBuffer.Tell());
m_aXRef[nAnnotsId].SetDirty(true);
m_aEditBuffer.WriteUInt32AsString(nAnnotsId);
- m_aEditBuffer.WriteCharPtr(" 0 obj\n[");
+ m_aEditBuffer.WriteOString(" 0 obj\n[");
// Write existing references.
PDFArrayElement* pArray = pAnnotsObject->GetArray();
@@ -386,16 +386,16 @@ bool PDFDocument::WritePageObject(PDFObjectElement& rFirstPage, sal_Int32 nAnnot
continue;
if (i)
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteUInt32AsString(pReference->GetObjectValue());
- m_aEditBuffer.WriteCharPtr(" 0 R");
+ m_aEditBuffer.WriteOString(" 0 R");
}
// Write our reference.
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteUInt32AsString(nAnnotId);
- m_aEditBuffer.WriteCharPtr(" 0 R");
+ m_aEditBuffer.WriteOString(" 0 R");
- m_aEditBuffer.WriteCharPtr("]\nendobj\n\n");
+ m_aEditBuffer.WriteOString("]\nendobj\n\n");
}
else
{
@@ -409,8 +409,8 @@ bool PDFDocument::WritePageObject(PDFObjectElement& rFirstPage, sal_Int32 nAnnot
m_aXRef[nFirstPageId].SetOffset(m_aEditBuffer.Tell());
m_aXRef[nFirstPageId].SetDirty(true);
m_aEditBuffer.WriteUInt32AsString(nFirstPageId);
- m_aEditBuffer.WriteCharPtr(" 0 obj\n");
- m_aEditBuffer.WriteCharPtr("<<");
+ m_aEditBuffer.WriteOString(" 0 obj\n");
+ m_aEditBuffer.WriteOString("<<");
auto pAnnotsArray = dynamic_cast<PDFArrayElement*>(pAnnots);
if (!pAnnotsArray)
{
@@ -418,9 +418,9 @@ bool PDFDocument::WritePageObject(PDFObjectElement& rFirstPage, sal_Int32 nAnnot
m_aEditBuffer.WriteBytes(static_cast<const char*>(m_aEditBuffer.GetData())
+ rFirstPage.GetDictionaryOffset(),
rFirstPage.GetDictionaryLength());
- m_aEditBuffer.WriteCharPtr("/Annots[");
+ m_aEditBuffer.WriteOString("/Annots[");
m_aEditBuffer.WriteUInt32AsString(nAnnotId);
- m_aEditBuffer.WriteCharPtr(" 0 R]");
+ m_aEditBuffer.WriteOString(" 0 R]");
}
else
{
@@ -435,9 +435,9 @@ bool PDFDocument::WritePageObject(PDFObjectElement& rFirstPage, sal_Int32 nAnnot
m_aEditBuffer.WriteBytes(static_cast<const char*>(m_aEditBuffer.GetData())
+ rFirstPage.GetDictionaryOffset(),
nAnnotsBeforeEndLength);
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteUInt32AsString(nAnnotId);
- m_aEditBuffer.WriteCharPtr(" 0 R");
+ m_aEditBuffer.WriteOString(" 0 R");
// Length of Annots end -> end of the dictionary.
sal_uInt64 nAnnotsAfterEndLength = rFirstPage.GetDictionaryOffset()
+ rFirstPage.GetDictionaryLength()
@@ -446,8 +446,8 @@ bool PDFDocument::WritePageObject(PDFObjectElement& rFirstPage, sal_Int32 nAnnot
+ nAnnotsEndOffset,
nAnnotsAfterEndLength);
}
- m_aEditBuffer.WriteCharPtr(">>");
- m_aEditBuffer.WriteCharPtr("\nendobj\n\n");
+ m_aEditBuffer.WriteOString(">>");
+ m_aEditBuffer.WriteOString("\nendobj\n\n");
}
return true;
@@ -500,7 +500,7 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
m_aXRef[nAcroFormId].SetOffset(m_aEditBuffer.Tell());
m_aXRef[nAcroFormId].SetDirty(true);
m_aEditBuffer.WriteUInt32AsString(nAcroFormId);
- m_aEditBuffer.WriteCharPtr(" 0 obj\n");
+ m_aEditBuffer.WriteOString(" 0 obj\n");
// If this is nullptr, then the AcroForm object is not in an object stream.
SvMemoryStream* pStreamBuffer = pAcroFormObject->GetStreamBuffer();
@@ -531,16 +531,16 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
else
{
nFieldsBeforeEndLength -= pAcroFormObject->GetDictionaryOffset();
- m_aEditBuffer.WriteCharPtr("<<");
+ m_aEditBuffer.WriteOString("<<");
m_aEditBuffer.WriteBytes(static_cast<const char*>(m_aEditBuffer.GetData())
+ pAcroFormObject->GetDictionaryOffset(),
nFieldsBeforeEndLength);
}
// Append our reference at the end of the Fields array.
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteUInt32AsString(nAnnotId);
- m_aEditBuffer.WriteCharPtr(" 0 R");
+ m_aEditBuffer.WriteOString(" 0 R");
// Length of Fields end -> end of the object dictionary.
if (pStreamBuffer)
@@ -558,10 +558,10 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
m_aEditBuffer.WriteBytes(static_cast<const char*>(m_aEditBuffer.GetData())
+ nFieldsEndOffset,
nFieldsAfterEndLength);
- m_aEditBuffer.WriteCharPtr(">>");
+ m_aEditBuffer.WriteOString(">>");
}
- m_aEditBuffer.WriteCharPtr("\nendobj\n\n");
+ m_aEditBuffer.WriteOString("\nendobj\n\n");
}
else
{
@@ -570,17 +570,17 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
m_aXRef[nCatalogId].SetOffset(m_aEditBuffer.Tell());
m_aXRef[nCatalogId].SetDirty(true);
m_aEditBuffer.WriteUInt32AsString(nCatalogId);
- m_aEditBuffer.WriteCharPtr(" 0 obj\n");
- m_aEditBuffer.WriteCharPtr("<<");
+ m_aEditBuffer.WriteOString(" 0 obj\n");
+ m_aEditBuffer.WriteOString("<<");
if (!pAcroFormDictionary)
{
// No AcroForm key, assume no signatures.
m_aEditBuffer.WriteBytes(static_cast<const char*>(m_aEditBuffer.GetData())
+ pCatalog->GetDictionaryOffset(),
pCatalog->GetDictionaryLength());
- m_aEditBuffer.WriteCharPtr("/AcroForm<</Fields[\n");
+ m_aEditBuffer.WriteOString("/AcroForm<</Fields[\n");
m_aEditBuffer.WriteUInt32AsString(nAnnotId);
- m_aEditBuffer.WriteCharPtr(" 0 R\n]/SigFlags 3>>\n");
+ m_aEditBuffer.WriteOString(" 0 R\n]/SigFlags 3>>\n");
}
else
{
@@ -607,9 +607,9 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
m_aEditBuffer.WriteBytes(static_cast<const char*>(m_aEditBuffer.GetData())
+ pCatalog->GetDictionaryOffset(),
nFieldsBeforeEndLength);
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteUInt32AsString(nAnnotId);
- m_aEditBuffer.WriteCharPtr(" 0 R");
+ m_aEditBuffer.WriteOString(" 0 R");
// Length of Fields end -> end of the Catalog dictionary.
sal_uInt64 nFieldsAfterEndLength = pCatalog->GetDictionaryOffset()
+ pCatalog->GetDictionaryLength() - nFieldsEndOffset;
@@ -617,7 +617,7 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
+ nFieldsEndOffset,
nFieldsAfterEndLength);
}
- m_aEditBuffer.WriteCharPtr(">>\nendobj\n\n");
+ m_aEditBuffer.WriteOString(">>\nendobj\n\n");
}
return true;
@@ -701,7 +701,7 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
}
m_aEditBuffer.WriteUInt32AsString(nXRefStreamId);
- m_aEditBuffer.WriteCharPtr(
+ m_aEditBuffer.WriteOString(
" 0 obj\n<</DecodeParms<</Columns 5/Predictor 12>>/Filter/FlateDecode");
// ID.
@@ -709,7 +709,7 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
if (pID)
{
const std::vector<PDFElement*>& rElements = pID->GetElements();
- m_aEditBuffer.WriteCharPtr("/ID [ <");
+ m_aEditBuffer.WriteOString("/ID [ <");
for (size_t i = 0; i < rElements.size(); ++i)
{
auto pIDString = dynamic_cast<PDFHexStringElement*>(rElements[i]);
@@ -718,36 +718,36 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
m_aEditBuffer.WriteOString(pIDString->GetValue());
if ((i + 1) < rElements.size())
- m_aEditBuffer.WriteCharPtr("> <");
+ m_aEditBuffer.WriteOString("> <");
}
- m_aEditBuffer.WriteCharPtr("> ] ");
+ m_aEditBuffer.WriteOString("> ] ");
}
// Index.
- m_aEditBuffer.WriteCharPtr("/Index [ ");
+ m_aEditBuffer.WriteOString("/Index [ ");
for (const auto& rXRef : m_aXRef)
{
if (!rXRef.second.GetDirty())
continue;
m_aEditBuffer.WriteUInt32AsString(rXRef.first);
- m_aEditBuffer.WriteCharPtr(" 1 ");
+ m_aEditBuffer.WriteOString(" 1 ");
}
- m_aEditBuffer.WriteCharPtr("] ");
+ m_aEditBuffer.WriteOString("] ");
// Info.
auto pInfo = dynamic_cast<PDFReferenceElement*>(m_pXRefStream->Lookup("Info"));
if (pInfo)
{
- m_aEditBuffer.WriteCharPtr("/Info ");
+ m_aEditBuffer.WriteOString("/Info ");
m_aEditBuffer.WriteUInt32AsString(pInfo->GetObjectValue());
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteUInt32AsString(pInfo->GetGenerationValue());
- m_aEditBuffer.WriteCharPtr(" R ");
+ m_aEditBuffer.WriteOString(" R ");
}
// Length.
- m_aEditBuffer.WriteCharPtr("/Length ");
+ m_aEditBuffer.WriteOString("/Length ");
{
ZCodec aZCodec;
aZCodec.BeginCompression();
@@ -765,30 +765,30 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
if (!m_aStartXRefs.empty())
{
// Write location of the previous cross-reference section.
- m_aEditBuffer.WriteCharPtr("/Prev ");
+ m_aEditBuffer.WriteOString("/Prev ");
m_aEditBuffer.WriteUInt32AsString(m_aStartXRefs.back());
}
// Root.
- m_aEditBuffer.WriteCharPtr("/Root ");
+ m_aEditBuffer.WriteOString("/Root ");
m_aEditBuffer.WriteUInt32AsString(pRoot->GetObjectValue());
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteUInt32AsString(pRoot->GetGenerationValue());
- m_aEditBuffer.WriteCharPtr(" R ");
+ m_aEditBuffer.WriteOString(" R ");
// Size.
- m_aEditBuffer.WriteCharPtr("/Size ");
+ m_aEditBuffer.WriteOString("/Size ");
m_aEditBuffer.WriteUInt32AsString(m_aXRef.size());
- m_aEditBuffer.WriteCharPtr("/Type/XRef/W[1 3 1]>>\nstream\n");
+ m_aEditBuffer.WriteOString("/Type/XRef/W[1 3 1]>>\nstream\n");
aXRefStream.Seek(0);
m_aEditBuffer.WriteStream(aXRefStream);
- m_aEditBuffer.WriteCharPtr("\nendstream\nendobj\n\n");
+ m_aEditBuffer.WriteOString("\nendstream\nendobj\n\n");
}
else
{
// Write the xref table.
- m_aEditBuffer.WriteCharPtr("xref\n");
+ m_aEditBuffer.WriteOString("xref\n");
for (const auto& rXRef : m_aXRef)
{
size_t nObject = rXRef.first;
@@ -797,7 +797,7 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
continue;
m_aEditBuffer.WriteUInt32AsString(nObject);
- m_aEditBuffer.WriteCharPtr(" 1\n");
+ m_aEditBuffer.WriteOString(" 1\n");
OStringBuffer aBuffer = OString::number(static_cast<sal_Int32>(nOffset));
while (aBuffer.getLength() < 10)
aBuffer.insert(0, "0");
@@ -809,27 +809,27 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
}
// Write the trailer.
- m_aEditBuffer.WriteCharPtr("trailer\n<</Size ");
+ m_aEditBuffer.WriteOString("trailer\n<</Size ");
m_aEditBuffer.WriteUInt32AsString(m_aXRef.size());
- m_aEditBuffer.WriteCharPtr("/Root ");
+ m_aEditBuffer.WriteOString("/Root ");
m_aEditBuffer.WriteUInt32AsString(pRoot->GetObjectValue());
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteUInt32AsString(pRoot->GetGenerationValue());
- m_aEditBuffer.WriteCharPtr(" R\n");
+ m_aEditBuffer.WriteOString(" R\n");
auto pInfo = dynamic_cast<PDFReferenceElement*>(m_pTrailer->Lookup("Info"));
if (pInfo)
{
- m_aEditBuffer.WriteCharPtr("/Info ");
+ m_aEditBuffer.WriteOString("/Info ");
m_aEditBuffer.WriteUInt32AsString(pInfo->GetObjectValue());
- m_aEditBuffer.WriteCharPtr(" ");
+ m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteUInt32AsString(pInfo->GetGenerationValue());
- m_aEditBuffer.WriteCharPtr(" R\n");
+ m_aEditBuffer.WriteOString(" R\n");
}
auto pID = dynamic_cast<PDFArrayElement*>(m_pTrailer->Lookup("ID"));
if (pID)
{
const std::vector<PDFElement*>& rElements = pID->GetElements();
- m_aEditBuffer.WriteCharPtr("/ID [ <");
+ m_aEditBuffer.WriteOString("/ID [ <");
for (size_t i = 0; i < rElements.size(); ++i)
{
auto pIDString = dynamic_cast<PDFHexStringElement*>(rElements[i]);
@@ -838,19 +838,19 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
m_aEditBuffer.WriteOString(pIDString->GetValue());
if ((i + 1) < rElements.size())
- m_aEditBuffer.WriteCharPtr(">\n<");
+ m_aEditBuffer.WriteOString(">\n<");
}
- m_aEditBuffer.WriteCharPtr("> ]\n");
+ m_aEditBuffer.WriteOString("> ]\n");
}
if (!m_aStartXRefs.empty())
{
// Write location of the previous cross-reference section.
- m_aEditBuffer.WriteCharPtr("/Prev ");
+ m_aEditBuffer.WriteOString("/Prev ");
m_aEditBuffer.WriteUInt32AsString(m_aStartXRefs.back());
}
- m_aEditBuffer.WriteCharPtr(">>\n");
+ m_aEditBuffer.WriteOString(">>\n");
}
}
@@ -858,7 +858,7 @@ bool PDFDocument::Sign(const uno::Reference<security::XCertificate>& xCertificat
const OUString& rDescription, bool bAdES)
{
m_aEditBuffer.Seek(STREAM_SEEK_TO_END);
- m_aEditBuffer.WriteCharPtr("\n");
+ m_aEditBuffer.WriteOString("\n");
sal_uInt64 nSignatureLastByteRangeOffset = 0;
sal_Int64 nSignatureContentOffset = 0;
@@ -906,9 +906,9 @@ bool PDFDocument::Sign(const uno::Reference<security::XCertificate>& xCertificat
WriteXRef(nXRefOffset, pRoot);
// Write startxref.
- m_aEditBuffer.WriteCharPtr("startxref\n");
+ m_aEditBuffer.WriteOString("startxref\n");
m_aEditBuffer.WriteUInt32AsString(nXRefOffset);
- m_aEditBuffer.WriteCharPtr("\n%%EOF\n");
+ m_aEditBuffer.WriteOString("\n%%EOF\n");
// Finalize the signature, now that we know the total file size.
// Calculate the length of the last byte range.
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 3d3c8825f422..0eee2fee38b8 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -228,13 +228,13 @@ bool HexFmt::Flush()
void HexFmt::OpenString()
{
- o->WriteCharPtr("<\n");
+ o->WriteOString("<\n");
}
void HexFmt::CloseString()
{
Flush();
- o->WriteCharPtr("00\n>\n");
+ o->WriteOString("00\n>\n");
}
void HexFmt::BlockWrite(const void *ptr, sal_uInt32 size)
@@ -252,7 +252,7 @@ void HexFmt::BlockWrite(const void *ptr, sal_uInt32 size)
buffer[bufpos++] = toHex(Ch & 0xF);
if (bufpos == HFORMAT_LINELEN) {
Flush();
- o->WriteCharPtr("\n");
+ o->WriteOString("\n");
}
}
@@ -1628,16 +1628,16 @@ SFErrCodes CreateT3FromTTGlyphs(TrueTypeFont *ttf, SvStream *outf, const char *f
char buf[bufmax];
snprintf(buf, bufmax, h01, GetInt16(table, 0), GetUInt16(table, 2), GetInt16(table, 4), GetUInt16(table, 6));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, h02, modname, modver, modextra);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, h09, ttf->psname.getStr());
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%s", h10);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, h11, fname);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
/* snprintf(buf, bufmax, h12, 4000000); */
/* XUID generation:
@@ -1651,29 +1651,29 @@ SFErrCodes CreateT3FromTTGlyphs(TrueTypeFont *ttf, SvStream *outf, const char *f
*/
snprintf(buf, bufmax, h17, rtl_crc32(0, ttf->ptr, ttf->fsize), nGlyphs, rtl_crc32(0, glyphArray, nGlyphs * 2), rtl_crc32(0, encoding, nGlyphs));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%s", h13);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, h14, XUnits(UPEm, GetInt16(table, 36)), XUnits(UPEm, GetInt16(table, 38)), XUnits(UPEm, GetInt16(table, 40)), XUnits(UPEm, GetInt16(table, 42)));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%s", h15);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
for (i = 0; i < nGlyphs; i++) {
snprintf(buf, bufmax, h16, encoding[i], i);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
}
snprintf(buf, bufmax, h30, nGlyphs+1);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%s", h31);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%s", h32);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
for (i = 0; i < nGlyphs; i++) {
snprintf(buf, bufmax, h33, i);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
int r = GetTTGlyphOutline(ttf, glyphArray[i] < ttf->glyphCount() ? glyphArray[i] : 0, pa, &metrics, nullptr);
if (r > 0) {
@@ -1692,7 +1692,7 @@ SFErrCodes CreateT3FromTTGlyphs(TrueTypeFont *ttf, SvStream *outf, const char *f
XUnits(UPEm, metrics.yMin),
XUnits(UPEm, metrics.xMax),
XUnits(UPEm, metrics.yMax));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
for (j = 0; j < n; j++)
{
@@ -1700,22 +1700,22 @@ SFErrCodes CreateT3FromTTGlyphs(TrueTypeFont *ttf, SvStream *outf, const char *f
{
case PS_MOVETO:
snprintf(buf, bufmax, "\t%d %d moveto\n", XUnits(UPEm, path[j].x1), XUnits(UPEm, path[j].y1));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
break;
case PS_LINETO:
snprintf(buf, bufmax, "\t%d %d lineto\n", XUnits(UPEm, path[j].x1), XUnits(UPEm, path[j].y1));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
break;
case PS_CURVETO:
snprintf(buf, bufmax, "\t%d %d %d %d %d %d curveto\n", XUnits(UPEm, path[j].x1), XUnits(UPEm, path[j].y1), XUnits(UPEm, path[j].x2), XUnits(UPEm, path[j].y2), XUnits(UPEm, path[j].x3), XUnits(UPEm, path[j].y3));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
break;
case PS_CLOSEPATH:
snprintf(buf, bufmax, "\tclosepath\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
break;
case PS_NOOP:
break;
@@ -1724,21 +1724,21 @@ SFErrCodes CreateT3FromTTGlyphs(TrueTypeFont *ttf, SvStream *outf, const char *f
if (n > 0)
{
snprintf(buf, bufmax, "\tfill\n"); /* if glyph is not a whitespace character */
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
}
snprintf(buf, bufmax, "%s", h34);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
path.reset();
}
snprintf(buf, bufmax, "%s", h35);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%s", h40);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, h41, fname);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
return SFErrCodes::Ok;
}
@@ -2056,7 +2056,7 @@ static void DumpSfnts(SvStream *outf, sal_uInt8 *sfntP, sal_uInt32 sfntLen)
std::unique_ptr<sal_uInt32[]> offs(new sal_uInt32[numTables]);
- outf->WriteCharPtr("/sfnts [");
+ outf->WriteOString("/sfnts [");
h.OpenString();
h.BlockWrite(sfntP, 12); /* stream out the Offset Table */
h.BlockWrite(sfntP+12, 16 * numTables); /* stream out the Table Directory */
@@ -2125,7 +2125,7 @@ static void DumpSfnts(SvStream *outf, sal_uInt8 *sfntP, sal_uInt32 sfntLen)
h.BlockWrite(pad, (4 - (len & 3)) & 3);
}
h.CloseString();
- outf->WriteCharPtr("] def\n");
+ outf->WriteOString("] def\n");
}
SFErrCodes CreateT42FromTTGlyphs(TrueTypeFont *ttf,
@@ -2205,57 +2205,57 @@ SFErrCodes CreateT42FromTTGlyphs(TrueTypeFont *ttf,
char buf[bufmax];
snprintf(buf, bufmax, "%%!PS-TrueTypeFont-%d.%d-%d.%d\n", static_cast<int>(ver), static_cast<int>(ver & 0xFF), static_cast<int>(rev>>16), static_cast<int>(rev & 0xFFFF));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%%%%Creator: %s %s %s\n", modname, modver, modextra);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%%- Font subset generated from a source font file: '%s'\n", ttf->fileName().data());
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%%- Original font name: %s\n", ttf->psname.getStr());
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%%- Original font family: %s\n", ttf->family.getStr());
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "%%- Original font sub-family: %s\n", ttf->subfamily.getStr());
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "11 dict begin\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "/FontName (%s) cvn def\n", psname);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "/PaintType 0 def\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "/FontMatrix [1 0 0 1 0 0] def\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "/FontBBox [%d %d %d %d] def\n", XUnits(UPEm, GetInt16(headP, HEAD_xMin_offset)), XUnits(UPEm, GetInt16(headP, HEAD_yMin_offset)), XUnits(UPEm, GetInt16(headP, HEAD_xMax_offset)), XUnits(UPEm, GetInt16(headP, HEAD_yMax_offset)));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "/FontType 42 def\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "/Encoding 256 array def\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, " 0 1 255 {Encoding exch /.notdef put} for\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
for (i = 1; i<nGlyphs; i++) {
snprintf(buf, bufmax, "Encoding %d /glyph%u put\n", encoding[i], gID[i]);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
}
snprintf(buf, bufmax, "/XUID [103 0 1 16#%08X %u 16#%08X 16#%08X] def\n", static_cast<unsigned int>(rtl_crc32(0, ttf->ptr, ttf->fsize)), static_cast<unsigned int>(nGlyphs), static_cast<unsigned int>(rtl_crc32(0, glyphArray, nGlyphs * 2)), static_cast<unsigned int>(rtl_crc32(0, encoding, nGlyphs)));
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
DumpSfnts(outf, aOutBuffer.data(), aOutBuffer.size());
/* dump charstrings */
snprintf(buf, bufmax, "/CharStrings %d dict dup begin\n", nGlyphs);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "/.notdef 0 def\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
for (i = 1; i < nGlyfCount; i++) {
snprintf(buf, bufmax, "/glyph%d %d def\n", i, i);
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
}
snprintf(buf, bufmax, "end readonly def\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
snprintf(buf, bufmax, "FontName currentdict end definefont pop\n");
- outf->WriteCharPtr(buf);
+ outf->WriteOString(buf);
return SFErrCodes::Ok;
}
diff --git a/vcl/source/opengl/win/WinDeviceInfo.cxx b/vcl/source/opengl/win/WinDeviceInfo.cxx
index ef6a840f533b..bc8a0510027d 100644
--- a/vcl/source/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/source/opengl/win/WinDeviceInfo.cxx
@@ -191,8 +191,8 @@ OUString getCacheFolder()
void writeToLog(SvStream& rStrm, const char* pKey, std::u16string_view rVal)
{
- rStrm.WriteCharPtr(pKey);
- rStrm.WriteCharPtr(": ");
+ rStrm.WriteOString(pKey);
+ rStrm.WriteOString(": ");
rStrm.WriteOString(OUStringToOString(rVal, RTL_TEXTENCODING_UTF8));
rStrm.WriteChar('\n');
}
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index 09cc9f4f0647..5c3b5b0b252a 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -921,7 +921,7 @@ void ImageMap::Write( SvStream& rOStm ) const
rOStm.SetEndian( SvStreamEndian::LITTLE );
// write MagicCode
- rOStm.WriteCharPtr( IMAPMAGIC );
+ rOStm.WriteOString( IMAPMAGIC );
rOStm.WriteUInt16( IMAGE_MAP_VERSION );
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aImageName, eEncoding);
write_uInt16_lenPrefixed_uInt8s_FromOString(rOStm, ""); //dummy