Difference between revisions of "VML"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 12: Line 12:
 
For example:
 
For example:
 
We have 2 shapes in Word 2007, as below:
 
We have 2 shapes in Word 2007, as below:
 
 
[[File:Template-BasedShape.png]]
 
[[File:Template-BasedShape.png]]
 
 
And the OOXML description for this part is as below:
 
And the OOXML description for this part is as below:
 
 
[[File:Tem-baseShapeXML.png]]
 
[[File:Tem-baseShapeXML.png]]
 
 
In the OOXML file, the <v:shapetype> defines the shape's path information, and the <v:shape> defines style related information.
 
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 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.
 
And also, different shape in one document may refer to the same shape type if they have same layout, but with different style only.
 
=== 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:
 
 
[[File:XlsxComments.png]]
 
 
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:
 
 
[[File:XlsxCommentsXML.png]]
 
  
 
=== WordprocessingML Text Box ===
 
=== WordprocessingML Text Box ===
Line 40: Line 24:
  
 
For example, we have a file with a text box in it:
 
For example, we have a file with a text box in it:
 
 
[[File:Textbox.png]]
 
[[File:Textbox.png]]
 
 
And the VML format saved in OOXML files is as blow:
 
And the VML format saved in OOXML files is as blow:
 
 
[[File:TextboxXML.png]]
 
[[File:TextboxXML.png]]
 +
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
  
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:
 +
[[File:XlsxComments.png]]
 +
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:
 +
[[File:XlsxCommentsXML.png]]
  
 
== VML Parser data structure ==
 
== VML Parser data structure ==

Revision as of 09:15, 13 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.

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: Template-BasedShape.png And the OOXML description for this part is as below: Tem-baseShapeXML.png 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: Textbox.png And the VML format saved in OOXML files is as blow: TextboxXML.png 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: XlsxComments.png 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: XlsxCommentsXML.png

VML Parser data structure

Writerfilter for VML shape import handler

OOX part for VML shape process handler

Personal tools