summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-14 09:51:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-14 09:56:45 +0100
commitfa3adcf3c174be1703838665b6a7970816fefba8 (patch)
tree599081e83289f37fe6a4e61f0cf9a4af370acf25 /tools
parentf2ef13b2199f038c43a975258b3b59438e02797d (diff)
remove unused filler and width
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/stream.hxx18
-rw-r--r--tools/source/stream/stream.cxx33
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;
}