From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- karbon/core/vobject.cc | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'karbon/core/vobject.cc') diff --git a/karbon/core/vobject.cc b/karbon/core/vobject.cc index af2fee35..2f9333ac 100644 --- a/karbon/core/vobject.cc +++ b/karbon/core/vobject.cc @@ -17,7 +17,7 @@ * Boston, MA 02110-1301, USA. */ -#include +#include #include "vdocument.h" #include "vfill.h" @@ -33,15 +33,15 @@ #include #include -VObject::VObject( VObject* parent, VState state ) : m_dcop( 0L ) +VObject::VObject( VObject* tqparent, VState state ) : m_dcop( 0L ) { m_stroke = 0L; m_fill = 0L; - m_parent = parent; + m_parent = tqparent; m_state = state; - invalidateBoundingBox(); + tqinvalidateBoundingBox(); } VObject::VObject( const VObject& obj ) @@ -52,7 +52,7 @@ VObject::VObject( const VObject& obj ) m_parent = obj.m_parent; m_state = obj.m_state; - invalidateBoundingBox(); + tqinvalidateBoundingBox(); m_dcop = 0L; VDocument *srcDoc = obj.document(); @@ -99,7 +99,7 @@ VObject::setFill( const VFill& fill ) } void -VObject::save( QDomElement& element ) const +VObject::save( TQDomElement& element ) const { if( m_stroke ) m_stroke->save( element ); @@ -109,7 +109,7 @@ VObject::save( QDomElement& element ) const VDocument *doc = document(); if( doc && !doc->objectName( this ).isEmpty() ) - element.setAttribute( "ID", QString( doc->objectName( this ) ) ); + element.setAttribute( "ID", TQString( doc->objectName( this ) ) ); } void @@ -118,7 +118,7 @@ VObject::saveOasis( KoStore *, KoXmlWriter *docWriter, KoGenStyles &mainStyles, if( !name().isEmpty() ) docWriter->addAttribute( "draw:name", name() ); - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); mat.translate( 0, -document()->height() ); @@ -131,9 +131,9 @@ VObject::saveOasis( KoStore *, KoXmlWriter *docWriter, KoGenStyles &mainStyles, stroke.transform( mat ); stroke.saveOasis( styleobjectauto ); } - QString st = mainStyles.lookup( styleobjectauto, "st" ); + TQString st = mainStyles.lookup( styleobjectauto, "st" ); if(document()) - docWriter->addAttribute( "draw:id", "obj" + QString::number( index ) ); + docWriter->addAttribute( "draw:id", "obj" + TQString::number( index ) ); docWriter->addAttribute( "draw:style-name", st ); } @@ -142,7 +142,7 @@ VObject::saveOasisFill( KoGenStyles &mainStyles, KoGenStyle &stylesobjectauto ) { if( m_fill ) { - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); mat.translate( 0, -document()->height() ); @@ -154,7 +154,7 @@ VObject::saveOasisFill( KoGenStyles &mainStyles, KoGenStyle &stylesobjectauto ) } void -VObject::load( const QDomElement& element ) +VObject::load( const TQDomElement& element ) { if( !m_stroke ) m_stroke = new VStroke( this ); @@ -178,7 +178,7 @@ VObject::load( const QDomElement& element ) } bool -VObject::loadOasis( const QDomElement &object, KoOasisLoadingContext &context ) +VObject::loadOasis( const TQDomElement &object, KoOasisLoadingContext &context ) { if( !m_stroke ) m_stroke = new VStroke( this ); @@ -195,19 +195,19 @@ VObject::loadOasis( const QDomElement &object, KoOasisLoadingContext &context ) m_fill->loadOasis( object, context, this ); if( object.hasAttributeNS( KoXmlNS::draw, "name" ) ) - setName( object.attributeNS( KoXmlNS::draw, "name", QString::null ) ); + setName( object.attributeNS( KoXmlNS::draw, "name", TQString() ) ); return true; } void -VObject::addStyles( const QDomElement* style, KoOasisLoadingContext & context ) +VObject::addStyles( const TQDomElement* style, KoOasisLoadingContext & context ) { if(style) { - // this function is necessary as parent styles can have parents themself - if( style->hasAttributeNS( KoXmlNS::style, "parent-style-name" ) ) - addStyles( context.oasisStyles().findStyle( style->attributeNS( KoXmlNS::style, "parent-style-name", QString::null ) ), context ); + // this function is necessary as tqparent styles can have tqparents themself + if( style->hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) ) + addStyles( context.oasisStyles().findStyle( style->attributeNS( KoXmlNS::style, "tqparent-style-name", TQString() ) ), context ); context.addStyles( style, "style-name" ); } } @@ -216,19 +216,19 @@ VDocument * VObject::document() const { VObject *obj = (VObject *)this; - while( obj->parent() ) - obj = obj->parent(); + while( obj->tqparent() ) + obj = obj->tqparent(); return dynamic_cast( obj ); } -QString +TQString VObject::name() const { - return document() ? document()->objectName( this ) : QString(); + return document() ? document()->objectName( this ) : TQString(); } void -VObject::setName( const QString &s ) +VObject::setName( const TQString &s ) { if( document() ) document()->setObjectName( this, s ); -- cgit v1.2.1