summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2012-06-20 13:26:58 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-06-20 13:26:58 +0200
commit66fb0e8833a5ab6cc23a3acb7d6148ba948e51bd (patch)
tree71b2cf2b3fe0fdf5bafdc7a2cdb959e4524c59e7
parent22ae0a7d9495bff5ef0e44f62da1719edadc9d6f (diff)
This langid does not make sense and we don't even use it
-rw-r--r--src/lib/VSD11Parser.cpp9
-rw-r--r--src/lib/VSD6Parser.cpp9
-rw-r--r--src/lib/VSDXCharacterList.cpp19
-rw-r--r--src/lib/VSDXCharacterList.h2
-rw-r--r--src/lib/VSDXCollector.h8
-rw-r--r--src/lib/VSDXContentCollector.cpp8
-rw-r--r--src/lib/VSDXContentCollector.h8
-rw-r--r--src/lib/VSDXStyles.h5
-rw-r--r--src/lib/VSDXStylesCollector.cpp10
-rw-r--r--src/lib/VSDXStylesCollector.h4
10 files changed, 36 insertions, 46 deletions
diff --git a/src/lib/VSD11Parser.cpp b/src/lib/VSD11Parser.cpp
index 21c55bc..9d848a8 100644
--- a/src/lib/VSD11Parser.cpp
+++ b/src/lib/VSD11Parser.cpp
@@ -164,23 +164,20 @@ void libvisio::VSD11Parser::readCharIX(WPXInputStream *input)
if (fontMod & 4) strikeout = true;
if (fontMod & 0x20) doublestrikeout = true;
- input->seek(42, WPX_SEEK_CUR);
- unsigned langId = readU32(input);
-
if (m_isInStyles)
- m_collector->collectCharIXStyle(m_header.id, m_header.level, charCount, fontID, fontColour, langId, fontSize,
+ m_collector->collectCharIXStyle(m_header.id, m_header.level, charCount, fontID, fontColour, fontSize,
bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript, fontFace);
else if (m_isStencilStarted)
{
VSD_DEBUG_MSG(("Found stencil character style\n"));
if (!m_stencilShape.m_charStyle)
- m_stencilShape.m_charStyle= new VSDXCharStyle(charCount, fontID, fontColour, langId, fontSize,
+ m_stencilShape.m_charStyle= new VSDXCharStyle(charCount, fontID, fontColour, fontSize,
bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript, fontFace);
}
else
- m_charList->addCharIX(m_header.id, m_header.level, charCount, fontID, fontColour, langId, fontSize,
+ m_charList->addCharIX(m_header.id, m_header.level, charCount, fontID, fontColour, fontSize,
bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript, fontFace);
}
diff --git a/src/lib/VSD6Parser.cpp b/src/lib/VSD6Parser.cpp
index ededb03..2ed034f 100644
--- a/src/lib/VSD6Parser.cpp
+++ b/src/lib/VSD6Parser.cpp
@@ -145,23 +145,20 @@ void libvisio::VSD6Parser::readCharIX(WPXInputStream *input)
if (fontMod & 4) strikeout = true;
if (fontMod & 0x20) doublestrikeout = true;
- input->seek(42, WPX_SEEK_CUR);
- unsigned langId = readU32(input);
-
if (m_isInStyles)
- m_collector->collectCharIXStyle(m_header.id, m_header.level, charCount, fontID, fontColour, langId, fontSize,
+ m_collector->collectCharIXStyle(m_header.id, m_header.level, charCount, fontID, fontColour, fontSize,
bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript, fontFace);
else if (m_isStencilStarted)
{
VSD_DEBUG_MSG(("Found stencil character style\n"));
if (!m_stencilShape.m_charStyle)
- m_stencilShape.m_charStyle= new VSDXCharStyle(charCount, fontID, fontColour, langId, fontSize,
+ m_stencilShape.m_charStyle= new VSDXCharStyle(charCount, fontID, fontColour, fontSize,
bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript, fontFace);
}
else
- m_charList->addCharIX(m_header.id, m_header.level, charCount, fontID, fontColour, langId, fontSize,
+ m_charList->addCharIX(m_header.id, m_header.level, charCount, fontID, fontColour, fontSize,
bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript, fontFace);
}
diff --git a/src/lib/VSDXCharacterList.cpp b/src/lib/VSDXCharacterList.cpp
index d3ddca6..6aa2edc 100644
--- a/src/lib/VSDXCharacterList.cpp
+++ b/src/lib/VSDXCharacterList.cpp
@@ -46,12 +46,12 @@ public:
class VSDXCharIX : public VSDXCharacterListElement
{
public:
- VSDXCharIX(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
- double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
+ VSDXCharIX(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, double fontSize,
+ bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace) :
- m_id(id), m_level(level), m_charCount(charCount), m_fontID(fontID), m_fontColour(fontColour), m_langId(langId),
- m_fontSize(fontSize), m_bold(bold), m_italic(italic), m_underline(underline), m_doubleunderline(doubleunderline),
- m_strikeout(strikeout), m_doublestrikeout(doublestrikeout), m_allcaps(allcaps), m_initcaps(initcaps), m_smallcaps(smallcaps),
+ m_id(id), m_level(level), m_charCount(charCount), m_fontID(fontID), m_fontColour(fontColour), m_fontSize(fontSize),
+ m_bold(bold), m_italic(italic), m_underline(underline), m_doubleunderline(doubleunderline), m_strikeout(strikeout),
+ m_doublestrikeout(doublestrikeout), m_allcaps(allcaps), m_initcaps(initcaps), m_smallcaps(smallcaps),
m_superscript(superscript), m_subscript(subscript), m_fontFace(fontFace) {}
~VSDXCharIX() {}
void handle(VSDXCollector *collector);
@@ -61,7 +61,6 @@ private:
unsigned m_charCount;
unsigned short m_fontID;
Colour m_fontColour;
- unsigned m_langId;
double m_fontSize;
bool m_bold, m_italic, m_underline, m_doubleunderline, m_strikeout, m_doublestrikeout;
bool m_allcaps, m_initcaps, m_smallcaps, m_superscript, m_subscript;
@@ -72,14 +71,14 @@ private:
void libvisio::VSDXCharIX::handle(VSDXCollector *collector)
{
- collector->collectVSDXCharStyle(m_id, m_level, m_charCount, m_fontID, m_fontColour, m_langId, m_fontSize, m_bold, m_italic, m_underline,
+ collector->collectVSDXCharStyle(m_id, m_level, m_charCount, m_fontID, m_fontColour, m_fontSize, m_bold, m_italic, m_underline,
m_doubleunderline, m_strikeout, m_doublestrikeout, m_allcaps, m_initcaps, m_smallcaps,
m_superscript, m_subscript, m_fontFace);
}
libvisio::VSDXCharacterListElement *libvisio::VSDXCharIX::clone()
{
- return new VSDXCharIX(m_id, m_level, m_charCount, m_fontID, m_fontColour, m_langId, m_fontSize, m_bold, m_italic, m_underline,
+ return new VSDXCharIX(m_id, m_level, m_charCount, m_fontID, m_fontColour, m_fontSize, m_bold, m_italic, m_underline,
m_doubleunderline, m_strikeout, m_doublestrikeout, m_allcaps, m_initcaps, m_smallcaps,
m_superscript, m_subscript, m_fontFace);
}
@@ -115,11 +114,11 @@ libvisio::VSDXCharacterList::~VSDXCharacterList()
clear();
}
-void libvisio::VSDXCharacterList::addCharIX(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
+void libvisio::VSDXCharacterList::addCharIX(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour,
double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace)
{
- m_elements[id] = new VSDXCharIX(id, level, charCount, fontID, fontColour, langId, fontSize, bold, italic, underline, doubleunderline,
+ m_elements[id] = new VSDXCharIX(id, level, charCount, fontID, fontColour, fontSize, bold, italic, underline, doubleunderline,
strikeout, doublestrikeout, allcaps, initcaps, smallcaps, superscript, subscript, fontFace);
}
diff --git a/src/lib/VSDXCharacterList.h b/src/lib/VSDXCharacterList.h
index 5e4a733..1ceed63 100644
--- a/src/lib/VSDXCharacterList.h
+++ b/src/lib/VSDXCharacterList.h
@@ -48,7 +48,7 @@ public:
VSDXCharacterList(const VSDXCharacterList &charList);
~VSDXCharacterList();
VSDXCharacterList &operator=(const VSDXCharacterList &charList);
- void addCharIX(unsigned id, unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId, double fontSize,
+ void addCharIX(unsigned id, unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, double fontSize,
bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace);
void setElementsOrder(const std::vector<unsigned> &m_elementsOrder);
diff --git a/src/lib/VSDXCollector.h b/src/lib/VSDXCollector.h
index 7105d2d..5bf198f 100644
--- a/src/lib/VSDXCollector.h
+++ b/src/lib/VSDXCollector.h
@@ -83,8 +83,8 @@ public:
virtual void collectColours(const std::vector<Colour> &colours) = 0;
virtual void collectFont(unsigned short fontID, const ::WPXBinaryData &textStream, TextFormat format) = 0;
virtual void collectText(unsigned id, unsigned level, const ::WPXBinaryData &textStream, TextFormat format) = 0;
- virtual void collectVSDXCharStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
- double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
+ virtual void collectVSDXCharStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, double fontSize,
+ bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace) = 0;
virtual void collectVSDXParaStyle(unsigned id , unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight,
double spLine, double spBefore, double spAfter, unsigned char align, unsigned flags) = 0;
@@ -102,8 +102,8 @@ public:
double shadowOffsetX, double shadowOffsetY) = 0;
virtual void collectFillStyle(unsigned id, unsigned level, unsigned char colourIndexFG, unsigned char colourIndexBG, unsigned char fillPattern,
unsigned char fillFGTransparency, unsigned char fillBGTransparency, unsigned char shadowPattern, Colour shfgc) = 0;
- virtual void collectCharIXStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
- double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
+ virtual void collectCharIXStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, double fontSize,
+ bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace) = 0;
virtual void collectParaIXStyle(unsigned id , unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight,
double spLine, double spBefore, double spAfter, unsigned char align, unsigned flags) = 0;
diff --git a/src/lib/VSDXContentCollector.cpp b/src/lib/VSDXContentCollector.cpp
index acb879e..d7fe130 100644
--- a/src/lib/VSDXContentCollector.cpp
+++ b/src/lib/VSDXContentCollector.cpp
@@ -2144,13 +2144,13 @@ void libvisio::VSDXContentCollector::collectVSDXParaStyle(unsigned /* id */ , un
m_paraFormats.push_back(format);
}
-void libvisio::VSDXContentCollector::collectVSDXCharStyle(unsigned /*id*/ , unsigned level, unsigned charCount, unsigned short fontID,
- Colour fontColour, unsigned langId, double fontSize, bool bold, bool italic,
+void libvisio::VSDXContentCollector::collectVSDXCharStyle(unsigned /*id*/ , unsigned level, unsigned charCount,
+ unsigned short fontID, Colour fontColour, double fontSize, bool bold, bool italic,
bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace)
{
_handleLevelChange(level);
- VSDXCharStyle format(charCount, fontID, fontColour, langId, fontSize, bold, italic,
+ VSDXCharStyle format(charCount, fontID, fontColour, fontSize, bold, italic,
underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript, fontFace);
m_charFormats.push_back(format);
@@ -2209,7 +2209,7 @@ void libvisio::VSDXContentCollector::collectFillStyle(unsigned /*id*/, unsigned
_handleLevelChange(level);
}
-void libvisio::VSDXContentCollector::collectCharIXStyle(unsigned /*id*/ , unsigned level, unsigned /*charCount*/, unsigned short /*fontID*/, Colour /*fontColour*/, unsigned /*langId*/, double /*fontSize*/,
+void libvisio::VSDXContentCollector::collectCharIXStyle(unsigned /*id*/ , unsigned level, unsigned /*charCount*/, unsigned short /*fontID*/, Colour /*fontColour*/, double /*fontSize*/,
bool /*bold*/, bool /*italic*/, bool /*underline*/, bool /* doubleunderline */, bool /* strikeout */, bool /* doublestrikeout */,
bool /* allcaps */, bool /* initcaps */, bool /* smallcaps */, bool /* superscript */, bool /* subscript */, VSDXFont /*fontFace*/)
{
diff --git a/src/lib/VSDXContentCollector.h b/src/lib/VSDXContentCollector.h
index 61fdb3c..b786a2a 100644
--- a/src/lib/VSDXContentCollector.h
+++ b/src/lib/VSDXContentCollector.h
@@ -105,8 +105,8 @@ public:
void collectColours(const std::vector<Colour> &colours);
void collectFont(unsigned short fontID, const WPXBinaryData &textStream, TextFormat format);
void collectText(unsigned id, unsigned level, const WPXBinaryData &textStream, TextFormat format);
- void collectVSDXCharStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
- double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
+ void collectVSDXCharStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, double fontSize,
+ bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace);
void collectVSDXParaStyle(unsigned id , unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight,
double spLine, double spBefore, double spAfter, unsigned char align, unsigned flags);
@@ -124,8 +124,8 @@ public:
double shadowOffsetX, double shadowOffsetY);
void collectFillStyle(unsigned id, unsigned level, unsigned char colourIndexFG, unsigned char colourIndexBG, unsigned char fillPattern,
unsigned char fillFGTransparency, unsigned char fillBGTransparency, unsigned char shadowPattern, Colour shfgc);
- void collectCharIXStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
- double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
+ void collectCharIXStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, double fontSize,
+ bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace);
void collectParaIXStyle(unsigned id , unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight,
double spLine, double spBefore, double spAfter, unsigned char align, unsigned flags);
diff --git a/src/lib/VSDXStyles.h b/src/lib/VSDXStyles.h
index d4b2729..3d610aa 100644
--- a/src/lib/VSDXStyles.h
+++ b/src/lib/VSDXStyles.h
@@ -89,7 +89,6 @@ struct VSDXCharStyle
charCount(0),
faceID(0),
colour(),
- langID(0),
size(12.0/72.0),
bold(false),
italic(false),
@@ -103,11 +102,10 @@ struct VSDXCharStyle
superscript(false),
subscript(false),
face() {}
- VSDXCharStyle(unsigned cc, unsigned short id, Colour c, unsigned lang, double s, bool b, bool i, bool u, bool du, bool so, bool dso, bool ac, bool ic, bool sc, bool super, bool sub, VSDXFont f) :
+ VSDXCharStyle(unsigned cc, unsigned short id, Colour c, double s, bool b, bool i, bool u, bool du, bool so, bool dso, bool ac, bool ic, bool sc, bool super, bool sub, VSDXFont f) :
charCount(cc),
faceID(id),
colour(c),
- langID(lang),
size(s),
bold(b),
italic(i),
@@ -125,7 +123,6 @@ struct VSDXCharStyle
unsigned charCount;
unsigned short faceID;
Colour colour;
- unsigned langID;
double size;
bool bold;
bool italic;
diff --git a/src/lib/VSDXStylesCollector.cpp b/src/lib/VSDXStylesCollector.cpp
index 1b2c3b8..402cf62 100644
--- a/src/lib/VSDXStylesCollector.cpp
+++ b/src/lib/VSDXStylesCollector.cpp
@@ -243,8 +243,8 @@ void libvisio::VSDXStylesCollector::collectVSDXParaStyle(unsigned /* id */ , uns
_handleLevelChange(level);
}
-void libvisio::VSDXStylesCollector::collectVSDXCharStyle(unsigned /*id*/ , unsigned level, unsigned /*charCount*/, unsigned short /*fontID*/, Colour /*fontColour*/,
- unsigned /*langId*/, double /*fontSize*/, bool /*bold*/, bool /*italic*/, bool /*underline*/,
+void libvisio::VSDXStylesCollector::collectVSDXCharStyle(unsigned /*id*/ , unsigned level, unsigned /*charCount*/, unsigned short /*fontID*/,
+ Colour /*fontColour*/, double /*fontSize*/, bool /*bold*/, bool /*italic*/, bool /*underline*/,
bool /* doubleunderline */, bool /* strikeout */, bool /* doublestrikeout */, bool /* allcaps */,
bool /* initcaps */, bool /* smallcaps */, bool /* superscript */, bool /* subscript */, VSDXFont /*fontFace*/)
{
@@ -324,14 +324,14 @@ void libvisio::VSDXStylesCollector::collectParaIXStyle(unsigned /*id*/, unsigned
}
-void libvisio::VSDXStylesCollector::collectCharIXStyle(unsigned /*id*/ , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour,
- unsigned langID, double fontSize, bool bold, bool italic, bool underline, bool doubleunderline,
+void libvisio::VSDXStylesCollector::collectCharIXStyle(unsigned /*id*/ , unsigned level, unsigned charCount, unsigned short fontID,
+ Colour fontColour, double fontSize, bool bold, bool italic, bool underline, bool doubleunderline,
bool strikeout, bool doublestrikeout, bool allcaps, bool initcaps, bool smallcaps,
bool superscript, bool subscript, VSDXFont fontFace)
{
_handleLevelChange(level);
if (!m_charStyle)
- m_charStyle = new VSDXCharStyle(charCount, fontID, fontColour, langID, fontSize, bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
+ m_charStyle = new VSDXCharStyle(charCount, fontID, fontColour, fontSize, bold, italic, underline, doubleunderline, strikeout, doublestrikeout,
allcaps, initcaps, smallcaps, superscript, subscript, fontFace);
}
diff --git a/src/lib/VSDXStylesCollector.h b/src/lib/VSDXStylesCollector.h
index ac7fdef..302d41f 100644
--- a/src/lib/VSDXStylesCollector.h
+++ b/src/lib/VSDXStylesCollector.h
@@ -96,7 +96,7 @@ public:
void collectFont(unsigned short fontID, const ::WPXBinaryData &textStream, TextFormat format);
void collectText(unsigned id, unsigned level, const ::WPXBinaryData &textStream, TextFormat format);
- void collectVSDXCharStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
+ void collectVSDXCharStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour,
double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace);
void collectVSDXParaStyle(unsigned id , unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight,
@@ -117,7 +117,7 @@ public:
double shadowOffsetX, double shadowOffsetY);
void collectFillStyle(unsigned id, unsigned level, unsigned char colourIndexFG, unsigned char colourIndexBG, unsigned char fillPattern,
unsigned char fillFGTransparency, unsigned char fillBGTransparency, unsigned char shadowPattern, Colour shfgc);
- void collectCharIXStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour, unsigned langId,
+ void collectCharIXStyle(unsigned id , unsigned level, unsigned charCount, unsigned short fontID, Colour fontColour,
double fontSize, bool bold, bool italic, bool underline, bool doubleunderline, bool strikeout, bool doublestrikeout,
bool allcaps, bool initcaps, bool smallcaps, bool superscript, bool subscript, VSDXFont fontFace);
void collectParaIXStyle(unsigned id , unsigned level, unsigned charCount, double indFirst, double indLeft, double indRight,