summaryrefslogtreecommitdiff
path: root/sdext/source/presenter/PresenterTextView.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-05-24 16:14:56 +0200
committerAndras Timar <andras.timar@collabora.com>2017-05-30 09:41:22 +0200
commit356e3ab9945e36fae7a07bb1c4948df5686236cf (patch)
treecb84f66a4d947dc52c1f0e3c2494bc2b690a5323 /sdext/source/presenter/PresenterTextView.cxx
parentb6218e94f0bf546ac065be3f874ccd47c9381c78 (diff)
rhbz#1425304 sdext: join TimerScheduler thread before shutdown
Use a osl::Condition to interrupt the waiting thread, and join it. Change-Id: I638a2495afd082446c39faf9362578bd0f758d04 (cherry picked from commit 15b033d1dd09cd1898a994a0f12e38ed5cf847cb) Reviewed-on: https://gerrit.libreoffice.org/37992 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 1a14a0404ef02a76cfc3b6bfd50b1c78bb150d45)
Diffstat (limited to 'sdext/source/presenter/PresenterTextView.cxx')
-rw-r--r--sdext/source/presenter/PresenterTextView.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx
index 8e3800b46479..1946696b4b89 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -73,6 +73,7 @@ PresenterTextView::PresenterTextView (
mpFont(),
maParagraphs(),
mpCaret(new PresenterTextCaret(
+ rxContext,
[this] (sal_Int32 const nParagraphIndex, sal_Int32 const nCharacterIndex)
{ return this->GetCaretBounds(nParagraphIndex, nCharacterIndex); },
rInvalidator)),
@@ -1077,9 +1078,11 @@ void PresenterTextParagraph::SetupCellArray (
//===== PresenterTextCaret ================================================----
PresenterTextCaret::PresenterTextCaret (
+ uno::Reference<uno::XComponentContext> const& xContext,
const ::std::function<css::awt::Rectangle (const sal_Int32,const sal_Int32)>& rCharacterBoundsAccess,
const ::std::function<void (const css::awt::Rectangle&)>& rInvalidator)
- : mnParagraphIndex(-1),
+ : m_xContext(xContext)
+ , mnParagraphIndex(-1),
mnCharacterIndex(-1),
mnCaretBlinkTaskId(0),
mbIsCaretVisible(false),
@@ -1100,6 +1103,7 @@ void PresenterTextCaret::ShowCaret()
if (mnCaretBlinkTaskId == 0)
{
mnCaretBlinkTaskId = PresenterTimer::ScheduleRepeatedTask (
+ m_xContext,
[this] (TimeValue const&) { return this->InvertCaret(); },
CaretBlinkIntervall,
CaretBlinkIntervall);