NS_IMETHODIMP xpcAccessibleHyperText::ScriptableInsertText(const nsAString& aText, int32_t aOffset) { HyperTextAccessible* text = static_cast<HyperTextAccessible*>(this); if (text->IsDefunct()) return NS_ERROR_FAILURE; text->InsertText(aText, aOffset); return NS_OK; }
static void insertTextCB(AtkEditableText *aText, const gchar *aString, gint aLength, gint *aPosition) { AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText)); if (!accWrap) return; HyperTextAccessible* text = accWrap->AsHyperText(); if (!text || !text->IsTextRole()) return; NS_ConvertUTF8toUTF16 strContent(aString, aLength); text->InsertText(strContent, *aPosition); MAI_LOG_DEBUG(("EditableText: insert aString=%s, aLength=%d, aPosition=%d", aString, aLength, *aPosition)); }