diff options
author | Michele Calgaro <[email protected]> | 2023-12-03 00:36:33 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-12-04 14:19:15 +0900 |
commit | fb6b4d204d1155fa3a1bc7a128873340db1524f7 (patch) | |
tree | 58fbd21cd52695207154b1b40d0c9d0f53db19b1 /lib | |
parent | d7ae9fb514226c126e04cfe4f34800beb9f4ea19 (diff) | |
download | koffice-fb6b4d204d1155fa3a1bc7a128873340db1524f7.tar.gz koffice-fb6b4d204d1155fa3a1bc7a128873340db1524f7.zip |
Replaced various '#define' with actual strings - part 5
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kofficecore/KoDocument.cpp | 4 | ||||
-rw-r--r-- | lib/kofficecore/KoFilter.cpp | 2 | ||||
-rw-r--r-- | lib/kofficecore/KoOasisStore.cpp | 8 | ||||
-rw-r--r-- | lib/kofficecore/KoOasisStyles.cpp | 16 | ||||
-rw-r--r-- | lib/kofficecore/KoPictureBase.cpp | 2 | ||||
-rw-r--r-- | lib/kofficecore/KoPictureShared.cpp | 12 | ||||
-rw-r--r-- | lib/kofficecore/KoPictureWmf.cpp | 2 | ||||
-rw-r--r-- | lib/kofficeui/KoTabBar.cpp | 2 | ||||
-rw-r--r-- | lib/kotext/KoParagCounter.cpp | 2 | ||||
-rw-r--r-- | lib/kotext/KoParagLayout.cpp | 2 | ||||
-rw-r--r-- | lib/store/KoDirectoryStore.cpp | 2 | ||||
-rw-r--r-- | lib/store/KoStore.cpp | 4 | ||||
-rw-r--r-- | lib/store/KoTarStore.cpp | 2 |
13 files changed, 30 insertions, 30 deletions
diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index 4c3854fe..99bd8459 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -978,7 +978,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) TQFile f( file ); if ( f.open( IO_WriteOnly | IO_Translate ) ) { - bool success = saveToStream( TQT_TQIODEVICE(&f) ); + bool success = saveToStream( &f ); f.close(); return success; } @@ -1727,7 +1727,7 @@ bool KoDocument::loadNativeFormat( const TQString & file ) bool res; if ( doc.setContent( &in, true, &errorMsg, &errorLine, &errorColumn ) ) { - res = loadXML( TQT_TQIODEVICE(&in), doc ); + res = loadXML( &in, doc ); if ( res ) res = completeLoading( 0L ); } diff --git a/lib/kofficecore/KoFilter.cpp b/lib/kofficecore/KoFilter.cpp index 68953b40..2ded98fa 100644 --- a/lib/kofficecore/KoFilter.cpp +++ b/lib/kofficecore/KoFilter.cpp @@ -71,7 +71,7 @@ int KoEmbeddingFilter::embedPart( const TQCString& from, TQCString& to, KTempFile tempIn; tempIn.setAutoDelete( true ); - savePartContents( TQT_TQIODEVICE(tempIn.file()) ); + savePartContents( tempIn.file() ); tempIn.file()->close(); KoFilterManager *manager = new KoFilterManager( tempIn.name(), from, m_chain ); diff --git a/lib/kofficecore/KoOasisStore.cpp b/lib/kofficecore/KoOasisStore.cpp index c170297e..235d5f76 100644 --- a/lib/kofficecore/KoOasisStore.cpp +++ b/lib/kofficecore/KoOasisStore.cpp @@ -78,7 +78,7 @@ KoXmlWriter* KoOasisStore::bodyWriter() Q_ASSERT( !m_contentTmpFile ); m_contentTmpFile = new KTempFile; m_contentTmpFile->setAutoDelete( true ); - m_bodyWriter = new KoXmlWriter( TQT_TQIODEVICE(m_contentTmpFile->file()), 1 ); + m_bodyWriter = new KoXmlWriter( m_contentTmpFile->file(), 1 ); } return m_bodyWriter; } @@ -92,7 +92,7 @@ bool KoOasisStore::closeContentWriter() // copy over the contents from the tempfile to the real one TQFile* tmpFile = m_contentTmpFile->file(); tmpFile->close(); - m_contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); + m_contentWriter->addCompleteElement( tmpFile ); m_contentTmpFile->close(); delete m_contentTmpFile; m_contentTmpFile = 0; @@ -113,7 +113,7 @@ KoXmlWriter* KoOasisStore::manifestWriter( const char* mimeType ) // the pointer to the buffer is already stored in the KoXmlWriter, no need to store it here as well TQBuffer *manifestBuffer = new TQBuffer; manifestBuffer->open( IO_WriteOnly ); - m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(manifestBuffer) ); + m_manifestWriter = new KoXmlWriter( manifestBuffer ); m_manifestWriter->startDocument( "manifest:manifest" ); m_manifestWriter->startElement( "manifest:manifest" ); m_manifestWriter->addAttribute( "xmlns:manifest", KoXmlNS::manifest ); @@ -126,7 +126,7 @@ bool KoOasisStore::closeManifestWriter() { m_manifestWriter->endElement(); m_manifestWriter->endDocument(); - TQBuffer* buffer = TQT_TQBUFFER( static_cast<TQIODevice*>(m_manifestWriter->device()) ); + TQBuffer* buffer = static_cast<TQBuffer*>(m_manifestWriter->device()); delete m_manifestWriter; m_manifestWriter = 0; bool ok = false; if ( m_store->open( "META-INF/manifest.xml" ) ) diff --git a/lib/kofficecore/KoOasisStyles.cpp b/lib/kofficecore/KoOasisStyles.cpp index a5d34c0b..db003c3e 100644 --- a/lib/kofficecore/KoOasisStyles.cpp +++ b/lib/kofficecore/KoOasisStyles.cpp @@ -664,7 +664,7 @@ TQString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const TQStr KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TIME ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; if ( klocaleFormat ) { @@ -819,7 +819,7 @@ TQString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const TQStr KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_DATE ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; if ( klocaleFormat ) { @@ -993,7 +993,7 @@ TQString KoOasisStyles::saveOasisFractionStyle( KoGenStyles &mainStyles, const T KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_FRACTION ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; int integer = 0; int numerator = 0; @@ -1057,7 +1057,7 @@ TQString KoOasisStyles::saveOasisNumberStyle( KoGenStyles &mainStyles, const TQS KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_NUMBER ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; int decimalplaces = 0; int integerdigits = 0; @@ -1106,7 +1106,7 @@ TQString KoOasisStyles::saveOasisPercentageStyle( KoGenStyles &mainStyles, const KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_PERCENTAGE ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; int decimalplaces = 0; int integerdigits = 0; @@ -1160,7 +1160,7 @@ TQString KoOasisStyles::saveOasisScientificStyle( KoGenStyles &mainStyles, const int decimalplace = 0; int integerdigits = 0; int exponentdigits = 0; - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; bool beforeSeparator = true; bool exponential = false; @@ -1236,7 +1236,7 @@ TQString KoOasisStyles::saveOasisCurrencyStyle( KoGenStyles &mainStyles, KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_CURRENCY ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; int decimalplaces = 0; int integerdigits = 0; @@ -1292,7 +1292,7 @@ TQString KoOasisStyles::saveOasisTextStyle( KoGenStyles &mainStyles, const TQStr KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TEXT ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; do { diff --git a/lib/kofficecore/KoPictureBase.cpp b/lib/kofficecore/KoPictureBase.cpp index 101c946c..33437070 100644 --- a/lib/kofficecore/KoPictureBase.cpp +++ b/lib/kofficecore/KoPictureBase.cpp @@ -95,7 +95,7 @@ bool KoPictureBase::saveAsBase64( KoXmlWriter& writer ) const { TQBuffer buffer; buffer.open(IO_ReadWrite); - if ( !save( TQT_TQIODEVICE(&buffer) ) ) + if ( !save( &buffer ) ) return false; TQCString encoded = KCodecs::base64Encode( buffer.buffer() ); writer.addTextNode( encoded ); diff --git a/lib/kofficecore/KoPictureShared.cpp b/lib/kofficecore/KoPictureShared.cpp index 57d95f65..996df9ed 100644 --- a/lib/kofficecore/KoPictureShared.cpp +++ b/lib/kofficecore/KoPictureShared.cpp @@ -208,7 +208,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array ) TQBuffer buffer(array); buffer.open(IO_ReadOnly); - const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-gzip", "tmp" ); + const bool flag = loadCompressed( &buffer, "application/x-gzip", "tmp" ); buffer.close(); return flag; } @@ -217,7 +217,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array ) // BZip2 TQBuffer buffer(array); buffer.open(IO_ReadOnly); - const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-bzip2", "tmp" ); + const bool flag = loadCompressed( &buffer, "application/x-bzip2", "tmp" ); buffer.close(); return flag; } @@ -252,7 +252,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array ) return false; } - imageIO.setIODevice(TQT_TQIODEVICE(&buf)); + imageIO.setIODevice(&buf); imageIO.setFormat("PNG"); if (!imageIO.write()) @@ -309,7 +309,7 @@ bool KoPictureShared::loadXpm(TQIODevice* io) m_base=new KoPictureImage(); TQBuffer buffer(array); - bool check = m_base->load(TQT_TQIODEVICE(&buffer),"xpm"); + bool check = m_base->load(&buffer,"xpm"); setExtension("xpm"); return check; } @@ -441,13 +441,13 @@ bool KoPictureShared::loadFromFile(const TQString& fileName) { kdDebug(30003) << "File with no extension!" << endl; // As we have no extension, consider it like a temporary file - flag = loadTmp( TQT_TQIODEVICE(&file) ); + flag = loadTmp( &file ); } else { const TQString extension( fileName.mid( pos+1 ) ); // ### TODO: check if the extension if gz or bz2 and find the previous extension - flag = load( TQT_TQIODEVICE(&file), extension ); + flag = load( &file, extension ); } file.close(); return flag; diff --git a/lib/kofficecore/KoPictureWmf.cpp b/lib/kofficecore/KoPictureWmf.cpp index 96d10817..3f2d0a7e 100644 --- a/lib/kofficecore/KoPictureWmf.cpp +++ b/lib/kofficecore/KoPictureWmf.cpp @@ -97,7 +97,7 @@ bool KoPictureWmf::loadData(const TQByteArray& array, const TQString& /* extensi } m_originalSize = wmf.boundingRect().size(); // draw wmf file with relative coordinate - wmf.play(*TQT_TQPAINTDEVICE(&m_clipart), true); + wmf.play(m_clipart, true); return true; } diff --git a/lib/kofficeui/KoTabBar.cpp b/lib/kofficeui/KoTabBar.cpp index 319f2baf..4e7c3931 100644 --- a/lib/kofficeui/KoTabBar.cpp +++ b/lib/kofficeui/KoTabBar.cpp @@ -660,7 +660,7 @@ void KoTabBar::paintEvent( TQPaintEvent* ) TQPainter painter; TQPixmap pm( size() ); pm.fill( colorGroup().background() ); - painter.begin( TQT_TQPAINTDEVICE(&pm), this ); + painter.begin( &pm, this ); painter.setPen( colorGroup().dark() ); painter.drawLine( 0, 0, width(), 0 ); diff --git a/lib/kotext/KoParagCounter.cpp b/lib/kotext/KoParagCounter.cpp index 9810e8b0..6237bd1f 100644 --- a/lib/kotext/KoParagCounter.cpp +++ b/lib/kotext/KoParagCounter.cpp @@ -269,7 +269,7 @@ void KoParagCounter::saveOasis( KoGenStyle& listStyle, bool savingStyle ) const // Prepare a sub-xmlwriter for the list-level-style-* element TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter listLevelWriter( TQT_TQIODEVICE(&buffer), 3 /*indentation*/ ); + KoXmlWriter listLevelWriter( &buffer, 3 /*indentation*/ ); const char* tagName = isBullet() ? "text:list-level-style-bullet" : "text:list-level-style-number"; listLevelWriter.startElement( tagName ); diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index 1978d88c..521a4499 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -843,7 +843,7 @@ void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool sa TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter tabsWriter( TQT_TQIODEVICE(&buffer), 4 ); // indent==4: root,autostyle,style,parag-props + KoXmlWriter tabsWriter( &buffer, 4 ); // indent==4: root,autostyle,style,parag-props tabsWriter.startElement( "style:tab-stops" ); KoTabulatorList::ConstIterator it = m_tabList.begin(); for ( ; it != m_tabList.end() ; it++ ) diff --git a/lib/store/KoDirectoryStore.cpp b/lib/store/KoDirectoryStore.cpp index 894a7b39..a464db05 100644 --- a/lib/store/KoDirectoryStore.cpp +++ b/lib/store/KoDirectoryStore.cpp @@ -71,7 +71,7 @@ bool KoDirectoryStore::openReadOrWrite( const TQString& name, int iomode ) if ( !ret ) return false; } - m_stream = TQT_TQIODEVICE(new TQFile( m_basePath + name )); + m_stream = new TQFile( m_basePath + name ); if ( !m_stream->open( iomode ) ) { delete m_stream; diff --git a/lib/store/KoStore.cpp b/lib/store/KoStore.cpp index 221c6b5c..fa6e88d1 100644 --- a/lib/store/KoStore.cpp +++ b/lib/store/KoStore.cpp @@ -69,7 +69,7 @@ KoStore* KoStore::createStore( const TQString& fileName, Mode mode, const TQCStr { TQFile file( fileName ); if ( file.open( IO_ReadOnly ) ) - backend = determineBackend( TQT_TQIODEVICE(&file) ); + backend = determineBackend( &file ); else backend = DefaultFormat; // will create a "bad" store (bad()==true) } @@ -143,7 +143,7 @@ KoStore* KoStore::createStore( TQWidget* window, const KURL& url, Mode mode, con TQFile file( tmpFile ); if ( file.open( IO_ReadOnly ) ) { - backend = determineBackend( TQT_TQIODEVICE(&file) ); + backend = determineBackend( &file ); file.close(); } } diff --git a/lib/store/KoTarStore.cpp b/lib/store/KoTarStore.cpp index d4e6667a..160258d9 100644 --- a/lib/store/KoTarStore.cpp +++ b/lib/store/KoTarStore.cpp @@ -126,7 +126,7 @@ bool KoTarStore::openWrite( const TQString& /*name*/ ) { // Prepare memory buffer for writing m_byteArray.resize( 0 ); - m_stream = TQT_TQIODEVICE(new TQBuffer( m_byteArray )); + m_stream = new TQBuffer( m_byteArray ); m_stream->open( IO_WriteOnly ); return true; } |