summaryrefslogtreecommitdiff
path: root/editeng/source/items/borderline.cxx
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2011-03-25 15:51:50 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2011-03-28 11:20:08 +0200
commitfe551ada2d874b067cf57e80811d9b91e61b5457 (patch)
tree91929e0c884813e8d1b0039aa68050af7e0a021d /editeng/source/items/borderline.cxx
parentb4000b20f09b70b4792d050bc1804025b059bdef (diff)
Moved SvxBorder* into editeng namespace to avoid duplicate DOUBLE on windows
Diffstat (limited to 'editeng/source/items/borderline.cxx')
-rw-r--r--editeng/source/items/borderline.cxx46
1 files changed, 27 insertions, 19 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index da0ece104f00..de24284b92ce 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -39,6 +39,31 @@
// class SvxBorderLine --------------------------------------------------
+namespace {
+
+ Color lcl_compute3DColor( Color aMain, int nLight, int nMedium, int nDark )
+ {
+ basegfx::BColor color = aMain.getBColor( );
+ basegfx::BColor hsl = basegfx::tools::rgb2hsl( color );
+
+ int nCoef = 0;
+ if ( hsl.getZ( ) >= 0.5 )
+ nCoef = nLight;
+ else if ( 0.5 > hsl.getZ() && hsl.getZ() >= 0.25 )
+ nCoef = nMedium;
+ else
+ nCoef = nDark;
+
+ double L = hsl.getZ() * 255.0 + nCoef;
+ hsl.setZ( L / 255.0 );
+ color = basegfx::tools::hsl2rgb( hsl );
+
+ return Color( color );
+ }
+} // Anonymous namespace
+
+namespace editeng {
+
Color SvxBorderLine::darkColor( Color aMain )
{
return aMain;
@@ -56,25 +81,6 @@ Color SvxBorderLine::lightColor( Color aMain )
return Color( color );
}
-Color lcl_compute3DColor( Color aMain, int nLight, int nMedium, int nDark )
-{
- basegfx::BColor color = aMain.getBColor( );
- basegfx::BColor hsl = basegfx::tools::rgb2hsl( color );
-
- int nCoef = 0;
- if ( hsl.getZ( ) >= 0.5 )
- nCoef = nLight;
- else if ( 0.5 > hsl.getZ() && hsl.getZ() >= 0.25 )
- nCoef = nMedium;
- else
- nCoef = nDark;
-
- double L = hsl.getZ() * 255.0 + nCoef;
- hsl.setZ( L / 255.0 );
- color = basegfx::tools::hsl2rgb( hsl );
-
- return Color( color );
-}
Color SvxBorderLine::threeDLightColor( Color aMain )
{
@@ -484,4 +490,6 @@ bool SvxBorderLine::HasPriority( const SvxBorderLine& rOtherLine ) const
}
}
+} // namespace editeng
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */