From 47d4f141d6a5436e20f10ea62d48a5b3051e3718 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 23 Jul 2004 22:01:58 +0000 Subject: - Code cleanup. --- src/rtfparser.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/rtfparser.cpp') diff --git a/src/rtfparser.cpp b/src/rtfparser.cpp index 78945b6..738ab50 100644 --- a/src/rtfparser.cpp +++ b/src/rtfparser.cpp @@ -36,20 +36,18 @@ * */ -// RENAME RTFParser.cpp - #include "usuals.h" #include #include -#include "rtfreader.h" +#include "rtfparser.h" /* ---------------------------------------------------------------------------------- * CONSTRUCTION */ -RTFParser::RTFParser() +RtfParser::RtfParser() { m_handler = NULL; m_depth = 0; @@ -59,7 +57,7 @@ RTFParser::RTFParser() m_uniEatStack.push(0); } -RTFParser::~RTFParser() +RtfParser::~RtfParser() { } @@ -69,7 +67,7 @@ RTFParser::~RTFParser() * PUBLIC METHODS */ -bool RTFParser::parse(string fileName) +bool RtfParser::parse(string fileName) { FILE* file = fopen(fileName.c_str(), "r"); if(!file) @@ -82,7 +80,7 @@ bool RTFParser::parse(string fileName) return ret; } -bool RTFParser::parse(FILE* file) +bool RtfParser::parse(FILE* file) { int ch = 0; @@ -186,7 +184,7 @@ done: * HANDLER CALLS */ -void RTFParser::flushData(RtfContext& cx) +void RtfParser::flushData(RtfContext& cx) { if(!cx.data.empty()) { @@ -197,7 +195,7 @@ void RTFParser::flushData(RtfContext& cx) } } -void RTFParser::sendData(RtfContext& cx, wchar_t ch) +void RtfParser::sendData(RtfContext& cx, wchar_t ch) { // Skip unicode chars we've been asked to if(m_uniEat > 0) @@ -207,7 +205,7 @@ void RTFParser::sendData(RtfContext& cx, wchar_t ch) cx.data.append(1, ch); } -void RTFParser::sendData(RtfContext& cx, wstring data) +void RtfParser::sendData(RtfContext& cx, wstring data) { // Skip any unicode chars we've been asked to if(m_uniEat > 0) @@ -225,7 +223,7 @@ void RTFParser::sendData(RtfContext& cx, wstring data) } } -void RTFParser::sendControlWord(RtfContext& cx, string cw, int flags, int param) +void RtfParser::sendControlWord(RtfContext& cx, string cw, int flags, int param) { flushData(cx); @@ -238,7 +236,7 @@ void RTFParser::sendControlWord(RtfContext& cx, string cw, int flags, int param) * PARSE HELPERS */ -bool RTFParser::parseHexChar(RtfContext& cx, int num) +bool RtfParser::parseHexChar(RtfContext& cx, int num) { string data; @@ -283,7 +281,7 @@ bool RTFParser::parseHexChar(RtfContext& cx, int num) return true; } -bool RTFParser::parseControlWord(RtfContext& cx) +bool RtfParser::parseControlWord(RtfContext& cx) { bool isAsterisk = false; string controlword; -- cgit v1.2.3