summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-20 21:05:56 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-20 21:05:56 +0200
commit35be22a86d0cf1c2384cd1730350e0934cba0897 (patch)
tree0875d0fbf08ef67b3f5ec93fcd63e77947f020a0
parent0aa5d64dadf5342a54a9443091c32bac863f4e2a (diff)
Add tokens related to theme
-rw-r--r--src/lib/VSDXTheme.cpp18
-rw-r--r--src/lib/tokens.txt78
2 files changed, 94 insertions, 2 deletions
diff --git a/src/lib/VSDXTheme.cpp b/src/lib/VSDXTheme.cpp
index 616737c..9110173 100644
--- a/src/lib/VSDXTheme.cpp
+++ b/src/lib/VSDXTheme.cpp
@@ -27,6 +27,8 @@
* instead of those above.
*/
+#include "VSDXMLHelper.h"
+#include "VSDXMLTokenMap.h"
#include "VSDXTheme.h"
libvisio::VSDXTheme::VSDXTheme()
@@ -42,15 +44,27 @@ bool libvisio::VSDXTheme::parse(WPXInputStream *input)
if (!input)
return false;
+ xmlTextReaderPtr reader = xmlReaderForStream(input, 0, 0, XML_PARSE_NOBLANKS|XML_PARSE_NOENT|XML_PARSE_NONET);
+ if (!reader)
+ return false;
+
try
{
- return true;
+ int ret = xmlTextReaderRead(reader);
+ while (1 == ret)
+ {
+ /* int tokenId = VSDXMLTokenMap::getTokenId(xmlTextReaderConstName(reader));
+ int tokenType = xmlTextReaderNodeType(reader); */
+ ret = xmlTextReaderRead(reader);
+ }
}
catch (...)
{
+ xmlFreeTextReader(reader);
return false;
}
- return false;
+ xmlFreeTextReader(reader);
+ return true;
}
diff --git a/src/lib/tokens.txt b/src/lib/tokens.txt
index 88bdc2c..ead1950 100644
--- a/src/lib/tokens.txt
+++ b/src/lib/tokens.txt
@@ -1,6 +1,54 @@
A
+a:accent1
+a:accent2
+a:accent3
+a:accent4
+a:accent5
+a:accent6
+a:alpha
+a:bgFillStyleLst
+a:clrScheme
+a:cs
+a:dk1
+a:dk2
+a:ea
+a:effectLst
+a:effectStyle
+a:effectStyleLst
+a:ext
+a:extLst
+a:extraClrSchemeLst
+a:fillStyleLst
+a:fmtScheme
+a:folHlink
+a:font
+a:fontScheme
+a:gradFill
+a:gs
+a:gsLst
+a:hlink
+a:latin
+a:lin
+a:ln
+a:lnStyleLst
+a:lt1
+a:lt2
+a:lumMod
+a:majorFont
+a:minorFont
Angle
+a:objectDefaults
+a:outerShdw
+a:prstDash
ArcTo
+a:satMod
+a:schemeClr
+a:shade
+a:solidFill
+a:srgbClr
+a:theme
+a:themeElements
+a:tint
B
BeginArrow
BottomMargin
@@ -128,6 +176,36 @@ TxtPinX
TxtPinY
TxtWidth
VerticalAlign
+vt:bkgnd
+vt:color
+vt:connectorFontStyles
+vt:fillProps
+vt:fillStyles
+vt:fmtConnectorScheme
+vt:fmtConnectorSchemeEx
+vt:fmtConnectorSchemeLineStyles
+vt:fmtSchemeEx
+vt:fmtSchemeLineStyles
+vt:fontProps
+vt:fontStyles
+vt:fontStylesGroup
+vt:lineEx
+vt:lineStyle
+vt:lineStyles
+vt:schemeID
+vt:themeScheme
+vt:varColor1
+vt:varColor2
+vt:varColor3
+vt:varColor4
+vt:varColor5
+vt:varColor6
+vt:varColor7
+vt:variationClrScheme
+vt:variationClrSchemeLst
+vt:variationStyleScheme
+vt:variationStyleSchemeLst
+vt:varStyle
Width
X
XForm