r22585 by jghali - XtgScanner refactoring: prefix private members with m_

scribus-commit scribus-commit at lists.scribus.net
Sun Jun 17 23:57:11 UTC 2018


Author: jghali
Date: Sun Jun 17 23:57:10 2018
New Revision: 22585

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22585
Log:
XtgScanner refactoring: prefix private members with m_

Modified:
    trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
    trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h

Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22585&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	Sun Jun 17 23:57:10 2018
@@ -43,26 +43,26 @@
 
 XtgScanner::XtgScanner(PageItem *item, bool textOnly, bool prefix, bool append)
     : m_item(item),
-    importTextOnly(textOnly),
+    m_importTextOnly(textOnly),
     m_prefixName(prefix),
     m_append(append),
-    newlineFlag(false),
-    xflag(false),
-    inDef(false),
+    m_newlineFlag(false),
+    m_xflag(false),
+    m_inDef(false),
 	m_bufferIndex(0),
-    top(0),
-    define(0),
+    m_textIndex(0),
+    m_define(0),
     m_isBold(false),
     m_isItalic(false),
 	m_decoder(nullptr)
 {
-	doc = item->doc();
+	m_doc = item->doc();
 	initTagMode();
 	initTextMode();
 	initNameMode();
 	initLanguages();
-	prevMode = textMode;
-	styleEffects = ScStyle_None;
+	m_prevMode = textMode;
+	m_styleEffects = ScStyle_None;
 
 	QTextCodec* codec = QTextCodec::codecForName("cp1252");
 	if (!codec)
@@ -80,62 +80,62 @@
 {
 	bool forceUTF8 = false;
 
-	input_Buffer.clear();
-	decoded_text.clear();
+	m_inputBuffer.clear();
+	m_decodedText.clear();
 	if (m_decoder)
 	{
 		delete m_decoder;
 		m_decoder = nullptr;
 	}
 
-	newlineFlag = false;
-	xflag = false;
-	inDef = false;
+	m_newlineFlag = false;
+	m_xflag = false;
+	m_inDef = false;
 	m_bufferIndex = 0;
-	top = 0;
-	textToAppend.clear();
-	token.clear();
-	sfcName.clear();
-	define = 0;
+	m_textIndex = 0;
+	m_textToAppend.clear();
+	m_token.clear();
+	m_sfcName.clear();
+	m_define = 0;
 	m_isBold = false;
 	m_isItalic = false;
 
-	if (!loadRawBytes(fileName, input_Buffer))
+	if (!loadRawBytes(fileName, m_inputBuffer))
 		return false;
-	if (input_Buffer.size() >= 2)
-	{
-		if ((input_Buffer[0] == '\xFF') && (input_Buffer[1] == '\xFE'))
+	if (m_inputBuffer.size() >= 2)
+	{
+		if ((m_inputBuffer[0] == '\xFF') && (m_inputBuffer[1] == '\xFE'))
 		{
 			QTextCodec* utf8Codec  = QTextCodec::codecForName("UTF-8");
 			QTextCodec* utf16Codec = QTextCodec::codecForName("UTF-16LE");
 			if (!utf8Codec || !utf16Codec)
 				return false;
-			QString text = utf16Codec->toUnicode(input_Buffer.constData(), input_Buffer.length());
-			input_Buffer = utf8Codec->fromUnicode(text);
+			QString text = utf16Codec->toUnicode(m_inputBuffer.constData(), m_inputBuffer.length());
+			m_inputBuffer = utf8Codec->fromUnicode(text);
 			forceUTF8 = true;
 		}
-		else if ((input_Buffer[0] == '\xFE') && (input_Buffer[1] == '\xFF'))
+		else if ((m_inputBuffer[0] == '\xFE') && (m_inputBuffer[1] == '\xFF'))
 		{
 			QTextCodec* utf8Codec = QTextCodec::codecForName("UTF-8");
 			QTextCodec* utf16Codec = QTextCodec::codecForName("UTF-16BE");
 			if (!utf8Codec || !utf16Codec)
 				return false;
-			QString text = utf16Codec->toUnicode(input_Buffer.constData(), input_Buffer.length());
-			input_Buffer = utf8Codec->fromUnicode(text);
+			QString text = utf16Codec->toUnicode(m_inputBuffer.constData(), m_inputBuffer.length());
+			m_inputBuffer = utf8Codec->fromUnicode(text);
 			forceUTF8  = true;
 		}
 	}
-	Mode = prevMode = textMode;
-	styleEffects = ScStyle_None;
+	m_mode = m_prevMode = textMode;
+	m_styleEffects = ScStyle_None;
 
 	QTextCodec* codec = QTextCodec::codecForName(forceUTF8 ? "UTF-8" : "cp1252");
 	if (!codec)
 		codec = QTextCodec::codecForLocale();
 	m_decoder = new QTextDecoder(codec, QTextCodec::IgnoreHeader);
 
-	if (input_Buffer.size() > 0)
-		decoded_text.reserve(input_Buffer.size());
-	return (input_Buffer.size() > 0);
+	if (m_inputBuffer.size() > 0)
+		m_decodedText.reserve(m_inputBuffer.size());
+	return (m_inputBuffer.size() > 0);
 }
 
 /** Initialise a QHash which maps the values of n## to corresponding language strings
@@ -178,98 +178,98 @@
 	languages.insert(62,"Ukranian");
 }
 
-/** Initialise the tagModeHash with the tokens returned in tagMode and its corresponding function pointers */
+/** Initialise the m_tagModeHash with the tokens returned in tagMode and its corresponding function pointers */
 
 void XtgScanner::initTagMode()
 {
-	tagModeHash.insert("P",&XtgScanner::setPlain);
-	tagModeHash.insert("B",&XtgScanner::setBold);
-	tagModeHash.insert("I",&XtgScanner::setItalics);
-	tagModeHash.insert("O",&XtgScanner::setOutline);
-	tagModeHash.insert("S",&XtgScanner::setShadow);
-	tagModeHash.insert("U",&XtgScanner::setUnderline);
-	tagModeHash.insert("W",&XtgScanner::setWordUnder);
-	tagModeHash.insert("/",&XtgScanner::setStrikethrough);
-	tagModeHash.insert("R",&XtgScanner::setDoubleStrike);
-	tagModeHash.insert("K",&XtgScanner::setAllCaps);
-	tagModeHash.insert("H",&XtgScanner::setSmallCaps);
-	tagModeHash.insert("+",&XtgScanner::setSuperscript);
-	tagModeHash.insert("-",&XtgScanner::setSubscript);
-	tagModeHash.insert("V",&XtgScanner::setSuperior);
-	tagModeHash.insert("f",&XtgScanner::setFont);
-	tagModeHash.insert("z",&XtgScanner::setFontSize);
-	tagModeHash.insert("c",&XtgScanner::setColor);
-	tagModeHash.insert("s",&XtgScanner::setShade);
-	tagModeHash.insert("h",&XtgScanner::setHorizontalScale);
-	tagModeHash.insert("k",&XtgScanner::setKern);
-	tagModeHash.insert("t",&XtgScanner::setTrack);
-	tagModeHash.insert("b",&XtgScanner::setBaseLineShift);
-	tagModeHash.insert("y",&XtgScanner::setVerticalScale);
-	tagModeHash.insert("G",&XtgScanner::setLigatures);
-	tagModeHash.insert("p",&XtgScanner::csetOpacity);
-	tagModeHash.insert("o",&XtgScanner::setOpenType);
-	tagModeHash.insert("*A",&XtgScanner::setCharAlignment);
-	tagModeHash.insert("L",&XtgScanner::setVertStories);
-	tagModeHash.insert("M",&XtgScanner::setEmphasisMarks);
-	tagModeHash.insert("Y",&XtgScanner::setAsncjk);//Apply sending to non-CJK characters.
-	tagModeHash.insert("n",&XtgScanner::setLanguages);
-	tagModeHash.insert("A(",&XtgScanner::setXPresOwn); //Apply features like Rubi text, group characters & hyperlink
-	tagModeHash.insert("*L",&XtgScanner::setAlignLeft);
-	tagModeHash.insert("*C",&XtgScanner::setAlignCenter);
-	tagModeHash.insert("*R",&XtgScanner::setAlignRight);
-	tagModeHash.insert("*J",&XtgScanner::setAlignJustify);
-	tagModeHash.insert("*F",&XtgScanner::setAlignFJustify);
-	tagModeHash.insert("*t",&XtgScanner::setTabStops);
-	tagModeHash.insert("*p",&XtgScanner::setPAttributes);
-	tagModeHash.insert("*h",&XtgScanner::setHyphenation);
-	tagModeHash.insert("*ra",&XtgScanner::setPRuleAbove);
-	tagModeHash.insert("*rb",&XtgScanner::setPRuleBelow);
-	tagModeHash.insert("*d",&XtgScanner::setDropCap);
-	tagModeHash.insert("*kn",&XtgScanner::setKeepNextPar);
-	tagModeHash.insert("*kt",&XtgScanner::setKeepTogether);
-	tagModeHash.insert("*s",&XtgScanner::setHangingCSet);
-	tagModeHash.insert("DoO",&XtgScanner::setGlyph);
-	tagModeHash.insert("EX",&XtgScanner::setTranscodeSeq);
-	tagModeHash.insert("DO",&XtgScanner::setUnencodedGlyph);
-
-	tagModeHash.insert("@>",&XtgScanner::applyCStyle1);
-	tagModeHash.insert("@$",&XtgScanner::applyCStyle2);
-	tagModeHash.insert("@$p",&XtgScanner::applyCStyle3);
-	tagModeHash.insert("$$",&XtgScanner::applyCStyle4);
-	tagModeHash.insert("a$",&XtgScanner::applyCStyle5);
-	tagModeHash.insert("a$$",&XtgScanner::applyCStyle6);
-
-	tagModeHash.insert("$",&XtgScanner::setTypeStyle);
-
-	tagModeHash.insert("\\@",&XtgScanner::appendSpChar1);
-	tagModeHash.insert("x",&XtgScanner::xFlag);
-	tagModeHash.insert("\\<",&XtgScanner::appendSpChar2);
-	tagModeHash.insert("\\",&XtgScanner::appendSpChar3);
-	tagModeHash.insert(">",&XtgScanner::defClose);
-	tagModeHash.insert("e",&XtgScanner::setEncoding);
+	m_tagModeHash.insert("P",&XtgScanner::setPlain);
+	m_tagModeHash.insert("B",&XtgScanner::setBold);
+	m_tagModeHash.insert("I",&XtgScanner::setItalics);
+	m_tagModeHash.insert("O",&XtgScanner::setOutline);
+	m_tagModeHash.insert("S",&XtgScanner::setShadow);
+	m_tagModeHash.insert("U",&XtgScanner::setUnderline);
+	m_tagModeHash.insert("W",&XtgScanner::setWordUnder);
+	m_tagModeHash.insert("/",&XtgScanner::setStrikethrough);
+	m_tagModeHash.insert("R",&XtgScanner::setDoubleStrike);
+	m_tagModeHash.insert("K",&XtgScanner::setAllCaps);
+	m_tagModeHash.insert("H",&XtgScanner::setSmallCaps);
+	m_tagModeHash.insert("+",&XtgScanner::setSuperscript);
+	m_tagModeHash.insert("-",&XtgScanner::setSubscript);
+	m_tagModeHash.insert("V",&XtgScanner::setSuperior);
+	m_tagModeHash.insert("f",&XtgScanner::setFont);
+	m_tagModeHash.insert("z",&XtgScanner::setFontSize);
+	m_tagModeHash.insert("c",&XtgScanner::setColor);
+	m_tagModeHash.insert("s",&XtgScanner::setShade);
+	m_tagModeHash.insert("h",&XtgScanner::setHorizontalScale);
+	m_tagModeHash.insert("k",&XtgScanner::setKern);
+	m_tagModeHash.insert("t",&XtgScanner::setTrack);
+	m_tagModeHash.insert("b",&XtgScanner::setBaseLineShift);
+	m_tagModeHash.insert("y",&XtgScanner::setVerticalScale);
+	m_tagModeHash.insert("G",&XtgScanner::setLigatures);
+	m_tagModeHash.insert("p",&XtgScanner::csetOpacity);
+	m_tagModeHash.insert("o",&XtgScanner::setOpenType);
+	m_tagModeHash.insert("*A",&XtgScanner::setCharAlignment);
+	m_tagModeHash.insert("L",&XtgScanner::setVertStories);
+	m_tagModeHash.insert("M",&XtgScanner::setEmphasisMarks);
+	m_tagModeHash.insert("Y",&XtgScanner::setAsncjk);//Apply sending to non-CJK characters.
+	m_tagModeHash.insert("n",&XtgScanner::setLanguages);
+	m_tagModeHash.insert("A(",&XtgScanner::setXPresOwn); //Apply features like Rubi text, group characters & hyperlink
+	m_tagModeHash.insert("*L",&XtgScanner::setAlignLeft);
+	m_tagModeHash.insert("*C",&XtgScanner::setAlignCenter);
+	m_tagModeHash.insert("*R",&XtgScanner::setAlignRight);
+	m_tagModeHash.insert("*J",&XtgScanner::setAlignJustify);
+	m_tagModeHash.insert("*F",&XtgScanner::setAlignFJustify);
+	m_tagModeHash.insert("*t",&XtgScanner::setTabStops);
+	m_tagModeHash.insert("*p",&XtgScanner::setPAttributes);
+	m_tagModeHash.insert("*h",&XtgScanner::setHyphenation);
+	m_tagModeHash.insert("*ra",&XtgScanner::setPRuleAbove);
+	m_tagModeHash.insert("*rb",&XtgScanner::setPRuleBelow);
+	m_tagModeHash.insert("*d",&XtgScanner::setDropCap);
+	m_tagModeHash.insert("*kn",&XtgScanner::setKeepNextPar);
+	m_tagModeHash.insert("*kt",&XtgScanner::setKeepTogether);
+	m_tagModeHash.insert("*s",&XtgScanner::setHangingCSet);
+	m_tagModeHash.insert("DoO",&XtgScanner::setGlyph);
+	m_tagModeHash.insert("EX",&XtgScanner::setTranscodeSeq);
+	m_tagModeHash.insert("DO",&XtgScanner::setUnencodedGlyph);
+
+	m_tagModeHash.insert("@>",&XtgScanner::applyCStyle1);
+	m_tagModeHash.insert("@$",&XtgScanner::applyCStyle2);
+	m_tagModeHash.insert("@$p",&XtgScanner::applyCStyle3);
+	m_tagModeHash.insert("$$",&XtgScanner::applyCStyle4);
+	m_tagModeHash.insert("a$",&XtgScanner::applyCStyle5);
+	m_tagModeHash.insert("a$$",&XtgScanner::applyCStyle6);
+
+	m_tagModeHash.insert("$",&XtgScanner::setTypeStyle);
+
+	m_tagModeHash.insert("\\@",&XtgScanner::appendSpChar1);
+	m_tagModeHash.insert("x",&XtgScanner::xFlag);
+	m_tagModeHash.insert("\\<",&XtgScanner::appendSpChar2);
+	m_tagModeHash.insert("\\",&XtgScanner::appendSpChar3);
+	m_tagModeHash.insert(">",&XtgScanner::defClose);
+	m_tagModeHash.insert("e",&XtgScanner::setEncoding);
 }
 
 /** Initialise the textModeHash with tokens returned in textMode and its corresponding function pointers */
 
 void XtgScanner::initTextMode()
 {
-	textModeHash.insert("\n",&XtgScanner::defNewLine);
-	textModeHash.insert("<",&XtgScanner::defOpen);
-	textModeHash.insert("@",&XtgScanner::defAtRate);
-	textModeHash.insert("\r",&XtgScanner::defHardReturn);
+	m_textModeHash.insert("\n",&XtgScanner::defNewLine);
+	m_textModeHash.insert("<",&XtgScanner::defOpen);
+	m_textModeHash.insert("@",&XtgScanner::defAtRate);
+	m_textModeHash.insert("\r",&XtgScanner::defHardReturn);
 }
 
 /** Initialise the nameModeHash with tokens returned in nameMode and its corresponding function pointers */
 
 void XtgScanner::initNameMode()
 {
-	nameModeHash.insert("[F]",&XtgScanner::defFontSet);
-	nameModeHash.insert("[C]",&XtgScanner::defColor);
-	nameModeHash.insert("[S\"",&XtgScanner::definePStyles);
-	nameModeHash.insert("[Sp",&XtgScanner::definePStyles);
-	nameModeHash.insert("[St",&XtgScanner::defineCStyle);
-	nameModeHash.insert("=",&XtgScanner::defEquals);
-	nameModeHash.insert(":",&XtgScanner::defColon);
+	m_nameModeHash.insert("[F]",&XtgScanner::defFontSet);
+	m_nameModeHash.insert("[C]",&XtgScanner::defColor);
+	m_nameModeHash.insert("[S\"",&XtgScanner::definePStyles);
+	m_nameModeHash.insert("[Sp",&XtgScanner::definePStyles);
+	m_nameModeHash.insert("[St",&XtgScanner::defineCStyle);
+	m_nameModeHash.insert("=",&XtgScanner::defEquals);
+	m_nameModeHash.insert(":",&XtgScanner::defColon);
 }
 
 /** Function for each tokens in tagMode. Each token is hashed with corresponding function pointers
@@ -277,8 +277,8 @@
 
 void XtgScanner::setPlain()
 {
-	styleEffects = ScStyle_None;
-	currentCharStyle.setFeatures(styleEffects.featureList());
+	m_styleEffects = ScStyle_None;
+	m_currentCharStyle.setFeatures(m_styleEffects.featureList());
 	m_isBold = true;
 	m_isItalic = false;
 	setBold();
@@ -288,11 +288,11 @@
 void XtgScanner::setBold()
 {
 	m_isBold = !m_isBold;
-//	QString fam = currentCharStyle.font().family();
+//	QString fam = m_currentCharStyle.font().family();
 	int posC = m_item->itemText.length();
 	m_item->itemText.insertChars(posC, "B");
-	m_item->itemText.applyStyle(posC, currentParagraphStyle);
-	m_item->itemText.applyCharStyle(posC, 1, currentCharStyle);
+	m_item->itemText.applyStyle(posC, m_currentParagraphStyle);
+	m_item->itemText.applyCharStyle(posC, 1, m_currentCharStyle);
 	QString fam = m_item->itemText.charStyle(posC).font().family();
 	m_item->itemText.removeChars(posC, 1);
 	if (fam.isEmpty())
@@ -303,20 +303,20 @@
 		if (m_isItalic)
 		{
 			if (slist.contains("Bold Italic"))
-				currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
+				m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
 		}
 		else if (slist.contains("Bold"))
-			currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
+			m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
 	}
 	else
 	{
 		if (m_isItalic)
 		{
 			if (slist.contains("Italic"))
-				currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
+				m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
 		}
 		else if (slist.contains("Regular"))
-			currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
+			m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
 	}
 }
 
@@ -325,11 +325,11 @@
 	m_isItalic = !m_isItalic;
 	int posC = m_item->itemText.length();
 	m_item->itemText.insertChars(posC, "B");
-	m_item->itemText.applyStyle(posC, currentParagraphStyle);
-	m_item->itemText.applyCharStyle(posC, 1, currentCharStyle);
+	m_item->itemText.applyStyle(posC, m_currentParagraphStyle);
+	m_item->itemText.applyCharStyle(posC, 1, m_currentCharStyle);
 	QString fam = m_item->itemText.charStyle(posC).font().family();
 	m_item->itemText.removeChars(posC, 1);
-//	QString fam = currentCharStyle.font().family();
+//	QString fam = m_currentCharStyle.font().family();
 	if (fam.isEmpty())
 		return;
 	QStringList slist = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts.fontMap[fam];
@@ -338,20 +338,20 @@
 		if (m_isBold)
 		{
 			if (slist.contains("Bold Italic"))
-				currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
+				m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold Italic"]);
 		}
 		else if (slist.contains("Italic"))
-			currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
+			m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Italic"]);
 	}
 	else
 	{
 		if (m_isBold)
 		{
 			if (slist.contains("Bold"))
-				currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
+				m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Bold"]);
 		}
 		else if (slist.contains("Regular"))
-			currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
+			m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[fam + " Regular"]);
 	}
 }
 
@@ -367,13 +367,13 @@
 
 void XtgScanner::setUnderline()
 {
-	styleEffects &= ~ScStyle_UnderlineWords;
+	m_styleEffects &= ~ScStyle_UnderlineWords;
 	applyFeature(ScStyle_Underline);
 }
 
 void XtgScanner::setWordUnder()
 {
-	styleEffects &= ~ScStyle_Underline;
+	m_styleEffects &= ~ScStyle_Underline;
 	applyFeature(ScStyle_UnderlineWords);
 }
 
@@ -384,52 +384,52 @@
 
 void XtgScanner::setDoubleStrike()
 {
-	styleEffects &= ~ScStyle_Strikethrough;
-	currentCharStyle.setFeatures(styleEffects.featureList());
-	unSupported.insert(token);
+	m_styleEffects &= ~ScStyle_Strikethrough;
+	m_currentCharStyle.setFeatures(m_styleEffects.featureList());
+	m_unsupported.insert(m_token);
 }
 
 void XtgScanner::setAllCaps()
 {
-	styleEffects &= ~ScStyle_SmallCaps;
+	m_styleEffects &= ~ScStyle_SmallCaps;
 	applyFeature(ScStyle_AllCaps);
 }
 
 void XtgScanner::setSmallCaps()
 {
-	styleEffects &= ~ScStyle_AllCaps;
+	m_styleEffects &= ~ScStyle_AllCaps;
 	applyFeature(ScStyle_SmallCaps);
 }
 
 void XtgScanner::setSuperscript()
 {
-	styleEffects &= ~ScStyle_Subscript;
+	m_styleEffects &= ~ScStyle_Subscript;
 	applyFeature(ScStyle_Superscript);
 }
 
 void XtgScanner::setSubscript()
 {
-	styleEffects &= ~ScStyle_Superscript;
+	m_styleEffects &= ~ScStyle_Superscript;
 	applyFeature(ScStyle_Subscript);
 }
 
 void XtgScanner::setSuperior()
 {
-	styleEffects &= ~ScStyle_Subscript;
+	m_styleEffects &= ~ScStyle_Subscript;
 	applyFeature(ScStyle_Superscript);
 }
 
 void XtgScanner::setFont()
 {
-	/** define/apply font */
-	flushText();
-	token = getToken();
+	/** m_define/apply font */
+	flushText();
+	m_token = getToken();
 	QString font = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
-	if (token != "$")
-		font = getFontName(token);
-	currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[font]);
-	if(!doc->UsedFonts.contains(font))
-		doc->AddFont(font);
+	if (m_token != "$")
+		font = getFontName(m_token);
+	m_currentCharStyle.setFont(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[font]);
+	if(!m_doc->UsedFonts.contains(font))
+		m_doc->AddFont(font);
 }
 
 QString XtgScanner::getFontName(const QString& name)
@@ -468,7 +468,7 @@
 	}
 
 	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
-	QScopedPointer<MissingFont> dia(new MissingFont(0, fontName, doc));
+	QScopedPointer<MissingFont> dia(new MissingFont(0, fontName, m_doc));
 	if (dia->exec())
 	{
 		PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = dia->getReplacementFont();
@@ -476,8 +476,8 @@
 	}
 	else
 	{
-		PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = doc->itemToolPrefs().textFont;
-		fontName = doc->itemToolPrefs().textFont;
+		PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = m_doc->itemToolPrefs().textFont;
+		fontName = m_doc->itemToolPrefs().textFont;
 	}
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 
@@ -487,16 +487,16 @@
 void XtgScanner::setFontSize()
 {
 	flushText();
-	token = getToken();
-	if (token == "$")
-		token = "12";
-	currentCharStyle.setFontSize( token.toDouble() * 10 );
+	m_token = getToken();
+	if (m_token == "$")
+		m_token = "12";
+	m_currentCharStyle.setFontSize( m_token.toDouble() * 10 );
 }
 
 void XtgScanner::setColor()
 {
 	flushText();
-	token = getToken();
+	m_token = getToken();
 
 	QHash<QString,QString> color;
 	color.insert("cC","Cyan");
@@ -504,82 +504,82 @@
 	color.insert("cY","Yellow");
 	color.insert("cK","Black");
 
-	if (token == "C" || token == "M" || token == "Y" || token == "K")
-	{
-		token = "c" + token; 
-		token = color.value(token);
-	}
-	else if (!doc->PageColors.contains(token))
-		token = "Black";
-	if (doc->PageColors.contains(token))
-		currentCharStyle.setFillColor(token);
+	if (m_token == "C" || m_token == "M" || m_token == "Y" || m_token == "K")
+	{
+		m_token = "c" + m_token; 
+		m_token = color.value(m_token);
+	}
+	else if (!m_doc->PageColors.contains(m_token))
+		m_token = "Black";
+	if (m_doc->PageColors.contains(m_token))
+		m_currentCharStyle.setFillColor(m_token);
 }
 
 void XtgScanner::setShade()
 {
 	flushText();
-	token = getToken();
-	if (token == "$")
-		token = "100";
-	currentCharStyle.setFillShade(token.toDouble());
+	m_token = getToken();
+	if (m_token == "$")
+		m_token = "100";
+	m_currentCharStyle.setFillShade(m_token.toDouble());
 
 }
 
 void XtgScanner::setHorizontalScale()
 {
 	flushText();
-	token = getToken();
-	if (token == "$")
-		token = "100";
-	currentCharStyle.setScaleH(token.toDouble() * 10.0);
+	m_token = getToken();
+	if (m_token == "$")
+		m_token = "100";
+	m_currentCharStyle.setScaleH(m_token.toDouble() * 10.0);
 }
 
 void XtgScanner::setKern()
 {
 	flushText();
-	token = getToken();
-	if (token == "$")
-		token = "0";
-//	currentCharStyle.setWordTracking((token.toDouble() * (currentCharStyle.fontSize() / 200.0)) / currentCharStyle.fontSize() * 10);
+	m_token = getToken();
+	if (m_token == "$")
+		m_token = "0";
+//	m_currentCharStyle.setWordTracking((m_token.toDouble() * (m_currentCharStyle.fontSize() / 200.0)) / m_currentCharStyle.fontSize() * 10);
 }
 
 void XtgScanner::setTrack()
 {
 	flushText();
-	token = getToken();
-	if (token == "$")
-		token = "0";
-//	currentCharStyle.setTracking((token.toDouble() * (currentCharStyle.fontSize() / 200.0)) / currentCharStyle.fontSize() * 10);
+	m_token = getToken();
+	if (m_token == "$")
+		m_token = "0";
+//	m_currentCharStyle.setTracking((m_token.toDouble() * (m_currentCharStyle.fontSize() / 200.0)) / m_currentCharStyle.fontSize() * 10);
 }
 
 void XtgScanner::setBaseLineShift()
 {
 	flushText();
-	token = getToken();
-	if (token == "$")
-		token = "0";
-	currentCharStyle.setBaselineOffset((token.toDouble() * 10000) / currentCharStyle.fontSize());
+	m_token = getToken();
+	if (m_token == "$")
+		m_token = "0";
+	m_currentCharStyle.setBaselineOffset((m_token.toDouble() * 10000) / m_currentCharStyle.fontSize());
 }
 
 void XtgScanner::setVerticalScale()
 {
 	flushText();
-	token = getToken();
-	if (token == "$")
-		token = "100";
-	currentCharStyle.setScaleV(token.toDouble() * 10.0);
+	m_token = getToken();
+	if (m_token == "$")
+		m_token = "100";
+	m_currentCharStyle.setScaleV(m_token.toDouble() * 10.0);
 }
 
 void XtgScanner::setLigatures()
 {
-	token = getToken();
-	unSupported.insert("G"+token);
+	m_token = getToken();
+	m_unsupported.insert("G"+m_token);
 }
 
 void XtgScanner::csetOpacity()
 {
-	token = getToken();
-	unSupported.insert("p"+token);
+	m_token = getToken();
+	m_unsupported.insert("p"+m_token);
 }
 
 void XtgScanner::setOpenType()
@@ -589,102 +589,102 @@
 
 void XtgScanner::setCharAlignment()
 {
-	token.append( nextSymbol() );
-	unSupported.insert(token);
+	m_token.append( nextSymbol() );
+	m_unsupported.insert(m_token);
 }
 
 void XtgScanner::setVertStories()
 {
-	token.append( nextSymbol() );
-	unSupported.insert(token);
+	m_token.append( nextSymbol() );
+	m_unsupported.insert(m_token);
 }
 
 void XtgScanner::setEmphasisMarks()
 {
-	token.append( nextSymbol() );
-	unSupported.insert(token);
+	m_token.append( nextSymbol() );
+	m_unsupported.insert(m_token);
 }
 
 void XtgScanner::setAsncjk()
 {
 	//Apply sending to non-CJK characters.
-	token.append( nextSymbol() );
-	unSupported.insert(token);
+	m_token.append( nextSymbol() );
+	m_unsupported.insert(m_token);
 }
 
 void XtgScanner::setLanguages()
 {
 	flushText();
-	token = getToken();
-/*	if (define == 0)
+	m_token = getToken();
+/*	if (m_define == 0)
 	{
 		flushText();
-		currentCharStyle.setLanguage( languages.value( token.toInt() ) );
-		writer->setCharStyle(currentCharStyle);
-		currentCharStyle = writer->getCurrentCharStyle();
-	}
-	if (define == 1)
-		defCharStyle.setLanguage( languages.value( token.toInt() ) );
-	if (define == 2)
-		defParagraphStyle.charStyle().setLanguage( languages.value( token.toInt() ) );	*/
+		m_currentCharStyle.setLanguage( languages.value( m_token.toInt() ) );
+		writer->setCharStyle(m_currentCharStyle);
+		m_currentCharStyle = writer->getCurrentCharStyle();
+	}
+	if (m_define == 1)
+		defCharStyle.setLanguage( languages.value( m_token.toInt() ) );
+	if (m_define == 2)
+		defParagraphStyle.charStyle().setLanguage( languages.value( m_token.toInt() ) );	*/
 }
 
 void XtgScanner::setXPresOwn()
 {
 
-	unSupported.insert(token+')');
+	m_unsupported.insert(m_token+')');
 	//All these tags are unsupported in Scribus, so just ignoring them till we find close paranthesis
 	while (lookAhead() != QChar(')'))
-		top=top+1;
-	top=top+1;//Ignore )
+		m_textIndex=m_textIndex+1;
+	m_textIndex=m_textIndex+1;//Ignore )
 }
 
 void XtgScanner::setAlignLeft()
 {
 	flushText();
-	currentParagraphStyle.setAlignment(ParagraphStyle::Leftaligned);
+	m_currentParagraphStyle.setAlignment(ParagraphStyle::Leftaligned);
 }
 
 void XtgScanner::setAlignCenter()
 {
 	flushText();
-	currentParagraphStyle.setAlignment(ParagraphStyle::Centered);
+	m_currentParagraphStyle.setAlignment(ParagraphStyle::Centered);
 }
 
 void XtgScanner::setAlignRight()
 {
 	flushText();
-	currentParagraphStyle.setAlignment(ParagraphStyle::Rightaligned);
+	m_currentParagraphStyle.setAlignment(ParagraphStyle::Rightaligned);
 }
 
 void XtgScanner::setAlignJustify()
 {
 	flushText();
-	currentParagraphStyle.setAlignment(ParagraphStyle::Justified);
+	m_currentParagraphStyle.setAlignment(ParagraphStyle::Justified);
 }
 
 void XtgScanner::setAlignFJustify()
 {
 	flushText();
-	currentParagraphStyle.setAlignment(ParagraphStyle::Extended);
+	m_currentParagraphStyle.setAlignment(ParagraphStyle::Extended);
 }
 
 void XtgScanner::setTabStops()
 {
-	QList<ParagraphStyle::TabRecord> tbs = currentParagraphStyle.tabValues();
+	QList<ParagraphStyle::TabRecord> tbs = m_currentParagraphStyle.tabValues();
 	tbs.clear();
 	if (lookAhead() == QChar('0'))
 	{
-		currentParagraphStyle.setTabValues(tbs);
+		m_currentParagraphStyle.setTabValues(tbs);
 		return;
 	}
 	while (lookAhead() != QChar(')'))
 	{
-		token = getToken();
-		double pos = token.toDouble();
-		token = getToken();
-		int typ = token.toInt();
-		token = getToken();
+		m_token = getToken();
+		double pos = m_token.toDouble();
+		m_token = getToken();
+		int typ = m_token.toInt();
+		m_token = getToken();
 		ParagraphStyle::TabRecord tb;
 		if (typ == 0)
 			tb.tabType = 0;
@@ -699,7 +699,7 @@
 		tb.tabFillChar = QChar();
 		tbs.append(tb);
 	}
-	currentParagraphStyle.setTabValues(tbs);
+	m_currentParagraphStyle.setTabValues(tbs);
 	
 }
 
@@ -711,56 +711,56 @@
 	double leading = getToken().toDouble();
 	double gapBefore = getToken().toDouble();
 	double gapAfter = getToken().toDouble();
-	top++;
-	token="";
-	token.append( nextSymbol() );
-	if ((token == "g") || (token == "G"))
+	m_textIndex++;
+	m_token="";
+	m_token.append( nextSymbol() );
+	if ((m_token == "g") || (m_token == "G"))
 	{
 		// We have to discard (P,S)) since it is not yet supported in Scribus
 
 		while (lookAhead() != QChar(')'))
-			top++;
-	}
-	currentParagraphStyle.setLeftMargin(leftIndent);
-	currentParagraphStyle.setRightMargin(rightIndent);
-	currentParagraphStyle.setFirstIndent(firstlineIndent);
-	currentParagraphStyle.setLineSpacing(leading);
-	currentParagraphStyle.setGapBefore(gapBefore);
-	currentParagraphStyle.setGapAfter(gapAfter);
-	if (token == "G")
-		currentParagraphStyle.setUseBaselineGrid(true);
-	if (token == "g")
-		currentParagraphStyle.setUseBaselineGrid(false);
+			m_textIndex++;
+	}
+	m_currentParagraphStyle.setLeftMargin(leftIndent);
+	m_currentParagraphStyle.setRightMargin(rightIndent);
+	m_currentParagraphStyle.setFirstIndent(firstlineIndent);
+	m_currentParagraphStyle.setLineSpacing(leading);
+	m_currentParagraphStyle.setGapBefore(gapBefore);
+	m_currentParagraphStyle.setGapAfter(gapAfter);
+	if (m_token == "G")
+		m_currentParagraphStyle.setUseBaselineGrid(true);
+	if (m_token == "g")
+		m_currentParagraphStyle.setUseBaselineGrid(false);
 }
 
 void XtgScanner::setHyphenation()
 {
-	unSupported.insert(token);
-	token=getToken();
+	m_unsupported.insert(m_token);
+	m_token=getToken();
 }
 
 void XtgScanner::setPRuleAbove()
 {
-	unSupported.insert(token);
+	m_unsupported.insert(m_token);
 	if (lookAhead() == QChar('0'))
 	{
-		top++;
+		m_textIndex++;
 		return;
 	}
 	while (lookAhead() != QChar(')'))
-		top++;
+		m_textIndex++;
 }
 
 void XtgScanner::setPRuleBelow()
 {
-	unSupported.insert(token);
+	m_unsupported.insert(m_token);
 	if (lookAhead() == QChar('0'))
 	{
-		top++;
+		m_textIndex++;
 		return;
 	}
 	while (lookAhead() != QChar(')'))
-		top++;
+		m_textIndex++;
 }
 
 void XtgScanner::setDropCap()
@@ -769,20 +769,20 @@
 	int charCount = getToken().toInt();
 	if (charCount == 0) //Specify No rule
 	{
-		currentParagraphStyle.setHasDropCap(false);
+		m_currentParagraphStyle.setHasDropCap(false);
 	}
 	else
 	{
 		int lineCount = getToken().toInt();
-		currentParagraphStyle.setHasDropCap(true);
-		currentParagraphStyle.setDropCapLines(lineCount);
+		m_currentParagraphStyle.setHasDropCap(true);
+		m_currentParagraphStyle.setDropCapLines(lineCount);
 	}
 }
 
 void XtgScanner::setKeepNextPar()
 {
-	token.append(nextSymbol());
-	unSupported.insert(token);
+	m_token.append(nextSymbol());
+	m_unsupported.insert(m_token);
 }
 
 void XtgScanner::setKeepTogether()
