summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Schäfer <ssa@openoffice.org>2001-12-05 10:22:03 +0000
committerStephan Schäfer <ssa@openoffice.org>2001-12-05 10:22:03 +0000
commit1d56f010dde669ddbdfea9a9769dff609c6c1c52 (patch)
treee070c072e07f2eefc65e27bf2a3b93d292620870
parent1afd460373ee68d73b4e11ed2d98a35ab7851b17 (diff)
#95330# merge 1.23.2.3
-rw-r--r--vcl/source/window/menu.cxx30
1 files changed, 13 insertions, 17 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 689939a85c59..45d24613066e 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: menu.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: mt $ $Date: 2001-11-29 17:37:07 $
+ * last change: $Author: ssa $ $Date: 2001-12-05 11:22:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -480,13 +480,11 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
Help::ShowBalloon( pMenuWindow, aPos, pMenu->GetHelpText( nId ) );
else
{
- if( pMenu->GetTipHelpText( nId ).Len() )
- {
- // give user a chance to read the full filename
- ULONG oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
- Help::ShowQuickHelp( pMenuWindow, aRect, pMenu->GetTipHelpText( nId ) );
- ImplChangeTipTimeout( oldTimeout, pMenuWindow );
- }
+ // give user a chance to read the full filename
+ ULONG oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
+ // call always, even when strlen==0 to correctly remove tip
+ Help::ShowQuickHelp( pMenuWindow, aRect, pMenu->GetTipHelpText( nId ) );
+ ImplChangeTipTimeout( oldTimeout, pMenuWindow );
}
bDone = TRUE;
}
@@ -494,13 +492,11 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
{
Point aPos = rHEvt.GetMousePosPixel();
Rectangle aRect( aPos, Size() );
- if( pMenu->GetTipHelpText( nId ).Len() )
- {
- // give user a chance to read the full filename
- ULONG oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
- Help::ShowQuickHelp( pMenuWindow, aRect, pMenu->GetTipHelpText( nId ) );
- ImplChangeTipTimeout( oldTimeout, pMenuWindow );
- }
+ // give user a chance to read the full filename
+ ULONG oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
+ // call always, even when strlen==0 to correctly remove tip
+ Help::ShowQuickHelp( pMenuWindow, aRect, pMenu->GetTipHelpText( nId ) );
+ ImplChangeTipTimeout( oldTimeout, pMenuWindow );
bDone = TRUE;
}
else if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) )
@@ -2223,7 +2219,7 @@ long PopupMenu::ImplCalcHeight( USHORT nEntries ) const
USHORT nFound = 0;
for ( USHORT n = 0; ( nFound < nEntries ) && ( n < pItemList->Count() ); n++ )
{
- if ( ImplIsVisible( n ) )
+ if ( ImplIsVisible( (USHORT) n ) )
{
MenuItemData* pData = pItemList->GetDataFromPos( n );
nHeight += pData->aSz.Height();