[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/apps/konqueror/kttsplugin
From: Laurent Montel <montel () kde ! org>
Date: 2008-04-10 7:08:57
Message-ID: 1207811337.041236.30656.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 795394 by mlaurent:
Fix plugins
M +12 -9 khtmlkttsd.cpp
--- trunk/KDE/kdebase/apps/konqueror/kttsplugin/khtmlkttsd.cpp #795393:795394
@@ -23,8 +23,11 @@
#include <kactioncollection.h>
#include <kdebug.h>
#include <khtml_part.h> // this plugin applies to a khtml part
-#ifdef HAVE_WEBKIT
+#include "config-kttsplugin.h"
+#ifdef HAVE_WEBKITKDE
#include <webkitpart.h>
+#include <webkitview.h>
+#include <QWebFrame>
#endif
#include <kicon.h>
#include <klocale.h>
@@ -118,30 +121,30 @@
WebKitPart *webkitPart = dynamic_cast<WebKitPart *>(part);
if ( webkitPart )
{
-#if 0
if (supportsXhtml)
{
kDebug() << "KTTS claims to support rich speak (XHTML to SSML).";
if (hasSelection)
- query = part->selectedTextAsHTML();
+ query = webkitPart->view()->page()->currentFrame()->toHtml();
else
{
// TODO: Fooling around with the selection probably has unwanted
// side effects, but until a method is supplied to get valid xhtml
// from entire document..
// query = part->document().toString().string();
- part->selectAll();
- query = part->selectedTextAsHTML();
+#if 0
+ webkitPart->selectAll();
+ query = webkitPart->view()->page()->currentFrame()->toHtml();
// Restore no selection.
- part->setSelection(part->document().createRange());
+ webkitPart->setSelection(webkitPart->document().createRange());
+#endif
}
} else {
if (hasSelection)
- query = part->selectedText();
+ query = webkitPart->view()->selectedText();
else
- query = part->htmlDocument().body().innerText().string();
+ query = webkitPart->view()->page()->currentFrame()->toHtml();
}
-#endif
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic