summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-14 11:49:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-14 15:19:49 +0100
commite881c80269d503f66fdc56fbc54875ec05379783 (patch)
tree306941c9a73067572ed86797ab15508418ee5904 /tools
parent398997a3e1034abbcaaea58a423ac8738549e0b8 (diff)
and now we can remove FormatString
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/stream.hxx3
-rw-r--r--tools/source/stream/stream.cxx37
2 files changed, 6 insertions, 34 deletions
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 241416a1cd54..0e5094561734 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -269,13 +269,10 @@ private:
rtl::OString m_aCryptMaskKey; // aCryptMaskKey.getLength != 0 -> Verschluesselung
unsigned char nCryptMask;
- ByteString aFormatString;
-
// Userdata
long nVersion; // for external use
// Hilfsmethoden
- void CreateFormatString();
TOOLS_DLLPRIVATE void ImpInit();
SvStream ( const SvStream& rStream ); // not implemented
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index fb79106b2657..99acaffa0f1f 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -459,7 +459,6 @@ void SvStream::ImpInit()
nBufFree = 0;
eStreamMode = 0;
- CreateFormatString();
nVersion = 0;
@@ -1937,43 +1936,19 @@ void SvStream::RefreshBuffer()
eIOMode = STREAM_IO_DONTKNOW;
}
-
-/*************************************************************************
-|*
-|* Stream::CreateFormatString()
-|*
-|* Beschreibung Baut Formatstring zusammen
-|*
-*************************************************************************/
-
-void SvStream::CreateFormatString()
-{
- aFormatString = '%';
-}
-
-/*************************************************************************
-|*
-|* Stream::WriteNumber()
-|*
-*************************************************************************/
-
-SvStream& SvStream::WriteNumber( sal_Int32 nInt32 )
+SvStream& SvStream::WriteNumber(sal_Int32 nInt32)
{
char buffer[256+12];
- ByteString aFStr( aFormatString);
- aFStr += SAL_PRIdINT32;
- sal_Size nLen = sprintf(buffer, aFStr.GetBuffer(), nInt32);
- Write( buffer, nLen );
+ sal_Size nLen = sprintf(buffer, "%"SAL_PRIdINT32, nInt32);
+ Write(buffer, nLen);
return *this;
}
-SvStream& SvStream::WriteNumber( sal_uInt32 nUInt32 )
+SvStream& SvStream::WriteNumber(sal_uInt32 nUInt32)
{
char buffer[256+12];
- ByteString aFStr( aFormatString);
- aFStr += SAL_PRIuUINT32;
- sal_Size nLen = sprintf(buffer, aFStr.GetBuffer(), nUInt32);
- Write( buffer, nLen );
+ sal_Size nLen = sprintf(buffer, "%"SAL_PRIuUINT32, nUInt32);
+ Write(buffer, nLen);
return *this;
}