diff options
author | Christian M. Heller <christian.heller63@gmail.com> | 2013-03-24 10:28:49 -0400 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-26 23:36:57 +0000 |
commit | 69a9cffb9e6285a8735e4b35cdea9db4b118063c (patch) | |
tree | 3add3d002852092954ce987e8617ff8812474ea7 /vcl/source/control/slider.cxx | |
parent | 68fb0521999babdc24acbae3fc2ddd35fc7f4006 (diff) |
fdo#39468 Translate German comments - vcl/source/control/
FYI: there is some code duplication noticeable between slider and scrbar
Conflicts:
vcl/source/control/longcurr.cxx
vcl/source/control/lstbox.cxx
vcl/source/control/menubtn.cxx
vcl/source/control/morebtn.cxx
vcl/source/control/prgsbar.cxx
vcl/source/control/scrbar.cxx
Change-Id: I736cf155e252293ed571cd44a6a395b15c4bf576
Reviewed-on: https://gerrit.libreoffice.org/2966
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'vcl/source/control/slider.cxx')
-rw-r--r-- | vcl/source/control/slider.cxx | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index b6e1913fe794..6bfaa2a9fd91 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -222,7 +222,7 @@ void Slider::ImplUpdateRects( sal_Bool bUpdate ) long Slider::ImplCalcThumbPos( long nPixPos ) { - // Position berechnen + // calculate position long nCalcThumbPos; nCalcThumbPos = ImplMulDiv( nPixPos-mnThumbPixOffset, mnMaxRange-mnMinRange, mnThumbPixRange-1 ); nCalcThumbPos += mnMinRange; @@ -233,11 +233,10 @@ long Slider::ImplCalcThumbPos( long nPixPos ) long Slider::ImplCalcThumbPosPix( long nPos ) { - // Position berechnen + // calculate position long nCalcThumbPos; nCalcThumbPos = ImplMulDiv( nPos-mnMinRange, mnThumbPixRange-1, mnMaxRange-mnMinRange ); - // Am Anfang und Ende des Sliders versuchen wir die Anzeige korrekt - // anzuzeigen + // at the beginning and end we try to display Slider correctly if ( !nCalcThumbPos && (mnThumbPos > mnMinRange) ) nCalcThumbPos = 1; if ( nCalcThumbPos && @@ -327,7 +326,7 @@ void Slider::ImplDraw( sal_uInt16 nDrawFlags ) const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); sal_Bool bEnabled = IsEnabled(); - // Evt. noch offene Berechnungen nachholen + // do missing calculations if ( mbCalcSize ) ImplCalc( sal_False ); @@ -653,7 +652,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt ) meScrollType = SCROLL_DRAG; mnDragDraw = SLIDER_DRAW_THUMB; - // Zusaetzliche Daten berechnen + // calculate additional values Point aCenterPos = maThumbRect.Center(); if ( GetStyle() & WB_HORZ ) mnMouseOff = rMousePos.X()-aCenterPos.X(); @@ -685,10 +684,10 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt ) mnDragDraw = SLIDER_DRAW_CHANNEL; } - // Soll Tracking gestartet werden + // Shall we start Tracking? if( meScrollType != SCROLL_DONTKNOW ) { - // Startposition merken fuer Abbruch und EndScroll-Delta + // store Start position for cancel and EndScroll delta mnStartPos = mnThumbPos; ImplDoMouseAction( rMousePos, meScrollType != SCROLL_SET ); Update(); @@ -705,7 +704,7 @@ void Slider::MouseButtonUp( const MouseEvent& ) { if( SCROLL_SET == meScrollType ) { - // Button und PageRect-Status wieder herstellen + // reset Button and PageRect state const sal_uInt16 nOldStateFlags = mnStateFlags; mnStateFlags &= ~( SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN | SLIDER_STATE_THUMB_DOWN ); @@ -725,7 +724,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - // Button und PageRect-Status wieder herstellen + // reset Button and PageRect state sal_uInt16 nOldStateFlags = mnStateFlags; mnStateFlags &= ~(SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN | SLIDER_STATE_THUMB_DOWN); @@ -733,7 +732,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt ) ImplDraw( mnDragDraw ); mnDragDraw = 0; - // Bei Abbruch, die alte ThumbPosition wieder herstellen + // on cancel, reset the previous Thumb position if ( rTEvt.IsTrackingCanceled() ) { long nOldPos = mnThumbPos; @@ -744,8 +743,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt ) if ( meScrollType == SCROLL_DRAG ) { - // Wenn gedragt wurde, berechnen wir den Thumb neu, damit - // er wieder auf einer gerundeten ThumbPosition steht + // after dragging, recalculate to a rounded Thumb position ImplCalc(); Update(); @@ -766,7 +764,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt ) { const Point rMousePos = rTEvt.GetMouseEvent().GetPosPixel(); - // Dragging wird speziell behandelt + // special handling for dragging if ( meScrollType == SCROLL_DRAG ) { long nMovePix; @@ -775,8 +773,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt ) nMovePix = rMousePos.X()-(aCenterPos.X()+mnMouseOff); else nMovePix = rMousePos.Y()-(aCenterPos.Y()+mnMouseOff); - // Nur wenn sich Maus in die Scrollrichtung bewegt, muessen - // wir etwas tun + // only if the mouse moves in Scroll direction we have to act if ( nMovePix ) { mnThumbPixPos += nMovePix; @@ -802,8 +799,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt ) else ImplDoMouseAction( rMousePos, rTEvt.IsTrackingRepeat() ); - // Wenn Slider-Werte so umgesetzt wurden, das es nichts - // mehr zum Tracking gibt, dann berechen wir hier ab + // end tracking if ScrollBar values indicate we are done if ( !IsVisible() ) EndTracking(); } @@ -954,20 +950,20 @@ void Slider::EndSlide() void Slider::SetRange( const Range& rRange ) { - // Range einpassen + // adjust Range Range aRange = rRange; aRange.Justify(); long nNewMinRange = aRange.Min(); long nNewMaxRange = aRange.Max(); - // Wenn Range sich unterscheidet, dann neuen setzen + // reset Range if different if ( (mnMinRange != nNewMinRange) || (mnMaxRange != nNewMaxRange) ) { mnMinRange = nNewMinRange; mnMaxRange = nNewMaxRange; - // Thumb einpassen + // adjust Thumb if ( mnThumbPos > mnMaxRange ) mnThumbPos = mnMaxRange; if ( mnThumbPos < mnMinRange ) |