diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
commit | 94844816550ad672ccfcdc25659c625546239998 (patch) | |
tree | e35fc60fd736c645d59f6408af032774ad8023d3 /filters/kword/oowriter/oowriterimport.cc | |
parent | 2a811c38c74c03648ecf857e566c44483cbad706 (diff) | |
download | koffice-94844816550ad672ccfcdc25659c625546239998.tar.gz koffice-94844816550ad672ccfcdc25659c625546239998.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'filters/kword/oowriter/oowriterimport.cc')
-rw-r--r-- | filters/kword/oowriter/oowriterimport.cc | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/filters/kword/oowriter/oowriterimport.cc b/filters/kword/oowriter/oowriterimport.cc index 5fd196f8a..07262c861 100644 --- a/filters/kword/oowriter/oowriterimport.cc +++ b/filters/kword/oowriter/oowriterimport.cc @@ -69,7 +69,7 @@ OoWriterImport::~OoWriterImport() { } -KoFilter::ConversiontqStatus OoWriterImport::convert( TQCString const & from, TQCString const & to ) +KoFilter::ConversionStatus OoWriterImport::convert( TQCString const & from, TQCString const & to ) { kdDebug(30518) << "Entering Oowriter Import filter: " << from << " - " << to << endl; @@ -99,20 +99,20 @@ KoFilter::ConversiontqStatus OoWriterImport::convert( TQCString const & from, TQ } - KoFilter::ConversiontqStatus pretqStatus = openFile(); + KoFilter::ConversionStatus preStatus = openFile(); TQImage thumbnail; - if ( pretqStatus == KoFilter::OK ) + if ( preStatus == KoFilter::OK ) { // We do not care about the failure OoUtils::loadThumbnail( thumbnail, m_zip ); } - if ( pretqStatus != KoFilter::OK ) + if ( preStatus != KoFilter::OK ) { m_zip->close(); delete m_zip; - return pretqStatus; + return preStatus; } m_currentMasterPage = TQString(); @@ -535,14 +535,14 @@ TQDomElement OoWriterImport::createInitialFrame( TQDomElement& parentFramesetEle return frameElementOut; } -KoFilter::ConversiontqStatus OoWriterImport::loadAndParse(const TQString& filename, TQDomDocument& doc) +KoFilter::ConversionStatus OoWriterImport::loadAndParse(const TQString& filename, TQDomDocument& doc) { return OoUtils::loadAndParse( filename, doc, m_zip); } -KoFilter::ConversiontqStatus OoWriterImport::openFile() +KoFilter::ConversionStatus OoWriterImport::openFile() { - KoFilter::ConversiontqStatus status=loadAndParse("content.xml", m_content); + KoFilter::ConversionStatus status=loadAndParse("content.xml", m_content); if ( status != KoFilter::OK ) { kdError(30518) << "Content.xml could not be parsed correctly! Aborting!" << endl; @@ -596,7 +596,7 @@ bool OoWriterImport::createStyleMap( const TQDomDocument & styles, TQDomDocument if ( d > 1.0 ) { TQString message( i18n("This document was created with OpenOffice.org version '%1'. This filter was written for version 1.0. Reading this file could cause strange behavior, crashes or incorrect display of the data. Do you want to continue converting the document?") ); - message = message.tqarg( docElement.attributeNS( ooNS::office, "version", TQString() ) ); + message = message.arg( docElement.attributeNS( ooNS::office, "version", TQString() ) ); if ( KMessageBox::warningYesNo( 0, message, i18n( "Unsupported document version" ) ) == KMessageBox::No ) return false; } @@ -873,13 +873,13 @@ void OoWriterImport::writeCounter( TQDomDocument& doc, TQDomElement& layoutEleme TQString bulletChar = listStyle.attributeNS( ooNS::text, "bullet-char", TQString() ); if ( !bulletChar.isEmpty() ) { #if 0 // doesn't work well. Fonts lack those symbols! - counter.setAttribute( "bullet", bulletChar[0].tqunicode() ); - kdDebug(30518) << "bullet code " << bulletChar[0].tqunicode() << endl; + counter.setAttribute( "bullet", bulletChar[0].unicode() ); + kdDebug(30518) << "bullet code " << bulletChar[0].unicode() << endl; TQString fontName = listStyleProperties.attributeNS( ooNS::style, "font-name", TQString() ); counter.setAttribute( "bulletfont", fontName ); #endif // Reverse engineering, I found those codes: - switch( bulletChar[0].tqunicode() ) { + switch( bulletChar[0].unicode() ) { case 0x2022: // small disc counter.setAttribute( "type", 10 ); // a disc bullet break; @@ -992,11 +992,11 @@ void OoWriterImport::parseList( TQDomDocument& doc, const TQDomElement& list, TQ static int numberOfParagraphs( const TQDomElement& frameset ) { - const TQDomNodeList tqchildren = frameset.childNodes(); + const TQDomNodeList children = frameset.childNodes(); const TQString paragStr = "PARAGRAPH"; int paragCount = 0; - for ( unsigned int i = 0 ; i < tqchildren.length() ; ++i ) { - if ( tqchildren.item( i ).toElement().tagName() == paragStr ) + for ( unsigned int i = 0 ; i < children.length() ; ++i ) { + if ( children.item( i ).toElement().tagName() == paragStr ) ++paragCount; } return paragCount; @@ -1209,12 +1209,12 @@ TQDomElement OoWriterImport::parseParagraph( TQDomDocument& doc, const TQDomElem TQDomElement* paragraphStyle = m_styles[paragraph.attributeNS( ooNS::text, "style-name", TQString() )]; TQString masterPageName = paragraphStyle ? paragraphStyle->attributeNS( ooNS::style, "master-page-name", TQString() ) : TQString(); if ( masterPageName.isEmpty() ) - masterPageName = "Standard"; // Seems to be a builtin name for the default tqlayout... + masterPageName = "Standard"; // Seems to be a builtin name for the default layout... if ( masterPageName != m_currentMasterPage ) { - // Detected a change in the master page -> this means we have to use a new page tqlayout + // Detected a change in the master page -> this means we have to use a new page layout // and insert a frame break if not on the first paragraph. - // In KWord we don't support sections so the first paragraph is the one that determines the page tqlayout. + // In KWord we don't support sections so the first paragraph is the one that determines the page layout. if ( m_currentMasterPage.isEmpty() ) { m_currentMasterPage = masterPageName; // before writePageLayout to avoid recursion writePageLayout( doc, masterPageName ); @@ -1228,7 +1228,7 @@ TQDomElement OoWriterImport::parseParagraph( TQDomDocument& doc, const TQDomElem layoutElement.appendChild( pageBreakElem ); } pageBreakElem.setAttribute( "hardFrameBreak", "true" ); - // We have no way to store the new page tqlayout, KWord doesn't have sections. + // We have no way to store the new page layout, KWord doesn't have sections. } } @@ -1458,7 +1458,7 @@ void OoWriterImport::writeLayout( TQDomDocument& doc, TQDomElement& layoutElemen { Q_ASSERT( layoutElement.ownerDocument() == doc ); - // Always write out the tqalignment, it's required + // Always write out the alignment, it's required TQDomElement flowElement = doc.createElement("FLOW"); /* This was only an intermediate OASIS decision. The final decision is: @@ -1563,7 +1563,7 @@ void OoWriterImport::writeLayout( TQDomDocument& doc, TQDomElement& layoutElemen style:background-image line numbering punctuation wrap, 3.10.36 - vertical tqalignment - a bit like offsetfrombaseline (but not for subscript/superscript, in general) + vertical alignment - a bit like offsetfrombaseline (but not for subscript/superscript, in general) Michael said those are in fact parag properties: style:text-autospace, 3.10.32 - not implemented in kotext style:line-break, 3.10.37 - apparently that's for some Asian languages @@ -1817,7 +1817,7 @@ TQString OoWriterImport::appendPicture(TQDomDocument& doc, const TQDomElement& o strExtension=href.mid(result+1); // As we are using KoPicture, the extension should be without the dot. } TQString filename(href.mid(1)); - KoPictureKey key(filename, TQDateTime::tqcurrentDateTime(Qt::UTC)); + KoPictureKey key(filename, TQDateTime::currentDateTime(Qt::UTC)); picture.setKey(key); if (!m_zip) @@ -1966,7 +1966,7 @@ void OoWriterImport::appendField(TQDomDocument& doc, TQDomElement& outputFormats bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) + dt = TQDateTime::currentDateTime(); // OOo docs say so :) fixed = false; } const TQDate date(dt.date()); @@ -1995,7 +1995,7 @@ void OoWriterImport::appendField(TQDomDocument& doc, TQDomElement& outputFormats bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) + dt = TQDateTime::currentDateTime(); // OOo docs say so :) fixed = false; } @@ -2303,7 +2303,7 @@ void OoWriterImport::parseInsideOfTable( TQDomDocument &doc, const TQDomElement& if ( localName == "table-cell" ) // OOo SPEC 4.8.1 p267 { const TQString frameName(i18n("Frameset name","Table %3, row %1, column %2") - .tqarg(row).tqarg(column).tqarg(tableName)); // The table name could have a % sequence, so use the table name as last! + .arg(row).arg(column).arg(tableName)); // The table name could have a % sequence, so use the table name as last! kdDebug(30518) << "Trying to create " << frameName << endl; // We need to create a frameset for the cell |