onlyoffice / ooxml_parser Goto Github PK
View Code? Open in Web Editor NEWRuby OOXML Parser
License: GNU Affero General Public License v3.0
Ruby OOXML Parser
License: GNU Affero General Public License v3.0
SetSpacing.xlsx
xlsx.worksheets.first.drawings.first.shape.text_body.paragraphs.first.runs[1].properties.space
SetStyle.docx
In example file, table_width is eq("percent", 100);.
But parser is return 8.818342151675486 number.
Need to return Ooxml size parser object with 100%
value.
docx.elements[1].properties.table_width
is a path
SetCellBorderBottom.docx
docx.elements[1].properties.table_borders
In example, table has only row-bottom border, type - single, 32 size(point_8 unit), 0 pt - space and 0, 0, 0, 255 color
SetTableBorderBottom.docx
docx.elements[1].properties.table_borders.bottom.space
is equal 0:float
Need to eq OoxmlSize.new(0, :point)
SetTableBorderBottom11.docx
space = 11 points in this file
<w:lang w:val="en-CA"/>
- tag in xml
SetTextDirection.docx
docx.elements[1].properties.right_to_left
is true, but text in table (elements[1]) is write to up/
SetShd.docx
docx.elements[1].properties.shd
- this option is contains only color (OoxmlParser::Color.new(238, 238, 238)), but not contain type of shading (clear
in example file)
GetParaPr.docx
docx.elements[1].rows.first.cells.first.elements.first.align
- this code is return "left", but text in paragraph has align = center
SetCellSpacing.docx
I dont know, where it is has been placed, but i cant find celll spacing = 720 twip
RemoveHeader.docx
In first page header -
"This is page header #1. You will not see it, as it will be removed."
In second header -
"This is page header #2. Only this header can be seen, as the first one has been removed."
But docx.notes objecT (only one) has one element with second headers data.
SetTableInd.docx
docx.elements[1].properties.table_indent
= 2.5396825396825395 (!):float
GetTablePr.docx
docx.elements[1].rows.first.cells.first.properties.margins.top.class
- Float
Its true for left, right and bottom margins
pt_8 - Eighths of a point (24 eighths of a point = 3 points).
Sometimes this is used for set width of the border
SetShd.docx
docx.elements[1].properties.table_style.table_cell_properties.color.parent
eq nil
SetHeight.docx
In this example, height = 720 twip and type = "atLeast", but i cant find this properties in ooxml object
SetPosition.xlsx
xlsx.worksheets.first.drawings.first.position.from.column_offset
Need this to eq OoxmlParser::OoxmlSize.new(72000, :emu)
And also for xlsx.worksheets.first.drawings.first.position.from.row_offset
<a:gs pos="0">
<a:prstClr val="lightYellow"/>
</a:gs>
GetParagraphMarkTextPr (1).docx
In this file non-printed symbols has parameters:
font size - 52
font color - 255, 255, 0
spacing - 5
But i cant to take this from parser
SetCellSpacing.docx
table spacing = 720 twip
I cant find it in object
SetSpacingAfter.xlsx
xlsx.worksheets.first.drawings.first.shape.text_body.paragraphs.first.properties.spacing.after
twips equivalent to 1/1440th of an inch. Sometimes this is used in indents
All that data now stored in series
Remove that stuff
https://github.com/ONLYOFFICE/ooxml_parser/blob/master/lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart.rb#L40
It also included calls with magic number values
566.9
360_000.0
283.3
2_834
567.5
12_699
12_700
Half-points(hps) (2 half-points = 1 point).
See position
option in character_style_array obj
SetPosition.docx
SetTableLook (2).docx
docx.elements[1].rows.first.cells.first.properties.fill
Like this code is one document (paragraph with indent 1inch and image with size 1 inch)
<w:ind w:firstLine="1440"/>
<a:ext cx="914400" cy="1335023"/>
Need to able to set units delimeter for each tag separatly
MergeCells.docx
In this example, cells 2.2 -3.3 is merged.
docx.elements[1].rows[1].cells[1].properties.merge
SetSpacingAfter.docx
docx.elements.first.spacing.after = 2.54
its wrong
The shading type applied to the contents of the text run. Need option nil
and clear
for background_color option
See examples:
nil
type
nil.docx
clear
type
clear.docx
SetBasedOn.docx
Add object of table base style
GetTableCellPr (1).docx
This code returns PresentationFill obj. Need to return Color class obj
docx.elements[1].rows.first.cells.first.properties.color
SetStyleColBandSize (8).docx
is a ColBandSize = 2
SetStyleRowBandSize.docx
is a RowBandSize = 2
SetStyleColBandSize5.docx
is a ColBandSize = 5
SetStyleRowBandSize5.docx
is a RowBandSize = 5
SetBasedOn.docx
docx.elements[1].properties.table_borders
has not properties
SetNoWrap.docx
I cant find table cell wrap.
In example, table cell wrap is used to first cell of first row
GetTextPr.docx
In first cell of table i see bold text, but ooxml object is not show it. In show text, but font style is wrong
docx.elements[1].rows.first.cells.first.elements.first.character_style_array[1].font_style.bold
<w:rPr>
<w:rStyle w:val="127"/>
</w:rPr>
FooterDistance = 1440 twips
SetFooterDistance.docx
HeaderDistance = 1440 twips
SetHeaderDistance (1).docx
SetTableLayout (2).docx
TableLayout = fixed
SetTableLayout.docx
TableLayout = autofit
Add opportunity to get distance between columns
SetEqualColumns.docx
In this example, distance between columns eq 720 twips
GetTableRowPr.docx
Docx file has table with height row = 1440 twips and with rule from height value is atLeast, but code:
docx.elements[1].rows.first.table_row_properties.height
return nil
GetTextPr.docx
docx.elements.first.numbering.numbering_properties.ilvls.first.font
= "Calibri"
docx.elements.first.numbering.numbering_properties.ilvls.first.font_size
= 28
but now
docx.elements.first.numbering.numbering_properties = 1
SetIndFirstLine.docx
There is docx.elements.first.ind.units
property, and other property on this lvl is not OoxmlSize object
<a:gs pos="0">
<a:schemeClr val="accent6"/>
</a:gs>
xlsx.worksheets.first.drawings.first.shape.properties.fill_color.value.gradient_stops.first.color
SetContextualSpacing (2).docx
contextual_spacing in 1,2,3 and 4 paragraph is false. For 5 and 6 - true.
SetTabs.docx
docx.elements.first.tabs.first.position
Need this to eq OoxmlParser::OoxmlSize.new(1440, :twip)
GetTablePr.docx
I set table border bottom (0, 255, 0 - color, type - "single", size = 32, space = 0)
space.docx
tab.docx
none.docx
docx.elements[0].numbering.abstruct_numbering.level_list.first
- is a numbering style. In first example, after numbering has setted space. In second - tab. In third - none.
GetTableCellPr.docx
docx.elements[1].rows.first.cells.first.properties.color
is return nil, bun in document i setted ("clear" type and 0xEE, 0xEE, 0xEE color (238, 238, 238)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.