Switch to the correct view before calling getSelectionType() method.
This method needs to be called with having the correct view activated. It caused a crash in writer/simultaneous_typing multi-user cypress test. Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com> Change-Id: I57dd58a635ce7ea127200a6a3f0cadc8c0861aaf
This commit is contained in:
parent
f292ff4eb7
commit
218e47e65a
1 changed files with 1 additions and 0 deletions
|
@ -1031,6 +1031,7 @@ bool ChildSession::getTextSelection(const char* /*buffer*/, int /*length*/, cons
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string selection;
|
std::string selection;
|
||||||
|
getLOKitDocument()->setView(_viewId);
|
||||||
const int selectionType = getLOKitDocument()->getSelectionType();
|
const int selectionType = getLOKitDocument()->getSelectionType();
|
||||||
if (selectionType == LOK_SELTYPE_LARGE_TEXT || selectionType == LOK_SELTYPE_COMPLEX ||
|
if (selectionType == LOK_SELTYPE_LARGE_TEXT || selectionType == LOK_SELTYPE_COMPLEX ||
|
||||||
(selection = getTextSelectionInternal(mimeType)).size() >= 1024 * 1024) // Don't return huge data.
|
(selection = getTextSelectionInternal(mimeType)).size() >= 1024 * 1024) // Don't return huge data.
|
||||||
|
|
Loading…
Reference in a new issue