summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore/KoXmlReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficecore/KoXmlReader.h')
-rw-r--r--lib/kofficecore/KoXmlReader.h120
1 files changed, 60 insertions, 60 deletions
diff --git a/lib/kofficecore/KoXmlReader.h b/lib/kofficecore/KoXmlReader.h
index df2f10c98..919e566be 100644
--- a/lib/kofficecore/KoXmlReader.h
+++ b/lib/kofficecore/KoXmlReader.h
@@ -20,27 +20,27 @@
#ifndef KOFFICE_XMLREADER
#define KOFFICE_XMLREADER
-// use standard QDom, useful to test KoXml classes against Qt's QDom
-//#define KOXML_USE_QDOM
+// use standard TQDom, useful to test KoXml classes against TQt's TQDom
+//#define KOXML_USE_TQDOM
-#include <qdom.h>
+#include <tqdom.h>
#include <koffice_export.h>
-#ifdef KOXML_USE_QDOM
+#ifdef KOXML_USE_TQDOM
-#define KoXmlNode QDomNode
-#define KoXmlElement QDomElement
-#define KoXmlText QDomText
-#define KoXmlCDATASection QDomCDATASection
-#define KoXmlDocument QDomDocument
+#define KoXmlNode TQDomNode
+#define KoXmlElement TQDomElement
+#define KoXmlText TQDomText
+#define KoXmlCDATASection TQDomCDATASection
+#define KoXmlDocument TQDomDocument
#else
-class QIODevice;
-class QString;
-class QTextStream;
-class QXmlReader;
-class QXmlInputSource;
+class TQIODevice;
+class TQString;
+class TQTextStream;
+class TQXmlReader;
+class TQXmlInputSource;
class KoXmlElement;
class KoXmlText;
@@ -54,7 +54,7 @@ class KoXmlNodeData;
* KoXmlNode is a base class for KoXmlElement, KoXmlText.
* Often, these subclasses are used for getting the data instead of KoXmlNode.
* However, as base class, KoXmlNode is very helpful when for example iterating
- * all child nodes within one parent node.
+ * all child nodes within one tqparent node.
*
* KoXmlNode implements an explicit sharing, a node shares its data with
* other copies (if exist).
@@ -95,13 +95,13 @@ public:
KoXmlCDATASection toCDATASection();
KoXmlDocument toDocument();
- virtual QString nodeName() const;
- virtual QString namespaceURI() const;
- virtual QString prefix() const;
- virtual QString localName() const;
+ virtual TQString nodeName() const;
+ virtual TQString namespaceURI() const;
+ virtual TQString prefix() const;
+ virtual TQString localName() const;
KoXmlDocument ownerDocument() const;
- KoXmlNode parentNode() const;
+ KoXmlNode tqparentNode() const;
bool hasChildNodes() const;
KoXmlNode firstChild() const;
@@ -109,8 +109,8 @@ public:
KoXmlNode nextSibling() const;
KoXmlNode previousSibling() const;
- KoXmlNode namedItem( const QString& name ) const;
- KoXmlNode namedItemNS( const QString& nsURI, const QString& name ) const;
+ KoXmlNode namedItem( const TQString& name ) const;
+ KoXmlNode namedItemNS( const TQString& nsURI, const TQString& name ) const;
/**
* Loads all child nodes (if any) of this node. Normally you do not need
@@ -147,16 +147,16 @@ public:
bool operator== ( const KoXmlElement& ) const;
bool operator!= ( const KoXmlElement& ) const;
- QString tagName() const;
- QString text() const;
+ TQString tagName() const;
+ TQString text() const;
virtual bool isElement() const;
- QString attribute( const QString& name ) const;
- QString attribute( const QString& name, const QString& defaultValue ) const;
- QString attributeNS( const QString& namespaceURI, const QString& localName,
- const QString& defaultValue ) const;
- bool hasAttribute( const QString& name ) const;
- bool hasAttributeNS( const QString& namespaceURI, const QString& localName ) const;
+ TQString attribute( const TQString& name ) const;
+ TQString attribute( const TQString& name, const TQString& defaultValue ) const;
+ TQString attributeNS( const TQString& namespaceURI, const TQString& localName,
+ const TQString& defaultValue ) const;
+ bool hasAttribute( const TQString& name ) const;
+ bool hasAttributeNS( const TQString& namespaceURI, const TQString& localName ) const;
private:
friend class KoXmlNode;
@@ -176,8 +176,8 @@ public:
KoXmlText& operator=( const KoXmlText& text );
virtual ~KoXmlText();
- QString data() const;
- void setData( const QString& data );
+ TQString data() const;
+ void setData( const TQString& data );
virtual bool isText() const;
private:
@@ -209,8 +209,8 @@ private:
/**
* KoXmlDocument represents an XML document, structured in a DOM tree.
*
- * KoXmlDocument is designed to be memory efficient. Unlike QDomDocument from
- * Qt's XML module, KoXmlDocument does not store all nodes in the DOM tree.
+ * KoXmlDocument is designed to be memory efficient. Unlike TQDomDocument from
+ * TQt's XML module, KoXmlDocument does not store all nodes in the DOM tree.
* Some nodes will be loaded and parsed on-demand only.
*
* KoXmlDocument is read-only, you can not modify its content.
@@ -235,20 +235,20 @@ public:
void setFastLoading( bool f );
bool fastLoading() const;
- bool setContent( QIODevice* device, bool namespaceProcessing,
- QString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
- bool setContent( QIODevice* device,
- QString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
- bool setContent( QXmlInputSource *source, QXmlReader *reader,
- QString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
-
-// bool setContent( const QCString& text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QByteArray& text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QString& text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( QIODevice* dev, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QCString& text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QByteArray& text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-// bool setContent( const QString& text, QString *errorMsg=0, int *errorLine=0,
+ bool setContent( TQIODevice* device, bool namespaceProcessing,
+ TQString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
+ bool setContent( TQIODevice* device,
+ TQString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
+ bool setContent( TQXmlInputSource *source, TQXmlReader *reader,
+ TQString* errorMsg = 0, int* errorLine = 0, int* errorColumn = 0 );
+
+// bool setContent( const TQCString& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQByteArray& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQString& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( TQIODevice* dev, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQCString& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQByteArray& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
+// bool setContent( const TQString& text, TQString *errorMsg=0, int *errorLine=0,
// int *errorColumn=0 );
@@ -257,28 +257,28 @@ private:
KoXmlDocument( KoXmlNodeData* );
};
-#endif // KOXML_USE_QDOM
+#endif // KOXML_USE_TQDOM
/**
- * This namespace contains a few convenience functions to simplify code using QDom
+ * This namespace contains a few convenience functions to simplify code using TQDom
* (when loading OASIS documents, in particular).
*
* To find the child element with a given name, use KoXml::namedItemNS.
*
* To find all child elements with a given name, use
- * QDomElement e;
- * forEachElement( e, parent )
+ * TQDomElement e;
+ * forEachElement( e, tqparent )
* {
* if ( e.localName() == "..." && e.namespaceURI() == KoXmlNS::... )
* {
* ...
* }
* }
- * Note that this means you don't ever need to use QDomNode nor toElement anymore!
+ * Note that this means you don't ever need to use TQDomNode nor toElement anymore!
* Also note that localName is the part without the prefix, this is the whole point
* of namespace-aware methods.
*
- * To find the attribute with a given name, use QDomElement::attributeNS.
+ * To find the attribute with a given name, use TQDomElement::attributeNS.
*
* Do not use getElementsByTagNameNS, it's recursive (which is never needed in KOffice).
* Do not use tagName() or nodeName() or prefix(), since the prefix isn't fixed.
@@ -288,8 +288,8 @@ private:
namespace KoXml {
/**
- * A namespace-aware version of QDomNode::namedItem(),
- * which also takes care of casting to a QDomElement.
+ * A namespace-aware version of TQDomNode::namedItem(),
+ * which also takes care of casting to a TQDomElement.
* Use this when a domelement is known to have only *one* child element
* with a given tagname.
*
@@ -300,20 +300,20 @@ namespace KoXml {
/**
* Explicitly load child nodes of specified node, up to given depth.
- * This function has no effect if QDom is used.
+ * This function has no effect if TQDom is used.
*/
KOFFICECORE_EXPORT void load( KoXmlNode& node, int depth = 1 );
/**
* Unload child nodes of specified node.
- * This function has no effect if QDom is used.
+ * This function has no effect if TQDom is used.
*/
KOFFICECORE_EXPORT void unload( KoXmlNode& node );
}
-#define forEachElement( elem, parent ) \
- for ( KoXmlNode _node = parent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) \
+#define forEachElement( elem, tqparent ) \
+ for ( KoXmlNode _node = tqparent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) \
if ( !( elem = _node.toElement() ).isNull() )