diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/stream.hxx | 18 | ||||
-rw-r--r-- | tools/source/stream/stream.cxx | 33 |
2 files changed, 2 insertions, 49 deletions
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index e2199dbd62a7..241416a1cd54 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -269,17 +269,6 @@ private: rtl::OString m_aCryptMaskKey; // aCryptMaskKey.getLength != 0 -> Verschluesselung unsigned char nCryptMask; - // Formatierung von Strings - char cFiller; - sal_uInt8 nWidth; - - enum PrintfParams - { - SPECIAL_PARAM_NONE = 0, // Format-Str, Number - SPECIAL_PARAM_WIDTH = 1 // Format-Str, Width, Number - }; - - PrintfParams ePrintfParams; ByteString aFormatString; // Userdata @@ -396,13 +385,6 @@ public: SvStream& WriteByteString( const UniString& rStr ) { return WriteByteString( rStr, GetStreamCharSet() ); } SvStream& WriteByteString( const ByteString& rStr ); - void SetWidth( sal_uInt8 nWid) - { nWidth = nWid; CreateFormatString(); } - sal_uInt8 GetWidth() const { return nWidth; } - void SetFiller( char cFil ) - { cFiller = cFil; CreateFormatString(); } - char GetFiller() const { return cFiller; } - SvStream& WriteNumber( sal_uInt32 nUInt32 ); SvStream& WriteNumber( sal_Int32 nInt32 ); diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index ff0f2eeb518b..fb79106b2657 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -458,8 +458,6 @@ void SvStream::ImpInit() eIOMode = STREAM_IO_DONTKNOW; nBufFree = 0; - nWidth = 0; // default width - cFiller = ' '; eStreamMode = 0; CreateFormatString(); @@ -1951,15 +1949,6 @@ void SvStream::RefreshBuffer() void SvStream::CreateFormatString() { aFormatString = '%'; - ePrintfParams = SPECIAL_PARAM_NONE; - - if( nWidth ) - { - if( cFiller != ' ' ) - aFormatString += '0'; - aFormatString += '*'; - ePrintfParams = SPECIAL_PARAM_WIDTH; - } } /************************************************************************* @@ -1973,16 +1962,7 @@ SvStream& SvStream::WriteNumber( sal_Int32 nInt32 ) char buffer[256+12]; ByteString aFStr( aFormatString); aFStr += SAL_PRIdINT32; - sal_Size nLen = 0; - switch ( ePrintfParams ) - { - case SPECIAL_PARAM_NONE : - nLen = sprintf(buffer, aFStr.GetBuffer(), nInt32); - break; - case SPECIAL_PARAM_WIDTH : - nLen = sprintf(buffer, aFStr.GetBuffer(), nWidth, nInt32); - break; - } + sal_Size nLen = sprintf(buffer, aFStr.GetBuffer(), nInt32); Write( buffer, nLen ); return *this; } @@ -1992,16 +1972,7 @@ SvStream& SvStream::WriteNumber( sal_uInt32 nUInt32 ) char buffer[256+12]; ByteString aFStr( aFormatString); aFStr += SAL_PRIuUINT32; - sal_Size nLen = 0; - switch ( ePrintfParams ) - { - case SPECIAL_PARAM_NONE : - nLen = sprintf(buffer, aFStr.GetBuffer(), nUInt32); - break; - case SPECIAL_PARAM_WIDTH : - nLen = sprintf(buffer, aFStr.GetBuffer(), nWidth, nUInt32); - break; - } + sal_Size nLen = sprintf(buffer, aFStr.GetBuffer(), nUInt32); Write( buffer, nLen ); return *this; } |