diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2024-08-15 09:50:37 +0300 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2024-11-18 13:03:52 +0100 |
commit | 3c371b7bde13c02ad644db7702fb5770d0d25e47 (patch) | |
tree | afd7fe529d971a3605d1114a664c236cd79a215a /framework | |
parent | e3d16cb1ccf0cdbe9ffac972d9c1fff9f6de3dc2 (diff) |
Windows Taskbar: use progress bar feature (ITaskbarList3)
Any status progress in LO status bar is also represented
as progress in Windows taskbar.
Change-Id: Ibd7131ff6246cf5ea37ab8730d0eddfa084265c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171886
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/progressbarwrapper.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx index d92027c92c3a..7056183a8722 100644 --- a/framework/source/uielement/progressbarwrapper.cxx +++ b/framework/source/uielement/progressbarwrapper.cxx @@ -118,6 +118,11 @@ void ProgressBarWrapper::start( const OUString& Text, ::sal_Int32 Range ) pStatusBar->SetUpdateMode( true ); } pStatusBar->Show( true, ShowFlags::NoFocusChange | ShowFlags::NoActivate ); + + VclPtr<vcl::Window> pParent = pWindow->GetParent(); + assert(pParent); + if (pParent) + pWindow->GetParent()->SetTaskBarState(VclTaskBarStates::Progress); } void ProgressBarWrapper::end() @@ -144,6 +149,11 @@ void ProgressBarWrapper::end() StatusBar* pStatusBar = static_cast<StatusBar *>(pWindow.get()); if ( pStatusBar->IsProgressMode() ) pStatusBar->EndProgressMode(); + + VclPtr<vcl::Window> pParent = pWindow->GetParent(); + assert(pParent); + if (pParent) + pWindow->GetParent()->SetTaskBarState(VclTaskBarStates::Normal); } } } @@ -226,6 +236,11 @@ void ProgressBarWrapper::setValue( ::sal_Int32 nValue ) if ( !pStatusBar->IsProgressMode() ) pStatusBar->StartProgressMode( aText ); pStatusBar->SetProgressValue( sal_uInt16( nValue )); + + VclPtr<vcl::Window> pParent = pWindow->GetParent(); + assert(pParent); + if (pParent) + pWindow->GetParent()->SetTaskBarProgress(nValue); } } } |