summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore/KoOasisLoadingContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficecore/KoOasisLoadingContext.cpp')
-rw-r--r--lib/kofficecore/KoOasisLoadingContext.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/kofficecore/KoOasisLoadingContext.cpp b/lib/kofficecore/KoOasisLoadingContext.cpp
index fdad0ecc..e5082dc8 100644
--- a/lib/kofficecore/KoOasisLoadingContext.cpp
+++ b/lib/kofficecore/KoOasisLoadingContext.cpp
@@ -31,7 +31,7 @@ KoOasisLoadingContext::KoOasisLoadingContext( KoDocument* doc,
{
// Ideally this should be done by KoDocument and passed as argument here...
KoOasisStore oasisStore( store );
- QString dummy;
+ TQString dummy;
(void)oasisStore.loadAndParse( "tar:/META-INF/manifest.xml", m_manifestDoc, dummy );
}
@@ -41,12 +41,12 @@ KoOasisLoadingContext::~KoOasisLoadingContext()
}
-void KoOasisLoadingContext::fillStyleStack( const QDomElement& object, const char* nsURI, const char* attrName, const char* family )
+void KoOasisLoadingContext::fillStyleStack( const TQDomElement& object, const char* nsURI, const char* attrName, const char* family )
{
// find all styles associated with an object and push them on the stack
if ( object.hasAttributeNS( nsURI, attrName ) ) {
- const QString styleName = object.attributeNS( nsURI, attrName, QString::null );
- const QDomElement* style = 0;
+ const TQString styleName = object.attributeNS( nsURI, attrName, TQString() );
+ const TQDomElement* style = 0;
bool isStyleAutoStyle = false;
if ( m_useStylesAutoStyles ) {
// When loading something from styles.xml, look into the styles.xml auto styles first
@@ -64,39 +64,39 @@ void KoOasisLoadingContext::fillStyleStack( const QDomElement& object, const cha
}
}
-void KoOasisLoadingContext::addStyles( const QDomElement* style, const char* family, bool usingStylesAutoStyles )
+void KoOasisLoadingContext::addStyles( const TQDomElement* style, const char* family, bool usingStylesAutoStyles )
{
Q_ASSERT( style );
if ( !style ) return;
- // this recursive function is necessary as parent styles can have parents themselves
- if ( style->hasAttributeNS( KoXmlNS::style, "parent-style-name" ) ) {
- const QString parentStyleName = style->attributeNS( KoXmlNS::style, "parent-style-name", QString::null );
- const QDomElement* parentStyle = 0;
+ // this recursive function is necessary as tqparent styles can have tqparents themselves
+ if ( style->hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) ) {
+ const TQString tqparentStyleName = style->attributeNS( KoXmlNS::style, "tqparent-style-name", TQString() );
+ const TQDomElement* tqparentStyle = 0;
if ( usingStylesAutoStyles ) {
// When loading something from styles.xml, look into the styles.xml auto styles first
- parentStyle = m_styles.findStyleAutoStyle( parentStyleName, family );
+ tqparentStyle = m_styles.findStyleAutoStyle( tqparentStyleName, family );
// and fallback to looking at styles(), which includes the user styles from styles.xml
}
- if ( !parentStyle )
- parentStyle = m_styles.findStyle( parentStyleName, family );
- if ( parentStyle )
- addStyles( parentStyle, family, usingStylesAutoStyles );
+ if ( !tqparentStyle )
+ tqparentStyle = m_styles.findStyle( tqparentStyleName, family );
+ if ( tqparentStyle )
+ addStyles( tqparentStyle, family, usingStylesAutoStyles );
else
- kdWarning(32500) << "Parent style not found: " << parentStyleName << endl;
+ kdWarning(32500) << "Parent style not found: " << tqparentStyleName << endl;
}
else if ( family ) {
- const QDomElement* def = m_styles.defaultStyle( family );
+ const TQDomElement* def = m_styles.defaultStyle( family );
if ( def ) { // on top of all, the default style for this family
- //kdDebug(32500) << "pushing default style " << style->attributeNS( KoXmlNS::style, "name", QString::null ) << endl;
+ //kdDebug(32500) << "pushing default style " << style->attributeNS( KoXmlNS::style, "name", TQString() ) << endl;
m_styleStack.push( *def );
}
}
- //kdDebug(32500) << "pushing style " << style->attributeNS( KoXmlNS::style, "name", QString::null ) << endl;
+ //kdDebug(32500) << "pushing style " << style->attributeNS( KoXmlNS::style, "name", TQString() ) << endl;
m_styleStack.push( *style );
}
-QString KoOasisLoadingContext::generator() const
+TQString KoOasisLoadingContext::generator() const
{
parseMeta();
return m_generator;
@@ -108,13 +108,13 @@ void KoOasisLoadingContext::parseMeta() const
{
if ( m_store->hasFile( "meta.xml" ) )
{
- QDomDocument metaDoc;
+ TQDomDocument metaDoc;
KoOasisStore oasisStore( m_store );
- QString errorMsg;
+ TQString errorMsg;
if ( oasisStore.loadAndParse( "meta.xml", metaDoc, errorMsg ) ) {
- QDomNode meta = KoDom::namedItemNS( metaDoc, KoXmlNS::office, "document-meta" );
- QDomNode office = KoDom::namedItemNS( meta, KoXmlNS::office, "meta" );
- QDomElement generator = KoDom::namedItemNS( office, KoXmlNS::meta, "generator" );
+ TQDomNode meta = KoDom::namedItemNS( metaDoc, KoXmlNS::office, "document-meta" );
+ TQDomNode office = KoDom::namedItemNS( meta, KoXmlNS::office, "meta" );
+ TQDomElement generator = KoDom::namedItemNS( office, KoXmlNS::meta, "generator" );
if ( !generator.isNull() )
m_generator = generator.text();
}