diff options
Diffstat (limited to 'filters/kword')
-rw-r--r-- | filters/kword/amipro/amiproexport.cpp | 14 | ||||
-rw-r--r-- | filters/kword/amipro/amiproparser.cpp | 6 | ||||
-rw-r--r-- | filters/kword/latex/export/kwordlatexexportdia.cpp | 2 | ||||
-rw-r--r-- | filters/kword/latex/export/latexexportIface.cpp | 2 | ||||
-rw-r--r-- | filters/kword/msword/texthandler.cpp | 2 | ||||
-rw-r--r-- | filters/kword/palmdoc/palmdb.cpp | 12 | ||||
-rw-r--r-- | filters/kword/palmdoc/palmdoc.cpp | 16 | ||||
-rw-r--r-- | filters/kword/palmdoc/palmdocexport.cpp | 12 | ||||
-rw-r--r-- | filters/kword/palmdoc/palmdocimport.cpp | 2 | ||||
-rw-r--r-- | filters/kword/wml/wmlexport.cpp | 16 | ||||
-rw-r--r-- | filters/kword/wml/wmlimport.cpp | 4 | ||||
-rw-r--r-- | filters/kword/wml/wmlparser.cpp | 72 | ||||
-rw-r--r-- | filters/kword/wordperfect/import/kwordfilter.cpp | 10 | ||||
-rw-r--r-- | filters/kword/wordperfect/import/parser.cpp | 18 | ||||
-rw-r--r-- | filters/kword/wordperfect/import/parser.h | 2 |
15 files changed, 95 insertions, 95 deletions
diff --git a/filters/kword/amipro/amiproexport.cpp b/filters/kword/amipro/amiproexport.cpp index 6fef9654d..6d46bb60b 100644 --- a/filters/kword/amipro/amiproexport.cpp +++ b/filters/kword/amipro/amiproexport.cpp @@ -63,18 +63,18 @@ bool AmiProWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to* { filename = filenameOut; - return TRUE; + return true; } bool AmiProWorker::doCloseFile(void) { TQFile out( filename ); if( !out.open( IO_WriteOnly ) ) - return FALSE; + return false; TQTextStream stream; stream.setDevice( &out ); stream << result; - return TRUE; + return true; } bool AmiProWorker::doOpenDocument(void) @@ -98,15 +98,15 @@ bool AmiProWorker::doOpenDocument(void) result += "[edoc]\n"; m_bold = m_italic = m_underline = m_underlineDouble = - m_strike = m_subscript = m_superscript = FALSE; + m_strike = m_subscript = m_superscript = false; - return TRUE; + return true; } bool AmiProWorker::doCloseDocument(void) { result += ">\n\n"; - return TRUE; + return true; } static TQString AmiProEscape( const TQString& text ) @@ -172,7 +172,7 @@ bool AmiProWorker::doFullParagraph(const TQString& paraText, result += amiproText + "\n\n"; - return TRUE; + return true; } AmiProExport::AmiProExport( KoFilter *, const char *, const TQStringList& ): diff --git a/filters/kword/amipro/amiproparser.cpp b/filters/kword/amipro/amiproparser.cpp index a73e7456b..d9f38d7bc 100644 --- a/filters/kword/amipro/amiproparser.cpp +++ b/filters/kword/amipro/amiproparser.cpp @@ -579,7 +579,7 @@ AmiProFormat::AmiProFormat() pos = len = 0; bold = italic = underline = word_underline = double_underline = - subscript = superscript = strikethrough = FALSE; + subscript = superscript = strikethrough = false; fontFamily = ""; fontSize = 12; fontColor = TQt::black; @@ -637,7 +637,7 @@ AmiProLayout::AmiProLayout() fontColor = TQt::black; bold = italic = underline = word_underline = double_underline = - subscript = superscript = strikethrough = FALSE; + subscript = superscript = strikethrough = false; align = TQt::AlignLeft; linespace = AmiPro::LS_Single; spaceBefore = spaceAfter = 0; @@ -702,7 +702,7 @@ AmiProStyle::AmiProStyle() fontColor = TQt::black; bold = italic = underline = word_underline = double_underline = - subscript = superscript = strikethrough = FALSE; + subscript = superscript = strikethrough = false; linespace = AmiPro::LS_Single; spaceBefore = spaceAfter = 0; } diff --git a/filters/kword/latex/export/kwordlatexexportdia.cpp b/filters/kword/latex/export/kwordlatexexportdia.cpp index 3498bcdb9..8d0a5ff62 100644 --- a/filters/kword/latex/export/kwordlatexexportdia.cpp +++ b/filters/kword/latex/export/kwordlatexexportdia.cpp @@ -54,7 +54,7 @@ * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ KWordLatexExportDia::KWordLatexExportDia(KoStore* in, TQWidget* parent, const char* name_, bool modal, WFlags fl ) diff --git a/filters/kword/latex/export/latexexportIface.cpp b/filters/kword/latex/export/latexexportIface.cpp index 102845b10..9b715463d 100644 --- a/filters/kword/latex/export/latexexportIface.cpp +++ b/filters/kword/latex/export/latexexportIface.cpp @@ -26,7 +26,7 @@ * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ LatexExportIface::LatexExportIface(KWordLatexExportDia* dia) : DCOPObject("FilterConfigDia") diff --git a/filters/kword/msword/texthandler.cpp b/filters/kword/msword/texthandler.cpp index 0e6dfdc45..d195756fa 100644 --- a/filters/kword/msword/texthandler.cpp +++ b/filters/kword/msword/texthandler.cpp @@ -515,7 +515,7 @@ TQString KWordTextHandler::getFont(unsigned fc) const for (i = 0; i < ENTRIES; i++) { // The loop will leave unchanged any MS font name not fuzzy-matched. - if (font.find(fuzzyLookup[i][0], 0, FALSE) != -1) + if (font.find(fuzzyLookup[i][0], 0, false) != -1) { font = fuzzyLookup[i][1]; break; diff --git a/filters/kword/palmdoc/palmdb.cpp b/filters/kword/palmdoc/palmdb.cpp index 50471ede1..f411adabe 100644 --- a/filters/kword/palmdoc/palmdb.cpp +++ b/filters/kword/palmdoc/palmdb.cpp @@ -45,7 +45,7 @@ PalmDB::PalmDB() setCreator( TQString() ); // crash if autodelete ? - records.setAutoDelete( TRUE ); + records.setAutoDelete( true ); } PalmDB::~PalmDB() @@ -58,13 +58,13 @@ bool PalmDB::load( const char* filename ) // open input file TQFile in (filename); if (!in.open (IO_ReadOnly)) - return FALSE; + return false; TQDataStream stream; stream.setDevice (&in); unsigned filesize = stream.device()->size(); - if( filesize < 72 ) return FALSE; + if( filesize < 72 ) return false; // always big-endian stream.setByteOrder (TQDataStream::BigEndian); @@ -194,7 +194,7 @@ bool PalmDB::load( const char* filename ) // close input file in.close(); - return TRUE; + return true; } bool PalmDB::save( const char* filename ) @@ -202,7 +202,7 @@ bool PalmDB::save( const char* filename ) // open output file TQFile out( filename ); if( !out.open( IO_WriteOnly ) ) - return FALSE; + return false; TQDataStream stream; stream.setDevice( &out ); @@ -321,7 +321,7 @@ bool PalmDB::save( const char* filename ) // close output file out.close(); - return TRUE; + return true; } void PalmDB::setType( const TQString& t ) diff --git a/filters/kword/palmdoc/palmdoc.cpp b/filters/kword/palmdoc/palmdoc.cpp index 9898ad00c..1d62dfa78 100644 --- a/filters/kword/palmdoc/palmdoc.cpp +++ b/filters/kword/palmdoc/palmdoc.cpp @@ -42,14 +42,14 @@ bool PalmDoc::load( const char* filename ) if( !ok ) { m_result = PalmDoc::ReadError; - return FALSE; + return false; } if( type() != "TEXt" ) { tqDebug( "Type is \"%s\", not \"TEXt\", so this is not Palm DOC!", type().latin1() ); m_result = PalmDoc::InvalidFormat; - return FALSE; + return false; } if( creator() != "REAd" ) @@ -57,7 +57,7 @@ bool PalmDoc::load( const char* filename ) tqDebug( "Creator is \"%s\", not \"REAd\", so this is not Palm DOC!", creator().latin1() ); m_result = PalmDoc::InvalidFormat; - return FALSE; + return false; } // must have at least two records @@ -65,7 +65,7 @@ bool PalmDoc::load( const char* filename ) { tqDebug( "Palm DOC has at least 2 records!" ); m_result = PalmDoc::InvalidFormat; - return FALSE; + return false; } // the very first record is DOC header @@ -82,7 +82,7 @@ bool PalmDoc::load( const char* filename ) { tqDebug( "Unknown format of document!" ); m_result = PalmDoc::InvalidFormat; - return FALSE; + return false; } // initialize @@ -110,7 +110,7 @@ bool PalmDoc::load( const char* filename ) // done m_result = OK; - return TRUE; + return true; } bool PalmDoc::save( const char* filename ) @@ -165,12 +165,12 @@ bool PalmDoc::save( const char* filename ) if( !ok ) { m_result = WriteError; - return FALSE; + return false; } // done m_result = OK; - return TRUE; + return true; } // TODO describe in brief about compression algorithm diff --git a/filters/kword/palmdoc/palmdocexport.cpp b/filters/kword/palmdoc/palmdocexport.cpp index 37f8d9cf2..f4e88b179 100644 --- a/filters/kword/palmdoc/palmdocexport.cpp +++ b/filters/kword/palmdoc/palmdocexport.cpp @@ -64,7 +64,7 @@ private: bool PalmDocWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { outfile = filenameOut; - return TRUE; + return true; } bool PalmDocWorker::doCloseFile(void) @@ -80,24 +80,24 @@ bool PalmDocWorker::doCloseFile(void) doc.setText( text ); doc.save( outfile.latin1() ); - return TRUE; + return true; } bool PalmDocWorker::doOpenDocument(void) { text = TQString(); - return TRUE; + return true; } bool PalmDocWorker::doCloseDocument(void) { - return TRUE; + return true; } bool PalmDocWorker::doFullDocumentInfo( const KWEFDocumentInfo& docInfo ) { title = docInfo.title; - return TRUE; + return true; } bool PalmDocWorker::doFullParagraph(const TQString& paraText, @@ -107,7 +107,7 @@ bool PalmDocWorker::doFullParagraph(const TQString& paraText, text.append( paraText ); text.append( "\n\n" ); - return TRUE; + return true; } PalmDocExport::PalmDocExport( KoFilter *, const char *, const TQStringList& ): diff --git a/filters/kword/palmdoc/palmdocimport.cpp b/filters/kword/palmdoc/palmdocimport.cpp index a1e8107bc..fa420eaed 100644 --- a/filters/kword/palmdoc/palmdocimport.cpp +++ b/filters/kword/palmdoc/palmdocimport.cpp @@ -156,7 +156,7 @@ TQString PalmDocImport::processPlainDocument( TQString plaindoc ) TQString prolog, content, epilog; TQStringList paragraphs; - paragraphs = TQStringList::split( "\n\n", plaindoc, TRUE ); + paragraphs = TQStringList::split( "\n\n", plaindoc, true ); for( unsigned int i = 0; i < paragraphs.count(); i++ ) { TQString text = paragraphs[i]; diff --git a/filters/kword/wml/wmlexport.cpp b/filters/kword/wml/wmlexport.cpp index df6dd3d5a..b2ed27119 100644 --- a/filters/kword/wml/wmlexport.cpp +++ b/filters/kword/wml/wmlexport.cpp @@ -62,18 +62,18 @@ class WMLWorker : public KWEFBaseWorker bool WMLWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { filename = filenameOut; - return TRUE; + return true; } bool WMLWorker::doCloseFile(void) { TQFile out( filename ); if( !out.open( IO_WriteOnly ) ) - return FALSE; + return false; TQTextStream stream; stream.setDevice( &out ); stream << result; - return TRUE; + return true; } bool WMLWorker::doOpenDocument(void) @@ -84,16 +84,16 @@ bool WMLWorker::doOpenDocument(void) result += "<wml>\n"; result += "<card>\n"; - m_bold = m_italic = m_underline = FALSE; + m_bold = m_italic = m_underline = false; - return TRUE; + return true; } bool WMLWorker::doCloseDocument(void) { result += "</card>\n"; result += "</wml>"; - return TRUE; + return true; } bool WMLWorker::doFullParagraph(const TQString& paraText, @@ -114,7 +114,7 @@ bool WMLWorker::doFullParagraph(const TQString& paraText, partialText = text.mid( formatData.pos, formatData.len ); // escape the text - partialText = KWEFUtil::EscapeSgmlText( NULL, partialText, TRUE, TRUE ); + partialText = KWEFUtil::EscapeSgmlText( NULL, partialText, true, true ); // apply formatting m_bold = formatData.text.weight >= 75; @@ -137,7 +137,7 @@ bool WMLWorker::doFullParagraph(const TQString& paraText, result += "<p align=\"" + align + "\">" + wmlText + "</p>\n"; - return TRUE; + return true; } WMLExport::WMLExport( KoFilter *, const char *, const TQStringList& ): diff --git a/filters/kword/wml/wmlimport.cpp b/filters/kword/wml/wmlimport.cpp index 83e14d9f0..b713bec60 100644 --- a/filters/kword/wml/wmlimport.cpp +++ b/filters/kword/wml/wmlimport.cpp @@ -150,7 +150,7 @@ bool WMLConverter::doOpenCard( TQString id, TQString title ) if( m_title.isEmpty() ) m_title = ( !title.isEmpty() ) ? title : id; - return TRUE; + return true; } // FIXME is this right ? @@ -186,7 +186,7 @@ bool WMLConverter::doParagraph( TQString atext, WMLFormatList formatList, root.append( WMLLayoutAsXML( layout) ); root.append( "</PARAGRAPH>\n" ); - return TRUE; + return true; } void WMLConverter::parse( const char* filename ) diff --git a/filters/kword/wml/wmlparser.cpp b/filters/kword/wml/wmlparser.cpp index e704061a7..3054cf9dc 100644 --- a/filters/kword/wml/wmlparser.cpp +++ b/filters/kword/wml/wmlparser.cpp @@ -125,7 +125,7 @@ bool WMLHandler::startElement( const TQString&, const TQString&, if( tag == "p" ) { m_state.currentLayout = WMLLayout(); - m_inBlock = TRUE; + m_inBlock = true; if( m_state.currentFormat.bold || m_state.currentFormat.italic || m_state.currentFormat.underline || @@ -138,31 +138,31 @@ bool WMLHandler::startElement( const TQString&, const TQString&, if( align == "center" ) m_state.currentLayout.align = WMLLayout::Center; - return TRUE; + return true; } if(( tag == "b" ) || (tag == "strong") ) { - m_state.currentFormat.bold = TRUE; + m_state.currentFormat.bold = true; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if(( tag == "i" ) || (tag == "em") ) { - m_state.currentFormat.italic = TRUE; + m_state.currentFormat.italic = true; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if( tag == "u" ) { - m_state.currentFormat.underline = TRUE; + m_state.currentFormat.underline = true; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if( tag == "big" ) @@ -170,7 +170,7 @@ bool WMLHandler::startElement( const TQString&, const TQString&, m_state.currentFormat.fontsize = WMLFormat::Big; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if( tag == "small" ) @@ -178,7 +178,7 @@ bool WMLHandler::startElement( const TQString&, const TQString&, m_state.currentFormat.fontsize = WMLFormat::Small; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if( tag == "a" ) @@ -208,7 +208,7 @@ bool WMLHandler::startElement( const TQString&, const TQString&, if( tag == "tr" ) { m_state.tableRow++; - return TRUE; + return true; } // open table cell, keep in sync with <p> above @@ -216,13 +216,13 @@ bool WMLHandler::startElement( const TQString&, const TQString&, { m_state.tableCol++; m_state.currentLayout = WMLLayout(); - m_inBlock = TRUE; + m_inBlock = true; m_state.formatList.append( m_state.currentFormat ); return m_parser->doTableCell( m_state.tableRow, m_state.tableCol ); } // unhandled element - return TRUE; + return true; } bool WMLHandler::endElement( const TQString&, const TQString&, @@ -236,7 +236,7 @@ bool WMLHandler::endElement( const TQString&, const TQString&, if( tag == "card" ) { // forget </p> before </card> ? - m_inBlock = FALSE; + m_inBlock = false; if( !m_text.isEmpty() ) flushParagraph(); return m_parser->doCloseCard(); @@ -244,32 +244,32 @@ bool WMLHandler::endElement( const TQString&, const TQString&, if( tag == "p" ) { - m_inBlock = FALSE; + m_inBlock = false; return flushParagraph(); } if(( tag == "b" ) || (tag == "strong") ) { - m_state.currentFormat.bold = FALSE; + m_state.currentFormat.bold = false; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if(( tag == "i" ) || (tag == "em") ) { - m_state.currentFormat.italic = FALSE; + m_state.currentFormat.italic = false; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if( tag == "u" ) { - m_state.currentFormat.underline = FALSE; + m_state.currentFormat.underline = false; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if( tag == "big" ) @@ -277,7 +277,7 @@ bool WMLHandler::endElement( const TQString&, const TQString&, m_state.currentFormat.fontsize = WMLFormat::Normal; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if( tag == "small" ) @@ -285,7 +285,7 @@ bool WMLHandler::endElement( const TQString&, const TQString&, m_state.currentFormat.fontsize = WMLFormat::Normal; m_state.currentFormat.pos = m_text.length(); m_state.formatList.append( m_state.currentFormat ); - return TRUE; + return true; } if( tag == "a" ) @@ -305,17 +305,17 @@ bool WMLHandler::endElement( const TQString&, const TQString&, // close table row if( tag == "tr" ) - return TRUE; //skip + return true; //skip // close table cell, like </p> if( tag == "td" ) { - m_inBlock = FALSE; + m_inBlock = false; return flushParagraph(); } // unhandled - return TRUE; + return true; } bool WMLHandler::characters( const TQString& ch ) @@ -326,7 +326,7 @@ bool WMLHandler::characters( const TQString& ch ) if( m_inLink ) m_state.currentFormat.link.append( ch ); - return TRUE; + return true; } bool WMLHandler::flushParagraph() @@ -375,7 +375,7 @@ WMLFormat::WMLFormat() { pos = len = 0; fontsize = Normal; - bold = italic = underline = FALSE; + bold = italic = underline = false; link = ""; href = ""; } @@ -438,40 +438,40 @@ void WMLParser::parse( const char* filename ) bool WMLParser::doOpenDocument() { - return TRUE; + return true; } bool WMLParser::doCloseDocument() { - return TRUE; + return true; } bool WMLParser::doOpenCard( TQString, TQString ) { - return TRUE; + return true; } bool WMLParser::doCloseCard() { - return TRUE; + return true; } bool WMLParser::doParagraph( TQString, WMLFormatList, WMLLayout ) { - return TRUE; + return true; } bool WMLParser::doBeginTable() { - return TRUE; + return true; } bool WMLParser::doEndTable() { - return TRUE; + return true; } bool WMLParser::doTableCell( unsigned, unsigned ) { - return TRUE; + return true; } diff --git a/filters/kword/wordperfect/import/kwordfilter.cpp b/filters/kword/wordperfect/import/kwordfilter.cpp index 1b3b83df2..3a0701757 100644 --- a/filters/kword/wordperfect/import/kwordfilter.cpp +++ b/filters/kword/wordperfect/import/kwordfilter.cpp @@ -52,9 +52,9 @@ class KWordFormat KWordFormat::KWordFormat() { - bold = italic = underline = doubleunderline = FALSE; - striked = superscript = subscript = redline = FALSE; - color = highlight = FALSE; + bold = italic = underline = doubleunderline = false; + striked = superscript = subscript = redline = false; + color = highlight = false; red = green = blue = 0; bgred = bggreen = bgblue = 255; fontsize = 0.0; @@ -122,7 +122,7 @@ KWordFilter::parse (const TQString & filename) int frameLeftMargin = 36, frameRightMargin = 36; // quick hack if (!Parser::parse (filename)) - return FALSE; + return false; // this will force very last text and formatting to be flushed as well tokens.append( new Token( Token::HardReturn ) ); @@ -418,5 +418,5 @@ KWordFilter::parse (const TQString & filename) documentInfo += "</document-info>"; - return TRUE; + return true; } diff --git a/filters/kword/wordperfect/import/parser.cpp b/filters/kword/wordperfect/import/parser.cpp index 96a2559cc..95e899474 100644 --- a/filters/kword/wordperfect/import/parser.cpp +++ b/filters/kword/wordperfect/import/parser.cpp @@ -91,8 +91,8 @@ mapToAlign (int data) Parser::Parser () { - tokens.setAutoDelete( TRUE ); - packets.setAutoDelete( TRUE ); + tokens.setAutoDelete( true ); + packets.setAutoDelete( true ); } bool @@ -107,7 +107,7 @@ Parser::parse (const TQString & filename) TQDataStream stream; TQFile in (filename); if (!in.open (IO_ReadOnly)) - return FALSE; + return false; stream.setDevice (&in); // must be little-endian @@ -121,19 +121,19 @@ Parser::parse (const TQString & filename) // check first 4 bytes, must be (in hex): 0xFF, 0x57, 0x50, 0x43 if ((header[0] != 0xFF) || (header[1] != 0x57) || (header[2] != 0x50) || (header[3] != 0x43)) - return FALSE; + return false; // get document start unsigned m_docstart = header[4] + (header[5] << 8) + (header[6] << 16) + (header[7] << 24); if (m_docstart > stream.device ()->size ()) - return FALSE; + return false; // check document type unsigned product_type = header[8]; unsigned file_type = header[9]; if ((product_type != 1) || (file_type != 10)) - return FALSE; + return false; // check document format version: for WP 5.x or WP 6/7/8 // major 0 means WP 5.x, otherwise WP 6/7/8 @@ -143,11 +143,11 @@ Parser::parse (const TQString & filename) // do not accept other than 0 (WP 5.x) and 2 (WP 6/7/8) if ( (major_version != 0) && (major_version != 2) ) - return FALSE; + return false; // check if this is encrypted unsigned encrypt_hash = header[12] + (header[13] << 8); - if ( encrypt_hash ) return FALSE; + if ( encrypt_hash ) return false; in.close (); @@ -159,7 +159,7 @@ Parser::parse (const TQString & filename) if ( major_version == 0 ) parseDocWP5 ( filename, m_docstart ); else parseDocWP6 ( filename, m_docstart ); - return TRUE; + return true; } void diff --git a/filters/kword/wordperfect/import/parser.h b/filters/kword/wordperfect/import/parser.h index 9fa880527..4ead85f7c 100644 --- a/filters/kword/wordperfect/import/parser.h +++ b/filters/kword/wordperfect/import/parser.h @@ -170,7 +170,7 @@ namespace WP /** * Parses given filename. - * @returns TRUE if parsing was successful, otherwise FALSE. + * @returns true if parsing was successful, otherwise false. * */ bool parse (const TQString & filename); |