[dasher: 14/38] Don't store unused foreground-colour attribute of text symbols



commit a9b3c1d69215b32740714837896c70860527d9d2
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Mon Dec 12 15:45:00 2011 +0000

    Don't store unused foreground-colour attribute of text symbols

 Src/DasherCore/Alphabet/AlphIO.cpp   |    1 -
 Src/DasherCore/Alphabet/AlphInfo.cpp |   11 -----------
 Src/DasherCore/Alphabet/AlphInfo.h   |    6 ------
 3 files changed, 0 insertions(+), 18 deletions(-)
---
diff --git a/Src/DasherCore/Alphabet/AlphIO.cpp b/Src/DasherCore/Alphabet/AlphIO.cpp
index f74ebb0..63ab52c 100644
--- a/Src/DasherCore/Alphabet/AlphIO.cpp
+++ b/Src/DasherCore/Alphabet/AlphIO.cpp
@@ -358,7 +358,6 @@ void CAlphIO::ReadCharAtts(const XML_Char **atts, CAlphInfo::character &ch) {
     if(strcmp(*atts, "t") == 0) ch.Text = *(atts+1);
     else if(strcmp(*atts, "d") == 0) ch.Display = *(atts+1);
     else if(strcmp(*atts, "b") == 0) ch.Colour = atoi(*(atts+1));
-    else if(strcmp(*atts, "f") == 0) ch.Foreground = *(atts+1);
     atts += 2;
   }
 }
diff --git a/Src/DasherCore/Alphabet/AlphInfo.cpp b/Src/DasherCore/Alphabet/AlphInfo.cpp
index c5fb5c0..989b60b 100644
--- a/Src/DasherCore/Alphabet/AlphInfo.cpp
+++ b/Src/DasherCore/Alphabet/AlphInfo.cpp
@@ -36,16 +36,6 @@ static char THIS_FILE[] = __FILE__;
 #endif
 #endif
 
-int CAlphInfo::GetTextColour(symbol Symbol) const {
-  const std::string &TextColour(GetForeground(Symbol));
-  if(TextColour != std::string("")) {
-    return atoi(TextColour.c_str());
-  }
-  else {
-    return 4;
-  }
-}
-
 CAlphabetMap *CAlphInfo::MakeMap() const {
   CAlphabetMap *map = new CAlphabetMap();
   if (iParagraphCharacter!=0) map->AddParagraphSymbol(iParagraphCharacter);
@@ -94,5 +84,4 @@ CAlphInfo::character::character() {
   Display="";
   Text="";
   Colour=-1;
-  Foreground="";
 }
diff --git a/Src/DasherCore/Alphabet/AlphInfo.h b/Src/DasherCore/Alphabet/AlphInfo.h
index 41720a1..e994295 100644
--- a/Src/DasherCore/Alphabet/AlphInfo.h
+++ b/Src/DasherCore/Alphabet/AlphInfo.h
@@ -71,7 +71,6 @@ private:
     std::string Display;
     std::string Text;
     int Colour;
-    std::string Foreground;
   };
 public:
   
@@ -105,11 +104,6 @@ public:
     return m_vCharacters[i-1].Colour;
   };
 
-  /// Text foreground colour for i'th symbol; default 4 if unspecified
-  int GetTextColour(symbol i) const;
-  /// Text foreground colour for i'th symbol, as specified in XML
-  const std::string & GetForeground(symbol i) const {return m_vCharacters[i-1].Foreground;}
-
   const std::string &GetDefaultContext() const {return m_strDefaultContext;}
 
   ///A single unicode character to use as an escape sequence in training files



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]