summaryrefslogtreecommitdiffstats
path: root/ksvg/core/KSVGReader.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /ksvg/core/KSVGReader.cc
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksvg/core/KSVGReader.cc')
-rw-r--r--ksvg/core/KSVGReader.cc52
1 files changed, 26 insertions, 26 deletions
diff --git a/ksvg/core/KSVGReader.cc b/ksvg/core/KSVGReader.cc
index e479b9a1..690069ba 100644
--- a/ksvg/core/KSVGReader.cc
+++ b/ksvg/core/KSVGReader.cc
@@ -84,7 +84,7 @@ private:
TQString m_SVGFragmentId;
};
-class InputHandler : public QXmlDefaultHandler
+class InputHandler : public TQXmlDefaultHandler
{
public:
virtual bool startDocument();
@@ -146,13 +146,13 @@ SVGSVGElementImpl *Helper::nextSVGElement(SVGElementImpl *elem)
SVGSVGElementImpl *Helper::nextSVGElement(DOM::Node elem)
{
DOM::Node foundSVG;
- DOM::Node shape = elem.parentNode();
+ DOM::Node tqshape = elem.parentNode();
- for(; !shape.isNull(); shape = shape.parentNode())
+ for(; !tqshape.isNull(); tqshape = tqshape.parentNode())
{
- if(reinterpret_cast<DOM::Element &>(shape).nodeName() == "svg")
+ if(reinterpret_cast<DOM::Element &>(tqshape).nodeName() == "svg")
{
- foundSVG = shape;
+ foundSVG = tqshape;
break;
}
}
@@ -245,7 +245,7 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &,
SVGLengthImpl *height = SVGSVGElementImpl::createSVGLength();
width->setValueAsString(svg->getAttribute("width").string());
height->setValueAsString(svg->getAttribute("height").string());
- TQString viewbox = TQString("0 0 %1 %2").arg(width->value()).arg(height->value());
+ TQString viewbox = TQString("0 0 %1 %2").tqarg(width->value()).tqarg(height->value());
//kdDebug(26001) << "VIEWBOX : " << viewbox.latin1() << endl;
svg->setAttribute("viewBox", viewbox);
width->deref();
@@ -289,7 +289,7 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &,
Helper::self()->doc()->appendChild(*newElement);
// Special logics:
- if(qName == "switch" || qName == "pattern" || qName == "mask")
+ if(qName == "switch" || qName == "pattern" || qName == "tqmask")
m_noRendering = true;
}
@@ -300,13 +300,13 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &,
if(svg && svg->ownerSVGElement() == 0)
{
- SVGImageElementImpl *parentImage = Helper::self()->doc()->parentImage();
+ SVGImageElementImpl *tqparentImage = Helper::self()->doc()->tqparentImage();
- if(parentImage)
+ if(tqparentImage)
{
// We're being displayed in a document via an 'image' element. Set
// us up to fit into it's rectangle.
- parentImage->setupSVGElement(svg);
+ tqparentImage->setupSVGElement(svg);
}
}
@@ -316,25 +316,25 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &,
{
// Set up the cached screenCTM
SVGLocatableImpl *locatableParent = 0;
- DOM::Node parentNode = newElement->parentNode();
+ DOM::Node tqparentNode = newElement->parentNode();
- if(!parentNode.isNull())
+ if(!tqparentNode.isNull())
{
- SVGElementImpl *parent = Helper::self()->doc()->getElementFromHandle(parentNode.handle());
+ SVGElementImpl *tqparent = Helper::self()->doc()->getElementFromHandle(tqparentNode.handle());
- if(parent)
- locatableParent = dynamic_cast<SVGLocatableImpl *>(parent);
+ if(tqparent)
+ locatableParent = dynamic_cast<SVGLocatableImpl *>(tqparent);
}
- SVGMatrixImpl *parentMatrix = 0;
+ SVGMatrixImpl *tqparentMatrix = 0;
if(locatableParent)
- parentMatrix = locatableParent->getScreenCTM();
+ tqparentMatrix = locatableParent->getScreenCTM();
else
- parentMatrix = SVGSVGElementImpl::createSVGMatrix();
+ tqparentMatrix = SVGSVGElementImpl::createSVGMatrix();
- locatable->updateCachedScreenCTM(parentMatrix);
- parentMatrix->deref();
+ locatable->updateCachedScreenCTM(tqparentMatrix);
+ tqparentMatrix->deref();
}
m_currentNode = newElement;
@@ -349,7 +349,7 @@ bool InputHandler::endElement(const TQString &, const TQString &, const TQString
SVGSVGElementImpl *root = Helper::self()->nextSVGElement(*m_currentNode);
SVGElementImpl *element = root ? root->ownerDoc()->getElementFromHandle(m_currentNode->handle()) : Helper::self()->doc()->getElementFromHandle(m_currentNode->handle());
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
@@ -386,18 +386,18 @@ bool InputHandler::endElement(const TQString &, const TQString &, const TQString
if(haveCanvas && (tests ? tests->ok() : true))
{
- if((shape && !shape->isContainer()) || (!shape && element))
+ if((tqshape && !tqshape->isContainer()) || (!tqshape && element))
element->createItem();
}
}
// Special logics:
- if(qName == "switch" || qName == "pattern" || qName == "mask")
+ if(qName == "switch" || qName == "pattern" || qName == "tqmask")
{
m_noRendering = false;
bool ok = tests ? tests->ok() : true;
- if(haveCanvas && element && style && ok && style->getDisplay() && style->getVisible() && qName == "pattern" || (shape && shape->directRender()))
+ if(haveCanvas && element && style && ok && style->getDisplay() && style->getVisible() && qName == "pattern" || (tqshape && tqshape->directRender()))
element->createItem();
}
@@ -426,10 +426,10 @@ bool InputHandler::fatalError(const TQXmlParseException &e)
if(Helper::self()->hasError())
{
error = Helper::self()->errorDescription();
- Helper::self()->setErrorDescription(TQString::null);
+ Helper::self()->setErrorDescription(TQString());
}
else
- error = TQString("[%1:%2]: FATAL ERROR: %3").arg(e.lineNumber()).arg(e.columnNumber()).arg(e.message());
+ error = TQString("[%1:%2]: FATAL ERROR: %3").tqarg(e.lineNumber()).tqarg(e.columnNumber()).tqarg(e.message());
kdDebug(26001) << "InputHandler::fatalError, " << error << endl;