summaryrefslogtreecommitdiff
path: root/svtools/source/brwbox
diff options
context:
space:
mode:
authorStefan Knorr (astron) <heinzlesspam@gmail.com>2012-03-13 18:54:16 +0100
committerStefan Knorr (astron) <heinzlesspam@gmail.com>2012-03-14 12:16:29 +0100
commit39b2b14a35daaf40da32221a7c5b90b70d17d0ff (patch)
treec2dbc156be9198a49722fd95c0d61db573597f48 /svtools/source/brwbox
parent21c646a8e8e5154f7e7a85de4d50239b72ebc7f6 (diff)
svtools/source/brwbox: translate comments
Diffstat (limited to 'svtools/source/brwbox')
-rw-r--r--svtools/source/brwbox/brwbox1.cxx156
-rw-r--r--svtools/source/brwbox/brwbox2.cxx93
-rw-r--r--svtools/source/brwbox/brwhead.cxx6
-rw-r--r--svtools/source/brwbox/datwin.cxx10
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx4
5 files changed, 130 insertions, 139 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 5ddaa03cc565..a1e0dbbc4325 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -262,7 +262,7 @@ void BrowseBox::InsertHandleColumn( sal_uLong nWidth )
pCols->insert( pCols->begin(), new BrowserColumn( 0, Image(), String(), nWidth, GetZoom(), 0 ) );
FreezeColumn( 0 );
- // Headerbar anpassen
+ // adjust headerbar
if ( getDataWindow()->pHeaderBar )
{
getDataWindow()->pHeaderBar->SetPosSizePixel(
@@ -564,12 +564,12 @@ void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const String& rTitle )
pCol->Title() = rTitle;
- // Headerbar-Column anpassen
+ // adjust headerbar column
if ( getDataWindow()->pHeaderBar )
getDataWindow()->pHeaderBar->SetItemText( nItemId, rTitle );
else
{
- // redraw visible colums
+ // redraw visible columns
if ( GetUpdateMode() && ( pCol->IsFrozen() || nItemPos > nFirstCol ) )
Invalidate( Rectangle( Point(0,0),
Size( GetOutputSizePixel().Width(), GetTitleHeight() ) ) );
@@ -602,7 +602,7 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
{
long nOldWidth = (*pCols)[ nItemPos ]->Width();
- // ggf. letzte Spalte anpassen
+ // adjust last column, if necessary
if ( IsVisible() && nItemPos == pCols->size() - 1 )
{
long nMaxWidth = pDataWin->GetSizePixel().Width();
@@ -617,32 +617,31 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
}
// OV
- // In AutoSizeLastColumn() wird SetColumnWidth mit nWidth==0xffff
- // gerufen. Deshalb muss hier nochmal geprueft werden, ob sich die
- // Breite tatsaechlich geaendert hat.
+ // In AutoSizeLastColumn(), we call SetColumnWidth with nWidth==0xffff.
+ // Thus, check here, if the width has actually changed.
if( (sal_uLong)nOldWidth == nWidth )
return;
- // soll die Aenderung sofort dargestellt werden?
+ // do we want to display the change immediately?
sal_Bool bUpdate = GetUpdateMode() &&
( (*pCols)[ nItemPos ]->IsFrozen() || nItemPos >= nFirstCol );
if ( bUpdate )
{
- // Selection hiden
+ // Selection hidden
DoHideCursor( "SetColumnWidth" );
ToggleSelection();
//!getDataWindow()->Update();
//!Control::Update();
}
- // Breite setzen
+ // set width
(*pCols)[ nItemPos ]->SetWidth(nWidth, GetZoom());
// scroll and invalidate
if ( bUpdate )
{
- // X-Pos der veraenderten Spalte ermitteln
+ // get X-Pos of the column changed
long nX = 0;
for ( sal_uInt16 nCol = 0; nCol < nItemPos; ++nCol )
{
@@ -651,7 +650,7 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
nX += pCol->Width();
}
- // eigentliches scroll+invalidate
+ // actually scroll+invalidate
pDataWin->SetClipRegion();
sal_Bool bSelVis = bSelectionIsVisible;
bSelectionIsVisible = sal_False;
@@ -683,7 +682,7 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
}
UpdateScrollbars();
- // Headerbar-Column anpassen
+ // adjust headerbar column
if ( getDataWindow()->pHeaderBar )
getDataWindow()->pHeaderBar->SetItemSize(
nItemId ? nItemId : USHRT_MAX - 1, nWidth );
@@ -714,33 +713,32 @@ void BrowseBox::RemoveColumn( sal_uInt16 nItemId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- // Spaltenposition ermitteln
+ // get column position
sal_uInt16 nPos = GetColumnPos(nItemId);
if ( nPos >= ColCount() )
- // nicht vorhanden
+ // not available
return;
- // Spaltenselektion korrigieren
+ // correct column selection
if ( pColSel )
pColSel->Remove( nPos );
- // Spaltencursor korrigieren
+ // correct column cursor
if ( nCurColId == nItemId )
nCurColId = 0;
- // Spalte entfernen
+ // delete column
BrowserColumns::iterator it = pCols->begin();
::std::advance( it, nPos );
delete *it;
pCols->erase( it );
- // OJ #93534#
if ( nFirstCol >= nPos && nFirstCol > FrozenColCount() )
{
OSL_ENSURE(nFirstCol > 0,"FirstCol must be greater zero!");
--nFirstCol;
}
- // Handlecolumn nicht in der Headerbar
+ // handlecolumn not in headerbar
if (nItemId)
{
if ( getDataWindow()->pHeaderBar )
@@ -748,7 +746,7 @@ void BrowseBox::RemoveColumn( sal_uInt16 nItemId )
}
else
{
- // Headerbar anpassen
+ // adjust headerbar
if ( getDataWindow()->pHeaderBar )
{
getDataWindow()->pHeaderBar->SetPosSizePixel(
@@ -758,10 +756,10 @@ void BrowseBox::RemoveColumn( sal_uInt16 nItemId )
}
}
- // vertikalen Scrollbar korrigieren
+ // correct vertical scrollbar
UpdateScrollbars();
- // ggf. Repaint ausl"osen
+ // trigger repaint, if necessary
if ( GetUpdateMode() )
{
getDataWindow()->Invalidate();
@@ -1036,7 +1034,7 @@ long BrowseBox::ScrollColumns( long nCols )
aHScroll.SetThumbPos( nFirstCol - FrozenColCount() );
}
- // ggf. externe Headerbar anpassen
+ // adjust external headerbar, if necessary
if ( getDataWindow()->pHeaderBar )
{
long nWidth = 0;
@@ -1044,7 +1042,7 @@ long BrowseBox::ScrollColumns( long nCols )
nCol < pCols->size() && nCol < nFirstCol;
++nCol )
{
- // HandleColumn nicht
+ // not the handle column
if ( (*pCols)[ nCol ]->GetId() )
nWidth += (*pCols)[ nCol ]->Width();
}
@@ -1164,10 +1162,9 @@ void BrowseBox::Clear()
nTopRow = 0;
nCurColId = 0;
- // nFirstCol darf nicht zurueckgesetzt werden, da ansonsten das Scrollen
- // total durcheinander kommt
- // nFirstCol darf nur beim Hinzufuegen oder Loeschen von Spalten geaendert werden
- // nFirstCol = 0; ->Falsch!!!!
+ // nFirstCol may not be reset, else the scrolling code will become confused.
+ // nFirstCol may only be changed when adding or deleting columns
+ // nFirstCol = 0; -> wrong!
aHScroll.SetThumbPos( 0 );
pVScroll->SetThumbPos( 0 );
@@ -1256,7 +1253,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, sal_Bool bDoPaint, sal_Bo
Size( aSz.Width(), nNumRows * GetDataRowHeight() ) ) );
}
- // ggf. Top-Row korrigieren
+ // correct top row if necessary
if ( nRow < nTopRow )
nTopRow += nNumRows;
@@ -1511,7 +1508,7 @@ sal_Bool BrowseBox::GoToRow( long nRow, sal_Bool bRowColMove, sal_Bool bKeepSele
if ( nRow < 0 || nRow >= nRowCount )
return sal_False;
- // nicht erlaubt?
+ // not allowed?
if ( ( !bRowColMove && !IsCursorMoveAllowed( nRow, nCurColId ) ) )
return sal_False;
@@ -1526,7 +1523,7 @@ sal_Bool BrowseBox::GoToRow( long nRow, sal_Bool bRowColMove, sal_Bool bKeepSele
// suspend Updates
getDataWindow()->EnterUpdateLock();
- // ggf. altes Highlight weg
+ // remove old highlight, if necessary
if ( !bMultiSelection && !bKeepSelection )
ToggleSelection();
DoHideCursor( "GoToRow" );
@@ -1559,7 +1556,7 @@ sal_Bool BrowseBox::GoToRow( long nRow, sal_Bool bRowColMove, sal_Bool bKeepSele
nCurRow = nRowCount - 1;
aSelRange = Range( nCurRow, nCurRow );
- // ggf. neues Highlight anzeigen
+ // display new highlight if necessary
if ( !bMultiSelection && !bKeepSelection )
uRow.nSel = nRow;
@@ -1598,7 +1595,7 @@ sal_Bool BrowseBox::GoToColumnId( sal_uInt16 nColId, sal_Bool bMakeVisible, sal_
if (!bColumnCursor)
return sal_False;
- // erlaubt?
+ // allowed?
if (!bRowColMove && !IsCursorMoveAllowed( nCurRow, nColId ) )
return sal_False;
@@ -1653,7 +1650,7 @@ sal_Bool BrowseBox::GoToRowColumnId( long nRow, sal_uInt16 nColId )
nColId == nCurColId && IsFieldVisible(nCurRow, nColId, sal_True))
return sal_True;
- // erlaubt?
+ // allowed?
if (!IsCursorMoveAllowed(nRow, nColId))
return sal_False;
@@ -1725,7 +1722,7 @@ void BrowseBox::SelectAll()
pColSel->SelectAll(sal_False);
uRow.pSel->SelectAll(sal_True);
- // Handle-Column nicht highlighten
+ // don't highlight handle column
BrowserColumn *pFirstCol = (*pCols)[ 0 ];
long nOfsX = pFirstCol->GetId() ? 0 : pFirstCol->Width();
@@ -1814,7 +1811,7 @@ void BrowseBox::SelectRow( long nRow, sal_Bool _bSelect, sal_Bool bExpand )
)
)
{
- // Handle-Column nicht highlighten
+ // don't highlight handle column
BrowserColumn *pFirstCol = (*pCols)[ 0 ];
long nOfsX = pFirstCol->GetId() ? 0 : pFirstCol->Width();
@@ -1992,26 +1989,25 @@ bool BrowseBox::IsColumnSelected( sal_uInt16 nColumnId ) const
sal_Bool BrowseBox::MakeFieldVisible
(
- long nRow, // Zeilen-Nr des Feldes (beginnend mit 0)
- sal_uInt16 nColId, // Spalten-Id des Feldes
- sal_Bool bComplete // (== sal_False), sal_True => vollst"andig sichtbar machen
+ long nRow, // line number of the field (starting with 0)
+ sal_uInt16 nColId, // column ID of the field
+ sal_Bool bComplete // (== sal_False), sal_True => make visible in its entirety
)
-/* [Beschreibung]
+/* [Description]
- Macht das durch 'nRow' und 'nColId' beschriebene Feld durch
- entsprechendes scrollen sichtbar. Ist 'bComplete' gesetzt, dann wird
- gefordert, da\s das Feld ganz sichtbar wird.
+ Makes visible the field described in 'nRow' and 'nColId' by scrolling
+ accordingly. If 'bComplete' is set, the field should become visible in its
+ entirety.
- [R"uckgabewert]
+ [Returned Value]
- sal_Bool sal_True
- Das angegebene Feld wurde sichtbar gemacht, bzw. war
- bereits sichtbar.
+ sal_Bool sal_True
+ The given field is already visible or was already visible.
sal_False
- Das angegebene Feld konnte nicht sichtbar bzw. bei
- 'bComplete' nicht vollst"andig sichtbar gemacht werden.
+ The given field could not be made visible or in the case of
+ 'bComplete' could not be made visible in its entirety.
*/
{
@@ -2021,51 +2017,51 @@ sal_Bool BrowseBox::MakeFieldVisible
( aTestSize.Width() == 0 && aTestSize.Height() == 0 ) )
return sal_False;
- // ist es schon sichtbar?
+ // is it visible already?
sal_Bool bVisible = IsFieldVisible( nRow, nColId, bComplete );
if ( bVisible )
return sal_True;
- // Spaltenposition und Feld-Rechteck und Ausgabebereich berechnen
+ // calculate column position, field rectangle and painting area
sal_uInt16 nColPos = GetColumnPos( nColId );
Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, sal_False );
Rectangle aDataRect = Rectangle( Point(0, 0), pDataWin->GetSizePixel() );
- // links au\serhalb?
+ // positioned outside on the left?
if ( nColPos >= FrozenColCount() && nColPos < nFirstCol )
- // => nach rechts scrollen
+ // => scroll to the right
ScrollColumns( nColPos - nFirstCol );
- // solange rechts au\serhalb
+ // while outside on the right
while ( aDataRect.Right() < ( bComplete
? aFieldRect.Right()
: aFieldRect.Left()+aFieldRect.GetWidth()/2 ) )
{
- // => nach links scrollen
+ // => scroll to the left
if ( ScrollColumns( 1 ) != 1 )
- // nichts mehr zu scrollen
+ // no more need to scroll
break;
aFieldRect = GetFieldRectPixel( nRow, nColId, sal_False );
}
- // oben au\serhalb?
+ // positioned outside above?
if ( nRow < nTopRow )
- // nach unten scrollen
+ // scroll further to the bottom
ScrollRows( nRow - nTopRow );
- // unten au\serhalb?
+ // positioned outside below?
long nBottomRow = nTopRow + GetVisibleRows();
- // OV: damit nBottomRow die Nummer der letzten sichtbaren Zeile ist
- // (Zaehlung ab Null!), muss sie dekrementiert werden.
- // Beispiel: BrowseBox enthaelt genau einen Eintrag. nBottomRow := 0 + 1 - 1
+ // decrement nBottomRow to make it the number of the last visible line
+ // (count starts with 0!).
+ // Example: BrowseBox contains exactly one entry. nBottomRow := 0 + 1 - 1
if( nBottomRow )
nBottomRow--;
if ( nRow > nBottomRow )
- // nach oben scrollen
+ // scroll further to the top
ScrollRows( nRow - nBottomRow );
- // jetzt kann es immer noch nicht passen, z.B. weil Window zu klein
+ // it might still not actually fit, e.g. if the window is too small
return IsFieldVisible( nRow, nColId, bComplete );
}
@@ -2076,7 +2072,7 @@ sal_Bool BrowseBox::IsFieldVisible( long nRow, sal_uInt16 nColumnId,
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- // durch frozen-Column verdeckt?
+ // hidden by frozen column?
sal_uInt16 nColPos = GetColumnPos( nColumnId );
if ( nColPos >= FrozenColCount() && nColPos < nFirstCol )
return sal_False;
@@ -2154,7 +2150,7 @@ Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- // compute the X-coordinte realtiv to DataWin by accumulation
+ // compute the X-coordinate relative to DataWin by accumulation
long nColX = 0;
sal_uInt16 nFrozenCols = FrozenColCount();
size_t nCol;
@@ -2185,7 +2181,7 @@ long BrowseBox::GetRowAtYPosPixel( long nY, sal_Bool bRelToBrowser ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- // compute the Y-coord
+ // compute the Y-coordinate
if ( bRelToBrowser )
{
Point aDataTopLeft = pDataWin->OutputToScreenPixel( Point(0, 0) );
@@ -2215,7 +2211,7 @@ sal_uInt16 BrowseBox::GetColumnAtXPosPixel( long nX, sal_Bool ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- // accumulate the withds of the visible columns
+ // accumulate the widths of the visible columns
long nColX = 0;
for ( size_t nCol = 0; nCol < pCols->size(); ++nCol )
{
@@ -2331,7 +2327,8 @@ void BrowseBox::SetMode( BrowserMode nMode )
getDataWindow()->bOwnDataChangedHdl =
BROWSER_OWN_DATACHANGED == ( nMode & BROWSER_OWN_DATACHANGED );
- // Headerbar erzeugen, was passiert, wenn eine erzeugt werden mu� und schon Spalten bestehen ?
+ // create a headerbar. what happens, if a headerbar has to be created and
+ // there already are columns?
if ( BROWSER_HEADERBAR_NEW == ( nMode & BROWSER_HEADERBAR_NEW ) )
{
if (!getDataWindow()->pHeaderBar)
@@ -2392,7 +2389,7 @@ void BrowseBox::VisibleRowsChanged( long, sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- // Das alte Verhalten: NumRows automatisch korrigieren:
+ // old behavior: automatically correct NumRows:
if ( nRowCount < GetRowCount() )
{
RowInserted(nRowCount,GetRowCount() - nRowCount,sal_False);
@@ -2407,17 +2404,16 @@ void BrowseBox::VisibleRowsChanged( long, sal_uInt16 )
sal_Bool BrowseBox::IsCursorMoveAllowed( long, sal_uInt16 ) const
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode wird immer gerufen bevor der Cursor direkt
- bewegt werden soll. Durch 'return sal_False' kann verhindert werden, da\s
- dies geschieht, wenn z.B. ein Datensatz irgendwelchen Rules widerspricht.
+ This virtual method is always called before the cursor is moved directly.
+ By means of 'return sal_False', we avoid doing this if e.g. a record
+ contradicts any rules.
- Diese Methode wird nicht gerufen, wenn die Cursorbewegung durch
- ein L"oschen oder Einf"ugen (einer Zeile/Spalte) ausgel"ost wird, also
- genaugenommen nur eine Cursor-Korrektur vorliegt.
+ This method is not called, if the cursor movement results from removing or
+ deleting a row/column (thus, in cases where only a "cursor correction" happens).
- Die Basisimplementierung liefert derzeit immer sal_True.
+ The base implementation currently always returns sal_True.
*/
{
@@ -2459,7 +2455,7 @@ const char* BrowseBoxCheckInvariants( const void * pVoid )
if (p->nCurRow < -1) return "BrowseBox: nCurRow < -1";
if (p->nCurRow > p->nRowCount) return "BrowseBox: nCurRow > nRowCount";
- // Leider waehrend der Bearbeitung nicht immer der Fall:
+ // Sadly not always the case when editing:
//if (p->nCurRow < 0 && p->nRowCount != 0) return "nCurRow < 0 && nRowCount != 0";
//if (p->nCurRow >= p->nRowCount && p->nRowCount != 0) return "nCurRow >= nRowCount && nRowCount != 0";
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 44b5f64aded1..f1f35be2c278 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -165,7 +165,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
}
else if ( STATE_CHANGE_INITSHOW == nStateChange )
{
- bBootstrapped = sal_True; // muss zuerst gesetzt werden!
+ bBootstrapped = sal_True; // must be set first!
Resize();
if ( bMultiSelection )
@@ -192,7 +192,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
if (pHeaderBar)
pHeaderBar->SetZoom(GetZoom());
- // let the cols calc their new widths and adjust the header bar
+ // let the columns calculate their new widths and adjust the header bar
for ( size_t nPos = 0; nPos < pCols->size(); ++nPos )
{
(*pCols)[ nPos ]->ZoomChanged(GetZoom());
@@ -207,7 +207,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
{
// do we have a handle column?
sal_Bool bHandleCol = !pCols->empty() && (0 == (*pCols)[ 0 ]->GetId());
- // do we have a header bar
+ // do we have a header bar?
sal_Bool bHeaderBar = (NULL != static_cast<BrowserDataWin&>(GetDataWindow()).pHeaderBar);
if ( nTitleLines
@@ -335,9 +335,9 @@ void BrowseBox::ToggleSelection( sal_Bool bForce )
// accumulate areas of rows to highlight
RectangleList aHighlightList;
- long nLastRowInRect = 0; // fuer den CFront
+ long nLastRowInRect = 0; // for the CFront
- // Handle-Column nicht highlighten
+ // don't highlight handle column
BrowserColumn *pFirstCol = pCols->empty() ? NULL : (*pCols)[ 0 ];
long nOfsX = (!pFirstCol || pFirstCol->GetId()) ? 0 : pFirstCol->Width();
@@ -420,7 +420,7 @@ void BrowseBox::DrawCursor()
if ( nCurColId == HandleColumnId )
nCurColId = GetColumnId(1);
- // Cursor-Rechteck berechnen
+ // calculate cursor rectangle
Rectangle aCursor;
if ( bColumnCursor )
{
@@ -445,7 +445,7 @@ void BrowseBox::DrawCursor()
if (m_aCursorColor == COL_TRANSPARENT)
{
- // auf diesem Plattformen funktioniert der StarView-Focus richtig
+ // on these platforms, the StarView focus works correctly
if ( bReallyHide )
((Control*)pDataWin)->HideFocus();
else
@@ -531,12 +531,12 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
{
// down and up
while ( rEvt.GetRow() < aSelRange.Max() )
- { // ZTC/Mac bug - dont put these statemants together!
+ { // ZTC/Mac bug - don't put these statements together!
SelectRow( aSelRange.Max(), bSelectThis, sal_True );
--aSelRange.Max();
}
while ( rEvt.GetRow() > aSelRange.Max() )
- { // ZTC/Mac bug - dont put these statemants together!
+ { // ZTC/Mac bug - don't put these statements together!
SelectRow( aSelRange.Max(), bSelectThis, sal_True );
++aSelRange.Max();
}
@@ -547,7 +547,7 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
sal_Bool bOldSelecting = bSelecting;
bSelecting = sal_True;
while ( rEvt.GetRow() < aSelRange.Max() )
- { // ZTC/Mac bug - dont put these statemants together!
+ { // ZTC/Mac bug - don't put these statements together!
--aSelRange.Max();
if ( !IsRowSelected( aSelRange.Max() ) )
{
@@ -556,7 +556,7 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
}
}
while ( rEvt.GetRow() > aSelRange.Max() )
- { // ZTC/Mac bug - dont put these statemants together!
+ { // ZTC/Mac bug - don't put these statements together!
++aSelRange.Max();
if ( !IsRowSelected( aSelRange.Max() ) )
{
@@ -604,7 +604,7 @@ void BrowseBox::Resize()
if (GetDataRowHeight())
nOldVisibleRows = (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
- // did we need a horiz. scroll bar oder gibt es eine Control Area?
+ // did we need a horizontal scroll bar or is there a Control Area?
if ( !getDataWindow()->bNoHScroll &&
( ( pCols->size() - FrozenColCount() ) > 1 ) )
aHScroll.Show();
@@ -630,8 +630,7 @@ void BrowseBox::Resize()
if (GetDataRowHeight())
nVisibleRows = (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
- // TopRow ist unveraendert, aber die Anzahl sichtbarer Zeilen hat sich
- // geaendert
+ // TopRow is unchanged, but the number of visible lines has changed.
if ( nVisibleRows != nOldVisibleRows )
VisibleRowsChanged(nTopRow, nVisibleRows);
@@ -647,7 +646,7 @@ void BrowseBox::Resize()
HeaderBar* pHeaderBar = getDataWindow()->pHeaderBar;
if ( pHeaderBar )
{
- // Handle-Column beruecksichtigen
+ // take the handle column into account
BrowserColumn *pFirstCol = (*pCols)[ 0 ];
long nOfsX = pFirstCol->GetId() ? 0 : pFirstCol->Width();
pHeaderBar->SetPosSizePixel( Point( nOfsX, 0 ), Size( GetOutputSizePixel().Width() - nOfsX, GetTitleHeight() ) );
@@ -691,9 +690,8 @@ void BrowseBox::Paint( const Rectangle& rRect )
}
// Title Bar
- // Wenn es eine Handle Column gibt und die Headerbar verfuegbar ist, dann nur
- // die HandleColumn
- // Handle-Column beruecksichtigen
+ // If there is a handle column and if the header bar is available, only
+ // take the HandleColumn into account
if ( nTitleLines && (!bHeaderBar || bHandleCol) )
{
// iterate through columns to redraw
@@ -703,11 +701,11 @@ void BrowseBox::Paint( const Rectangle& rRect )
nCol < pCols->size() && nX < rRect.Right();
++nCol )
{
- // skip invisible colums between frozen and scrollable area
+ // skip invisible columns between frozen and scrollable area
if ( nCol < nFirstCol && !(*pCols)[ nCol ]->IsFrozen() )
nCol = nFirstCol;
- // nur die HandleCol ?
+ // only the handle column?
if (bHeaderBar && bHandleCol && nCol > 0)
break;
@@ -749,8 +747,8 @@ void BrowseBox::Paint( const Rectangle& rRect )
DrawRect( Rectangle(
Point( nX, 0 ),
Point( rRect.Right(), GetTitleHeight() - 2 ) ) );
- SetFillColor( aOldFillColor); // aOldLineColor ); oj 09.02.00 seems to be a copy&paste bug
- SetLineColor( aOldLineColor); // aOldFillColor );
+ SetFillColor( aOldFillColor);
+ SetLineColor( aOldLineColor);
}
}
}
@@ -944,7 +942,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_
++nRelRow, aPos.Y() += nDataRowHeigt )
{
// get row
- // Zur Sicherheit auf zul"assigen Bereich abfragen:
+ // check valid area, to be on the safe side:
DBG_ASSERT( (sal_uInt16)(nTopRow+nRelRow) < nRowCount, "BrowseBox::ImplPaintData: invalid seek" );
if ( (nTopRow+long(nRelRow)) < 0 || (sal_uInt16)(nTopRow+nRelRow) >= nRowCount )
continue;
@@ -952,7 +950,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_
// prepare row
sal_uLong nRow = nTopRow+nRelRow;
if ( !SeekRow( nRow) ) {
- OSL_FAIL("BrowseBox::ImplPaintData: SeekRow gescheitert");
+ OSL_FAIL("BrowseBox::ImplPaintData: SeekRow failed");
}
_rOut.SetClipRegion();
aPos.X() = aOverallAreaPos.X();
@@ -993,7 +991,8 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_
pCol = (nCol < pCols->size() ) ? (*pCols)[ nCol ] : NULL;
if (!pCol)
{ // FS - 21.05.99 - 66325
- // ist zwar eigentlich woanders (an der richtigen Stelle) gefixt, aber sicher ist sicher ...
+ // actually this has been fixed elsewhere (in the right place),
+ // but let's make sure...
OSL_FAIL("BrowseBox::PaintData : nFirstCol is probably invalid !");
break;
}
@@ -1017,13 +1016,13 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_
if (!m_bFocusOnlyCursor && (pCol->GetId() == GetCurColumnId()) && (nRow == (sal_uLong)GetCurRow()))
DrawCursor();
- // draw a single field
- // #63864#, Sonst wird auch etwas gezeichnet, bsp Handle Column
+ // draw a single field.
+ // else something is drawn to, e.g. handle column
if (pCol->Width())
{
// clip the column's output to the field area
if (_bForeignDevice)
- { // (not neccessary if painting onto the data window)
+ { // (not necessary if painting onto the data window)
Size aFieldSize(pCol->Width(), nDataRowHeigt);
if (aPos.X() + aFieldSize.Width() > aOverallAreaBRPos.X())
@@ -1122,7 +1121,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_
// get column
BrowserColumn *pCol = (*pCols)[ nCol ];
- // skip invisible colums between frozen and scrollable area
+ // skip invisible columns between frozen and scrollable area
if ( nCol < nFirstCol && !pCol->IsFrozen() )
{
nCol = nFirstCol;
@@ -1163,7 +1162,7 @@ void BrowseBox::PaintData( Window& rWin, const Rectangle& rRect )
return;
if ( getDataWindow()->bResizeOnPaint )
Resize();
- // MI: wer war das denn? Window::Update();
+ // MI: who was that? Window::Update();
ImplPaintData(rWin, rRect, sal_False, sal_True);
}
@@ -1177,7 +1176,7 @@ void BrowseBox::UpdateScrollbars()
if ( !bBootstrapped || !IsUpdateMode() )
return;
- // Rekursionsschutz
+ // protect against recursion
BrowserDataWin *pBDW = (BrowserDataWin*) pDataWin;
if ( pBDW->bInUpdateScrollbars )
{
@@ -1252,10 +1251,10 @@ void BrowseBox::UpdateScrollbars()
Point( nHScrX, GetOutputSizePixel().Height() - nCornerSize ),
Size( aDataWinSize.Width() - nHScrX, nCornerSize ) );
- // Scrollable Columns insgesamt
+ // total scrollable columns
short nScrollCols = short(pCols->size()) - (short)nFrozenCols;
- // Sichtbare Columns
+ // visible columns
short nVisibleHSize = nLastCol == BROWSER_INVALIDID
? (short)( pCols->size() - nFirstCol )
: (short)( nLastCol - nFirstCol );
@@ -1319,7 +1318,7 @@ void BrowseBox::UpdateScrollbars()
else
DELETEZ( getDataWindow()->pCornerWin );
- // ggf. Headerbar mitscrollen
+ // scroll headerbar, if necessary
if ( getDataWindow()->pHeaderBar )
{
long nWidth = 0;
@@ -1327,7 +1326,7 @@ void BrowseBox::UpdateScrollbars()
nCol < pCols->size() && nCol < nFirstCol;
++nCol )
{
- // HandleColumn nicht
+ // not the handle column
if ( (*pCols)[ nCol ]->GetId() )
nWidth += (*pCols)[ nCol ]->Width();
}
@@ -1354,9 +1353,8 @@ void BrowseBox::SetUpdateMode( sal_Bool bUpdate )
return;
Control::SetUpdateMode( bUpdate );
- // OV
- // Wenn an der BrowseBox WB_CLIPCHILDREN gesetzt ist (wg. Flackerminimierung),
- // wird das Datenfenster nicht von SetUpdateMode invalidiert.
+ // If WB_CLIPCHILDREN is st at the BrowseBox (to minimize flicker),
+ // the data window is not invalidated by SetUpdateMode.
if( bUpdate )
getDataWindow()->Invalidate();
getDataWindow()->SetUpdateMode( bUpdate );
@@ -1451,9 +1449,6 @@ IMPL_LINK_NOARG(BrowseBox, EndScrollHdl)
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- // kein Focus grabben!
- /// GrabFocus();
-
if ( getDataWindow()->bNoScrollBack )
{
EndScroll();
@@ -1472,7 +1467,7 @@ IMPL_LINK( BrowseBox, StartDragHdl, HeaderBar*, pBar )
}
//-------------------------------------------------------------------
-// MI: es wurde immer nur die 1. Spalte resized
+// usually only the first column was resized
#ifdef _MSC_VER
#pragma optimize("",off)
#endif
@@ -1483,7 +1478,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
GrabFocus();
- // onl< mouse events in the title-line are supported
+ // only mouse events in the title-line are supported
const Point &rEvtPos = rEvt.GetPosPixel();
if ( rEvtPos.Y() >= GetTitleHeight() )
return;
@@ -1563,10 +1558,10 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
aNewPointer = Pointer( POINTER_HSPLIT );
if ( bResizing )
{
- // alte Hilfslinie loeschen
+ // delete old auxiliary line
pDataWin->HideTracking() ;
- // erlaubte breite abholen und neues Delta
+ // check allowed width and new delta
nDragX = Max( rEvt.GetPosPixel().X(), nMinResizeX );
long nDeltaX = nDragX - nResizeX;
sal_uInt16 nId = GetColumnId(nResizeCol);
@@ -1575,7 +1570,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
nOldWidth + nDeltaX )
+ nResizeX - nOldWidth;
- // neue Hilfslinie zeichnen
+ // draw new auxiliary line
pDataWin->ShowTracking( Rectangle( Point( nDragX, 0 ),
Size( 1, pDataWin->GetSizePixel().Height() ) ),
SHOWTRACK_SPLIT|SHOWTRACK_WINDOW );
@@ -1597,7 +1592,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
if ( bResizing )
{
- // Hilfslinie loeschen
+ // delete auxiliary line
pDataWin->HideTracking();
// width changed?
@@ -1712,7 +1707,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
// click in the selected area?
else if ( IsRowSelected( rEvt.GetRow() ) )
{
- // auf Drag&Drop warten
+ // wait for Drag&Drop
bHit = sal_True;
bExtendedMode = MOUSE_MULTISELECT ==
( rEvt.GetMode() & MOUSE_MULTISELECT );
@@ -1769,7 +1764,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
SelectColumnId( rEvt.GetColumnId(), sal_True, sal_False );
}
- // ggf. Cursor wieder an
+ // turn cursor on again, if necessary
bSelecting = sal_False;
DoShowCursor( "MouseButtonDown" );
if ( bSelect )
diff --git a/svtools/source/brwbox/brwhead.cxx b/svtools/source/brwbox/brwhead.cxx
index db8c9105ee13..1e08809c2369 100644
--- a/svtools/source/brwbox/brwhead.cxx
+++ b/svtools/source/brwbox/brwhead.cxx
@@ -78,7 +78,7 @@ void BrowserHeader::EndDrag()
sal_uInt16 nId = GetCurItemId();
if ( nId )
{
- // Handle-Column?
+ // handle column?
if ( nId == USHRT_MAX-1 )
nId = 0;
@@ -92,8 +92,8 @@ void BrowserHeader::EndDrag()
else
{
// column drag
- // Hat sich die Position eigentlich veraendert
- // Handlecolumn beruecksichtigen
+ // did the position actually change?
+ // take the handle column into account
sal_uInt16 nOldPos = _pBrowseBox->GetColumnPos(nId),
nNewPos = GetItemPos( nId );
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 73364e45011b..8db2a1580103 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -407,7 +407,7 @@ void BrowserDataWin::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
//-------------------------------------------------------------------
void BrowserDataWin::Command( const CommandEvent& rEvt )
{
- // Scrollmaus-Event?
+ // scroll mouse event?
BrowseBox *pBox = GetParent();
if ( ( (rEvt.GetCommand() == COMMAND_WHEEL) ||
(rEvt.GetCommand() == COMMAND_STARTAUTOSCROLL) ||
@@ -488,7 +488,7 @@ void BrowserDataWin::MouseButtonDown( const MouseEvent& rEvt )
void BrowserDataWin::MouseMove( const MouseEvent& rEvt )
{
- // Pseudo MouseMoves verhindern
+ // avoid pseudo MouseMoves
Point aNewPos = OutputToScreenPixel( rEvt.GetPosPixel() );
if ( ( aNewPos == aLastMousePos ) )
return;
@@ -532,14 +532,14 @@ IMPL_LINK_NOARG_INLINE_END(BrowserDataWin, RepeatedMouseMove)
void BrowserDataWin::MouseButtonUp( const MouseEvent& rEvt )
{
- // Pseudo MouseMoves verhindern
+ // avoid pseudo MouseMoves
Point aNewPos = OutputToScreenPixel( rEvt.GetPosPixel() );
aLastMousePos = aNewPos;
- // Move an die aktuelle Position simulieren
+ // simulate a move to the current position
MouseMove( rEvt );
- // eigentliches Up-Handling
+ // actual button up handling
ReleaseMouse();
if ( aMouseTimer.IsActive() )
aMouseTimer.Stop();
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 85700a777703..e3bf2f92095e 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -187,7 +187,7 @@ namespace svt
//------------------------------------------------------------------------------
void EditBrowseBox::Init()
{
- // spaetes Construieren,
+ // late construction
}
//------------------------------------------------------------------------------
@@ -1024,7 +1024,7 @@ namespace svt
nEditCol = nCol;
if ((GetSelectRowCount() && GetSelection() != NULL) || GetSelectColumnCount() ||
- (aMouseEvent.Is() && (aMouseEvent.IsDown() || aMouseEvent->GetClicks() > 1))) // bei MouseDown passiert noch nichts
+ (aMouseEvent.Is() && (aMouseEvent.IsDown() || aMouseEvent->GetClicks() > 1))) // nothing happens on MouseDown
{
return;
}