diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-03-03 13:50:48 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-03-03 14:45:12 +0100 |
commit | 4037d4416c9a567e5af8c4e3473d0cef8c261a60 (patch) | |
tree | 0c8bc9e7f0f3f53ae20f6e1afea3c1a424bdf050 /vcl | |
parent | 16e8ae5b0d5a3a26450bbc9e6afc6e0984e173ea (diff) |
HELPDELAY_SHORT is unused - get rid of related defines, too
It is unused since commit bd45c56a07e77662570f9dd5dc1710f8f9ca0e3b.
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>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/helpwin.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/help.cxx | 23 |
2 files changed, 9 insertions, 16 deletions
diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx index ee14b5a4eb39..5d2e19e80654 100644 --- a/vcl/inc/helpwin.hxx +++ b/vcl/inc/helpwin.hxx @@ -63,7 +63,7 @@ public: // only remember: void SetHelpArea( const tools::Rectangle& rRect ) { maHelpArea = rRect; } - void ShowHelp( sal_uInt16 nDelayMode ); + void ShowHelp(bool bNoDelay); Size CalcOutSize() const; const tools::Rectangle& GetHelpArea() const { return maHelpArea; } 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); } |