[Libreoffice-commits] .: slideshow/source
Caolán McNamara
caolan at kemper.freedesktop.org
Sat Dec 4 13:21:35 PST 2010
slideshow/source/engine/color.cxx | 67 --------------------------------------
slideshow/source/engine/tools.cxx | 4 ++
slideshow/source/inc/hslcolor.hxx | 16 ---------
slideshow/source/inc/rgbcolor.hxx | 22 ------------
slideshow/source/inc/tools.hxx | 4 ++
5 files changed, 8 insertions(+), 105 deletions(-)
New commits:
commit 1ab36420dbe7dcdda770de05e34fdd65bb4983c1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Dec 4 21:21:24 2010 +0000
callcatcher: remove uncalled and uncallable methods
diff --git a/slideshow/source/engine/color.cxx b/slideshow/source/engine/color.cxx
index 4e65fc5..0f8a8f7 100644
--- a/slideshow/source/engine/color.cxx
+++ b/slideshow/source/engine/color.cxx
@@ -228,44 +228,6 @@ namespace slideshow
return maHSLTriple.mnLuminance;
}
- double HSLColor::getRed() const
- {
- if( ::basegfx::fTools::equalZero( getSaturation() ) )
- return getLuminance();
-
- return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
- mnMagicValue,
- getHue() + 120.0 );
- }
-
- double HSLColor::getGreen() const
- {
- if( ::basegfx::fTools::equalZero( getSaturation() ) )
- return getLuminance();
-
- return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
- mnMagicValue,
- getHue() );
- }
-
- double HSLColor::getBlue() const
- {
- if( ::basegfx::fTools::equalZero( getSaturation() ) )
- return getLuminance();
-
- return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
- mnMagicValue,
- getHue() - 120.0 );
- }
-
- RGBColor HSLColor::getRGBColor() const
- {
- RGBColor::RGBTriple aColor( hsl2rgb( getHue(),
- getSaturation(),
- getLuminance() ) );
- return RGBColor( aColor.mnRed, aColor.mnGreen, aColor.mnBlue );
- }
-
RGBColor::RGBColor(const RGBColor& rLHS)
{
RGBColor(rLHS.getRed(), rLHS.getGreen(), rLHS.getBlue());
@@ -385,27 +347,6 @@ namespace slideshow
{
}
- double RGBColor::getHue() const
- {
- return rgb2hsl( getRed(),
- getGreen(),
- getBlue() ).mnHue;
- }
-
- double RGBColor::getSaturation() const
- {
- return rgb2hsl( getRed(),
- getGreen(),
- getBlue() ).mnSaturation;
- }
-
- double RGBColor::getLuminance() const
- {
- return rgb2hsl( getRed(),
- getGreen(),
- getBlue() ).mnLuminance;
- }
-
double RGBColor::getRed() const
{
return maRGBTriple.mnRed;
@@ -421,14 +362,6 @@ namespace slideshow
return maRGBTriple.mnBlue;
}
- HSLColor RGBColor::getHSLColor() const
- {
- HSLColor::HSLTriple aColor( rgb2hsl( getRed(),
- getGreen(),
- getBlue() ) );
- return HSLColor( aColor.mnHue, aColor.mnSaturation, aColor.mnLuminance );
- }
-
::cppcanvas::Color::IntSRGBA RGBColor::getIntegerColor() const
{
return ::cppcanvas::makeColor( colorToInt( getRed() ),
diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx
index 1a6db2d..56f15ba 100644
--- a/slideshow/source/engine/tools.cxx
+++ b/slideshow/source/engine/tools.cxx
@@ -790,6 +790,9 @@ namespace slideshow
aTmpRect.Y+aTmpRect.Height );
}
+/*
+ TODO(F1): When ZOrder someday becomes usable enable this
+
double getAPIShapePrio( const uno::Reference< drawing::XShape >& xShape )
{
uno::Reference< beans::XPropertySet > xPropSet( xShape,
@@ -807,6 +810,7 @@ namespace slideshow
// Maybe we can also take the total number of shapes here
return nPrio / 65535.0;
}
+*/
basegfx::B2IVector getSlideSizePixel( const basegfx::B2DVector& rSlideSize,
const UnoViewSharedPtr& pView )
diff --git a/slideshow/source/inc/hslcolor.hxx b/slideshow/source/inc/hslcolor.hxx
index a2bd8e9..afd21c7 100644
--- a/slideshow/source/inc/hslcolor.hxx
+++ b/slideshow/source/inc/hslcolor.hxx
@@ -68,22 +68,6 @@ namespace slideshow
*/
double getLuminance() const;
- /** Get the RGB red value.
- */
- double getRed() const;
-
- /** Get the RGB green value.
- */
- double getGreen() const;
-
- /** Get the RGB blue value.
- */
- double getBlue() const;
-
- /** Create an RGB color object.
- */
- RGBColor getRGBColor() const;
-
struct HSLTriple
{
HSLTriple();
diff --git a/slideshow/source/inc/rgbcolor.hxx b/slideshow/source/inc/rgbcolor.hxx
index fd27859..4290042 100644
--- a/slideshow/source/inc/rgbcolor.hxx
+++ b/slideshow/source/inc/rgbcolor.hxx
@@ -50,24 +50,6 @@ namespace slideshow
RGBColor( double nRed, double nGreen, double nBlue );
explicit RGBColor( const HSLColor& rColor );
- /** Hue of the color.
-
- @return hue, is in the range [0,360]
- */
- double getHue() const;
-
- /** Saturation of the color.
-
- @return saturation, is in the range [0,1]
- */
- double getSaturation() const;
-
- /** Luminance of the color.
-
- @return luminance, is in the range [0,1]
- */
- double getLuminance() const;
-
/** Get the RGB red value.
*/
double getRed() const;
@@ -80,10 +62,6 @@ namespace slideshow
*/
double getBlue() const;
- /** Create an HSL color object.
- */
- HSLColor getHSLColor() const;
-
/** Create an integer sRGBA color.
*/
::cppcanvas::Color::IntSRGBA getIntegerColor() const;
diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx
index 706d26d..8e0b5b3 100644
--- a/slideshow/source/inc/tools.hxx
+++ b/slideshow/source/inc/tools.hxx
@@ -393,9 +393,13 @@ namespace slideshow
basegfx::B2DRange getAPIShapeBounds( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape );
+/*
+ TODO(F1): When ZOrder someday becomes usable enable this
+
/// Get the content of the ZOrder shape property
double getAPIShapePrio( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape );
+*/
basegfx::B2IVector getSlideSizePixel( const basegfx::B2DVector& rSize,
const boost::shared_ptr<UnoView>& pView );
More information about the Libreoffice-commits
mailing list