HELPDELAY_SHORT is unused - get rid of related defines, too

It is unused since commit bd45c56a07.

Change-Id: I3d70b0cc112a6f4a8f57a65831cb0a46ac36514a
Reviewed-on: https://gerrit.libreoffice.org/68641
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2019-03-03 13:50:48 +01:00
parent 16e8ae5b0d
commit 4037d4416c
2 changed files with 9 additions and 16 deletions

View File

@@ -63,7 +63,7 @@ public:
// only remember: // only remember:
void SetHelpArea( const tools::Rectangle& rRect ) { maHelpArea = rRect; } void SetHelpArea( const tools::Rectangle& rRect ) { maHelpArea = rRect; }
void ShowHelp( sal_uInt16 nDelayMode ); void ShowHelp(bool bNoDelay);
Size CalcOutSize() const; Size CalcOutSize() const;
const tools::Rectangle& GetHelpArea() const { return maHelpArea; } const tools::Rectangle& GetHelpArea() const { return maHelpArea; }

View File

@@ -40,10 +40,6 @@
#define HELPTEXTMARGIN_QUICK 3 #define HELPTEXTMARGIN_QUICK 3
#define HELPTEXTMARGIN_BALLOON 6 #define HELPTEXTMARGIN_BALLOON 6
#define HELPDELAY_NORMAL 1
#define HELPDELAY_SHORT 2
#define HELPDELAY_NONE 3
#define HELPTEXTMAXLEN 150 #define HELPTEXTMAXLEN 150
Help::Help() Help::Help()
@@ -213,7 +209,7 @@ void* Help::ShowPopover(vcl::Window* pParent, const tools::Rectangle& rScreenRec
nId = pHelpWin.get(); nId = pHelpWin.get();
UpdatePopover(nId, pParent, rScreenRect, rText); UpdatePopover(nId, pParent, rScreenRect, rText);
pHelpWin->ShowHelp( HELPDELAY_NONE ); pHelpWin->ShowHelp(true);
return nId; 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; sal_uLong nTimeout = 0;
if ( nDelayMode != HELPDELAY_NONE ) if (!bNoDelay)
{ {
// In case of ExtendedHelp display help sooner // In case of ExtendedHelp display help sooner
if ( ImplGetSVData()->maHelpData.mbExtHelpMode ) if ( ImplGetSVData()->maHelpData.mbExtHelpMode )
@@ -436,9 +432,6 @@ void HelpTextWindow::ShowHelp( sal_uInt16 nDelayMode )
else else
nTimeout = HelpSettings::GetBalloonDelay(); nTimeout = HelpSettings::GetBalloonDelay();
} }
if ( nDelayMode == HELPDELAY_SHORT )
nTimeout /= 3;
} }
maShowTimer.SetTimeout( nTimeout ); maShowTimer.SetTimeout( nTimeout );
@@ -500,7 +493,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
return; return;
VclPtr<HelpTextWindow> pHelpWin = pSVData->maHelpData.mpHelpWin; VclPtr<HelpTextWindow> pHelpWin = pSVData->maHelpData.mpHelpWin;
sal_uInt16 nDelayMode = HELPDELAY_NORMAL; bool bNoDelay = false;
if ( pHelpWin ) if ( pHelpWin )
{ {
SAL_WARN_IF( pHelpWin == pParent, "vcl", "HelpInHelp ?!" ); 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 // other help mode. but keep it if we are scrolling, ie not requesting help
bool bWasVisible = pHelpWin->IsVisible(); bool bWasVisible = pHelpWin->IsVisible();
if ( bWasVisible ) 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; pHelpWin = nullptr;
ImplDestroyHelpWindow( bWasVisible ); ImplDestroyHelpWindow( bWasVisible );
} }
@@ -544,7 +537,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
sal_uInt64 nCurTime = tools::Time::GetSystemTicks(); sal_uInt64 nCurTime = tools::Time::GetSystemTicks();
if ( ( nCurTime - pSVData->maHelpData.mnLastHelpHideTime ) < HelpSettings::GetTipDelay() ) if ( ( nCurTime - pSVData->maHelpData.mnLastHelpHideTime ) < HelpSettings::GetTipDelay() )
nDelayMode = HELPDELAY_NONE; bNoDelay = true;
pHelpWin = VclPtr<HelpTextWindow>::Create( pParent, rHelpText, nHelpWinStyle, nStyle ); pHelpWin = VclPtr<HelpTextWindow>::Create( pParent, rHelpText, nHelpWinStyle, nStyle );
pSVData->maHelpData.mpHelpWin = pHelpWin; pSVData->maHelpData.mpHelpWin = pHelpWin;
@@ -556,8 +549,8 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
ImplSetHelpWindowPos( pHelpWin, nHelpWinStyle, nStyle, rScreenPos, rHelpArea ); ImplSetHelpWindowPos( pHelpWin, nHelpWinStyle, nStyle, rScreenPos, rHelpArea );
// if not called from Window::RequestHelp, then without delay... // if not called from Window::RequestHelp, then without delay...
if ( !pSVData->maHelpData.mbRequestingHelp ) if ( !pSVData->maHelpData.mbRequestingHelp )
nDelayMode = HELPDELAY_NONE; bNoDelay = true;
pHelpWin->ShowHelp( nDelayMode ); pHelpWin->ShowHelp(bNoDelay);
} }