@@ -791,17 +791,17 @@
 	{
 		while (lookAhead() != QChar(')'))
 		{
-			token.append( nextSymbol() );
-		}
-	}
-	token.append(nextSymbol());
-	unSupported.insert(token);
+			m_token.append( nextSymbol() );
+		}
+	}
+	m_token.append(nextSymbol());
+	m_unsupported.insert(m_token);
 }
 
 void XtgScanner::setHangingCSet()
 {
-	token.append( getToken() );
-	unSupported.insert(token);
+	m_token.append( getToken() );
+	m_unsupported.insert(m_token);
 }
 
 void XtgScanner::setGlyph()
@@ -818,70 +818,70 @@
 
 void XtgScanner::appendSpChar1()
 {
-	textToAppend.append("@");
+	m_textToAppend.append("@");
 }
 
 void XtgScanner::appendSpChar2()
 {
-	textToAppend.append("<");
+	m_textToAppend.append("<");
 }
 
 void XtgScanner::appendSpChar3()
 {
-	textToAppend.append("\\");
+	m_textToAppend.append("\\");
 }
 
 void XtgScanner::xFlag()
 {
-	xflag = true;
+	m_xflag = true;
 }
 
 void XtgScanner::applyCStyle1()
 {
 	//apply nostyle character sheet <@>
-	define = 0;
+	m_define = 0;
 	flushText();
 	QString pStyle = CommonStrings::DefaultParagraphStyle;
 	ParagraphStyle newStyle;
 	newStyle.setParent(pStyle);
 	newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
-	currentCharStyle = newStyle.charStyle();
-	currentCharStyle.setFontSize(120.0);
-	styleEffects = ScStyle_None;
-	currentCharStyle.setFeatures(styleEffects.featureList());
+	m_currentCharStyle = newStyle.charStyle();
+	m_currentCharStyle.setFontSize(120.0);
+	m_styleEffects = ScStyle_None;
+	m_currentCharStyle.setFeatures(m_styleEffects.featureList());
 }
 
 void XtgScanner::applyCStyle2()
 {
 	//apply normal character style sheet <@$>
-	define = 0;
+	m_define = 0;
 	flushText();
 	QString pStyle = CommonStrings::DefaultParagraphStyle;
 	ParagraphStyle newStyle;
 	newStyle.setParent(pStyle);
 	newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
-	currentCharStyle = newStyle.charStyle();
-	currentCharStyle.setFontSize(120.0);
-	styleEffects = ScStyle_None;
-	currentCharStyle.setFeatures(styleEffects.featureList());
+	m_currentCharStyle = newStyle.charStyle();
+	m_currentCharStyle.setFontSize(120.0);
+	m_styleEffects = ScStyle_None;
+	m_currentCharStyle.setFeatures(m_styleEffects.featureList());
 }
 
 void XtgScanner::applyCStyle3()
 {
 	//apply paragraph's character stylesheet <@$p>
-	define = 0;
+	m_define = 0;
 	flushText();
 	QString pStyle = CommonStrings::DefaultParagraphStyle;
 	ParagraphStyle newStyle;
 	newStyle.setParent(pStyle);
 	newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
-	currentCharStyle = newStyle.charStyle();
-	currentCharStyle.setFontSize(120.0);
-	styleEffects = ScStyle_None;
-	currentCharStyle.setFeatures(styleEffects.featureList());
-//	currentCharStyle = currentParagraphStyle.charStyle();
-//	writer->setCharStyle(currentCharStyle);
-//	currentCharStyle = writer->getCurrentCharStyle();
+	m_currentCharStyle = newStyle.charStyle();
+	m_currentCharStyle.setFontSize(120.0);
+	m_styleEffects = ScStyle_None;
+	m_currentCharStyle.setFeatures(m_styleEffects.featureList());
+//	m_currentCharStyle = m_currentParagraphStyle.charStyle();
+//	writer->setCharStyle(m_currentCharStyle);
+//	m_currentCharStyle = writer->getCurrentCharStyle();
 }
 
 void XtgScanner::applyCStyle4()
@@ -903,16 +903,16 @@
 {
 	//tag = $
 	flushText();
-	currentCharStyle = currentParagraphStyle.charStyle();
-	currentCharStyle.setFontSize(120.0);
-	styleEffects = ScStyle_None;
-	currentCharStyle.setFeatures(styleEffects.featureList());
+	m_currentCharStyle = m_currentParagraphStyle.charStyle();
+	m_currentCharStyle.setFontSize(120.0);
+	m_styleEffects = ScStyle_None;
+	m_currentCharStyle.setFeatures(m_styleEffects.featureList());
 }
 
 void XtgScanner::setEncoding()
 {
-	token = getToken();
-	int enc = token.toInt();
+	m_token = getToken();
+	int enc = m_token.toInt();
 	QByteArray encTest = "cp1252";
 	if (enc == 0)
 		encTest = "macroman";
@@ -952,17 +952,17 @@
 void XtgScanner::defNewLine()
 {
 	flushText();
-	if (inDef)
-		newlineFlag = true;
+	if (m_inDef)
+		m_newlineFlag = true;
 	else
 	{
 		int posT = m_item->itemText.length();
 		if (posT > 0)
 		{
 			m_item->itemText.insertChars(posT, SpecialChars::PARSEP);
-			m_item->itemText.applyStyle(posT, currentParagraphStyle);
-		}
-		inDef = false;
+			m_item->itemText.applyStyle(posT, m_currentParagraphStyle);
+		}
+		m_inDef = false;
 	}
 }
 
@@ -972,16 +972,16 @@
 		new line flag to true */
 	flushText();
 	if (lookAhead() == QChar('\n'))
-		newlineFlag = true;
+		m_newlineFlag = true;
 	else
 	{
 		int posT = m_item->itemText.length();
 		if (posT > 0)
 		{
 			m_item->itemText.insertChars(posT, SpecialChars::PARSEP);
-			m_item->itemText.applyStyle(posT, currentParagraphStyle);
-		}
-		inDef = false;
+			m_item->itemText.applyStyle(posT, m_currentParagraphStyle);
+		}
+		m_inDef = false;
 	}
 }
 
@@ -994,56 +994,56 @@
 void XtgScanner::defAtRate()
 {
 	enterState(nameMode);
-	sfcName = getToken();
-	if (sfcName == "@$:")
-	{
-		if (doc->paragraphStyles().contains(m_item->itemName() + "_Normal"))
+	m_sfcName = getToken();
+	if (m_sfcName == "@$:")
+	{
+		if (m_doc->paragraphStyles().contains(m_item->itemName() + "_Normal"))
 		{
 			ParagraphStyle newStyle;
 			newStyle.setParent(m_item->itemName() + "_Normal");
-			currentParagraphStyle = newStyle;
-			currentCharStyle = newStyle.charStyle();
-		}
-		else if (doc->paragraphStyles().contains("Normal"))
+			m_currentParagraphStyle = newStyle;
+			m_currentCharStyle = newStyle.charStyle();
+		}
+		else if (m_doc->paragraphStyles().contains("Normal"))
 		{
 			ParagraphStyle newStyle;
 			newStyle.setParent("Normal");
-			currentParagraphStyle = newStyle;
-			currentCharStyle = newStyle.charStyle();
+			m_currentParagraphStyle = newStyle;
+			m_currentCharStyle = newStyle.charStyle();
 		}
 		enterState(previousState());
 	}
-	else if (sfcName == "@:")
+	else if (m_sfcName == "@:")
 	{
 		QString pStyle = CommonStrings::DefaultParagraphStyle;
 		ParagraphStyle newStyle;
 		newStyle.setParent(pStyle);
 		newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
-		currentParagraphStyle = newStyle;
-		currentCharStyle = newStyle.charStyle();
-		currentCharStyle.setFontSize(120.0);
-		styleEffects = ScStyle_None;
-		currentCharStyle.setFeatures(styleEffects.featureList());
+		m_currentParagraphStyle = newStyle;
+		m_currentCharStyle = newStyle.charStyle();
+		m_currentCharStyle.setFontSize(120.0);
+		m_styleEffects = ScStyle_None;
+		m_currentCharStyle.setFeatures(m_styleEffects.featureList());
 		enterState(textMode);
 	}
-	else if (doc->paragraphStyles().contains(m_item->itemName() + "_" + sfcName))
+	else if (m_doc->paragraphStyles().contains(m_item->itemName() + "_" + m_sfcName))
 	{
 		ParagraphStyle newStyle;
-		newStyle.setParent(m_item->itemName() + "_" + sfcName);
-		currentParagraphStyle = newStyle;
-		currentCharStyle = newStyle.charStyle();
+		newStyle.setParent(m_item->itemName() + "_" + m_sfcName);
+		m_currentParagraphStyle = newStyle;
+		m_currentCharStyle = newStyle.charStyle();
 		if (lookAhead() == QChar(':'))
-			top++;
+			m_textIndex++;
 		enterState(textMode);
 	}
-	else if (doc->paragraphStyles().contains(sfcName))
+	else if (m_doc->paragraphStyles().contains(m_sfcName))
 	{
 		ParagraphStyle newStyle;
-		newStyle.setParent(sfcName);
-		currentParagraphStyle = newStyle;
-		currentCharStyle = newStyle.charStyle();
+		newStyle.setParent(m_sfcName);
+		m_currentParagraphStyle = newStyle;
+		m_currentCharStyle = newStyle.charStyle();
 		if (lookAhead() == QChar(':'))
-			top++;
+			m_textIndex++;
 		enterState(textMode);
 	}
 }
