summaryrefslogtreecommitdiff
path: root/sc/source/ui/cctrl
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2010-11-05 19:23:38 -0700
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-11-06 09:19:56 -0500
commit72e1ebea328c6a7d951abd39176f731bccab7450 (patch)
tree21dbca42c385275d9394676d1be636ba6fc432aa /sc/source/ui/cctrl
parentaf077b4ae4d09c384a818de5ac4e7461a5b0b237 (diff)
High-Contrast Cleanup Phase #1
Diffstat (limited to 'sc/source/ui/cctrl')
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx35
1 files changed, 17 insertions, 18 deletions
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index cc8e9592d..f008e6ad9 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,7 +56,7 @@ SFX_IMPL_TOOLBOX_CONTROL( ScZoomSliderControl, SvxZoomSliderItem );
ScZoomSliderControl::ScZoomSliderControl(
USHORT nSlotId,
USHORT nId,
- ToolBox& rTbx )
+ ToolBox& rTbx )
:SfxToolBoxControl( nSlotId, nId, rTbx )
{
rTbx.Invalidate();
@@ -136,7 +136,7 @@ struct ScZoomSliderWnd::ScZoomSliderWnd_Impl
maIncreaseButton(),
maDecreaseButton(),
mbValuesSet( true ),
- mbOmitPaint( false )
+ mbOmitPaint( false )
{
}
@@ -148,7 +148,7 @@ const long nButtonWidth = 10;
const long nButtonHeight = 10;
const long nIncDecWidth = 11;
const long nIncDecHeight = 11;
-const long nSliderHeight = 2; //
+const long nSliderHeight = 2; //
const long nSliderWidth = 4; //
const long nSnappingHeight = 4;
const long nSliderXOffset = 20;
@@ -163,7 +163,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
Size aSliderWindowSize = GetOutputSizePixel();
const long nControlWidth = aSliderWindowSize.Width();
USHORT nRet = 0;
-
+
if( nOffset < nSliderXOffset )
return mpImpl->mnMinZoom;
if( nOffset > nControlWidth - nSliderXOffset )
@@ -210,7 +210,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
if( nRet < mpImpl->mnMinZoom )
return mpImpl->mnMinZoom;
-
+
else if( nRet > mpImpl->mnMaxZoom )
return mpImpl->mnMaxZoom;
@@ -256,10 +256,9 @@ ScZoomSliderWnd::ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::
m_xDispatchProvider( rDispatchProvider ),
m_xFrame( _xFrame )
{
- BOOL bIsHC = GetSettings().GetStyleSettings().GetHighContrastMode();
- mpImpl->maSliderButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) );
- mpImpl->maIncreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) );
- mpImpl->maDecreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) );
+ mpImpl->maSliderButton = Image( SVX_RES( RID_SVXBMP_SLIDERBUTTON ) );
+ mpImpl->maIncreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERINCREASE ) );
+ mpImpl->maDecreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERDECREASE ) );
Size aSliderSize = LogicToPixel( Size( aLogicalSize), MapMode( MAP_10TH_MM ) );
SetSizePixel( Size( aSliderSize.Width() * nSliderWidth-1, aSliderSize.Height() + nSliderHeight ) );
}
@@ -274,7 +273,7 @@ ScZoomSliderWnd::~ScZoomSliderWnd()
// -----------------------------------------------------------------------
void ScZoomSliderWnd::MouseButtonDown( const MouseEvent& rMEvt )
-{
+{
if ( !mpImpl->mbValuesSet )
return ;
Size aSliderWindowSize = GetOutputSizePixel();
@@ -311,19 +310,19 @@ void ScZoomSliderWnd::MouseButtonDown( const MouseEvent& rMEvt )
return ;
Rectangle aRect( Point( 0, 0 ), aSliderWindowSize );
-
+
Paint( aRect );
mpImpl->mbOmitPaint = true;
-
+
SvxZoomSliderItem aZoomSliderItem( mpImpl->mnCurrentZoom );
::com::sun::star::uno::Any a;
aZoomSliderItem.QueryValue( a );
-
+
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs( 1 );
aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ScalingFactor" ));
aArgs[0].Value = a;
-
+
SfxToolBoxControl::Dispatch( m_xDispatchProvider, String::CreateFromAscii(".uno:ScalingFactor"), aArgs );
mpImpl->mbOmitPaint = false;
@@ -418,7 +417,7 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem )
Size aSliderWindowSize = GetOutputSizePixel();
Rectangle aRect( Point( 0, 0 ), aSliderWindowSize );
-
+
if ( !mpImpl->mbOmitPaint )
Paint(aRect);
}
@@ -439,7 +438,7 @@ void ScZoomSliderWnd::DoPaint( const Rectangle& /*rRect*/ )
Size aSliderWindowSize = GetOutputSizePixel();
Rectangle aRect( Point( 0, 0 ), aSliderWindowSize );
-
+
VirtualDevice* pVDev = new VirtualDevice( *this );
pVDev->SetOutputSizePixel( aSliderWindowSize );
@@ -521,7 +520,7 @@ void ScZoomSliderWnd::DoPaint( const Rectangle& /*rRect*/ )
// draw increase button
aImagePoint.X() = aRect.TopLeft().X() + aSliderWindowSize.Width() - nIncDecWidth - (nSliderXOffset - nIncDecWidth)/2;
pVDev->DrawImage( aImagePoint, mpImpl->maIncreaseButton );
-
+
DrawOutDev( Point(0, 0), aSliderWindowSize, Point(0, 0), aSliderWindowSize, *pVDev );
delete pVDev;