summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/helper/statusindicator.hxx2
-rw-r--r--framework/source/helper/statusindicator.cxx7
2 files changed, 8 insertions, 1 deletions
diff --git a/framework/inc/helper/statusindicator.hxx b/framework/inc/helper/statusindicator.hxx
index d52216eccde5..6043cf2a2071 100644
--- a/framework/inc/helper/statusindicator.hxx
+++ b/framework/inc/helper/statusindicator.hxx
@@ -69,6 +69,8 @@ class StatusIndicator : public ::cppu::WeakImplHelper1< css::task::XStatusIndic
css::uno::WeakReference< css::task::XStatusIndicatorFactory > m_xFactory;
sal_Int32 m_nRange;
+ // We want the callback percentages to increase monotonically
+ int m_nLastCallbackPercent;
// c++ interface
public:
diff --git a/framework/source/helper/statusindicator.cxx b/framework/source/helper/statusindicator.cxx
index 88c247e9a312..6c78d0a87a9f 100644
--- a/framework/source/helper/statusindicator.cxx
+++ b/framework/source/helper/statusindicator.cxx
@@ -38,6 +38,7 @@ void SAL_CALL StatusIndicator::start(const OUString& sText ,
if (comphelper::LibreOfficeKit::isActive())
{
m_nRange = nRange;
+ m_nLastCallbackPercent = -1;
comphelper::LibreOfficeKit::statusIndicatorStart();
return;
@@ -102,7 +103,11 @@ void SAL_CALL StatusIndicator::setValue(sal_Int32 nValue)
if (comphelper::LibreOfficeKit::isActive())
{
int nPercent = (100*nValue)/m_nRange;
- comphelper::LibreOfficeKit::statusIndicatorSetValue(nPercent);
+ if (nPercent != m_nLastCallbackPercent)
+ {
+ comphelper::LibreOfficeKit::statusIndicatorSetValue(nPercent);
+ m_nLastCallbackPercent = nPercent;
+ }
return;
}