@@ -1053,71 +1053,71 @@
 
 void XtgScanner::defClose()	//Token >
 {
-	if (define == 1)
+	if (m_define == 1)
 	{
 		StyleSet<CharStyle>tmp;
-		tmp.create(currentCharStyle);
-		doc->redefineCharStyles(tmp, false);
-		inDef = false;
-	}
-	else if (define == 2)
+		tmp.create(m_currentCharStyle);
+		m_doc->redefineCharStyles(tmp, false);
+		m_inDef = false;
+	}
+	else if (m_define == 2)
 	{
 		StyleSet<ParagraphStyle>tmp;
-		tmp.create(currentParagraphStyle);
-		doc->redefineStyles(tmp, false);
-		inDef = false;
-	}
-	if (define != 0)
-		define = 0;
+		tmp.create(m_currentParagraphStyle);
+		m_doc->redefineStyles(tmp, false);
+		m_inDef = false;
+	}
+	if (m_define != 0)
+		m_define = 0;
 	enterState(textMode);	
 }
 
 void XtgScanner::defEquals()	//Token =
 {
-	//define a character stylesheet with the name in sfcName if the next character is not [
-	newlineFlag = false;
+	//m_define a character stylesheet with the name in m_sfcName if the next character is not [
+	m_newlineFlag = false;
 	if (lookAhead() != QChar('['))
 	{
-		define = 1;
+		m_define = 1;
 		if (m_prefixName)
-			currentCharStyle.setName(m_item->itemName() + "_" + sfcName);
+			m_currentCharStyle.setName(m_item->itemName() + "_" + m_sfcName);
 		else
-			currentCharStyle.setName(sfcName);
+			m_currentCharStyle.setName(m_sfcName);
 		enterState(textMode);
 	}
 	else 
-		define = 2;
-	inDef = true;
+		m_define = 2;
+	m_inDef = true;
 }
 
 void XtgScanner::defColon()
 {
 	flushText();
-	if ((sfcName == "@") || (sfcName == "@$:") || (sfcName == "@:"))
+	if ((m_sfcName == "@") || (m_sfcName == "@$:") || (m_sfcName == "@:"))
 	{
 		QString pStyle = CommonStrings::DefaultParagraphStyle;
 		ParagraphStyle newStyle;
 		newStyle.setParent(pStyle);
 		newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
-		currentParagraphStyle = newStyle;
-		currentCharStyle = newStyle.charStyle();
-		currentCharStyle.setFontSize(120.0);
-		styleEffects = ScStyle_None;
-		currentCharStyle.setFeatures(styleEffects.featureList());
-	}
-	else if (doc->paragraphStyles().contains(m_item->itemName() + "_" + sfcName))
+		m_currentParagraphStyle = newStyle;
+		m_currentCharStyle = newStyle.charStyle();
+		m_currentCharStyle.setFontSize(120.0);
+		m_styleEffects = ScStyle_None;
+		m_currentCharStyle.setFeatures(m_styleEffects.featureList());
+	}
+	else if (m_doc->paragraphStyles().contains(m_item->itemName() + "_" + m_sfcName))
 	{
 		ParagraphStyle newStyle;
-		newStyle.setParent(m_item->itemName() + "_" + sfcName);
-		currentParagraphStyle = newStyle;
-		currentCharStyle = newStyle.charStyle();
-	}
-	else if (doc->paragraphStyles().contains(sfcName))
+		newStyle.setParent(m_item->itemName() + "_" + m_sfcName);
+		m_currentParagraphStyle = newStyle;
+		m_currentCharStyle = newStyle.charStyle();
+	}
+	else if (m_doc->paragraphStyles().contains(m_sfcName))
 	{
 		ParagraphStyle newStyle;
-		newStyle.setParent(sfcName);
-		currentParagraphStyle = newStyle;
-		currentCharStyle = newStyle.charStyle();
+		newStyle.setParent(m_sfcName);
+		m_currentParagraphStyle = newStyle;
+		m_currentCharStyle = newStyle.charStyle();
 	}
 	else
 	{
@@ -1125,34 +1125,34 @@
 		ParagraphStyle newStyle;
 		newStyle.setParent(pStyle);
 		newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
-		currentParagraphStyle = newStyle;
-		currentCharStyle = newStyle.charStyle();
-		currentCharStyle.setFontSize(120.0);
-		styleEffects = ScStyle_None;
-		currentCharStyle.setFeatures(styleEffects.featureList());
-	}
-	if (newlineFlag)
+		m_currentParagraphStyle = newStyle;
+		m_currentCharStyle = newStyle.charStyle();
+		m_currentCharStyle.setFontSize(120.0);
+		m_styleEffects = ScStyle_None;
+		m_currentCharStyle.setFeatures(m_styleEffects.featureList());
+	}
+	if (m_newlineFlag)
 	{
 		int posT = m_item->itemText.length();
 		if (posT > 0)
 		{
 			m_item->itemText.insertChars(posT, SpecialChars::PARSEP);
-			m_item->itemText.applyStyle(posT, currentParagraphStyle);
-		}
-	}
-	newlineFlag = false;
+			m_item->itemText.applyStyle(posT, m_currentParagraphStyle);
+		}
+	}
+	m_newlineFlag = false;
 	enterState(textMode);
-	define = 0;
+	m_define = 0;
 	if (!((lookAhead() == QChar('\r')) || (lookAhead() == QChar('\n'))))
-		inDef = false;
+		m_inDef = false;
 }
 
 void XtgScanner::defFontSet()
 {
-	unSupported.insert("[F]");
+	m_unsupported.insert("[F]");
 	while (lookAhead() != QChar('>'))
-		top = top+1;
-	top = top-1;
+		m_textIndex = m_textIndex+1;
+	m_textIndex = m_textIndex-1;
 }
 
 void XtgScanner::defColor()
@@ -1160,17 +1160,17 @@
 	bool isSpot = false;
 	ScColor tmp;
 	enterState(stringMode);
-	token = getToken();
+	m_token = getToken();
 	while (lookAhead() != QChar('>'))
 	{
-		token = getToken();
-		if ((token == "CMJN") || (token == "CMYK"))
+		m_token = getToken();
+		if ((m_token == "CMJN") || (m_token == "CMYK"))
 		{
 			enterState(tagMode);
-			token = getToken();
-			if (token == "S")
+			m_token = getToken();
+			if (m_token == "S")
 			{
-				token = getToken();
+				m_token = getToken();
 				isSpot = true;
 			}
 			double c = getToken().toDouble();
@@ -1180,15 +1180,15 @@
 			tmp.setColorF(c / 100.0, m / 100.0, y / 100.0, k / 100.0);
 			tmp.setSpotColor(isSpot);
 			tmp.setRegistrationColor(false);
-			doc->PageColors.tryAddColor(sfcName, tmp);
-		}
-		else if (token == "RGB")
+			m_doc->PageColors.tryAddColor(m_sfcName, tmp);
+		}
+		else if (m_token == "RGB")
 		{
 			enterState(tagMode);
-			token = getToken();
-			if (token == "S")
+			m_token = getToken();
+			if (m_token == "S")
 			{
-				token = getToken();
+				m_token = getToken();
 				isSpot = true;
 			}
 			double r = getToken().toDouble();
@@ -1197,10 +1197,10 @@
 			tmp.setRgbColorF(r / 100.0, g / 100.0, b / 100.0);
 			tmp.setSpotColor(isSpot);
 			tmp.setRegistrationColor(false);
-			doc->PageColors.tryAddColor(sfcName, tmp);
-		}
-	}
-	top++;
+			m_doc->PageColors.tryAddColor(m_sfcName, tmp);
+		}
+	}
+	m_textIndex++;
 	enterState(textMode);
 }
 
