summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/misc/lok.cxx12
-rw-r--r--desktop/source/lib/init.cxx4
-rw-r--r--framework/source/helper/statusindicator.cxx2
-rw-r--r--include/comphelper/lok.hxx5
4 files changed, 12 insertions, 11 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index fe7c742e4ec3..b11bf4e83582 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -255,31 +255,31 @@ bool isAllowlistedLanguage(const OUString& lang)
#endif
}
-static void (*pStatusIndicatorCallback)(void *data, statusIndicatorCallbackType type, int percent)(nullptr);
+static void (*pStatusIndicatorCallback)(void *data, statusIndicatorCallbackType type, int percent, const char* pText)(nullptr);
static void *pStatusIndicatorCallbackData(nullptr);
-void setStatusIndicatorCallback(void (*callback)(void *data, statusIndicatorCallbackType type, int percent), void *data)
+void setStatusIndicatorCallback(void (*callback)(void *data, statusIndicatorCallbackType type, int percent, const char* pText), void *data)
{
pStatusIndicatorCallback = callback;
pStatusIndicatorCallbackData = data;
}
-void statusIndicatorStart()
+void statusIndicatorStart(const OUString& sText)
{
if (pStatusIndicatorCallback)
- pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Start, 0);
+ pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Start, 0, sText.toUtf8().getStr());
}
void statusIndicatorSetValue(int percent)
{
if (pStatusIndicatorCallback)
- pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::SetValue, percent);
+ pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::SetValue, percent, nullptr);
}
void statusIndicatorFinish()
{
if (pStatusIndicatorCallback)
- pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Finish, 0);
+ pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Finish, 0, nullptr);
}
} // namespace
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7d3fc9f078ab..4060af238700 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -6006,7 +6006,7 @@ static void lo_runLoop(LibreOfficeKit* /*pThis*/,
static bool bInitialized = false;
-static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit::statusIndicatorCallbackType type, int percent)
+static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit::statusIndicatorCallbackType type, int percent, const char* pText)
{
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(data);
@@ -6016,7 +6016,7 @@ static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit:
switch (type)
{
case comphelper::LibreOfficeKit::statusIndicatorCallbackType::Start:
- pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_START, nullptr, pLib->mpCallbackData);
+ pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_START, pText, pLib->mpCallbackData);
break;
case comphelper::LibreOfficeKit::statusIndicatorCallbackType::SetValue:
pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE,
diff --git a/framework/source/helper/statusindicator.cxx b/framework/source/helper/statusindicator.cxx
index 2073b8e68d9d..2deb4a0ae5b2 100644
--- a/framework/source/helper/statusindicator.cxx
+++ b/framework/source/helper/statusindicator.cxx
@@ -38,7 +38,7 @@ void SAL_CALL StatusIndicator::start(const OUString& sText, sal_Int32 nRange)
m_nRange = nRange;
m_nLastCallbackPercent = -1;
- comphelper::LibreOfficeKit::statusIndicatorStart();
+ comphelper::LibreOfficeKit::statusIndicatorStart(sText);
}
#if !defined(IOS) && !defined(ANDROID)
css::uno::Reference<css::task::XStatusIndicatorFactory> xFactory(m_xFactory);
diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx
index 07b8ef6aa426..99f3dd30dfce 100644
--- a/include/comphelper/lok.hxx
+++ b/include/comphelper/lok.hxx
@@ -33,7 +33,8 @@ enum class statusIndicatorCallbackType
};
COMPHELPER_DLLPUBLIC void setStatusIndicatorCallback(
- void (*callback)(void* data, statusIndicatorCallbackType type, int percent), void* data);
+ void (*callback)(void* data, statusIndicatorCallbackType type, int percent, const char* pText),
+ void* data);
// Functions that can be called from arbitrary places in LibreOffice.
@@ -104,7 +105,7 @@ COMPHELPER_DLLPUBLIC bool isAllowlistedLanguage(const OUString& lang);
// Status indicator handling. Even if in theory there could be several status indicators active at
// the same time, in practice there is only one at a time, so we don't handle any identification of
// status indicator in this API.
-COMPHELPER_DLLPUBLIC void statusIndicatorStart();
+COMPHELPER_DLLPUBLIC void statusIndicatorStart(const OUString& sText);
COMPHELPER_DLLPUBLIC void statusIndicatorSetValue(int percent);
COMPHELPER_DLLPUBLIC void statusIndicatorFinish();
}