case WebCore::ContextMenuItemTagReload: return QWebPage::Reload;
case WebCore::ContextMenuItemTagCut: return QWebPage::Cut;
case WebCore::ContextMenuItemTagPaste: return QWebPage::Paste;
+ case WebCore::ContextMenuItemTagDefaultDirection: return QWebPage::SetTextDirectionDefault;
+ case WebCore::ContextMenuItemTagLeftToRight: return QWebPage::SetTextDirectionLeftToRight;
+ case WebCore::ContextMenuItemTagRightToLeft: return QWebPage::SetTextDirectionRightToLeft;
default: break;
}
return QWebPage::NoWebAction;
command = "DeleteWordForward";
break;
+ case SetTextDirectionDefault:
+ editor->setBaseWritingDirection("inherit");
+ break;
+ case SetTextDirectionLeftToRight:
+ editor->setBaseWritingDirection("ltr");
+ break;
+ case SetTextDirectionRightToLeft:
+ editor->setBaseWritingDirection("rtl");
+ break;
+
default: break;
}
case DeleteEndOfWord:
break; // ####
+ case SetTextDirectionDefault:
+ text = contextMenuItemTagDefaultDirection();
+ break;
+ case SetTextDirectionLeftToRight:
+ text = contextMenuItemTagLeftToRight();
+ break;
+ case SetTextDirectionRightToLeft:
+ text = contextMenuItemTagRightToLeft();
+ break;
+
case NoWebAction:
return 0;
}
DeleteStartOfWord,
DeleteEndOfWord,
+ SetTextDirectionDefault,
+ SetTextDirectionLeftToRight,
+ SetTextDirectionRightToLeft,
+
WebActionCount
};
+2007-11-09 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Holger.
+
+ Implemented the webcore actions for changing the text direction.
+
+
+ * Api/qwebpage.cpp:
+ (webActionForContextMenuAction):
+ (QWebPage::triggerAction):
+ (QWebPage::action):
+ * Api/qwebpage.h:
+
2007-11-09 Simon Hausmann <hausmann@kde.org>
Reviewed by Holger.