summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index b5be152d6ece..e087305effd1 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -278,6 +278,10 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion,
const sal_Int32 nEndPara = pEditEngine->GetEditDoc().GetPos(pEndNode);
if (nStartPara == EE_PARA_NOT_FOUND || nEndPara == EE_PARA_NOT_FOUND)
return;
+
+ bool bStartHandleVisible = false;
+ bool bEndHandleVisible = false;
+
for ( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
ParaPortion* pTmpPortion = pEditEngine->GetParaPortions().SafeGetObject( nPara );
@@ -341,6 +345,11 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion,
if ( aBottomRight.Y() < GetVisDocTop() )
continue;
+ if ( ( nPara == nStartPara ) && ( nLine == nStartLine ) )
+ bStartHandleVisible = true;
+ if ( ( nPara == nEndPara ) && ( nLine == nEndLine ) )
+ bEndHandleVisible = true;
+
// Now that we have Bidi, the first/last index doesn't have to be the 'most outside' position
if ( !bPartOfLine )
{
@@ -405,6 +414,8 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion,
const OUString rAction("text_selection");
std::vector<vcl::LOKPayloadItem> aItems;
aItems.emplace_back("rectangles", sRectangle);
+ aItems.emplace_back("startHandleVisible", OString::boolean(bStartHandleVisible));
+ aItems.emplace_back("endHandleVisible", OString::boolean(bEndHandleVisible));
pNotifier->notifyWindow(pParent->GetLOKWindowId(), rAction, aItems);
pPolyPoly.reset();
return;
@@ -1384,6 +1395,11 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
EENotify aNotify( EE_NOTIFY_TEXTVIEWSCROLLED );
pEditEngine->pImpEditEngine->GetNotifyHdl().Call( aNotify );
}
+
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ DrawSelectionXOR();
+ }
}
return Pair( nRealDiffX, nRealDiffY );