summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuc Castermans <luc.castermans@gmail.com>2011-12-18 12:21:45 +0100
committerStefan Knorr (astron) <heinzlesspam@gmail.com>2011-12-18 16:05:09 +0100
commit7c9a874ef8a0d486b5ba6ce6aeb8a3e1521f1463 (patch)
treea32ab2a29c87c9dcdb256e056e3fde7e87f98bea /vcl
parent02c790620b63de3fb8d6dd63255444ff40aad34a (diff)
translate German comments to English in VCL module
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/toolbox.cxx200
-rw-r--r--vcl/source/window/window.cxx31
-rw-r--r--vcl/source/window/window2.cxx22
-rw-r--r--vcl/source/window/winproc.cxx61
-rw-r--r--vcl/source/window/wrkwin.cxx3
5 files changed, 156 insertions, 161 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 6fd3fab8f583..905f0fe66c8a 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1419,7 +1419,7 @@ void ImplTBDragMgr::EndDragging( sal_Bool bOK )
aSize.Width() = maRect.GetWidth();
pItem->mpWindow->SetSizePixel( aSize );
- // ToolBox neu brechnen und neu ausgeben
+ // re-calculate and show ToolBox
mpDragBox->ImplInvalidate( sal_True );
mpDragBox->Customize( ToolBoxCustomizeEvent( mpDragBox, nTempItem,
TOOLBOX_CUSTOMIZE_RESIZE,
@@ -1433,7 +1433,7 @@ void ImplTBDragMgr::EndDragging( sal_Bool bOK )
ToolBox* pDropBox = FindToolBox( aScreenRect );
if ( pDropBox )
{
- // Such-Position bestimmen
+ // Determine search position
Point aPos;
if ( pDropBox->mbHorz )
{
@@ -1470,7 +1470,7 @@ void ImplTBDragMgr::EndDragging( sal_Bool bOK )
void ImplTBDragMgr::UpdateDragRect()
{
- // Nur Updaten, wenn wir schon im Dragging sind
+ // Only update if we're already dragging
if ( !mbShowDragRect )
return;
@@ -1510,10 +1510,10 @@ static void ImplDrawOutButton( OutputDevice* pOutDev, const Rectangle& rRect,
nOffset++;
}
- // Hintergrund loeschen
+ // delete background
pOutDev->Erase( rRect );
- // Button zeichnen
+ // draw button
pOutDev->SetLineColor( rStyleSettings.GetLightColor() );
pOutDev->DrawLine( aPos,
Point( aPos.X()+aSize.Width()-OUTBUTTON_BORDER, aPos.Y() ) );
@@ -1539,7 +1539,7 @@ static void ImplDrawOutButton( OutputDevice* pOutDev, const Rectangle& rRect,
void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
{
- // Variablen initialisieren
+ // initialize variables
ImplGetWindowImpl()->mbToolBox = sal_True;
mpBtnDev = NULL;
mpFloatSizeAry = NULL;
@@ -1547,8 +1547,8 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
mpFloatWin = NULL;
mnDX = 0;
mnDY = 0;
- mnMaxItemWidth = 0;
- mnMaxItemHeight = 0;
+ mnMaxItemWidth = 0;
+ mnMaxItemHeight = 0;
mnWinHeight = 0;
mnBorderX = 0;
mnBorderY = 0;
@@ -1595,8 +1595,8 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
meLastStyle = POINTER_ARROW;
mnWinStyle = nStyle;
meLayoutMode = TBX_LAYOUT_NORMAL;
- mnLastFocusItemId = 0;
- mnKeyModifier = 0;
+ mnLastFocusItemId = 0;
+ mnKeyModifier = 0;
mnActivateCount = 0;
maTimer.SetTimeout( 50 );
@@ -1734,7 +1734,7 @@ void ToolBox::ImplLoadRes( const ResId& rResId )
{
sal_uLong nEle = ReadLongRes();
- // Item hinzufuegen
+ // insert item
for ( sal_uLong i = 0; i < nEle; i++ )
{
InsertItem( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
@@ -1763,8 +1763,8 @@ ToolBox::ToolBox( Window* pParent, const ResId& rResId ) :
ImplInit( pParent, nStyle );
ImplLoadRes( rResId );
- // Groesse des FloatingWindows berechnen und umschalten, wenn die
- // ToolBox initial im FloatingModus ist
+ // calculate size of floating windows and switch if the
+ // toolbox is initially in floating mode
if ( ImplIsFloatingMode() )
mbHorz = sal_True;
else
@@ -1786,23 +1786,23 @@ ToolBox::~ToolBox()
while( mnActivateCount > 0 )
Deactivate();
- // Falls noch ein Floating-Window connected ist, dann den
- // PopupModus beenden
+ // terminate popupmode if the floating window is
+ // still connected
if ( mpFloatWin )
mpFloatWin->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
// delete private data
delete mpData;
- // FloatSizeAry gegebenenfalls loeschen
+ // delete FloatSizeAry if required
delete mpFloatSizeAry;
- // Wenn keine ToolBox-Referenzen mehr auf die Listen bestehen, dann
- // Listen mit wegloeschen
+ // remove the lists when there are no more toolbox references to
+ // the lists
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maCtrlData.mpTBDragMgr )
{
- // Wenn im TBDrag-Manager, dann wieder rausnehmen
+ // remove if in TBDrag-Manager
if ( mbCustomize )
pSVData->maCtrlData.mpTBDragMgr->erase( this );
@@ -2024,7 +2024,7 @@ sal_Bool ToolBox::ImplCalcItem()
it->mbEmptyBtn = sal_True;
}
- // Gegebenenfalls die Fensterhoehe mit beruecksichtigen
+ // if required, take window height into consideration
if ( it->mpWindow )
{
long nHeight = it->mpWindow->GetSizePixel().Height();
@@ -2201,7 +2201,7 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b
{
nLines++;
- // Gruppe auseinanderbrechen oder ganze Gruppe umbrechen?
+ // Add break before the entire group or take group apart?
if ( (it->meType == TOOLBOXITEM_BREAK) ||
(nLineStart == nGroupStart) )
{
@@ -2219,8 +2219,8 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b
if ( nLastGroupLineWidth > nMaxLineWidth )
nMaxLineWidth = nLastGroupLineWidth;
- // Wenn ganze Gruppe umgebrochen wird, diese auf
- // Zeilenanfang setzen und wieder neu berechnen
+ // if the break is added before the group, set it to
+ // beginning of line and re-calculate
nLineWidth = 0;
nLineStart = nGroupStart;
it = mpData->m_aItems.begin() + nGroupStart;
@@ -2341,13 +2341,13 @@ void ToolBox::ImplFormat( sal_Bool bResize )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- // Muss ueberhaupt neu formatiert werden
+ // Has to re-formatted
if ( !mbFormat )
return;
mpData->ImplClearLayoutData();
- // Positionen/Groessen berechnen
+ // recalulate positions and sizes
Rectangle aEmptyRect;
long nLineSize;
long nLeft;
@@ -2363,7 +2363,7 @@ void ToolBox::ImplFormat( sal_Bool bResize )
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
sal_Bool bIsInPopupMode = ImplIsInPopupMode();
- // FloatSizeAry gegebenenfalls loeschen
+ // delete FloatSizeAry if required
if ( mpFloatSizeAry )
{
delete mpFloatSizeAry;
@@ -3317,7 +3317,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa
if(!pItem->mbEnabled)
nHighlight = 0;
- // Falls Rechteck ausserhalb des sichbaren Bereichs liegt
+ // if the rectangle is outside visible area
if ( pItem->maRect.IsEmpty() )
return;
@@ -3422,7 +3422,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa
SetFont( aOldFont );
SetTextColor( aOldTextColor );
- // Gegebenenfalls noch Config-Frame zeichnen
+ // draw Config-Frame if required
if ( pMgr && !bLayout)
pMgr->UpdateDragRect();
return;
@@ -3636,7 +3636,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa
ImplDrawDropdownArrow( this, aDropDownRect, bSetColor, bRotate );
}
- // Gegebenenfalls noch Config-Frame zeichnen
+ // draw config-frame if required
if ( pMgr )
pMgr->UpdateDragRect();
}
@@ -3759,10 +3759,10 @@ sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat
{
Point aMousePos = rMEvt.GetPosPixel();
- // Ist ToolBox aktiv
+ // ToolBox active?
if ( mbDrag && mnCurPos != TOOLBOX_ITEM_NOTFOUND )
{
- // Befindet sich Maus ueber dem Item
+ // is the cursor over the item?
ImplToolItem* pItem = &mpData->m_aItems[mnCurPos];
if ( pItem->maRect.IsInside( aMousePos ) )
{
@@ -3841,8 +3841,8 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa
if ( mbDrag || mbSelection )
{
- // Hier die MouseDaten setzen, wenn Selection-Modus, da dann kein
- // MouseButtonDown-Handler gerufen wird
+ // set mouse data if in selection mode, as then
+ // the MouseButtonDown handler cannot be called
if ( mbSelection )
{
mnMouseClicks = rMEvt.GetClicks();
@@ -3860,7 +3860,7 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa
return sal_True;
}
- // Wurde Maus ueber dem Item losgelassen
+ // has mouse been released on top of item?
if( mnCurPos < mpData->m_aItems.size() )
{
ImplToolItem* pItem = &mpData->m_aItems[mnCurPos];
@@ -3869,7 +3869,7 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa
mnCurItemId = pItem->mnId;
if ( !bCancel )
{
- // Gegebenenfalls ein AutoCheck durchfuehren
+ // execute AutoCheck if required
if ( pItem->mnBits & TIB_AUTOCHECK )
{
if ( pItem->mnBits & TIB_RADIOCHECK )
@@ -3886,11 +3886,11 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa
}
}
- // Select nicht bei Repeat ausloesen, da dies schon im
- // MouseButtonDown ausgeloest wurde
+ // do not call Select when Repeat is active, as in this
+ // case that was triggered already in MouseButtonDown
if ( !(pItem->mnBits & TIB_REPEAT) )
{
- // Gegen zerstoeren im Select-Handler sichern
+ // prevent from being destroyed in the select handler
ImplDelData aDelData;
ImplAddDel( &aDelData );
Select();
@@ -3904,7 +3904,7 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
}
- // Items nicht geloescht, im Select-Handler
+ // Items not destroyed, in Select handler
if ( mnCurItemId )
{
sal_uInt16 nHighlight;
@@ -3982,19 +3982,19 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
sal_uInt16 i = 0;
sal_uInt16 nNewPos = TOOLBOX_ITEM_NOTFOUND;
- // Item suchen, das geklickt wurde
+ // search the item that has been clicked
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
{
- // Wenn Mausposition in diesem Item vorhanden, kann die
- // Suche abgebrochen werden
+ // if the mouse position is in this item,
+ // we can stop the search
if ( it->maRect.IsInside( aMousePos ) )
{
- // Wenn es ein Button ist, dann wird er selektiert
+ // select it if it is a button
if ( it->meType == TOOLBOXITEM_BUTTON )
{
- // Wenn er disablet ist, findet keine Aenderung
- // statt
+ // if button is disabled, do not
+ // change it
if ( !it->mbEnabled || it->mbShowWindow )
nNewPos = mnCurPos;
else
@@ -4071,12 +4071,11 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
if ( (eStyle == POINTER_ARROW) && mbCustomizeMode )
{
- // Item suchen, das geklickt wurde
+ // search the item which was clicked
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
{
- // Wenn es ein Customize-Window ist, gegebenenfalls den
- // Resize-Pointer anzeigen
+ // show resize pointer if it is a customize window
if ( it->mbShowWindow )
{
if ( it->maRect.IsInside( aMousePos ) )
@@ -4182,15 +4181,15 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
{
- // Nur bei linker Maustaste ToolBox ausloesen und wenn wir uns nicht
- // noch in der normalen Bearbeitung befinden
+ // only trigger toolbox for left mouse button and when
+ // we're not in normal operation
if ( rMEvt.IsLeft() && !mbDrag && (mnCurPos == TOOLBOX_ITEM_NOTFOUND) )
{
- // Activate schon hier rufen, da gegebenenfalls noch Items
- // ausgetauscht werden
+ // call activate already here, as items could
+ // be exchanged
Activate();
- // ToolBox hier updaten, damit der Anwender weiss, was Sache ist
+ // update ToolBox here, such that user knows it
if ( mbFormat )
{
ImplFormat();
@@ -4201,15 +4200,15 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
sal_uInt16 i = 0;
sal_uInt16 nNewPos = TOOLBOX_ITEM_NOTFOUND;
- // Item suchen, das geklickt wurde
+ // search for item that was clicked
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
{
- // Ist es dieses Item
+ // is this the item?
if ( it->maRect.IsInside( aMousePos ) )
{
- // Ist es ein Separator oder ist das Item disabled,
- // dann mache nichts
+ // do nothing if it is a separator or
+ // if the item has been disabled
if ( (it->meType == TOOLBOXITEM_BUTTON) &&
(!it->mbShowWindow || mbCustomizeMode) )
nNewPos = i;
@@ -4221,7 +4220,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
++it;
}
- // Item gefunden
+ // item found
if ( nNewPos != TOOLBOX_ITEM_NOTFOUND )
{
if ( mbCustomize )
@@ -4252,7 +4251,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
}
- // Aktuelle Daten setzen
+ // update actual data
sal_uInt16 nTrackFlags = 0;
mnCurPos = i;
mnCurItemId = it->mnId;
@@ -4270,12 +4269,12 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
}
else
{
- // Hier schon bDrag setzen, da in EndSelection ausgewertet wird
+ // update bDrag here, as it is evaluated in the EndSelection
mbDrag = sal_True;
- // Bei Doppelklick nur den Handler rufen, aber bevor der
- // Button gehiltet wird, da evt. in diesem Handler der
- // Drag-Vorgang abgebrochen wird
+ // on double-click: only call the handler, but do so before the button
+ // is hit, as in the handler dragging
+ // can be terminated
if ( rMEvt.GetClicks() == 2 )
DoubleClick();
@@ -4319,21 +4318,21 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
}
- // Click-Handler aufrufen
+ // call Click handler
if ( rMEvt.GetClicks() != 2 )
Click();
- // Bei Repeat auch den Select-Handler rufen
+ // also call Select handler at repeat
if ( nTrackFlags & STARTTRACK_BUTTONREPEAT )
Select();
- // Wenn die Aktion nicht im Click-Handler abgebrochen wurde
+ // if the actions was not aborted in Click handler
if ( mbDrag )
StartTracking( nTrackFlags );
}
- // Wenn Maus ueber einem Item gedrueckt wurde, koennen wir
- // die Bearbeitung abbrechen
+ // if mouse was clicked over an item we
+ // can abort here
return;
}
@@ -4346,8 +4345,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
return;
}
-
- // Gegebenenfalls noch Scroll- und Next-Buttons ueberpruefen
+ // check scroll- and next-buttons here
if ( maUpperRect.IsInside( aMousePos ) )
{
if ( mnCurLine > 1 )
@@ -4387,22 +4385,22 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
{
ImplTBDragMgr* pMgr = ImplGetTBDragMgr();
- // Handler rufen, damit die Dock-Rectangles gesetzt werden
- // koenen
+ // call handler, such that we can set the
+ // dock rectangles
StartDocking();
Point aPos = GetParent()->OutputToScreenPixel( GetPosPixel() );
Size aSize = GetSizePixel();
aPos = ScreenToOutputPixel( aPos );
- // Dragging starten
+ // start dragging
pMgr->StartDragging( this, aMousePos, Rectangle( aPos, aSize ),
nLineMode, sal_False );
return;
}
}
- // Kein Item, dann nur Click oder DoubleClick
+ // no item, then only click or double click
if ( rMEvt.GetClicks() == 2 )
DoubleClick();
else
@@ -4472,17 +4470,17 @@ void ToolBox::Paint( const Rectangle& rPaintRect )
ImplDrawMenubutton( this, mpData->mbMenubuttonSelected );
- // SpinButtons zeichnen
+ // draw SpinButtons
if ( mnWinStyle & WB_SCROLL )
{
if ( mnCurLines > mnLines )
ImplDrawSpin( sal_False, sal_False );
}
- // NextButton zeichnen
+ // draw NextButton
ImplDrawNext( sal_False );
- // Buttons zeichnen
+ // draw buttons
sal_uInt16 nHighPos;
if ( mnHighItemId )
nHighPos = GetItemPos( mnHighItemId );
@@ -4494,7 +4492,7 @@ void ToolBox::Paint( const Rectangle& rPaintRect )
{
ImplToolItem* pItem = &mpData->m_aItems[i];
- // Nur malen, wenn Rechteck im PaintRectangle liegt
+ // only draw when the rectangle is in the draw rectangle
if ( !pItem->maRect.IsEmpty() && rPaintRect.IsOver( pItem->maRect ) )
{
sal_uInt16 nHighlight = 0;
@@ -4535,7 +4533,7 @@ void ToolBox::Resize()
// invalidate everything to have gradient backgrounds properly drawn
Invalidate();
- // Evt. neu formatieren oder neu painten
+ // re-format or re-draw
if ( mbScroll )
{
if ( !mbFormat )
@@ -4546,10 +4544,10 @@ void ToolBox::Resize()
}
}
- // Border muss neu ausgegeben werden
+ // redraw border
if ( mnWinStyle & WB_BORDER )
{
- // Da wir sonst beim Paint denken, das alles neu gepaintet wird
+ // as otherwise, when painting we might think we have to re-draw everything
if ( mbFormat && IsReallyVisible() )
Invalidate();
else
@@ -4627,7 +4625,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
{
if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) )
{
- // Rechteck ermitteln
+ // get rectangle
Rectangle aTempRect = GetItemRect( nItemId );
Point aPt = OutputToScreenPixel( aTempRect.TopLeft() );
aTempRect.Left() = aPt.X();
@@ -4636,7 +4634,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
aTempRect.Right() = aPt.X();
aTempRect.Bottom() = aPt.Y();
- // Text ermitteln und anzeigen
+ // get text and display it
XubString aStr = GetQuickHelpText( nItemId );
const XubString& rHelpStr = GetHelpText( nItemId );
if ( !aStr.Len() )
@@ -4658,7 +4656,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
if ( aCommand.Len() || aHelpId.getLength() )
{
- // Wenn eine Hilfe existiert, dann ausloesen
+ // If help is available then trigger it
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
@@ -4675,7 +4673,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
{
if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) )
{
- // Rechteck ermitteln
+ // get rectangle
Rectangle aTempRect = maNextToolRect;
Point aPt = OutputToScreenPixel( aTempRect.TopLeft() );
aTempRect.Left() = aPt.X();
@@ -4781,27 +4779,27 @@ long ToolBox::Notify( NotifyEvent& rNEvt )
void ToolBox::Command( const CommandEvent& rCEvt )
{
- // StartDrag auf MouseButton/Left/Alt abbilden
+ // depict StartDrag on MouseButton/Left/Alt
if ( (rCEvt.GetCommand() == COMMAND_STARTDRAG) && rCEvt.IsMouseEvent() &&
mbCustomize && !mbDragging && !mbDrag && !mbSelection &&
(mnCurPos == TOOLBOX_ITEM_NOTFOUND) )
{
- // Wir erlauben nur das Draggen von Items. Deshalb muessen wir
- // testen, ob auch ein Item angeklickt wurde, ansonsten wuerden
- // wir evt. das Fenster verschieben, was nicht gewollt waere.
- // Wir machen dieses jedoch nur im Customize-Mode, da ansonsten
- // Items zuhaeufig ausversehen verschoben werden.
+ // We only allow dragging of items. Therefore, we have to check
+ // if an item was clicked, otherwise we could move the window, and
+ // this is unwanted.
+ // We only do this in customize mode, as otherwise
+ // items could be moved accidentally
if ( mbCustomizeMode )
{
Point aMousePos = rCEvt.GetMousePosPixel();
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
{
- // Ist es dieses Item
+ // is this the item?
if ( it->maRect.IsInside( aMousePos ) )
{
- // Ist es ein Separator oder ist das Item disabled,
- // dann mache nichts
+ // do nothing if it is a separator or
+ // the item has been disabled
if ( (it->meType == TOOLBOXITEM_BUTTON) &&
!it->mbShowWindow )
mbCommandDrag = sal_True;
@@ -4959,7 +4957,7 @@ void ToolBox::StartDocking()
sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
{
- // Wenn Dragging, dann nicht machen, da vorher schon berechnet
+ // do nothing during dragging, it was calculated before
if ( mbDragging )
return sal_False;
@@ -4967,8 +4965,7 @@ sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
DockingWindow::Docking( rPos, rRect );
- // Befindet sich die Maus ausserhalb des Bereichs befindet, kann es nur ein
- // FloatWindow werden
+ // if the mouse is outside the area, it can only become a floating window
Rectangle aDockingRect( rRect );
if ( !ImplIsFloatingMode() )
{
@@ -4995,7 +4992,7 @@ sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
aInRect.Right() -= aDockSize.Width()/2;
aInRect.Bottom() -= aDockSize.Height()/2;
- // Wenn Fenster zu klein, wird das gesammte InDock-Rect genommen
+ // if the window is too small, use the complete InDock-Rect
if ( aInRect.Left() >= aInRect.Right() )
{
aInRect.Left() = maInDockRect.Left();
@@ -5007,8 +5004,8 @@ sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
aInRect.Bottom() = maInDockRect.Bottom();
}
- // Wenn Maus nicht im Dock-Bereich, dann kann es nur zum
- // FloatWindow werden
+ // if the mouse is outside the Dock area, it can only
+ // become a floating window
Rectangle aIntersect = aInRect.GetIntersection( aDockingRect );
if ( aIntersect == aDockingRect )
bFloatMode = sal_True;
@@ -5029,8 +5026,7 @@ sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
else if ( aInPosBR.Y() >= aInSize.Height() )
meDockAlign = WINDOWALIGN_BOTTOM;
- // Wenn sich Dock-Align geaendert hat, muessen wir die
- // neue Dock-Groesse setzen
+ // update the Dock size if Dock-Align was changed
if ( (meDockAlign == WINDOWALIGN_TOP) || (meDockAlign == WINDOWALIGN_BOTTOM) )
aDockSize.Width() = maInDockRect.GetWidth();
else
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 585b7dda62bc..dfd68ccafffd 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -529,9 +529,8 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl
}
#if defined(DBG_UTIL)
- // Evt. AppFont auf Fett schalten, damit man feststellen kann,
- // ob fuer die Texte auf anderen Systemen genuegend Platz
- // vorhanden ist
+ // If needed, set AppFont to bold, in order to check
+ // if there is enough space available for texts on other systems
if ( DbgIsBoldAppFont() )
{
aStyleSettings = rSettings.GetStyleSettings();
@@ -690,12 +689,12 @@ void Window::ImplInitWindowData( WindowType nType )
mpWindowImpl->mbInitWinClipRegion = sal_True; // sal_True: Calc Window Clip Region
mpWindowImpl->mbInitChildRegion = sal_False; // sal_True: InitChildClipRegion
mpWindowImpl->mbWinRegion = sal_False; // sal_True: Window Region
- mpWindowImpl->mbClipChildren = sal_False; // sal_True: Child-Fenster muessen evt. geclippt werden
- mpWindowImpl->mbClipSiblings = sal_False; // sal_True: Nebeneinanderliegende Child-Fenster muessen evt. geclippt werden
- mpWindowImpl->mbChildTransparent = sal_False; // sal_True: Child-Fenster duerfen transparent einschalten (inkl. Parent-CLIPCHILDREN)
- mpWindowImpl->mbPaintTransparent = sal_False; // sal_True: Paints muessen auf Parent ausgeloest werden
+ mpWindowImpl->mbClipChildren = sal_False; // sal_True: Child-window should be clipped
+ mpWindowImpl->mbClipSiblings = sal_False; // sal_True: Adjacent Child-window should be clipped
+ mpWindowImpl->mbChildTransparent = sal_False; // sal_True: Child-windows are allowed to switch to transparent (incl. Parent-CLIPCHILDREN)
+ mpWindowImpl->mbPaintTransparent = sal_False; // sal_True: Paints should be executed on the Parent
mpWindowImpl->mbMouseTransparent = sal_False; // sal_True: Window is transparent for Mouse
- mpWindowImpl->mbDlgCtrlStart = sal_False; // sal_True: Ab hier eigenes Dialog-Control
+ mpWindowImpl->mbDlgCtrlStart = sal_False; // sal_True: From here on own Dialog-Control
mpWindowImpl->mbFocusVisible = sal_False; // sal_True: Focus Visible
mpWindowImpl->mbUseNativeFocus = sal_False;
mpWindowImpl->mbNativeFocusVisible= sal_False; // sal_True: native Focus Visible
@@ -704,14 +703,14 @@ void Window::ImplInitWindowData( WindowType nType )
mpWindowImpl->mbTrackVisible = sal_False; // sal_True: Tracking Visible
mpWindowImpl->mbControlForeground = sal_False; // sal_True: Foreground-Property set
mpWindowImpl->mbControlBackground = sal_False; // sal_True: Background-Property set
- mpWindowImpl->mbAlwaysOnTop = sal_False; // sal_True: immer vor allen anderen normalen Fenstern sichtbar
- mpWindowImpl->mbCompoundControl = sal_False; // sal_True: Zusammengesetztes Control => Listener...
- mpWindowImpl->mbCompoundControlHasFocus = sal_False; // sal_True: Zusammengesetztes Control hat irgendwo den Focus
- mpWindowImpl->mbPaintDisabled = sal_False; // sal_True: Paint soll nicht ausgefuehrt werden
- mpWindowImpl->mbAllResize = sal_False; // sal_True: Auch ResizeEvents mit 0,0 schicken
- mpWindowImpl->mbInDtor = sal_False; // sal_True: Wir befinden uns im Window-Dtor
+ mpWindowImpl->mbAlwaysOnTop = sal_False; // sal_True: always visible for all others windows
+ mpWindowImpl->mbCompoundControl = sal_False; // sal_True: Composite Control => Listener...
+ mpWindowImpl->mbCompoundControlHasFocus = sal_False; // sal_True: Composite Control has focus somewhere
+ mpWindowImpl->mbPaintDisabled = sal_False; // sal_True: Paint should not be executed
+ mpWindowImpl->mbAllResize = sal_False; // sal_True: Also sent ResizeEvents with 0,0
+ mpWindowImpl->mbInDtor = sal_False; // sal_True: We're still in Window-Dtor
mpWindowImpl->mbExtTextInput = sal_False; // sal_True: ExtTextInput-Mode is active
- mpWindowImpl->mbInFocusHdl = sal_False; // sal_True: Innerhalb vom GetFocus-Handler
+ mpWindowImpl->mbInFocusHdl = sal_False; // sal_True: Within GetFocus-Handler
mpWindowImpl->mbCreatedWithToolkit = sal_False;
mpWindowImpl->mbSuppressAccessibilityEvents = sal_False; // sal_True: do not send any accessibility events
mpWindowImpl->mbDrawSelectionBackground = sal_False; // sal_True: draws transparent window background to indicate (toolbox) selection
@@ -1376,7 +1375,7 @@ Window* Window::ImplFindWindow( const Point& rFramePos )
sal_uInt16 nHitTest = ImplHitTest( rFramePos );
if ( nHitTest & WINDOW_HITTEST_INSIDE )
{
- // und danach gehen wir noch alle Child-Fenster durch
+ // and then we check all child windows
pTempWindow = mpWindowImpl->mpFirstChild;
while ( pTempWindow )
{
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 943411ccb151..16972adf07d6 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -74,7 +74,7 @@ sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
DBG_CHKOBJ( pTestWindow, Window, ImplDbgCheckWindow );
- // Testen, ob es Fenster untereinander liegen
+ // check for overlapping window
pTestWindow = pTestWindow->ImplGetFirstOverlapWindow();
const Window* pTempWindow = pTestWindow;
const Window* pThisWindow = ImplGetFirstOverlapWindow();
@@ -100,7 +100,7 @@ sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const
}
while ( pTempWindow );
- // Fenster auf gleiche Ebene bringen
+ // move window to same level
if ( pThisWindow->mpWindowImpl->mpOverlapWindow != pTestWindow->mpWindowImpl->mpOverlapWindow )
{
sal_uInt16 nThisLevel = 0;
@@ -146,7 +146,7 @@ sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const
}
}
- // Wenn TestWindow vor ThisWindow kommt, liegt es vorne
+ // if TestWindow is before ThisWindow, it is in front
pTempWindow = pTestWindow;
do
{
@@ -253,7 +253,7 @@ void Window::ImplDeleteOverlapBackground()
mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL;
}
- // Fenster aus der Liste entfernen
+ // remove window from the list
if ( mpWindowImpl->mpFrameData->mpFirstBackWin == this )
mpWindowImpl->mpFrameData->mpFirstBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin;
else
@@ -276,8 +276,8 @@ void Window::ImplInvalidateAllOverlapBackgrounds()
Window* pWindow = mpWindowImpl->mpFrameData->mpFirstBackWin;
while ( pWindow )
{
- // Naechstes Fenster schon hier merken, da dieses Fenster in
- // der if-Abfrage aus der Liste entfernt werden kann
+ // remember next window here already, as this window could
+ // be removed within the next if clause from the list
Window* pNext = pWindow->mpWindowImpl->mpOverlapData->mpNextBackWin;
if ( ImplIsWindowInFront( pWindow ) )
@@ -725,8 +725,8 @@ void Window::EndTracking( sal_uInt16 nFlags )
if ( pSVData->maWinData.mpTrackWin == this )
{
- // Hier wegen DbgChkThis geklammert, da Window im Handler zerstoert
- // werden kann
+ // due to DbgChkThis in brackets, as the window could be destroyed
+ // in the handler
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -741,7 +741,7 @@ void Window::EndTracking( sal_uInt16 nFlags )
ReleaseMouse();
}
- // EndTracking rufen, wenn es gerufen werden soll
+ // call EndTracking if required
if ( !(nFlags & ENDTRACK_DONTCALLHDL) )
{
Point aMousePos( mpWindowImpl->mpFrameData->mnLastMouseX, mpWindowImpl->mpFrameData->mnLastMouseY );
@@ -923,8 +923,8 @@ void Window::SetZoomedPointFont( const Font& rFont )
aFont.SetSize( aSize );
SetPointFont( aFont );
- // Wenn Darstellung skaliert wird, nehmen wir gegebenenfalls
- // einen anderen Font, wenn der aktuelle nicht skalierbar ist
+ // Use another font if the representation is to be scaled,
+ // and the actual font is not scalable
FontMetric aMetric = GetFontMetric();
long nFontDiff = Abs( GetFont().GetSize().Height()-aMetric.GetSize().Height() );
if ( (aMetric.GetType() == TYPE_RASTER) && (nFontDiff >= 2) )
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index f6765ffaf2d8..43866142ccc8 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -444,7 +444,7 @@ long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse
if ( !pChild && !bMouseLeave )
return 0;
- // Ein paar Test ausfuehren und Message abfangen oder Status umsetzen
+ // execute a few tests and catch the message or implement the status
if ( pChild )
{
if( pChild->ImplIsAntiparallel() )
@@ -506,8 +506,8 @@ long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse
// determine mouse event data
if ( nSVEvent == EVENT_MOUSEMOVE )
{
- // Testen, ob MouseMove an das gleiche Fenster geht und sich der
- // Status nicht geaendert hat
+ // check if MouseMove belongs to same window and if the
+ // status did not change
if ( pChild )
{
Point aChildMousePos = pChild->ImplFrameToOutput( aMousePos );
@@ -517,8 +517,8 @@ long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse
(aChildMousePos.Y() == pWinFrameData->mnLastMouseWinY) &&
(nOldCode == pWinFrameData->mnMouseCode) )
{
- // Mouse-Pointer neu setzen, da er sich geaendet haben
- // koennte, da ein Modus umgesetzt wurde
+ // set mouse pointer anew, as it could have changed
+ // due to the mode switch
ImplSetMousePointer( pChild );
return 0;
}
@@ -530,15 +530,15 @@ long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse
// mouse click
nClicks = pWinFrameData->mnClickCount;
- // Gegebenenfalls den Start-Drag-Handler rufen.
- // Achtung: Muss vor Move gerufen werden, da sonst bei schnellen
- // Mausbewegungen die Applikationen in den Selektionszustand gehen.
+ // call Start-Drag handler if required
+ // Warning: should be called before Move, as otherwise during
+ // fast mouse movements the applications move to the selection state
Window* pMouseDownWin = pWinFrameData->mpMouseDownWin;
if ( pMouseDownWin )
{
- // Testen, ob StartDrag-Modus uebereinstimmt. Wir vergleichen nur
- // den Status der Maustasten, damit man mit Mod1 z.B. sofort
- // in den Kopiermodus gehen kann.
+ // check for matching StartDrag mode. We only compare
+ // the status of the mouse buttons, such that e. g. Mod1 can
+ // change immediately to the copy mode
const MouseSettings& rMSettings = pMouseDownWin->GetSettings().GetMouseSettings();
if ( (nCode & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)) ==
(rMSettings.GetStartDragCode() & (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)) )
@@ -622,8 +622,8 @@ long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse
pWinFrameData->mbInMouseMove = sal_True;
pMouseMoveWin->ImplGetWinData()->mbMouseOver = sal_False;
pMouseMoveWin->ImplAddDel( &aDelData );
- // Durch MouseLeave kann auch dieses Fenster zerstoert
- // werden
+
+ // A MouseLeave can destroy this window
if ( pChild )
pChild->ImplAddDel( &aDelData2 );
if ( !ImplCallPreNotify( aNLeaveEvt ) )
@@ -1712,7 +1712,7 @@ static void ImplHandleMoveResize( Window* pWindow, long nNewWidth, long nNewHeig
static void ImplActivateFloatingWindows( Window* pWindow, sal_Bool bActive )
{
- // Zuerst alle ueberlappenden Fenster ueberpruefen
+ // First check all overlapping windows
Window* pTempWindow = pWindow->ImplGetWindowImpl()->mpFirstOverlap;
while ( pTempWindow )
{
@@ -1735,15 +1735,14 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG )
{
ImplGetWindowImpl()->mpFrameData->mnFocusId = 0;
- // Wenn Status erhalten geblieben ist, weil wir den Focus in der
- // zwischenzeit schon wiederbekommen haben, brauchen wir auch
- // nichts machen
+ // If the status has been preserved, because we got back the focus
+ // in the meantime, we do nothing
sal_Bool bHasFocus = ImplGetWindowImpl()->mpFrameData->mbHasFocus || ImplGetWindowImpl()->mpFrameData->mbSysObjFocus;
- // Dann die zeitverzoegerten Funktionen ausfuehren
+ // next execute the delayed functions
if ( bHasFocus )
{
- // Alle FloatingFenster deaktiv zeichnen
+ // redraw all floating windows inactive
if ( ImplGetWindowImpl()->mpFrameData->mbStartFocusState != bHasFocus )
ImplActivateFloatingWindows( this, bHasFocus );
@@ -1814,8 +1813,8 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG )
}
// TrackingMode is ended in ImplHandleLoseFocus
-// To avoid problems with the Unix IME
-// pFocusWin->EndExtTextInput( EXTTEXTINPUT_END_COMPLETE );
+ // To avoid problems with the Unix IME
+ // pFocusWin->EndExtTextInput( EXTTEXTINPUT_END_COMPLETE );
// XXX #102010# hack for accessibility: do not close the menu,
// even after focus lost
@@ -1832,7 +1831,7 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG )
}
}
- // Alle FloatingFenster deaktiv zeichnen
+ // Redraw all floating window inactive
if ( ImplGetWindowImpl()->mpFrameData->mbStartFocusState != bHasFocus )
ImplActivateFloatingWindows( this, bHasFocus );
}
@@ -1846,8 +1845,9 @@ static void ImplHandleGetFocus( Window* pWindow )
{
pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_True;
- // Focus-Events zeitverzoegert ausfuehren, damit bei SystemChildFenstern
- // nicht alles flackert, wenn diese den Focus bekommen
+
+ // execute Focus-Events after a delay, such that SystemChildWindows
+ // do not blink when they receive focus
if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
{
bool bCallDirect = ImplGetSVData()->mbIsTestTool;
@@ -1868,20 +1868,19 @@ static void ImplHandleLoseFocus( Window* pWindow )
{
ImplSVData* pSVData = ImplGetSVData();
- // Wenn Frame den Focus verliert, brechen wir auch ein AutoScroll ab
+ // Abort the autoscroll if the frame loses focus
if ( pSVData->maWinData.mpAutoScrollWin )
pSVData->maWinData.mpAutoScrollWin->EndAutoScroll();
- // Wenn Frame den Focus verliert, brechen wir auch ein Tracking ab
+ // Abort tracking if the frame loses focus
if ( pSVData->maWinData.mpTrackWin )
{
if ( pSVData->maWinData.mpTrackWin->ImplGetWindowImpl()->mpFrameWindow == pWindow )
pSVData->maWinData.mpTrackWin->EndTracking( ENDTRACK_CANCEL );
}
- // handle FloatingMode
- // hier beenden wir immer den PopupModus, auch dann, wenn NOFOCUSCLOSE
- // gesetzt ist, damit wir nicht beim Wechsel noch Fenster stehen lassen
+ // here we always terminate the popupmode, also when NOFOCUSCLOSE
+ // is set, such that we do not show windows during the switch
if ( pSVData->maWinData.mpFirstFloat )
{
if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE) )
@@ -1890,8 +1889,8 @@ static void ImplHandleLoseFocus( Window* pWindow )
pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_False;
- // Focus-Events zeitverzoegert ausfuehren, damit bei SystemChildFenstern
- // nicht alles flackert, wenn diese den Focus bekommen
+ // execute Focus-Events after a delay, such that SystemChildWindows
+ // do not flicker when they receive focus
bool bCallDirect = ImplGetSVData()->mbIsTestTool;
if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
{
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 091f88899e0f..08af25cd0891 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -74,7 +74,8 @@ void WorkWindow::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pS
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
-// mpWindowImpl->mpRealParent = pParent; // !!! Muesste eigentlich gesetzt werden, aber wegen Fehlern mit dem MenuBar erstmal nicht gesetzt !!!
+
+ // mpWindowImpl->mpRealParent = pParent; // should actually be set, but is not set due to errors with the menubar!!
if ( nStyle & WB_APP )
{