Hi, I have submitted a patch for review:
https://gerrit.libreoffice.org/2966 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/66/2966/1 fdo#39468 Translate German comments - vcl/source/control/ Change-Id: I736cf155e252293ed571cd44a6a395b15c4bf576 FYI: there is some code duplication noticeable between slider and scrbar --- M vcl/source/control/longcurr.cxx M vcl/source/control/lstbox.cxx M vcl/source/control/menubtn.cxx M vcl/source/control/morebtn.cxx M vcl/source/control/prgsbar.cxx M vcl/source/control/scrbar.cxx M vcl/source/control/slider.cxx M vcl/source/control/spinfld.cxx M vcl/source/control/tabctrl.cxx 9 files changed, 100 insertions(+), 111 deletions(-) diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index d84b404..f7c4c90 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -137,11 +137,11 @@ sal_uInt16 nDecPos; sal_Bool bNegative = sal_False; - // Reaktion auf leeren String + // empty string if ( !rStr.Len() ) return sal_False; - // Fuehrende und nachfolgende Leerzeichen entfernen + // trim leading or trailing spaces aStr = string::strip(aStr, ' '); // Position des Dezimalpunktes suchen @@ -155,7 +155,7 @@ else aStr1 = aStr; - // Negativ ? + // negativ ? if ( bCurrency ) { if ( (aStr.GetChar( 0 ) == '(') && (aStr.GetChar( aStr.Len()-1 ) == ')') ) @@ -198,7 +198,7 @@ bNegative = sal_True; } - // Alle unerwuenschten Zeichen rauswerfen + // delete unwanted characters for (xub_StrLen i=0; i < aStr1.Len(); ) { if ( (aStr1.GetChar( i ) >= '0') && (aStr1.GetChar( i ) <= '9') ) @@ -222,7 +222,7 @@ if ( bNegative ) aStr1.Insert( '-', 0 ); - // Nachkommateil zurechtstutzen und dabei runden + // trim & round digits bool bRound = false; if (aStr2.getLength() > nDecDigits) { @@ -236,7 +236,7 @@ aStr = aStr1; aStr += aStr2.makeStringAndClear(); - // Bereichsueberpruefung + // check range BigInt nValue( aStr ); if ( bRound ) { @@ -256,8 +256,7 @@ static sal_Bool ImplLongCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, sal_Bool, sal_Bool bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper ) { - // Es gibt hier kein sinnvolles StrictFormat, also alle - // Zeichen erlauben + // there is no suitable StrictFormat, thus allow all characters return ImplNumericProcessKeyInput( pEdit, rKEvt, sal_False, bUseThousandSep, rLocaleDataWrapper ); } @@ -266,7 +265,7 @@ inline sal_Bool ImplLongCurrencyGetValue( const XubString& rStr, BigInt& rValue, sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper ) { - // Zahlenwert holen + // get value return ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper, sal_True ); } @@ -468,7 +467,7 @@ void LongCurrencyFormatter::SetDecimalDigits( sal_uInt16 nDigits ) { -// DBG_ASSERT( nDigits < 10, "LongCurrency duerfen nur maximal 9 Nachkommastellen haben" ); +// DBG_ASSERT( nDigits < 10, "LongCurrency may have no more than 9 decimal places" ); if ( nDigits > 9 ) nDigits = 9; diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index cb15f0a..6822bcd 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -75,8 +75,8 @@ //#109201# ImplCallEventListeners( VCLEVENT_OBJECT_DYING ); - // Beim zerstoeren des FloatWins macht TH ein GrabFocus auf den Parent, - // also diese ListBox => PreNotify()... + // When destroying the FloatWin, TH does a GrabFocus of the parent, + // thus this ListBox => PreNotify()... ImplListBox *pImplLB = mpImplLB; mpImplLB = NULL; delete pImplLB; @@ -208,7 +208,7 @@ long nId = ReadLongRes(); if( nId ) - SetEntryData( nPos, (void *)nId ); // ID als UserData + SetEntryData( nPos, (void *)nId ); // ID as UserData } if( nSelPos < nNumber ) @@ -272,7 +272,7 @@ const ImplEntryList* pEntryList = mpImplLB->GetEntryList(); if ( pEntryList->IsEntryPosSelected( nChanged ) ) { - // Sollte mal ein ImplPaintEntry werden... + // was supposed to become a ImplPaintEntry... if ( nChanged < pEntryList->GetMRUCount() ) nChanged = pEntryList->FindEntry( pEntryList->GetEntryText( nChanged ) ); mpImplWin->SetItemPos( nChanged ); @@ -414,7 +414,7 @@ } } - // Inhalt + // contents if ( ( nFlags & WINDOW_DRAW_MONO ) || ( eOutDevType == OUTDEV_PRINTER ) ) { pDev->SetTextColor( Color( COL_BLACK ) ); @@ -461,7 +461,8 @@ { Rectangle aClip( aPos, aSize ); if ( nTextHeight > aSize.Height() ) - aClip.Bottom() += nTextHeight-aSize.Height()+1; // Damit HP-Drucker nicht 'weg-optimieren' + // so as to not 'optimize-away' the HP printer + aClip.Bottom() += nTextHeight-aSize.Height()+1; pDev->IntersectClipRegion( aClip ); } @@ -560,11 +561,11 @@ SetBackground(); // due to a hack in Window::UpdateSettings the background must be reset // otherwise it will overpaint NWF drawn listboxes Resize(); - mpImplLB->Resize(); // Wird nicht durch ListBox::Resize() gerufen, wenn sich die ImplLB nicht aendert. + mpImplLB->Resize(); // not called by ListBox::Resize() if ImplLB is unchanged if ( mpImplWin ) { - mpImplWin->SetSettings( GetSettings() ); // Falls noch nicht eingestellt... + mpImplWin->SetSettings( GetSettings() ); // in case not setup yet ImplInitFieldSettings( mpImplWin, sal_True, sal_True, sal_True ); mpBtn->SetSettings( GetSettings() ); @@ -705,8 +706,8 @@ mpImplLB->SetSizePixel( aOutSz ); } - // FloatingWindow-Groesse auch im unsichtbare Zustand auf Stand halten, - // weil KEY_PGUP/DOWN ausgewertet wird... + // keep size of FloatingWindow current even when invisible, + // for calc of KEY_PGUP/DOWN if ( mpFloatWin ) mpFloatWin->SetSizePixel( mpFloatWin->CalcFloatSize() ); @@ -1262,13 +1263,13 @@ mpImplLB->EnableMultiSelection( bMulti, bStackSelection ); // WB_SIMPLEMODE: - // Die MultiListBox verh�lt sich wie eine normale ListBox. - // Die Mehrfachselektion kann nur �ber entsprechende Zusatztasten erfolgen. + // MultiListBox acts as a normal ListBox + // Multi-Selection needs modifier keys sal_Bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? sal_True : sal_False; mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode ); - // ohne Focus ist das Traveln in einer MultiSelection nicht zu sehen: + // moving in a MultiSelection is not visible when not in focus if ( mpFloatWin ) mpImplLB->GetMainWindow()->AllowGrabFocus( bMulti ); } @@ -1405,13 +1406,13 @@ Size ListBox::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const { - // ggf. werden ScrollBars eingeblendet + // show ScrollBars if needed Size aMinSz = CalcMinimumSize(); // aMinSz = ImplCalcOutSz( aMinSz ); Size aSz; - // Hoehe + // height if ( nLines ) { if ( !IsDropDownBox() ) @@ -1422,7 +1423,7 @@ else aSz.Height() = aMinSz.Height(); - // Breite + // width if ( nColumns ) aSz.Width() = nColumns * GetTextWidth( rtl::OUString('X') ); else diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx index 2bce1cc..50bb748 100644 --- a/vcl/source/control/menubtn.cxx +++ b/vcl/source/control/menubtn.cxx @@ -131,8 +131,7 @@ IMPL_LINK_NOARG(MenuButton, ImplMenuTimeoutHdl) { - // Abfragen, ob Button-Benutzung noch aktiv ist, da diese ja auch - // vorher abgebrochen wurden sein koennte + // check if button is still active, as it could have been cancelled if ( IsTracking() ) { if ( !(GetStyle() & WB_NOPOINTERFOCUS) ) @@ -212,8 +211,7 @@ void MenuButton::SetMenuMode( sal_uInt16 nMode ) { - // Fuer die 5.1-Auslieferung besser noch nicht inline, ansonsten kann - // diese Funktion zur 6.0 inline werden + // TODO: make this function inline for V6.0? mnMenuMode = nMode; } @@ -221,8 +219,7 @@ { if (pNewMenu == mpMenu) return; - // Fuer die 5.1-Auslieferung besser noch nicht inline, ansonsten kann - // diese Funktion zur 6.0 inline werden + // TODO: make this function inline for V6.0? mpMenu = pNewMenu; } diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx index 2d3b974..1a473a7 100644 --- a/vcl/source/control/morebtn.cxx +++ b/vcl/source/control/morebtn.cxx @@ -110,7 +110,7 @@ if ( nObjMask & RSC_MOREBUTTON_STATE ) { - // Nicht Methode rufen, da Dialog nicht umgeschaltet werden soll + // do not call method, as Dlg shall not be switched mbState = (sal_Bool)ReadShortRes(); // SetText( GetText() ); ShowState(); @@ -118,7 +118,7 @@ if ( nObjMask & RSC_MOREBUTTON_MAPUNIT ) meUnit = (MapUnit)ReadLongRes(); if ( nObjMask & RSC_MOREBUTTON_DELTA ) - // Groesse fuer Erweitern des Dialogs + // size for extended dialog mnDelta = ReadShortRes(); } @@ -139,25 +139,24 @@ Size aSize( pParent->GetSizePixel() ); long nDeltaPixel = LogicToPixel( Size( 0, mnDelta ), meUnit ).Height(); - // Status aendern + // change state mbState = !mbState; ShowState(); - // Hier den Click-Handler rufen, damit vorher die Controls initialisiert - // werden koennen + // call click handler, so that the controls can be initialized here PushButton::Click(); - // Je nach Status die Fenster updaten + // update windows if ( mbState ) { - // Fenster anzeigen + // show window if ( mpMBData->mpItemList ) { for ( size_t i = 0, n = mpMBData->mpItemList->size(); i < n; ++i ) { (*mpMBData->mpItemList)[ i ]->Show(); } } - // Dialogbox anpassen + // adjust Dialogbox Point aPos( pParent->GetPosPixel() ); Rectangle aDeskRect( pParent->ImplGetFrameWindow()->GetDesktopRectPixel() ); @@ -176,11 +175,11 @@ } else { - // Dialogbox anpassen + // adjust Dialogbox aSize.Height() -= nDeltaPixel; pParent->SetSizePixel( aSize ); - // Fenster nicht mehr anzeigen + // hide window if ( mpMBData->mpItemList ) { for ( size_t i = 0, n = mpMBData->mpItemList->size(); i < n; ++i ) { (*mpMBData->mpItemList)[ i ]->Hide(); diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index 5b0d04c..3b417d1 100644 --- a/vcl/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -80,7 +80,7 @@ { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); -/* !!! Derzeit unterstuetzen wir keine Textausgaben +/* TODO: So far we do not support text if ( bFont ) { Font aFont; @@ -128,7 +128,8 @@ } SetLineColor(); SetFillColor( aColor ); -/* !!! Derzeit unterstuetzen wir keine Textausgaben + +/* TODO: So far we do not support text SetTextColor( aColor ); SetTextFillColor(); */ @@ -209,7 +210,7 @@ void ProgressBar::StateChanged( StateChangedType nType ) { -/* !!! Derzeit unterstuetzen wir keine Textausgaben +/* TODO: So far we do not support text if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index f5677a9..9898fe8 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -283,7 +283,7 @@ long ScrollBar::ImplCalcThumbPos( long nPixPos ) { - // Position berechnen + // calculate position long nCalcThumbPos; nCalcThumbPos = ImplMulDiv( nPixPos, mnMaxRange-mnVisibleSize-mnMinRange, mnThumbPixRange-mnThumbPixSize ); @@ -297,12 +297,11 @@ { long nCalcThumbPos; - // Position berechnen + // calculate position nCalcThumbPos = ImplMulDiv( nPos-mnMinRange, mnThumbPixRange-mnThumbPixSize, mnMaxRange-mnVisibleSize-mnMinRange ); - // Am Anfang und Ende des ScrollBars versuchen wir die Anzeige korrekt - // anzuzeigen + // at the beginning and end we try to display ScrollBar correctly if ( !nCalcThumbPos && (mnThumbPos > mnMinRange) ) nCalcThumbPos = 1; if ( nCalcThumbPos && @@ -425,7 +424,7 @@ if ( mnThumbPixRange ) { - // Werte berechnen + // calculate if ( (mnVisibleSize >= (mnMaxRange-mnMinRange)) || ((mnMaxRange-mnMinRange) <= 0) ) { @@ -452,9 +451,8 @@ } } - // Wenn neu ausgegeben werden soll und wir schon ueber eine - // Aktion einen Paint-Event ausgeloest bekommen haben, dann - // geben wir nicht direkt aus, sondern invalidieren nur alles + // if we want to update, and also have a Paint-Event, + // don't update ourselves but just invalidate everything if ( bUpdate && HasPaintEvent() ) { Invalidate(); @@ -679,7 +677,7 @@ SymbolType eSymbolType; sal_Bool bEnabled = IsEnabled(); - // Evt. noch offene Berechnungen nachholen + // do missing calculations if ( mbCalcSize ) ImplCalc( sal_False ); @@ -1055,7 +1053,7 @@ // Soll Tracking gestartet werden if ( meScrollType != SCROLL_DONTKNOW ) { - // remember original position in case of abort or EndScroll-Delta + // store original position for cancel and EndScroll delta mnStartPos = mnThumbPos; // #92906# Call StartTracking() before ImplDoMouseAction(), otherwise // MouseButtonUp() / EndTracking() may be called if somebody is spending @@ -1075,7 +1073,7 @@ { if ( rTEvt.IsTrackingEnded() ) { - // Button und PageRect-Status wieder herstellen + // reset Button and PageRect state sal_uInt16 nOldStateFlags = mnStateFlags; mnStateFlags &= ~(SCRBAR_STATE_BTN1_DOWN | SCRBAR_STATE_BTN2_DOWN | SCRBAR_STATE_PAGE1_DOWN | SCRBAR_STATE_PAGE2_DOWN | @@ -1084,7 +1082,7 @@ ImplDraw( mnDragDraw, this ); mnDragDraw = 0; - // Bei Abbruch, die alte ThumbPosition wieder herstellen + // on cancel, reset the previous Thumb position if ( rTEvt.IsTrackingCanceled() ) { long nOldPos = mnThumbPos; @@ -1095,8 +1093,7 @@ 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(); if ( !mbFullDrag && (mnStartPos != mnThumbPos) ) @@ -1119,14 +1116,13 @@ { const Point rMousePos = rTEvt.GetMouseEvent().GetPosPixel(); - // Dragging wird speziell behandelt + // special handling for dragging if ( meScrollType == SCROLL_DRAG ) ImplDragThumb( rMousePos ); else ImplDoMouseAction( rMousePos, rTEvt.IsTrackingRepeat() ); - // Wenn ScrollBar-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() || (mnVisibleSize >= (mnMaxRange-mnMinRange)) ) EndTracking(); } @@ -1450,20 +1446,20 @@ void ScrollBar::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-mnVisibleSize ) mnThumbPos = mnMaxRange-mnVisibleSize; if ( mnThumbPos < mnMinRange ) @@ -1497,7 +1493,7 @@ { mnVisibleSize = nNewSize; - // Thumb einpassen + // adjust Thumb if ( mnThumbPos > mnMaxRange-mnVisibleSize ) mnThumbPos = mnMaxRange-mnVisibleSize; if ( mnThumbPos < mnMinRange ) @@ -1548,8 +1544,9 @@ void ScrollBarBox::ImplInitSettings() { - // Hack, damit man auch DockingWindows ohne Hintergrund bauen kann - // und noch nicht alles umgestellt ist + // TODO: + // Hack: to allow building DockingWindows w/o background before + // everything is reset if ( IsBackground() ) { Color aColor; diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index b6e1913..6bfaa2a 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -222,7 +222,7 @@ 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::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 @@ 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 @@ 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 @@ 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 @@ { 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 @@ { 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 @@ 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 @@ 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 @@ { const Point rMousePos = rTEvt.GetMouseEvent().GetPosPixel(); - // Dragging wird speziell behandelt + // special handling for dragging if ( meScrollType == SCROLL_DRAG ) { long nMovePix; @@ -775,8 +773,7 @@ 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 @@ 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::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 ) diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index d50c521..0c58aee 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -178,7 +178,7 @@ } } - // Oberen/linken Button malen + // draw upper/left Button sal_uInt16 nTempStyle = nStyle; if ( bUpperIn ) nTempStyle |= BUTTON_DRAW_PRESSED; @@ -225,14 +225,14 @@ if( !bNativeOK ) aUpRect = aDecoView.DrawButton( rUpperRect, nTempStyle ); - // Unteren/rechten Button malen + // draw lower/right Button if ( bLowerIn ) nStyle |= BUTTON_DRAW_PRESSED; Rectangle aLowRect; if( !bNativeOK ) aLowRect = aDecoView.DrawButton( rLowerRect, nStyle ); - // Zusaetzliche Default-Kante wollen wir auch ausnutzen + // make use of additional default edge aUpRect.Left()--; aUpRect.Top()--; aUpRect.Right()++; @@ -242,8 +242,7 @@ aLowRect.Right()++; aLowRect.Bottom()++; - // Wir malen auch in die Kante rein, damit man etwas erkennen kann, - // wenn das Rechteck zu klein ist + // draw into the edge, so that something is visible if the rectangle is too small if ( aUpRect.GetHeight() < 4 ) { aUpRect.Right()++; @@ -252,7 +251,7 @@ aLowRect.Bottom()++; } - // Symbolgroesse berechnen + // calculate Symbol size long nTempSize1 = aUpRect.GetWidth(); long nTempSize2 = aLowRect.GetWidth(); if ( Abs( nTempSize1-nTempSize2 ) == 1 ) @@ -426,7 +425,7 @@ } else if ( maDropDownRect.IsInside( rMEvt.GetPosPixel() ) ) { - // Rechts daneben liegt der DropDownButton: + // put DropDownButton to the right mbInDropDown = ShowDropDown( mbInDropDown ? sal_False : sal_True ); Paint( Rectangle( Point(), GetOutputSizePixel() ) ); } @@ -679,7 +678,7 @@ else rDDArea.SetEmpty(); - // Je nach Hoehe, die groessen Berechnen + // calcuate sizes according to the height if ( GetStyle() & WB_SPIN ) { long nBottom1 = aSize.Height()/2; diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 337b766..3e8eb51 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -85,7 +85,7 @@ #define TAB_BORDER_RIGHT 2 #define TAB_BORDER_BOTTOM 2 -// Fuer die Ermittlung von den Tab-Positionen +// for the Tab positions #define TAB_PAGERECT 0xFFFF // ======================================================================= @@ -234,7 +234,7 @@ { sal_uLong nEle = ReadLongRes(); - // Item hinzufuegen + // add item for( sal_uLong i = 0; i < nEle; i++ ) { InsertPage( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) ); @@ -252,7 +252,7 @@ ImplFreeLayoutData(); - // TabCtrl-Daten loeschen + // delete TabCtrl data if ( mpTabCtrlData ) { if( mpTabCtrlData->mpListBox ) @@ -310,7 +310,7 @@ if ( pItem->maFormatText.Len() < TAB_EXTRASPACE_X ) aSize.Width() += TAB_EXTRASPACE_X-pItem->maFormatText.Len(); - // Evt. den Text kuerzen + // shorten Text if needed if ( aSize.Width()+4 >= nMaxWidth ) { rtl::OUString aAppendStr("..."); @@ -638,7 +638,7 @@ sal_Bool TabControl::ImplPosCurTabPage() { - // Aktuelle TabPage resizen/positionieren + // resize/position current TabPage ImplTabItem* pItem = ImplGetItem( GetCurPageId() ); if ( pItem && pItem->mpTabPage ) { @@ -762,7 +762,7 @@ else nOff = 0; - // Wenn wir die aktuelle Page sind, muessen wir etwas mehr zeichnen + // if this is the active Page, we have to draw a little more if ( pItem->mnId == mnCurPageId ) { nOff2 = 2; @@ -1041,7 +1041,7 @@ if( ! bLayout ) HideFocus(); - // Hier wird gegebenenfalls auch neu formatiert + // reformat if needed Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); // find current item @@ -1239,9 +1239,10 @@ mbFormat = sal_True; - // Aktuelle TabPage resizen/positionieren + // resize/position active TabPage sal_Bool bTabPage = ImplPosCurTabPage(); - // Feststellen, was invalidiert werden muss + + // check what needs to be invalidated Size aNewSize = rAllocation; long nNewWidth = aNewSize.Width(); for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin(); @@ -1362,7 +1363,7 @@ rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) ); if ( !aHelpId.isEmpty() ) { - // Wenn eine Hilfe existiert, dann ausloesen + // call Help if existing Help* pHelp = Application::GetHelp(); if ( pHelp ) pHelp->Start( aHelpId, this ); @@ -1370,8 +1371,7 @@ } } - // Bei Quick- oder Balloon-Help zeigen wir den Text an, - // wenn dieser abgeschnitten ist + // for Quick or Ballon Help, we show the text, if it is cut if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) ) { ImplTabItem* pItem = ImplGetItem( nItemId ); @@ -1929,7 +1929,7 @@ { mnActPageId = nPageId; ActivatePage(); - // Page koennte im Activate-Handler umgeschaltet wurden sein + // Page could have been switched by the Activate handler nPageId = mnActPageId; mnActPageId = 0; SetCurPageId( nPageId ); @@ -1956,7 +1956,7 @@ if ( IsDefaultSize() ) SetTabPageSizePixel( pTabPage->GetSizePixel() ); - // Erst hier setzen, damit Resize nicht TabPage umpositioniert + // only set here, so that Resize does not reposition TabPage pItem->mpTabPage = pTabPage; queue_resize(); if ( pItem->mnId == mnCurPageId ) -- To view, visit https://gerrit.libreoffice.org/2966 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I736cf155e252293ed571cd44a6a395b15c4bf576 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Christian M. Heller <christian.helle...@gmail.com> _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice