summaryrefslogtreecommitdiff
path: root/vcl/source/app/help.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app/help.cxx')
-rw-r--r--vcl/source/app/help.cxx23
1 files changed, 8 insertions, 15 deletions
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index ba24ef27ad0b..035230c69235 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -40,10 +40,6 @@
#define HELPTEXTMARGIN_QUICK 3
#define HELPTEXTMARGIN_BALLOON 6
-#define HELPDELAY_NORMAL 1
-#define HELPDELAY_SHORT 2
-#define HELPDELAY_NONE 3
-
#define HELPTEXTMAXLEN 150
Help::Help()
@@ -213,7 +209,7 @@ void* Help::ShowPopover(vcl::Window* pParent, const tools::Rectangle& rScreenRec
nId = pHelpWin.get();
UpdatePopover(nId, pParent, rScreenRect, rText);
- pHelpWin->ShowHelp( HELPDELAY_NONE );
+ pHelpWin->ShowHelp(true);
return nId;
}
@@ -421,10 +417,10 @@ void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rec
}
}
-void HelpTextWindow::ShowHelp( sal_uInt16 nDelayMode )
+void HelpTextWindow::ShowHelp(bool bNoDelay)
{
sal_uLong nTimeout = 0;
- if ( nDelayMode != HELPDELAY_NONE )
+ if (!bNoDelay)
{
// In case of ExtendedHelp display help sooner
if ( ImplGetSVData()->maHelpData.mbExtHelpMode )
@@ -436,9 +432,6 @@ void HelpTextWindow::ShowHelp( sal_uInt16 nDelayMode )
else
nTimeout = HelpSettings::GetBalloonDelay();
}
-
- if ( nDelayMode == HELPDELAY_SHORT )
- nTimeout /= 3;
}
maShowTimer.SetTimeout( nTimeout );
@@ -500,7 +493,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
return;
VclPtr<HelpTextWindow> pHelpWin = pSVData->maHelpData.mpHelpWin;
- sal_uInt16 nDelayMode = HELPDELAY_NORMAL;
+ bool bNoDelay = false;
if ( pHelpWin )
{
SAL_WARN_IF( pHelpWin == pParent, "vcl", "HelpInHelp ?!" );
@@ -515,7 +508,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
// other help mode. but keep it if we are scrolling, ie not requesting help
bool bWasVisible = pHelpWin->IsVisible();
if ( bWasVisible )
- nDelayMode = HELPDELAY_NONE; // display it quickly if we were already in quick help mode
+ bNoDelay = true; // display it quickly if we were already in quick help mode
pHelpWin = nullptr;
ImplDestroyHelpWindow( bWasVisible );
}
@@ -544,7 +537,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
sal_uInt64 nCurTime = tools::Time::GetSystemTicks();
if ( ( nCurTime - pSVData->maHelpData.mnLastHelpHideTime ) < HelpSettings::GetTipDelay() )
- nDelayMode = HELPDELAY_NONE;
+ bNoDelay = true;
pHelpWin = VclPtr<HelpTextWindow>::Create( pParent, rHelpText, nHelpWinStyle, nStyle );
pSVData->maHelpData.mpHelpWin = pHelpWin;
@@ -556,8 +549,8 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
ImplSetHelpWindowPos( pHelpWin, nHelpWinStyle, nStyle, rScreenPos, rHelpArea );
// if not called from Window::RequestHelp, then without delay...
if ( !pSVData->maHelpData.mbRequestingHelp )
- nDelayMode = HELPDELAY_NONE;
- pHelpWin->ShowHelp( nDelayMode );
+ bNoDelay = true;
+ pHelpWin->ShowHelp(bNoDelay);
}