summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/source/helper/statusindicator.cxx2
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx4
-rw-r--r--sw/source/core/crsr/viscrs.cxx26
3 files changed, 24 insertions, 8 deletions
diff --git a/framework/source/helper/statusindicator.cxx b/framework/source/helper/statusindicator.cxx
index 5c9dafc5ba81..ce8310a07cf5 100644
--- a/framework/source/helper/statusindicator.cxx
+++ b/framework/source/helper/statusindicator.cxx
@@ -43,7 +43,6 @@ void SAL_CALL StatusIndicator::start(const OUString& sText ,
m_nLastCallbackPercent = -1;
comphelper::LibreOfficeKit::statusIndicatorStart();
- return;
}
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
@@ -60,7 +59,6 @@ void SAL_CALL StatusIndicator::end()
if (comphelper::LibreOfficeKit::isActive())
{
comphelper::LibreOfficeKit::statusIndicatorFinish();
- return;
}
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 07dd7e34b29c..e7ab14942f79 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -383,6 +383,8 @@ void SwTiledRenderingTest::testSearchViewArea()
void SwTiledRenderingTest::testSearchTextFrame()
{
#if !defined(WNT) && !defined(MACOSX)
+ comphelper::LibreOfficeKit::setActive();
+
SwXTextDocument* pXTextDocument = createDoc("search.odt");
pXTextDocument->registerCallback(&SwTiledRenderingTest::callback, this);
uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence(
@@ -393,6 +395,8 @@ void SwTiledRenderingTest::testSearchTextFrame()
comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues);
// This was empty: nothing was highlighted after searching for 'TextFrame'.
CPPUNIT_ASSERT(!m_aTextSelection.isEmpty());
+
+ comphelper::LibreOfficeKit::setActive(false);
#endif
}
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index cd47accc7035..01a2da7e6e73 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -361,7 +361,7 @@ void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles)
// talks about "the" cursor at the moment. As long as that's true,
// don't say anything about the Writer cursor till a draw object is
// being edited.
- if (GetShell()->isTiledRendering() && !pView->GetTextEditObject())
+ if (comphelper::LibreOfficeKit::isActive() && !pView->GetTextEditObject())
{
if (!empty())
{
@@ -377,12 +377,18 @@ void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles)
if (aStartRect.HasArea())
{
OString sRect = aStartRect.SVRect().toString();
- GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_START, sRect.getStr());
+ if (comphelper::LibreOfficeKit::isViewCallback())
+ GetShell()->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, sRect.getStr());
+ else
+ GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_START, sRect.getStr());
}
if (aEndRect.HasArea())
{
OString sRect = aEndRect.SVRect().toString();
- GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_END, sRect.getStr());
+ if (comphelper::LibreOfficeKit::isViewCallback())
+ GetShell()->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_END, sRect.getStr());
+ else
+ GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_END, sRect.getStr());
}
}
@@ -396,7 +402,12 @@ void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles)
}
OString sRect = ss.str().c_str();
if (!pSelectionRectangles)
- GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, sRect.getStr());
+ {
+ if (comphelper::LibreOfficeKit::isViewCallback())
+ GetShell()->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, sRect.getStr());
+ else
+ GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, sRect.getStr());
+ }
else
pSelectionRectangles->push_back(sRect);
}
@@ -593,7 +604,7 @@ void SwShellCrsr::Show()
pShCrsr->SwSelPaintRects::Show(&aSelectionRectangles);
}
- if (GetShell()->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
{
std::stringstream ss;
bool bFirst = true;
@@ -609,7 +620,10 @@ void SwShellCrsr::Show()
ss << rSelectionRectangle.getStr();
}
OString sRect = ss.str().c_str();
- GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, sRect.getStr());
+ if (comphelper::LibreOfficeKit::isViewCallback())
+ GetShell()->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, sRect.getStr());
+ else
+ GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, sRect.getStr());
}
}