Kaydet (Commit) 455b403a authored tarafından Luc Castermans's avatar Luc Castermans Kaydeden (comit) Miklos Vajna

translated German comments

Change-Id: I75c7611c36c15fb36e00de239f5b322adb182e73
Reviewed-on: https://gerrit.libreoffice.org/7273Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst ed6b4dc7
...@@ -109,28 +109,28 @@ public: ...@@ -109,28 +109,28 @@ public:
sal_Bool* pDtorNotify; sal_Bool* pDtorNotify;
AutoTimer aMouseTimer; // recalls MouseMove on dragging out AutoTimer aMouseTimer; // recalls MouseMove on dragging out
MouseEvent aRepeatEvt; // a MouseEvent to repeat MouseEvent aRepeatEvt; // a MouseEvent to repeat
Point aLastMousePos; // verhindert pseudo-MouseMoves Point aLastMousePos; // prevents pseudo-MouseMoves
OUString aRealRowCount; // zur Anzeige im VScrollBar OUString aRealRowCount; // to show in VScrollBar
RectangleList aInvalidRegion; // invalidated Rectangles during !UpdateMode RectangleList aInvalidRegion; // invalidated Rectangles during !UpdateMode
bool bInPaint; // TRUE while in Paint bool bInPaint; // TRUE while in Paint
bool bInCommand; // TRUE while in Command bool bInCommand; // TRUE while in Command
bool bNoScrollBack; // nur vorwaerts scrollen bool bNoScrollBack; // only scroll forward
bool bNoHScroll; // kein horizontaler Scrollbar bool bNoHScroll; // no horizontal scrollbar
bool bNoVScroll; // no vertical scrollbar bool bNoVScroll; // no vertical scrollbar
bool bAutoHScroll; // autohide horizontaler Scrollbar bool bAutoHScroll; // autohide horizontaler Scrollbar
bool bAutoVScroll; // autohide horizontaler Scrollbar bool bAutoVScroll; // autohide horizontaler Scrollbar
bool bUpdateMode; // nicht SV-UpdateMode wegen Invalidate() bool bUpdateMode; // not SV-UpdateMode because of Invalidate()
bool bAutoSizeLastCol; // last column always fills up window bool bAutoSizeLastCol; // last column always fills up window
bool bResizeOnPaint; // outstanding resize-event bool bResizeOnPaint; // outstanding resize-event
bool bUpdateOnUnlock; // Update() while locked bool bUpdateOnUnlock; // Update() while locked
bool bInUpdateScrollbars; // Rekursionsschutz bool bInUpdateScrollbars; // prevents recursions
bool bHadRecursion; // Rekursion war aufgetreten bool bHadRecursion; // a recursion occured
bool bOwnDataChangedHdl; // dont change colors in DataChanged bool bOwnDataChangedHdl; // dont change colors in DataChanged
bool bCallingDropCallback; // we're in a callback to AcceptDrop or ExecuteDrop curently bool bCallingDropCallback; // we're in a callback to AcceptDrop or ExecuteDrop curently
sal_uInt16 nUpdateLock; // lock count, dont call Control::Update()! sal_uInt16 nUpdateLock; // lock count, dont call Control::Update()!
short nCursorHidden; // new conuter for DoHide/ShowCursor short nCursorHidden; // new counter for DoHide/ShowCursor
long m_nDragRowDividerLimit; long m_nDragRowDividerLimit;
long m_nDragRowDividerOffset; long m_nDragRowDividerOffset;
......
...@@ -730,7 +730,7 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance, ...@@ -730,7 +730,7 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
long nVirHeight = n1+nDist+n2; long nVirHeight = n1+nDist+n2;
if ( nVirHeight > aSize.Height() ) if ( nVirHeight > aSize.Height() )
aSize.Height() = nVirHeight; aSize.Height() = nVirHeight;
// negative Breiten muss und darf man nicht painten // negative width should not be drawn
if ( aSize.Width() > 0 ) if ( aSize.Width() > 0 )
{ {
Size aVirSize = aVirDev.LogicToPixel( aSize ); Size aVirSize = aVirDev.LogicToPixel( aSize );
...@@ -1644,7 +1644,7 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList ) ...@@ -1644,7 +1644,7 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList )
} }
else else
{ {
// Wenn Font nicht, dann Standard-Styles einfuegen // insert standard styles if no font
InsertEntry( pList->GetNormalStr() ); InsertEntry( pList->GetNormalStr() );
InsertEntry( pList->GetItalicStr() ); InsertEntry( pList->GetItalicStr() );
InsertEntry( pList->GetBoldStr() ); InsertEntry( pList->GetBoldStr() );
......
...@@ -167,11 +167,10 @@ static OUString ImplMakeSearchStringFromName(const OUString& rStr) ...@@ -167,11 +167,10 @@ static OUString ImplMakeSearchStringFromName(const OUString& rStr)
ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* pIndex) const ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* pIndex) const
{ {
// Wenn kein Eintrag in der Liste oder der Eintrag groesser ist als // Append if there is no enty in the list or if the entry is larger
// der Letzte, dann hinten dranhaengen. Wir vergleichen erst mit dem // then the last one. We only compare to the last entry as the list of VCL
// letzten Eintrag, da die Liste von VCL auch sortiert zurueckkommt // is returned sorted, which increases the probability that appending
// und somit die Wahrscheinlichkeit das hinten angehaengt werden muss // is more likely
// sehr gross ist.
sal_uLong nCnt = maEntries.size(); sal_uLong nCnt = maEntries.size();
if ( !nCnt ) if ( !nCnt )
{ {
...@@ -193,7 +192,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* ...@@ -193,7 +192,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong*
return const_cast<ImplFontListNameInfo*>(pCmpData); return const_cast<ImplFontListNameInfo*>(pCmpData);
} }
// Fonts in der Liste suchen // search fonts in the list
const ImplFontListNameInfo* pCompareData; const ImplFontListNameInfo* pCompareData;
const ImplFontListNameInfo* pFoundData = NULL; const ImplFontListNameInfo* pFoundData = NULL;
sal_uLong nLow = 0; sal_uLong nLow = 0;
...@@ -253,15 +252,14 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll, ...@@ -253,15 +252,14 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll,
else else
nType = FONTLIST_FONTNAMETYPE_PRINTER; nType = FONTLIST_FONTNAMETYPE_PRINTER;
// Alle Fonts vom Device abfragen // inquire all fonts from the device
int n = pDevice->GetDevFontCount(); int n = pDevice->GetDevFontCount();
sal_uInt16 i; sal_uInt16 i;
for( i = 0; i < n; i++ ) for( i = 0; i < n; i++ )
{ {
FontInfo aFontInfo = pDevice->GetDevFont( i ); FontInfo aFontInfo = pDevice->GetDevFont( i );
// Wenn keine Raster-Schriften angezeigt werden sollen, // ignore raster-fonts if they are not to be displayed
// dann diese ignorieren
if ( !bAll && (aFontInfo.GetType() == TYPE_RASTER) ) if ( !bAll && (aFontInfo.GetType() == TYPE_RASTER) )
continue; continue;
...@@ -341,12 +339,12 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll, ...@@ -341,12 +339,12 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll,
FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll ) FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll )
{ {
// Variablen initialisieren // initialise variables
mpDev = pDevice; mpDev = pDevice;
mpDev2 = pDevice2; mpDev2 = pDevice2;
mpSizeAry = NULL; mpSizeAry = NULL;
// Stylenamen festlegen // store style names
maLight = SVT_RESSTR(STR_SVT_STYLE_LIGHT); maLight = SVT_RESSTR(STR_SVT_STYLE_LIGHT);
maLightItalic = SVT_RESSTR(STR_SVT_STYLE_LIGHT_ITALIC); maLightItalic = SVT_RESSTR(STR_SVT_STYLE_LIGHT_ITALIC);
maNormal = SVT_RESSTR(STR_SVT_STYLE_NORMAL); maNormal = SVT_RESSTR(STR_SVT_STYLE_NORMAL);
...@@ -358,8 +356,8 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll ...@@ -358,8 +356,8 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll
ImplInsertFonts( pDevice, bAll, sal_True ); ImplInsertFonts( pDevice, bAll, sal_True );
// Gegebenenfalls muessen wir mit den Bildschirmfonts vergleichen, // if required compare to the screen fonts
// damit dort die eigentlich doppelten auf Equal mappen koennen // in order to map the duplicates to Equal
sal_Bool bCompareWindow = sal_False; sal_Bool bCompareWindow = sal_False;
if ( !pDevice2 && (pDevice->GetOutDevType() == OUTDEV_PRINTER) ) if ( !pDevice2 && (pDevice->GetOutDevType() == OUTDEV_PRINTER) )
{ {
...@@ -376,10 +374,10 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll ...@@ -376,10 +374,10 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll
FontList::~FontList() FontList::~FontList()
{ {
// Gegebenenfalls SizeArray loeschen // delete SizeArray if required
delete[] mpSizeAry; delete[] mpSizeAry;
// FontInfos loeschen // delete FontInfos
ImplFontListFontInfo *pTemp, *pInfo; ImplFontListFontInfo *pTemp, *pInfo;
boost::ptr_vector<ImplFontListNameInfo>::iterator it; boost::ptr_vector<ImplFontListNameInfo>::iterator it;
for (it = maEntries.begin(); it != maEntries.end(); ++it) for (it = maEntries.begin(); it != maEntries.end(); ++it)
...@@ -450,8 +448,7 @@ OUString FontList::GetStyleName(const FontInfo& rInfo) const ...@@ -450,8 +448,7 @@ OUString FontList::GetStyleName(const FontInfo& rInfo) const
FontWeight eWeight = rInfo.GetWeight(); FontWeight eWeight = rInfo.GetWeight();
FontItalic eItalic = rInfo.GetItalic(); FontItalic eItalic = rInfo.GetItalic();
// Nur wenn kein StyleName gesetzt ist, geben wir einen syntetischen // return synthetic Name if no StyleName was set
// Namen zurueck
if (aStyleName.isEmpty()) if (aStyleName.isEmpty())
aStyleName = GetStyleName(eWeight, eItalic); aStyleName = GetStyleName(eWeight, eItalic);
else else
...@@ -577,7 +574,7 @@ namespace ...@@ -577,7 +574,7 @@ namespace
FontWeight eWeight, FontItalic eItalic) FontWeight eWeight, FontItalic eItalic)
{ {
FontInfo aInfo; FontInfo aInfo;
// Falls der Fontname stimmt, uebernehmen wir soviel wie moeglich // if the fontname matches, we copy as much as possible
if (pFontNameInfo) if (pFontNameInfo)
{ {
aInfo = *pFontNameInfo; aInfo = *pFontNameInfo;
...@@ -618,8 +615,7 @@ FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const ...@@ -618,8 +615,7 @@ FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const
} }
} }
// Konnten die Daten nicht gefunden werden, dann muessen bestimmte // reproduce attributes if data could not be found
// Attribute nachgebildet werden
FontInfo aInfo; FontInfo aInfo;
if ( !pFontInfo ) if ( !pFontInfo )
{ {
...@@ -703,8 +699,7 @@ FontInfo FontList::Get(const OUString& rName, ...@@ -703,8 +699,7 @@ FontInfo FontList::Get(const OUString& rName,
} }
} }
// Konnten die Daten nicht gefunden werden, dann muessen bestimmte // reproduce attributes if data could not be found
// Attribute nachgebildet werden
FontInfo aInfo; FontInfo aInfo;
if ( !pFontInfo ) if ( !pFontInfo )
aInfo = makeMissing(pFontNameInfo, rName, eWeight, eItalic); aInfo = makeMissing(pFontNameInfo, rName, eWeight, eItalic);
...@@ -764,19 +759,18 @@ const FontInfo& FontList::GetFontInfo( sal_Handle hFontInfo ) const ...@@ -764,19 +759,18 @@ const FontInfo& FontList::GetFontInfo( sal_Handle hFontInfo ) const
const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const
{ {
// Size-Array vorher loeschen // first delete Size-Array
if ( mpSizeAry ) if ( mpSizeAry )
{ {
delete[] ((FontList*)this)->mpSizeAry; delete[] ((FontList*)this)->mpSizeAry;
((FontList*)this)->mpSizeAry = NULL; ((FontList*)this)->mpSizeAry = NULL;
} }
// Falls kein Name, dann Standardgroessen // use standarad sizes if no name
if ( rInfo.GetName().isEmpty() ) if ( rInfo.GetName().isEmpty() )
return aStdSizeAry; return aStdSizeAry;
// Zuerst nach dem Fontnamen suchen um das Device dann von dem // first search fontname in order to use device from the matching font
// entsprechenden Font zu nehmen
OutputDevice* pDevice = mpDev; OutputDevice* pDevice = mpDev;
ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() ); ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() );
if ( pData ) if ( pData )
......
...@@ -125,8 +125,8 @@ void FileControl::StateChanged( StateChangedType nType ) ...@@ -125,8 +125,8 @@ void FileControl::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_CONTROLFONT ) else if ( nType == STATE_CHANGE_CONTROLFONT )
{ {
GetEdit().SetControlFont( GetControlFont() ); GetEdit().SetControlFont( GetControlFont() );
// Fuer den Button nur die Hoehe uebernehmen, weil in // Only use height of the button, as in HTML
// HTML immer Courier eingestellt wird. // always Courier is used
Font aFont = GetButton().GetControlFont(); Font aFont = GetButton().GetControlFont();
aFont.SetSize( GetControlFont().GetSize() ); aFont.SetSize( GetControlFont().GetSize() );
GetButton().SetControlFont( aFont ); GetButton().SetControlFont( aFont );
......
...@@ -183,7 +183,7 @@ Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const ...@@ -183,7 +183,7 @@ Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const
{ {
Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 ); Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 );
aRect.Right() = aRect.Left() + (*mpItemList)[ nPos ]->mnSize - 1; aRect.Right() = aRect.Left() + (*mpItemList)[ nPos ]->mnSize - 1;
// Gegen Ueberlauf auf einigen Systemen testen // check for overflow on various systems
if ( aRect.Right() > 16000 ) if ( aRect.Right() > 16000 )
aRect.Right() = 16000; aRect.Right() = 16000;
return aRect; return aRect;
...@@ -317,11 +317,11 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -317,11 +317,11 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
Rectangle aRect = rItemRect; Rectangle aRect = rItemRect;
// Wenn kein Platz, dann brauchen wir auch nichts ausgeben // do not display if there is no space
if ( aRect.GetWidth() <= 1 ) if ( aRect.GetWidth() <= 1 )
return; return;
// Feststellen, ob Rectangle ueberhaupt sichtbar // check of rectangle is visible
if ( pRect ) if ( pRect )
{ {
if ( aRect.Right() < pRect->Left() ) if ( aRect.Right() < pRect->Left() )
...@@ -351,11 +351,11 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -351,11 +351,11 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
} }
else else
{ {
// Border muss nicht gemalt werden // do not draw border
aRect.Top() += mnBorderOff1; aRect.Top() += mnBorderOff1;
aRect.Bottom() -= mnBorderOff2; aRect.Bottom() -= mnBorderOff2;
// Hintergrund loeschen // delete background
if ( !pRect || bDrag ) if ( !pRect || bDrag )
{ {
if ( bDrag ) if ( bDrag )
...@@ -384,12 +384,12 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -384,12 +384,12 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
} }
else else
{ {
// Trennlinie malen // draw separation line
pDev->SetLineColor( rStyleSettings.GetDarkShadowColor() ); pDev->SetLineColor( rStyleSettings.GetDarkShadowColor() );
pDev->DrawLine( Point( aRect.Right(), aRect.Top() ), pDev->DrawLine( Point( aRect.Right(), aRect.Top() ),
Point( aRect.Right(), aRect.Bottom() ) ); Point( aRect.Right(), aRect.Bottom() ) );
// ButtonStyle malen // draw ButtonStyle
// avoid 3D borders // avoid 3D borders
if( bHigh ) if( bHigh )
DrawSelectionBackground( aRect, 1, sal_True, sal_False, sal_False, &aSelectionTextColor ); DrawSelectionBackground( aRect, 1, sal_True, sal_False, sal_False, &aSelectionTextColor );
...@@ -397,11 +397,11 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -397,11 +397,11 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False, &aSelectionTextColor ); DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False, &aSelectionTextColor );
} }
// Wenn kein Platz, dann brauchen wir auch nichts ausgeben // do not draw if there is no space
if ( aRect.GetWidth() < 1 ) if ( aRect.GetWidth() < 1 )
return; return;
// Positionen und Groessen berechnen und Inhalt ausgeben // calculate size and position and draw content
pItem->maOutText = pItem->maText; pItem->maOutText = pItem->maText;
Size aImageSize = pItem->maImage.GetSizePixel(); Size aImageSize = pItem->maImage.GetSizePixel();
Size aTxtSize( pDev->GetTextWidth( pItem->maOutText ), 0 ); Size aTxtSize( pDev->GetTextWidth( pItem->maOutText ), 0 );
...@@ -411,7 +411,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -411,7 +411,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
if ( nBits & (HIB_UPARROW | HIB_DOWNARROW) ) if ( nBits & (HIB_UPARROW | HIB_DOWNARROW) )
nArrowWidth = HEAD_ARROWSIZE2+HEADERBAR_ARROWOFF; nArrowWidth = HEAD_ARROWSIZE2+HEADERBAR_ARROWOFF;
// Wenn kein Platz fuer Image, dann nicht ausgeben // do not draw if there is not enough space for the image
long nTestHeight = aImageSize.Height(); long nTestHeight = aImageSize.Height();
if ( !(nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) ) if ( !(nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) )
nTestHeight += aTxtSize.Height(); nTestHeight += aTxtSize.Height();
...@@ -421,7 +421,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -421,7 +421,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
aImageSize.Height() = 0; aImageSize.Height() = 0;
} }
// Text auf entsprechende Laenge kuerzen // cut text to correct length
sal_Bool bLeftText = sal_False; sal_Bool bLeftText = sal_False;
long nMaxTxtWidth = aRect.GetWidth()-(HEADERBAR_TEXTOFF*2)-nArrowWidth; long nMaxTxtWidth = aRect.GetWidth()-(HEADERBAR_TEXTOFF*2)-nArrowWidth;
if ( nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE) ) if ( nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE) )
...@@ -446,7 +446,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -446,7 +446,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
} }
} }
// Text/Imageposition berechnen // calculate text/imageposition
long nTxtPos; long nTxtPos;
if ( !bLeftText && (nBits & HIB_RIGHT) ) if ( !bLeftText && (nBits & HIB_RIGHT) )
{ {
...@@ -481,7 +481,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -481,7 +481,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
nTxtPos += nArrowWidth; nTxtPos += nArrowWidth;
} }
// TextPosition berechnen // calculate text/imageposition
long nTxtPosY = 0; long nTxtPosY = 0;
if ( !pItem->maOutText.isEmpty() || (nArrowWidth && aTxtSize.Height()) ) if ( !pItem->maOutText.isEmpty() || (nArrowWidth && aTxtSize.Height()) )
{ {
...@@ -504,7 +504,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -504,7 +504,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
} }
} }
// Text ausgebeben // display text
if (!pItem->maOutText.isEmpty()) if (!pItem->maOutText.isEmpty())
{ {
if( aSelectionTextColor != Color( COL_TRANSPARENT ) ) if( aSelectionTextColor != Color( COL_TRANSPARENT ) )
...@@ -520,7 +520,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -520,7 +520,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
pDev->Pop(); pDev->Pop();
} }
// Wenn Image vorhanden, Position berechnen und ausgeben // calculate the position and draw image if it is available
long nImagePosY = 0; long nImagePosY = 0;
if ( aImageSize.Width() && aImageSize.Height() ) if ( aImageSize.Width() && aImageSize.Height() )
{ {
...@@ -586,7 +586,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -586,7 +586,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
nArrowX += aImageSize.Width(); nArrowX += aImageSize.Width();
} }
// Feststellen, ob Platz genug ist, das Item zu malen // is there enough space to draw the item?
sal_Bool bDraw = sal_True; sal_Bool bDraw = sal_True;
if ( nArrowX < aRect.Left()+HEADERBAR_TEXTOFF ) if ( nArrowX < aRect.Left()+HEADERBAR_TEXTOFF )
bDraw = sal_False; bDraw = sal_False;
...@@ -650,7 +650,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, ...@@ -650,7 +650,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
} }
} }
// Gegebenenfalls auch UserDraw aufrufen // all UserDraw if required
if ( nBits & HIB_USERDRAW ) if ( nBits & HIB_USERDRAW )
{ {
Region aRegion( aRect ); Region aRegion( aRect );
...@@ -795,7 +795,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) ...@@ -795,7 +795,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos )
else else
bNewOutDrag = sal_True; bNewOutDrag = sal_True;
// Evt. ItemDrag anschalten // if needed switch on ItemDrag
if ( bNewOutDrag && mbDragable && !mbItemDrag && if ( bNewOutDrag && mbDragable && !mbItemDrag &&
!((*mpItemList)[ nPos ]->mnBits & HIB_FIXEDPOS) ) !((*mpItemList)[ nPos ]->mnBits & HIB_FIXEDPOS) )
{ {
...@@ -829,7 +829,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) ...@@ -829,7 +829,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos )
mnItemDragPos = GetItemCount()-1; mnItemDragPos = GetItemCount()-1;
} }
// Nicht verschiebbare Items aussparen // do not use non-movable items
if ( mnItemDragPos < nPos ) if ( mnItemDragPos < nPos )
{ {
while ( ((*mpItemList)[ mnItemDragPos ]->mnBits & HIB_FIXEDPOS) && while ( ((*mpItemList)[ mnItemDragPos ]->mnBits & HIB_FIXEDPOS) &&
...@@ -1076,7 +1076,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ...@@ -1076,7 +1076,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{ {
aItemRect.Left() = aRect.Left()+ImplGetItemPos( i ); aItemRect.Left() = aRect.Left()+ImplGetItemPos( i );
aItemRect.Right() = aItemRect.Left() + (*mpItemList)[ i ]->mnSize - 1; aItemRect.Right() = aItemRect.Left() + (*mpItemList)[ i ]->mnSize - 1;
// Gegen Ueberlauf auf einigen Systemen testen // check for overflow on some systems
if ( aItemRect.Right() > 16000 ) if ( aItemRect.Right() > 16000 )
aItemRect.Right() = 16000; aItemRect.Right() = 16000;
Region aRegion( aRect ); Region aRegion( aRect );
...@@ -1133,9 +1133,8 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt ) ...@@ -1133,9 +1133,8 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
if ( aStr.isEmpty() || !(rHEvt.GetMode() & HELPMODE_BALLOON) ) if ( aStr.isEmpty() || !(rHEvt.GetMode() & HELPMODE_BALLOON) )
{ {
ImplHeadItem* pItem = (*mpItemList)[ GetItemPos( nItemId ) ]; ImplHeadItem* pItem = (*mpItemList)[ GetItemPos( nItemId ) ];
// Wir zeigen die Quick-Hilfe nur an, wenn Text nicht // Quick-help is only displayed if the text is not fully visible.
// vollstaendig sichtbar, ansonsten zeigen wir den Hilfetext // Otherwise we display Helptext only if the items do not contain text
// an, wenn das Item keinen Text besitzt
if ( pItem->maOutText != pItem->maText ) if ( pItem->maOutText != pItem->maText )
aStr = pItem->maText; aStr = pItem->maText;
else if (!pItem->maText.isEmpty()) else if (!pItem->maText.isEmpty())
...@@ -1156,7 +1155,7 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt ) ...@@ -1156,7 +1155,7 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) ); OUString aHelpId( OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
if ( !aHelpId.isEmpty() ) if ( !aHelpId.isEmpty() )
{ {
// Wenn eine Hilfe existiert, dann ausloesen // display it if help is available
Help* pHelp = Application::GetHelp(); Help* pHelp = Application::GetHelp();
if ( pHelp ) if ( pHelp )
pHelp->Start( aHelpId, this ); pHelp->Start( aHelpId, this );
...@@ -1260,7 +1259,7 @@ void HeaderBar::InsertItem( sal_uInt16 nItemId, const OUString& rText, ...@@ -1260,7 +1259,7 @@ void HeaderBar::InsertItem( sal_uInt16 nItemId, const OUString& rText,
DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND, DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND,
"HeaderBar::InsertItem(): ItemId already exists" ); "HeaderBar::InsertItem(): ItemId already exists" );
// Item anlegen und in die Liste einfuegen // create item and insert in the list
ImplHeadItem* pItem = new ImplHeadItem; ImplHeadItem* pItem = new ImplHeadItem;
pItem->mnId = nItemId; pItem->mnId = nItemId;
pItem->mnBits = nBits; pItem->mnBits = nBits;
...@@ -1274,7 +1273,7 @@ void HeaderBar::InsertItem( sal_uInt16 nItemId, const OUString& rText, ...@@ -1274,7 +1273,7 @@ void HeaderBar::InsertItem( sal_uInt16 nItemId, const OUString& rText,
mpItemList->push_back( pItem ); mpItemList->push_back( pItem );
} }
// Ausgabe updaten // update display
ImplUpdate( nPos, sal_True ); ImplUpdate( nPos, sal_True );
} }
...@@ -1320,7 +1319,7 @@ void HeaderBar::MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos ) ...@@ -1320,7 +1319,7 @@ void HeaderBar::MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos )
void HeaderBar::Clear() void HeaderBar::Clear()
{ {
// Alle Items loeschen // delete all items
for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) {
delete (*mpItemList)[ i ]; delete (*mpItemList)[ i ];
} }
...@@ -1333,7 +1332,7 @@ void HeaderBar::Clear() ...@@ -1333,7 +1332,7 @@ void HeaderBar::Clear()
void HeaderBar::SetOffset( long nNewOffset ) void HeaderBar::SetOffset( long nNewOffset )
{ {
// Bereich verschieben // move area
Rectangle aRect( 0, mnBorderOff1, mnDX-1, mnDY-mnBorderOff1-mnBorderOff2-1 ); Rectangle aRect( 0, mnBorderOff1, mnDX-1, mnDY-mnBorderOff1-mnBorderOff2-1 );
long nDelta = mnOffset-nNewOffset; long nDelta = mnOffset-nNewOffset;
mnOffset = nNewOffset; mnOffset = nNewOffset;
...@@ -1511,21 +1510,21 @@ Size HeaderBar::CalcWindowSizePixel() const ...@@ -1511,21 +1510,21 @@ Size HeaderBar::CalcWindowSizePixel() const
for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) for ( size_t i = 0, n = mpItemList->size(); i < n; ++i )
{ {
ImplHeadItem* pItem = (*mpItemList)[ i ]; ImplHeadItem* pItem = (*mpItemList)[ i ];
// Image-Groessen beruecksichtigen // take image size into account
long nImageHeight = pItem->maImage.GetSizePixel().Height(); long nImageHeight = pItem->maImage.GetSizePixel().Height();
if ( !(pItem->mnBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && !pItem->maText.isEmpty() ) if ( !(pItem->mnBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && !pItem->maText.isEmpty() )
nImageHeight += aSize.Height(); nImageHeight += aSize.Height();
if ( nImageHeight > nMaxImageSize ) if ( nImageHeight > nMaxImageSize )
nMaxImageSize = nImageHeight; nMaxImageSize = nImageHeight;
// Breite aufaddieren // add width
aSize.Width() += pItem->mnSize; aSize.Width() += pItem->mnSize;
} }
if ( nMaxImageSize > aSize.Height() ) if ( nMaxImageSize > aSize.Height() )
aSize.Height() = nMaxImageSize; aSize.Height() = nMaxImageSize;
// Border aufaddieren // add border
if ( mbButtonStyle ) if ( mbButtonStyle )
aSize.Height() += 4; aSize.Height() += 4;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment