framework/source/uielement/progressbarwrapper.cxx |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit 3c371b7bde13c02ad644db7702fb5770d0d25e47
Author:     Vasily Melenchuk <[email protected]>
AuthorDate: Thu Aug 15 09:50:37 2024 +0300
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Mon Nov 18 13:03:52 2024 +0100

    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 <[email protected]>

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);
         }
     }
 }

Reply via email to