summaryrefslogtreecommitdiffstats
path: root/ksvg/impl/SVGUseElementImpl.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/impl/SVGUseElementImpl.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/impl/SVGUseElementImpl.cc')
-rw-r--r--ksvg/impl/SVGUseElementImpl.cc52
1 files changed, 26 insertions, 26 deletions
diff --git a/ksvg/impl/SVGUseElementImpl.cc b/ksvg/impl/SVGUseElementImpl.cc
index 457436cb..b7bc40f2 100644
--- a/ksvg/impl/SVGUseElementImpl.cc
+++ b/ksvg/impl/SVGUseElementImpl.cc
@@ -182,9 +182,9 @@ SVGRectImpl *SVGUseElementImpl::getBBox()
{
if(m_instanceRoot)
{
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
- if(KSVG_TOKEN_NOT_PARSED(Width) && KSVG_TOKEN_NOT_PARSED(Height) && shape)
- return shape->getBBox();
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(KSVG_TOKEN_NOT_PARSED(Width) && KSVG_TOKEN_NOT_PARSED(Height) && tqshape)
+ return tqshape->getBBox();
}
SVGRectImpl *ret = new SVGRectImpl();
@@ -223,7 +223,7 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c)
KURL fragmentUrl(ownerDoc()->baseUrl(), url.string());
id = fragmentUrl.ref();
- fragmentUrl.setRef(TQString::null);
+ fragmentUrl.setRef(TQString());
orig = KSVGLoader::getSVGFragment(fragmentUrl, ownerDoc(), id);
}
@@ -243,10 +243,10 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c)
setReferencedElement(orig);
- // Create a parent, a <g>
- SVGElementImpl *parent = 0;
+ // Create a tqparent, a <g>
+ SVGElementImpl *tqparent = 0;
DOM::Element impl = static_cast<DOM::Document *>(ownerDoc())->createElement("g");
- parent = SVGDocumentImpl::createElement("g", impl, ownerDoc());
+ tqparent = SVGDocumentImpl::createElement("g", impl, ownerDoc());
SVGElementImpl *clone = orig->cloneNode(true);
// Apply the use-correction
@@ -258,8 +258,8 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c)
trans += ")";
// Apply the transform attribute and render the element
- parent->setAttributeInternal("transform", trans);
- parent->setAttribute("transform", trans);
+ tqparent->setAttributeInternal("transform", trans);
+ tqparent->setAttribute("transform", trans);
// Apply width/height if symbol
if(dynamic_cast<SVGSymbolElementImpl *>(clone))
@@ -294,14 +294,14 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c)
}
}
- appendChild(*parent);
- parent->appendChild(*clone);
+ appendChild(*tqparent);
+ tqparent->appendChild(*clone);
- setupSubtree(parent, ownerSVGElement(), viewportElement());
+ setupSubtree(tqparent, ownerSVGElement(), viewportElement());
m_instanceRoot->setCorrespondingElement(clone);
- dynamic_cast<SVGLocatableImpl *>(parent)->updateCachedScreenCTM(screenCTM());
+ dynamic_cast<SVGLocatableImpl *>(tqparent)->updateCachedScreenCTM(screenCTM());
// Redirect local ecma event handlers to the correspondingElement
TQPtrListIterator<SVGRegisteredEventListener> it(eventListeners());
@@ -370,19 +370,19 @@ void SVGUseElementImpl::update(CanvasItemUpdate reason, int param1, int param2)
{
if(m_instanceRoot)
{
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
- if(shape)
- shape->update(reason, param1, param2);
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(tqshape)
+ tqshape->update(reason, param1, param2);
}
}
-void SVGUseElementImpl::invalidate(KSVGCanvas *c, bool recalc)
+void SVGUseElementImpl::tqinvalidate(KSVGCanvas *c, bool recalc)
{
if(m_instanceRoot)
{
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
- if(shape)
- shape->invalidate(c, recalc);
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(tqshape)
+ tqshape->tqinvalidate(c, recalc);
}
}
@@ -390,9 +390,9 @@ void SVGUseElementImpl::setReferenced(bool referenced)
{
if(m_instanceRoot)
{
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
- if(shape)
- shape->setReferenced(referenced);
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(tqshape)
+ tqshape->setReferenced(referenced);
}
}
@@ -400,9 +400,9 @@ void SVGUseElementImpl::draw()
{
if(m_instanceRoot)
{
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
- if(shape)
- shape->draw();
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(tqshape)
+ tqshape->draw();
}
}