summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore/KoOasisStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficecore/KoOasisStore.cpp')
-rw-r--r--lib/kofficecore/KoOasisStore.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/kofficecore/KoOasisStore.cpp b/lib/kofficecore/KoOasisStore.cpp
index 1b7537ae..7eec46a5 100644
--- a/lib/kofficecore/KoOasisStore.cpp
+++ b/lib/kofficecore/KoOasisStore.cpp
@@ -29,9 +29,9 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qxml.h>
-#include <qbuffer.h>
+#include <tqfile.h>
+#include <tqxml.h>
+#include <tqbuffer.h>
KoOasisStore::KoOasisStore( KoStore* store )
: m_store( store ),
@@ -78,7 +78,7 @@ KoXmlWriter* KoOasisStore::bodyWriter()
Q_ASSERT( !m_contentTmpFile );
m_contentTmpFile = new KTempFile;
m_contentTmpFile->setAutoDelete( true );
- m_bodyWriter = new KoXmlWriter( m_contentTmpFile->file(), 1 );
+ m_bodyWriter = new KoXmlWriter( TQT_TQIODEVICE(m_contentTmpFile->file()), 1 );
}
return m_bodyWriter;
}
@@ -90,9 +90,9 @@ bool KoOasisStore::closeContentWriter()
delete m_bodyWriter; m_bodyWriter = 0;
// copy over the contents from the tempfile to the real one
- QFile* tmpFile = m_contentTmpFile->file();
+ TQFile* tmpFile = m_contentTmpFile->file();
tmpFile->close();
- m_contentWriter->addCompleteElement( tmpFile );
+ m_contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
m_contentTmpFile->close();
delete m_contentTmpFile; m_contentTmpFile = 0;
@@ -111,9 +111,9 @@ KoXmlWriter* KoOasisStore::manifestWriter( const char* mimeType )
if ( !m_manifestWriter )
{
// the pointer to the buffer is already stored in the KoXmlWriter, no need to store it here as well
- QBuffer *manifestBuffer = new QBuffer;
+ TQBuffer *manifestBuffer = new TQBuffer;
manifestBuffer->open( IO_WriteOnly );
- m_manifestWriter = new KoXmlWriter( manifestBuffer );
+ m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(manifestBuffer) );
m_manifestWriter->startDocument( "manifest:manifest" );
m_manifestWriter->startElement( "manifest:manifest" );
m_manifestWriter->addAttribute( "xmlns:manifest", KoXmlNS::manifest );
@@ -126,39 +126,39 @@ bool KoOasisStore::closeManifestWriter()
{
m_manifestWriter->endElement();
m_manifestWriter->endDocument();
- QBuffer* buffer = static_cast<QBuffer *>( m_manifestWriter->device() );
+ TQBuffer* buffer = TQT_TQBUFFER( static_cast<QIODevice*>(m_manifestWriter->device()) );
delete m_manifestWriter; m_manifestWriter = 0;
bool ok = false;
if ( m_store->open( "META-INF/manifest.xml" ) )
{
- Q_LONG written = m_store->write( buffer->buffer() );
- ok = ( written == (Q_LONG)buffer->buffer().size() && m_store->close() );
+ TQ_LONG written = m_store->write( buffer->buffer() );
+ ok = ( written == (TQ_LONG)buffer->buffer().size() && m_store->close() );
}
delete buffer;
return ok;
}
-bool KoOasisStore::loadAndParse( const QString& fileName, QDomDocument& doc, QString& errorMessage )
+bool KoOasisStore::loadAndParse( const TQString& fileName, TQDomDocument& doc, TQString& errorMessage )
{
//kdDebug(30003) << "loadAndParse: Trying to open " << fileName << endl;
if (!m_store->open(fileName))
{
kdWarning(30003) << "Entry " << fileName << " not found!" << endl;
- errorMessage = i18n( "Could not find %1" ).arg( fileName );
+ errorMessage = i18n( "Could not tqfind %1" ).tqarg( fileName );
return false;
}
- // Error variables for QDomDocument::setContent
- QString errorMsg;
+ // Error variables for TQDomDocument::setContent
+ TQString errorMsg;
int errorLine, errorColumn;
// We need to be able to see the space in <text:span> </text:span>, this is why
// we activate the "report-whitespace-only-CharData" feature.
// Unfortunately this leads to lots of whitespace text nodes in between real
// elements in the rest of the document, watch out for that.
- QXmlInputSource source( m_store->device() );
- // Copied from QDomDocumentPrivate::setContent, to change the whitespace thing
- QXmlSimpleReader reader;
+ TQXmlInputSource source( m_store->device() );
+ // Copied from TQDomDocumentPrivate::setContent, to change the whitespace thing
+ TQXmlSimpleReader reader;
KoDocument::setupXmlReader( reader, true /*namespaceProcessing*/ );
bool ok = doc.setContent( &source, &reader, &errorMsg, &errorLine, &errorColumn );
@@ -168,7 +168,7 @@ bool KoOasisStore::loadAndParse( const QString& fileName, QDomDocument& doc, QSt
<< " In line: " << errorLine << ", column: " << errorColumn << endl
<< " Error message: " << errorMsg << endl;
errorMessage = i18n( "Parsing error in the main document at line %1, column %2\nError message: %3" )
- .arg( errorLine ).arg( errorColumn ).arg( i18n ( "QXml", errorMsg.utf8() ) );
+ .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( "TQXml", errorMsg.utf8() ) );
}
else
{
@@ -178,17 +178,17 @@ bool KoOasisStore::loadAndParse( const QString& fileName, QDomDocument& doc, QSt
return ok;
}
-QString KoOasisStore::mimeForPath( const QDomDocument& doc, const QString& fullPath )
+TQString KoOasisStore::mimeForPath( const TQDomDocument& doc, const TQString& fullPath )
{
- QDomElement docElem = doc.documentElement();
- QDomElement elem;
+ TQDomElement docElem = doc.documentElement();
+ TQDomElement elem;
forEachElement( elem, docElem )
{
if ( elem.localName() == "file-entry" && elem.namespaceURI() == KoXmlNS::manifest )
{
- if ( elem.attributeNS( KoXmlNS::manifest, "full-path", QString::null ) == fullPath )
- return elem.attributeNS( KoXmlNS::manifest, "media-type", QString::null );
+ if ( elem.attributeNS( KoXmlNS::manifest, "full-path", TQString() ) == fullPath )
+ return elem.attributeNS( KoXmlNS::manifest, "media-type", TQString() );
}
}
- return QString::null;
+ return TQString();
}