[Libreoffice-commits] .: sc/source

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Sat Nov 6 08:12:30 PDT 2010


 sc/source/ui/cctrl/tbzoomsliderctrl.cxx |   35 +++++++++++++++-----------------
 sc/source/ui/src/toolbox.src            |   16 --------------
 2 files changed, 18 insertions(+), 33 deletions(-)

New commits:
commit 72e1ebea328c6a7d951abd39176f731bccab7450
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Fri Nov 5 19:23:38 2010 -0700

    High-Contrast Cleanup Phase #1

diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index cc8e959..f008e6a 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;
diff --git a/sc/source/ui/src/toolbox.src b/sc/source/ui/src/toolbox.src
index 85fb80b..cd6f9d0 100644
--- a/sc/source/ui/src/toolbox.src
+++ b/sc/source/ui/src/toolbox.src
@@ -1,7 +1,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
@@ -283,17 +283,3 @@ ImageList RID_DEFAULTIMAGELIST_LC
     MaskColor = STD_MASKCOLOR ;
     DEFAULT_IDLIST
 };
-
-ImageList RID_DEFAULTIMAGELIST_SCH
-{
-    Prefix = "sch";
-    MaskColor = SC_HC_MASKCOLOR ;
-    DEFAULT_IDLIST
-};
-
-ImageList RID_DEFAULTIMAGELIST_LCH
-{
-    Prefix = "lch";
-    MaskColor = SC_HC_MASKCOLOR ;
-    DEFAULT_IDLIST
-};


More information about the Libreoffice-commits mailing list