Difference between revisions of "VML"
(→VML Parser data structure: (checkpoint save)) |
((checkpoint save)) |
||
Line 52: | Line 52: | ||
== VML Parser data structure == | == VML Parser data structure == | ||
We can get the VML parser under \oox\source\vml, there are several parts for VML shape handler. Including: | We can get the VML parser under \oox\source\vml, there are several parts for VML shape handler. Including: | ||
− | vmldrawing.cxx - | + | |
− | vmldrawingfragment.cxx - | + | vmldrawing.cxx - |
− | vmlformatting.cxx - | + | vmldrawingfragment.cxx - |
− | vmlinputstream.cxx - | + | vmlformatting.cxx - |
− | vmlshape.cxx - | + | vmlinputstream.cxx - |
− | vmlshapecontainer.cxx - | + | vmlshape.cxx - |
− | vmlshapecontext.cxx - | + | vmlshapecontainer.cxx - |
− | vmltextbox.cxx - | + | vmlshapecontext.cxx - |
− | vmltextboxcontext.cxx - | + | vmltextbox.cxx - |
+ | vmltextboxcontext.cxx - | ||
+ | |||
+ | But the docx import filter is put under \writerfilter. so there are connections for \writerfitler to call \oox to parser the vml shape related. | ||
=== Writerfilter for VML shape import handler === | === Writerfilter for VML shape import handler === | ||
=== OOX part for VML shape process handler === | === OOX part for VML shape process handler === |
Revision as of 01:30, 18 September 2012
VML is a language for defining graphical objects in cases where DrawingML does not apply in Office Open XML, such as text boxes and shapes in WordprocessingML and comments and controls in SpreadsheetML.
VML is a legacy format originally introduced with Office 2000 and is existing mainly for backwards compatibility reasons. The DrawingML format is a newer and richer format created with the goal of eventually replacing any uses of VML in the Office Open XML formats.
Contents
VML Usage in the Office Open XML Format
WordprocessingML OfficeArt Shapes
Office Art shape is defined as a template-based shape in VML.
For example: We have 2 shapes in Word 2007, as below:
And the OOXML description for this part is as below:
In the OOXML file, the <v:shapetype> defines the shape's path information, and the <v:shape> defines style related information. And also the property type defined in <v:shape> means current shape refer to which of the shape type definition. And also, different shape in one document may refer to the same shape type if they have same layout, but with different style only.
WordprocessingML Text Box
Text Box created in MS Office 2007/2010 are described as VML format also, with the text information embeded in VML shape description.
For example, we have a file with a text box in it:
And the VML format saved in OOXML files is as blow:
From the OOXML definition above, the <v:textbox> part hold the text information and also format information in it to mark that it's a VML text box in the file
SpreadsheetML Comments
Comments created by Excel 2007/2010 are described as VML format in MS OOXML, and separated from SpreadsheetML.
For example, we have a xlsx file with a comment in as below:
And the comments information saved in the zip file as package\xl\comment[1].xml, and the drawing's information saved in the path as below:
VML Parser data structure
We can get the VML parser under \oox\source\vml, there are several parts for VML shape handler. Including:
vmldrawing.cxx - vmldrawingfragment.cxx - vmlformatting.cxx - vmlinputstream.cxx - vmlshape.cxx - vmlshapecontainer.cxx - vmlshapecontext.cxx - vmltextbox.cxx - vmltextboxcontext.cxx -
But the docx import filter is put under \writerfilter. so there are connections for \writerfitler to call \oox to parser the vml shape related.