diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-01-27 09:19:58 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-01-27 09:19:58 +0000 |
commit | 8a8b0da33244c6227e5678269c5a1d07576f9939 (patch) | |
tree | d7c4425fd2c13053b8d0284644d5110513d2915e /vcl/source/window/status.cxx | |
parent | c27d9f3d0493ae0103d93e8d52f58834f97de9ad (diff) |
INTEGRATION: CWS cd04 (1.14.48); FILE MERGED
2005/01/17 15:05:03 cd 1.14.48.1: #i40435# Statusbar now also uses the command to find extended help
Diffstat (limited to 'vcl/source/window/status.cxx')
-rw-r--r-- | vcl/source/window/status.cxx | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index dc0c25c74922..075235ba27a3 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -2,9 +2,9 @@ * * $RCSfile: status.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: hr $ $Date: 2004-11-26 16:22:23 $ + * last change: $Author: rt $ $Date: 2005-01-27 10:19:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -819,13 +819,20 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt ) } else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { + String aCommand = GetItemCommand( nItemId ); ULONG nHelpId = GetHelpId( nItemId ); - if ( nHelpId ) + + if ( aCommand.Len() || nHelpId ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); if ( pHelp ) - pHelp->Start( nHelpId, this ); + { + if ( aCommand.Len() ) + pHelp->Start( aCommand, this ); + else if ( nHelpId ) + pHelp->Start( nHelpId, this ); + } return; } } @@ -1365,11 +1372,16 @@ const XubString& StatusBar::GetHelpText( USHORT nItemId ) const if ( nPos != STATUSBAR_ITEM_NOTFOUND ) { ImplStatusItem* pItem = mpItemList->GetObject( nPos ); - if ( !pItem->maHelpText.Len() && pItem->mnHelpId ) + if ( !pItem->maHelpText.Len() && ( pItem->mnHelpId || pItem->maCommand.Len() )) { Help* pHelp = Application::GetHelp(); if ( pHelp ) - pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this ); + { + if ( pItem->maCommand.Len() ) + pItem->maHelpText = pHelp->GetHelpText( pItem->maCommand, this ); + if ( !pItem->maHelpText.Len() && pItem->mnHelpId ) + pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this ); + } } return pItem->maHelpText; |