Commit 16db4f6a authored by Pino Toscano's avatar Pino Toscano

use the width and heightof the view, it seems to slightly improve the placement of the text areas

(although the problem is not solved yet)
also, skip text nodes with a null area (we wouldn't be able to place them anywhere, anyway)

svn path=/trunk/KDE/kdegraphics/okular/; revision=966802
parent 3aeb12fe
......@@ -280,12 +280,12 @@ void CHMGenerator::generatePixmap( Okular::PixmapRequest * request )
void CHMGenerator::recursiveExploreNodes(DOM::Node node,Okular::TextPage *tp)
{
if (node.nodeType() == DOM::Node::TEXT_NODE)
if (node.nodeType() == DOM::Node::TEXT_NODE && !node.getRect().isNull())
{
QString nodeText=node.nodeValue().string();
QRect r=node.getRect();
int vWidth=m_syncGen->view()->contentsWidth();
int vHeight=m_syncGen->view()->contentsHeight();
int vWidth=m_syncGen->view()->width();
int vHeight=m_syncGen->view()->height();
Okular::NormalizedRect *nodeNormRect;
#define NOEXP
#ifndef NOEXP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment