// check what the cursor/event situation looks like bool bCompletelyHandled = false;
impDetectEvent(rKEvt, aCursorEvent, aNewSel, bCompletelyHandled);
if (aCursorEvent == CursorChainingEvent::NULL_EVENT) returnfalse; else {
HandleCursorEvent(aCursorEvent, aNewSel); // return value depends on the situation we are in return bCompletelyHandled;
}
}
// We need to have this KeyFuncType if (eFunc != KeyFuncType::DONTKNOW && eFunc != KeyFuncType::DELETE)
{
rOutCursorEvt = CursorChainingEvent::NULL_EVENT; return;
}
// Possibility: Are we "pushing" at the end of the object? if (nCode == KEY_RIGHT && bAtEndOfTextContent && pNextLink)
{
rOutCursorEvt = CursorChainingEvent::TO_NEXT_LINK; // Selection unchanged: we are at the beginning of the box
rOutHandled = true; // Nothing more to do than move cursor return;
}
// Possibility: Are we "pushing" at the end of the object? if (eFunc == KeyFuncType::DELETE && bAtEndOfTextContent && pNextLink)
{
rOutCursorEvt = CursorChainingEvent::TO_NEXT_LINK; // Selection unchanged: we are at the beginning of the box
rOutHandled = false; // We still need to delete the characters
mbHandlingDel = true; return;
}
// Possibility: Are we "pushing" at the start of the object? if (nCode == KEY_LEFT && bAtStartOfTextContent && pPrevLink)
{
rOutCursorEvt = CursorChainingEvent::TO_PREV_LINK;
rOutSel = aEndSelPrevBox; // Set at end of selection
rOutHandled = true; // Nothing more to do than move cursor return;
}
// Possibility: Are we "pushing" at the start of the object and deleting left? if (nCode == KEY_BACKSPACE && bAtStartOfTextContent && pPrevLink)
{
rOutCursorEvt = CursorChainingEvent::TO_PREV_LINK;
rOutSel = aEndSelPrevBox; // Set at end of selection
rOutHandled = false; // We need to delete characters after moving cursor return;
}
// If arrived here there is no event detected
rOutCursorEvt = CursorChainingEvent::NULL_EVENT;
switch ( aCurEvt ) { case CursorChainingEvent::UNCHANGED: // Set same selection as before the chaining (which is saved as PostChainingSel) // We need an explicit set because the Outliner is messed up // after text transfer and otherwise it brings us at arbitrary positions.
pOLV->SetSelection(aNewSel); break; case CursorChainingEvent::TO_NEXT_LINK:
mpTextObj->GetTextChain()->SetSwitchingToNextBox(mpTextObj, true);
impChangeEditingTextObj(pNextLink, aNewSel); break; case CursorChainingEvent::TO_PREV_LINK:
impChangeEditingTextObj(pPrevLink, aNewSel); break; case CursorChainingEvent::NULL_EVENT: // Do nothing here break;
}
mpEditView->SdrEndTextEdit();
mpEditView->SdrBeginTextEdit(pTargetTextObj); // OutlinerView has changed, so we update the pointer
OutlinerView *pOLV = mpEditView->GetTextEditOutlinerView();
pOLV->SetSelection(aNewSel);
// Update reference text obj
mpTextObj = pTargetTextObj;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.