diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-31 23:49:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-31 23:49:35 +0100 |
commit | ef6add9a7e0bcba1fb039afb75d62e753fa37949 (patch) | |
tree | 2f4bcee1cbcb97e6015995b7edd0d9087289a54e /tools | |
parent | d4d26018402aaa75fcb6524f5c7d99fcd9c5be45 (diff) |
callcatcher: remove unused code
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/color.hxx | 4 | ||||
-rw-r--r-- | tools/inc/tools/stream.hxx | 2 | ||||
-rw-r--r-- | tools/source/generic/color.cxx | 49 | ||||
-rw-r--r-- | tools/source/stream/stream.cxx | 7 |
4 files changed, 0 insertions, 62 deletions
diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx index ecd5f83b688c..ba9d7df5806d 100644 --- a/tools/inc/tools/color.hxx +++ b/tools/inc/tools/color.hxx @@ -177,10 +177,6 @@ public: static ColorData HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri ); void RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const; - // the range for cymk is 0 to 1.0 - static ColorData CMYKtoRGB( double fCyan, double fMagenta, double fYellow, double fKey ); - void RGBtoCMYK( double& fCyan, double& fMagenta, double& fYellow, double& fKey ); - sal_Bool operator==( const Color& rColor ) const { return (mnColor == rColor.mnColor); } sal_Bool operator!=( const Color& rColor ) const diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index 82ff78ce554f..0bd7fb654136 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -445,8 +445,6 @@ public: sal_Bool WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding eDestCharSet ); sal_Bool WriteUnicodeOrByteText( const String& rStr ) { return WriteUnicodeOrByteText( rStr, GetStreamCharSet() ); } - /// Write a line of Unicode and append line end (endlu()) - sal_Bool WriteUniStringLine( const String& rStr ); /// Write a Unicode character if eDestCharSet==RTL_TEXTENCODING_UNICODE, /// otherwise write as Bytecode converted to eDestCharSet. diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx index 5560e631767a..114f395e7786 100644 --- a/tools/source/generic/color.cxx +++ b/tools/source/generic/color.cxx @@ -259,55 +259,6 @@ ColorData Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri ) return RGB_COLORDATA( cR, cG, cB ); } -// ----------------------------------------------------------------------- - -// CMYK values from 0 to 1 -ColorData Color::CMYKtoRGB( double fCyan, double fMagenta, double fYellow, double fKey ) -{ - fCyan = (fCyan * ( 1.0 - fKey )) + fKey; - fMagenta = (fMagenta * ( 1.0 - fKey )) + fKey; - fYellow = (fYellow * ( 1.0 - fKey )) + fKey; - - sal_uInt8 nRed = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fCyan ) * 255.0, 255.0), 0.0 ) ); - sal_uInt8 nGreen = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fMagenta ) * 255.0, 255.0), 0.0 ) ); - sal_uInt8 nBlue = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fYellow ) * 255.0, 255.0), 0.0 ) ); - - return RGB_COLORDATA( nRed, nGreen, nBlue ); -} - -// ----------------------------------------------------------------------- - -// RGB values from 0 to 255 -// CMY results from 0 to 1 -void Color::RGBtoCMYK( double& fCyan, double& fMagenta, double& fYellow, double& fKey ) -{ - fCyan = 1 - ( GetRed() / 255.0 ); - fMagenta = 1 - ( GetGreen() / 255.0 ); - fYellow = 1 - ( GetBlue() / 255.0 ); - - //CMYK and CMY values from 0 to 1 - fKey = 1.0; - if( fCyan < fKey ) fKey = fCyan; - if( fMagenta < fKey ) fKey = fMagenta; - if( fYellow < fKey ) fKey = fYellow; - - if ( fKey == 1.0 ) - { - //Black - fCyan = 0.0; - fMagenta = 0.0; - fYellow = 0.0; - } - else - { - fCyan = ( fCyan - fKey ) / ( 1.0 - fKey ); - fMagenta = ( fMagenta - fKey ) / ( 1.0 - fKey ); - fYellow = ( fYellow - fKey ) / ( 1.0 - fKey ); - } -} - -// ----------------------------------------------------------------------- - SvStream& Color::Read( SvStream& rIStm, sal_Bool bNewFormat ) { if ( bNewFormat ) diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 84ae7bfb72ee..db7820e838c1 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -920,13 +920,6 @@ sal_Bool SvStream::WriteLine( const ByteString& rStr ) return nError == SVSTREAM_OK; } -sal_Bool SvStream::WriteUniStringLine( const String& rStr ) -{ - WriteUnicodeText( rStr ); - endlu(*this); - return nError == SVSTREAM_OK; -} - /************************************************************************* |* |* Stream::WriteLines() |