@@ -1208,37 +1208,37 @@
 {
 	QString s1, s2, s3;
 	enterState(stringMode);
-	define = 2;
-	if (token == "[S\"")
+	m_define = 2;
+	if (m_token == "[S\"")
 		s1 = getToken();
 	else
 	{
 		while (lookAhead() != QChar('\"'))
-			top++;					//skip the inch
-		top++;
+			m_textIndex++;					//skip the inch
+		m_textIndex++;
 		s1 = getToken();			//will contain the string 1
 	}
-//	top = top + 2;				//we have to skip comma and next inch character
+//	m_textIndex = m_textIndex + 2;				//we have to skip comma and next inch character
 	while (lookAhead() != QChar('\"'))
-		top++;
-	top++;
+		m_textIndex++;
+	m_textIndex++;
 	s2 = getToken();
 	if (lookAhead() != QChar(']'))
 	{
 		while (lookAhead() != QChar('\"'))
-			top++;
-		top++;
-	//	top = top + 2;
+			m_textIndex++;
+		m_textIndex++;
+	//	m_textIndex = m_textIndex + 2;
 		s3 = getToken();
 	}
-	top++; // to ensure that ] is avoided
+	m_textIndex++; // to ensure that ] is avoided
 	QString pStyle = CommonStrings::DefaultParagraphStyle;
 	ParagraphStyle newStyle;
 	if (s1.length() > 0)
 	{
-		if (doc->paragraphStyles().contains(m_item->itemName() + "_" + s1))
+		if (m_doc->paragraphStyles().contains(m_item->itemName() + "_" + s1))
 			newStyle.setParent(m_item->itemName() + "_" + s1);
-		else if  (doc->paragraphStyles().contains(s1))
+		else if  (m_doc->paragraphStyles().contains(s1))
 			newStyle.setParent(s1);
 		else
 			newStyle.setParent(pStyle);
@@ -1246,15 +1246,15 @@
 	else
 		newStyle.setParent(pStyle);
 	if (m_prefixName)
-		newStyle.setName(m_item->itemName() + "_" + sfcName);
+		newStyle.setName(m_item->itemName() + "_" + m_sfcName);
 	else
-		newStyle.setName((sfcName));
+		newStyle.setName((m_sfcName));
 	newStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
 	if (s3.length() > 0)
 	{
-		if (doc->charStyles().contains(m_item->itemName() + "_" + s3))
+		if (m_doc->charStyles().contains(m_item->itemName() + "_" + s3))
 			newStyle.charStyle().setParent(m_item->itemName() + "_" + s3);
-		else if  (doc->charStyles().contains(s3))
+		else if  (m_doc->charStyles().contains(s3))
 			newStyle.charStyle().setParent(s3);
 		else
 			newStyle.charStyle().setParent(CommonStrings::DefaultCharacterStyle);
@@ -1263,11 +1263,11 @@
 	{
 		newStyle.charStyle().setParent(CommonStrings::DefaultCharacterStyle);
 		newStyle.charStyle().setFontSize(120.0);
-		styleEffects = ScStyle_None;
-		newStyle.charStyle().setFeatures(styleEffects.featureList());
-	}
-	currentParagraphStyle = newStyle;
-	currentCharStyle = newStyle.charStyle();
+		m_styleEffects = ScStyle_None;
+		newStyle.charStyle().setFeatures(m_styleEffects.featureList());
+	}
+	m_currentParagraphStyle = newStyle;
+	m_currentCharStyle = newStyle.charStyle();
 	enterState(textMode);
 }
 
@@ -1275,7 +1275,7 @@
 {
 	//token [St
 	QString s4;
-	top = top+10;
+	m_textIndex = m_textIndex+10;
 	s4 = getToken();
 /*	if (styleStatus(definedCStyles,s4))
 		defCharStyle.setParent(s4);
@@ -1288,22 +1288,22 @@
 
 void XtgScanner::enterState ( scannerMode mode )
 {
-	prevMode = Mode;
-	Mode = mode;
+	m_prevMode = m_mode;
+	m_mode = mode;
 }
 
 QString XtgScanner::sliceString()
 {
 	QString name;
-	if (Mode == stringMode)
+	if (m_mode == stringMode)
 	{
 		while (lookAhead() != QChar('\"'))
 		{
 			name.append( nextSymbol() );
 		}
-		top = top+1;
-	}
-	if (Mode == nameMode)
+		m_textIndex = m_textIndex+1;
+	}
+	if (m_mode == nameMode)
 	{
 		while (lookAhead() != QChar('=') || lookAhead() != QChar(':'))
 		{
@@ -1321,7 +1321,7 @@
 	if (currentState() == textMode)
 	{
 		/**
-		This mode should return only '<' or '@' or newline. It also adds the text_to_be_appended to the QString textToAppend
+		This mode should return only '<' or '@' or newline. It also adds the text_to_be_appended to the QString m_textToAppend
 		*/
 		if (temp =='<' || temp =='@' || temp == '\n' || temp == '\r')
 			token.append( nextSymbol() );
@@ -1332,11 +1332,11 @@
 			the next character in buffer to the text. This will automatically
 			deal the occurrance of '\@' or '\:' or any other relevant escapes
 			*/
-			top = top+1;
-			textToAppend.append( nextSymbol() );
+			m_textIndex = m_textIndex+1;
+			m_textToAppend.append( nextSymbol() );
 		}
 		else
-			textToAppend.append( nextSymbol() );
+			m_textToAppend.append( nextSymbol() );
 	}
 	
 	if (currentState() == tagMode)
@@ -1383,7 +1383,7 @@
 			/**If inch character is found, the scanner should enter the string mode and enter the corresponding string as the token
 			*/
 			enterState(stringMode);
-			top = top+1;
+			m_textIndex = m_textIndex+1;
 			token = getToken();
 			enterState( previousState() );
 		} 
@@ -1417,12 +1417,12 @@
 			token.append( nextSymbol() );
 		else if (temp == '(')
 		{
-			top = top+1;
+			m_textIndex = m_textIndex+1;
 			token = getToken();
 		}
 		else if (temp == ',')
 		{
-			top = top+1;
+			m_textIndex = m_textIndex+1;
 			token=getToken();
 		}
 		else 
@@ -1446,12 +1446,12 @@
 		if (temp == '\"' )
 		{
 			enterState(stringMode);
-			top = top+1;
+			m_textIndex = m_textIndex+1;
 			token = getToken();
 			enterState( previousState() );
 		}
 		else if (temp == ',' )
-			top = top+1;
+			m_textIndex = m_textIndex+1;
 		else if (temp == '[' )
 		{
 			//return [F] or [C] or [Sp or [St
@@ -1477,7 +1477,7 @@
 				temp = lookAhead();
 				if (temp == ':' || temp == '=' )
 					break;
-				if (m_bufferIndex >= input_Buffer.length())
+				if (m_bufferIndex >= m_inputBuffer.length())
 					break;
 				token.append(nextSymbol());
 			}
@@ -1486,7 +1486,7 @@
 	
 	if ( currentState() == stringMode )
 	{
-		/* This mode should return those strings which are inside an inch character, while in tagMode. Hence this should set the mode to tagMode before returning the string value. This will call a function QString sliceString() which will return the required string and maintains the top correctly
+		/* This mode should return those strings which are inside an inch character, while in tagMode. Hence this should set the mode to tagMode before returning the string value. This will call a function QString sliceString() which will return the required string and maintains the m_textIndex correctly
 		*/
 		token = sliceString();
 	}
@@ -1494,69 +1494,69 @@
 }
 scannerMode XtgScanner::currentState()
 {
-	return Mode;
+	return m_mode;
 }
 scannerMode XtgScanner::previousState()
 {
-	return prevMode;
+	return m_prevMode;
 }
 
 bool XtgScanner::decodeText(int index)
 {
-	if (decoded_text.length() > index)
+	if (m_decodedText.length() > index)
 		return true;
-	if (m_bufferIndex >= input_Buffer.length())
+	if (m_bufferIndex >= m_inputBuffer.length())
 		return false;
 
 	QString txt;
-	const char* bufferData = input_Buffer.data() + m_bufferIndex;
-
-	while (m_bufferIndex < input_Buffer.length() &&
-		   decoded_text.length() <= index)
+	const char* bufferData = m_inputBuffer.data() + m_bufferIndex;
+
+	while (m_bufferIndex < m_inputBuffer.length() &&
+		   m_decodedText.length() <= index)
 	{
 		txt = m_decoder->toUnicode(bufferData, 1);
 		if (!txt.isEmpty())
-			decoded_text += txt;
+			m_decodedText += txt;
 		++bufferData;
 		++m_bufferIndex;
 	}
 
-	return (decoded_text.length() > index);
+	return (m_decodedText.length() > index);
 }
 
 QChar XtgScanner::lookAhead(int adj)
 {
-	if (!decodeText(top + adj))
+	if (!decodeText(m_textIndex + adj))
 		return QChar(0);
-	if (top + adj >= decoded_text.length())
+	if (m_textIndex + adj >= m_decodedText.length())
 		return QChar(0);
-	return decoded_text.at(top + adj);
+	return m_decodedText.at(m_textIndex + adj);
 }
 
 QChar XtgScanner::nextSymbol()
 {
-	if (!decodeText(top))
+	if (!decodeText(m_textIndex))
 		return QChar(0);
-	if (top >= decoded_text.length())
+	if (m_textIndex >= m_decodedText.length())
 		return QChar(0);
-	QChar newChar = decoded_text.at(top);
-	++top;
+	QChar newChar = m_decodedText.at(m_textIndex);
+	++m_textIndex;
 	return newChar;
 }
 
 void XtgScanner::flushText()
 {
-	if (textToAppend.isEmpty())
+	if (m_textToAppend.isEmpty())
 		return;
-	textToAppend.replace(QChar(10), SpecialChars::LINEBREAK);
-	textToAppend.replace(QChar(12), SpecialChars::FRAMEBREAK);
-	textToAppend.replace(QChar(30), SpecialChars::NBHYPHEN);
-	textToAppend.replace(QChar(160), SpecialChars::NBSPACE);
+	m_textToAppend.replace(QChar(10), SpecialChars::LINEBREAK);
+	m_textToAppend.replace(QChar(12), SpecialChars::FRAMEBREAK);
+	m_textToAppend.replace(QChar(30), SpecialChars::NBHYPHEN);
+	m_textToAppend.replace(QChar(160), SpecialChars::NBSPACE);
 	int posC = m_item->itemText.length();
-	m_item->itemText.insertChars(posC, textToAppend);
-	m_item->itemText.applyStyle(posC, currentParagraphStyle);
-	m_item->itemText.applyCharStyle(posC, textToAppend.length(), currentCharStyle);
-	textToAppend.clear();
+	m_item->itemText.insertChars(posC, m_textToAppend);
+	m_item->itemText.applyStyle(posC, m_currentParagraphStyle);
+	m_item->itemText.applyCharStyle(posC, m_textToAppend.length(), m_currentCharStyle);
+	m_textToAppend.clear();
 }
 
 bool XtgScanner::styleStatus(QStringList &name,QString &sfcname)
@@ -1575,11 +1575,11 @@
 void XtgScanner::applyFeature(StyleFlagValue feature)
 {
 	flushText();
-	if (styleEffects & feature)
-		styleEffects &= ~feature;
+	if (m_styleEffects & feature)
+		m_styleEffects &= ~feature;
 	else
-		styleEffects |= feature;
-	currentCharStyle.setFeatures(styleEffects.featureList());
+		m_styleEffects |= feature;
+	m_currentCharStyle.setFeatures(m_styleEffects.featureList());
 }
 
 void XtgScanner::xtgParse()
@@ -1595,23 +1595,23 @@
 		m_item->itemText.setDefaultStyle(newStyle);
 	}
 	enterState(textMode);
-	currentParagraphStyle.setParent(CommonStrings::DefaultParagraphStyle);
-	currentParagraphStyle.charStyle().setParent(CommonStrings::DefaultCharacterStyle);
-	currentParagraphStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
-	currentCharStyle = currentParagraphStyle.charStyle();
+	m_currentParagraphStyle.setParent(CommonStrings::DefaultParagraphStyle);
+	m_currentParagraphStyle.charStyle().setParent(CommonStrings::DefaultCharacterStyle);
+	m_currentParagraphStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
+	m_currentCharStyle = m_currentParagraphStyle.charStyle();
 	while (lookAhead() != QChar('\0'))
 	{
-		token = getToken();
+		m_token = getToken();
 		QHash<QString,void (XtgScanner::*)(void)> *temp = nullptr;
-		if (Mode == tagMode)
-			temp = &tagModeHash;
-		else if (Mode == nameMode)
-			temp = &nameModeHash;
-		else if (Mode == textMode)
-			temp = &textModeHash;
-		if (temp->contains(token) )
-		{
-			funPointer = temp->value(token);
+		if (m_mode == tagMode)
+			temp = &m_tagModeHash;
+		else if (m_mode == nameMode)
+			temp = &m_nameModeHash;
+		else if (m_mode == textMode)
+			temp = &m_textModeHash;
+		if (temp->contains(m_token) )
+		{
+			funPointer = temp->value(m_token);
 			(this->*funPointer)();
 		}
 
@@ -1620,39 +1620,39 @@
 				is not constant
 				*/
 
-		else if ( (currentState() == tagMode ) && token.startsWith('@') && token.endsWith('>') )
+		else if ( (currentState() == tagMode ) && m_token.startsWith('@') && m_token.endsWith('>') )
 		{
 			/*here we receive a token @stylesheetname>, hence we have to slice of token to 
 				get the name of character stylesheet to be applied
 			*/
-			define = 0;
-			sfcName = token.remove(0,1);
-			sfcName = sfcName.remove(sfcName.size()-1,1);
+			m_define = 0;
+			m_sfcName = m_token.remove(0,1);
+			m_sfcName = m_sfcName.remove(m_sfcName.size()-1,1);
 			flushText();
-		//	if (styleStatus(definedCStyles,sfcName))
-		//		writer->setCharStyle(sfcName);
+		//	if (styleStatus(definedCStyles,m_sfcName))
+		//		writer->setCharStyle(m_sfcName);
 		//	else
 		//	{
-		//		showWarning(sfcName);
+		//		showWarning(m_sfcName);
 		//		writer->setCharStyle("");
 		//	}
-		//	currentCharStyle = writer->getCurrentCharStyle();
-		}
-		if (m_bufferIndex >= input_Buffer.length())
+		//	m_currentCharStyle = writer->getCurrentCharStyle();
+		}
+		if (m_bufferIndex >= m_inputBuffer.length())
 			break;
 	}
-	if (!textToAppend.isEmpty())
-	{
-		textToAppend.replace(QChar(10), SpecialChars::LINEBREAK);
-		textToAppend.replace(QChar(12), SpecialChars::FRAMEBREAK);
-		textToAppend.replace(QChar(30), SpecialChars::NBHYPHEN);
-		textToAppend.replace(QChar(160), SpecialChars::NBSPACE);
+	if (!m_textToAppend.isEmpty())
+	{
+		m_textToAppend.replace(QChar(10), SpecialChars::LINEBREAK);
+		m_textToAppend.replace(QChar(12), SpecialChars::FRAMEBREAK);
+		m_textToAppend.replace(QChar(30), SpecialChars::NBHYPHEN);
+		m_textToAppend.replace(QChar(160), SpecialChars::NBSPACE);
 		ParagraphStyle newStyle;
-		newStyle.setParent(currentParagraphStyle.name());
+		newStyle.setParent(m_currentParagraphStyle.name());
 		int posC = m_item->itemText.length();
-		m_item->itemText.insertChars(posC, textToAppend);
+		m_item->itemText.insertChars(posC, m_textToAppend);
 		m_item->itemText.applyStyle(posC, newStyle);
-		m_item->itemText.applyCharStyle(posC, textToAppend.length(), currentCharStyle);
-	}
-//	qDebug()<<"Unsupported : "<<unSupported;
-}
+		m_item->itemText.applyCharStyle(posC, m_textToAppend.length(), m_currentCharStyle);
+	}
+//	qDebug()<<"Unsupported : "<<m_unsupported;
+}

Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22585&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h	(original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h	Sun Jun 17 23:57:10 2018
@@ -62,59 +62,59 @@
 	/**
 	 \variable Variables based on which scanner works in different modes
 	 */
-	scannerMode Mode;
-	scannerMode prevMode;
+	scannerMode m_mode;
+	scannerMode m_prevMode;
 	/**
 	 \variable Variables of the importer
 	 */
 	PageItem* m_item;
-	bool importTextOnly;
+	bool m_importTextOnly;
 	bool m_prefixName;
 	bool m_append;
 	/**
 	 \variable Flag variables used in the scanner
 	 */
-	bool newlineFlag;
-	bool xflag;
-	bool inDef;
+	bool m_newlineFlag;
+	bool m_xflag;
+	bool m_inDef;
 	 /**
 	 \variable Input buffer to which properly encoded file is loaded
 	 */
-	QByteArray input_Buffer;
+	QByteArray m_inputBuffer;
 	int m_bufferIndex;
 
-	QString decoded_text;
-	int top;
-
-	ScribusDoc* doc;
+	QString m_decodedText;
+	int m_textIndex;
+
+	ScribusDoc* m_doc;
 	/**
 	 \variable current Character and paragraph styles
 	 */
-	CharStyle currentCharStyle;
-	ParagraphStyle currentParagraphStyle;
-	StyleFlag styleEffects;
+	CharStyle m_currentCharStyle;
+	ParagraphStyle m_currentParagraphStyle;
+	StyleFlag m_styleEffects;
 
 	/** To store unsupported attributes */
-	QSet<QString> unSupported;
+	QSet<QString> m_unsupported;
 	/** 
-	\brief textToAppend will be the QString used by the function TextWriter::append(QString& )
+	\brief m_textToAppend will be the QString used by the function TextWriter::append(QString& )
 	*/ 
-	QString textToAppend;
-	QString token;
-	QString sfcName; // Name of Style/Fontset/Color to be defined, hence named sfcName
-
-	QHash<QString,void (XtgScanner::*)(void)> tagModeHash;
-	QHash<QString,void (XtgScanner::*)(void)> textModeHash;
-	QHash<QString,void (XtgScanner::*)(void)> nameModeHash;
+	QString m_textToAppend;
+	QString m_token;
+	QString m_sfcName; // Name of Style/Fontset/Color to be defined, hence named m_sfcName
+
+	QHash<QString,void (XtgScanner::*)(void)> m_tagModeHash;
+	QHash<QString,void (XtgScanner::*)(void)> m_textModeHash;
+	QHash<QString,void (XtgScanner::*)(void)> m_nameModeHash;
 	QHash<int,QString> languages;
 
-	/** define variable will take the following values : 
+	/** m_define variable will take the following values : 
 	 \brief
 		0	Not a definition
 		1	Character Stylesheet Definition
 		2	Paragraph Stylesheet Definition
 	 */
-	int define;
+	int  m_define;
 	bool m_isBold;
 	bool m_isItalic;
 
@@ -148,12 +148,12 @@
 	void xtgParse();
 
 	/**
-	\brief This function will return the character in Buffer to which top is now pointing to 
+	\brief This function will return the character in Buffer to which m_textIndex is now pointing to 
 	*/
 	QChar lookAhead(int adj = 0);
 
 	/** 
-	\brief A function which returns the next symbol in the input stream as character. This function will increment the top by 1
+	\brief A function which returns the next symbol in the input stream as character. This function will increment the m_textIndex by 1
 	*/
 	QChar nextSymbol();
 
@@ -181,7 +181,7 @@
 	 */
 	void applyFeature(StyleFlagValue feature);
 	/**
-	 \brief Function which will empty the textToAppend variable by writing into text frame
+	 \brief Function which will empty the m_textToAppend variable by writing into text frame
 	 */
 	void flushText();
 	/**




More information about the scribus-commit mailing list