Jos van den Oever
2ec8acd0ae
Add typing information to xmldom.XPath.
2013-11-26 16:56:00 +01:00
Friedrich W. H. Kossebau
c2a795e668
Update link to repo: now https://github.com/kogmbh/WebODF/
2013-10-23 18:20:30 +02:00
Friedrich W. H. Kossebau
508570dab8
Add copy of the AGPL3 to sources (+ add to created zip files)
2013-10-21 17:55:16 +02:00
Friedrich W. H. Kossebau
374feb9e26
In Style2CSS do not hardcode the fallback for font-family to sans-serif
...
Fixes the sometimes difference in what substitution font is used in the
font selector tool and what substitution font is used in the ODF document
display for fonts which are not installed on the system
2013-09-27 17:49:59 +02:00
Aditya Bhatt
d22a401aaa
Fix CSS generation for default styles - do not select for a style-name
...
attribute for matched elements.
2013-09-17 12:43:59 +02:00
Lu Li
b0ca6f34d6
add graphic property mapping for border
...
According to OpenDocument v1.0
"The attribute draw:stroke specifies the style of the stroke on the current object."
"The attribute svg:stroke-width specifies the width of the stroke on the current object."
"The attribute svg:stroke-color specifies the color of the stroke on the current object. "
2013-08-28 09:40:18 +02:00
Lu Li
da9e8a8f33
Ensure border width is no less than 1px otherwise border is not rendered. Also map 'border-model' to css property 'border-collapse' for table
2013-08-12 12:20:37 +02:00
Friedrich W. H. Kossebau
419b168b9c
Unify usage of object "window"
2013-07-29 12:07:04 +02:00
Lu Li
f6de4efdc7
line-height conversion fix
2013-07-29 11:44:00 +02:00
Jos van den Oever
64d57c96cf
Fix issues exposed by latest JSLint.
2013-07-24 21:41:56 +02:00
Jos van den Oever
967e5c0ba0
Update closure compiler and fix ensuing problems.
2013-07-24 17:56:39 +02:00
Jos van den Oever
1dd372b23c
Fix invalid css.
2013-07-10 22:49:52 +02:00
Philip Peitsch
c124a6617b
Removed debug log statement
2013-07-02 21:19:36 +02:00
Aditya Bhatt
9379f946e9
Add methods to parse PositiveLength, NonNegativeLength, Percentage,
...
fo:line-height, and fo:font-size to OdfUtils, and use them instead of
the old parseLength in Style2CSS
2013-06-20 11:46:45 +02:00
Aditya Bhatt
b54a00a869
* Rename parseFontSize to parseLength
...
* Use that for the line height
2013-06-20 11:46:45 +02:00
Aditya Bhatt
14af210392
Handle null values of line-height
2013-06-20 11:46:45 +02:00
Aditya Bhatt
4e8e109d7c
% line-height values in CSS are unreliable. Use a multiplier (1.x) type
...
% of value in stead of %ages.
2013-06-20 11:46:45 +02:00
Aditya Bhatt
6541e1343f
Add an OdfUtils.parseFontSize function for better font size handling
2013-06-19 17:26:09 +02:00
Aditya Bhatt
a66df8774b
Implement support for % font sizes.
2013-06-19 17:25:13 +02:00
Jos van den Oever
eecfa4d201
Remove trailing spaces and tabs.
2013-06-19 16:47:52 +02:00
Aditya Bhatt
fcbc668a50
Add stroke-width and border/padding mapping
2013-06-19 14:24:22 +02:00
Aditya Bhatt
563a0e69fb
* jsdoc
...
* handle case when bgcolor might be null
2013-06-19 13:08:49 +02:00
Aditya Bhatt
b4b2f08f29
There are more than one master page styles, style pages accordingly
...
Documentation++
2013-06-19 13:08:49 +02:00
Aditya Bhatt
558a9bbe9b
Undo bad width/height hack and now decide the page style to use by
...
checking the master style name
2013-06-19 13:08:49 +02:00
Aditya Bhatt
92dbaacc1d
Respect the presentation:background-visible rule
2013-06-19 13:08:49 +02:00
Aditya Bhatt
9c963f2317
Use a 'none' background if no solid/hatch fill is specified
2013-06-19 13:08:49 +02:00
Aditya Bhatt
8f11dc87b5
Smarter handling of background fill-color, along with alpha channel.
2013-06-19 13:08:49 +02:00
Aditya Bhatt
ba3f8a59e6
* Let drawing-page family things also be styled like a graphic.
...
* Frame opacity is here! (without affecting text)
2013-06-19 13:08:49 +02:00
Aditya Bhatt
29f45f5b54
Stop hardcoding dimensions for presentation pages in webodf.css, and get
...
these dimensions from the page style.
A new API call has been added to know the type of document
(text/presentation/spreadsheet), and this is used to decide what sort of
CSS rule to generate for page layouts.
As a little temporary hack, for slideshows, the last page style where the
height is lesser than the width is used for layouting, because for the
vast majority of presentations this holds true. This will change once we
adequately implement support for master styles.
2013-06-19 13:08:48 +02:00
Philip Peitsch
f76257c81a
Avoid issues with lists in fodt files
...
Extra whitespace nodes throw off any logic depending
on the node's firstChild being a non-whitespace element
2013-06-17 13:08:47 +10:00
Philip Peitsch
d34e7f8059
Small code cleanup around style and formatting classes
...
* Removing dead code and cleaning up unused variables
* Corrected extern definitions for createTreeWalker and createNodeIterator
* Clarified variable names and function header for mergeRecursive
* Made getInheritedStyleAttributes able to cope with a document that lacks default style definitions for various classes
(Theoretically all should have this, but it makes testing easier to write)
* Added missing module dependency to odf.Formatting
2013-06-14 17:40:18 +10:00
Philip Peitsch
73bac1e595
Fixed closure compiler warning
2013-06-12 16:45:33 +10:00
Aditya Bhatt
248d43c319
A new mapping for ODT page style in Style2CSS
...
Temporarily disable page height mapping, till we have pagination
2013-06-11 12:42:17 +02:00
Lu Li
e5ad98e25b
add more mapping
...
* add line-height into paragraph property mapping
* add background-color into graphic property mapping
2013-05-23 11:59:24 +02:00
Jos van den Oever
d662480721
Add mapping for paragraph property fo:text-indent.
2013-05-16 12:03:48 +02:00
Friedrich W. H. Kossebau
0d4c7c0d49
Move createFontFaceDeclsMap() function from odf.Style2CSS to odf.Formatting
2013-04-18 19:24:50 +02:00
Friedrich W. H. Kossebau
a3ba82f92a
Turn odf.Namespace from a class into a singleton object
2013-04-18 14:26:09 +02:00
Friedrich W. H. Kossebau
7741d55f2e
Create new class odf.Namespaces
2013-04-18 10:46:24 +02:00
Friedrich W. H. Kossebau
506f56434f
cleanup odf.Style2CSS.makeFontFaceDeclsMap (now .createFontFaceDeclsMap)
2013-04-15 16:14:11 +02:00
Philip Peitsch
138123bc94
Cope with list and bullet styles that do not specify values for fo:text-indent or fo:margin-left
2013-04-09 12:44:40 +02:00
Aditya Bhatt
5df8bc3471
Parantheses. Use parantheses. Generate proper CSS that includes
...
semicolon.
2013-03-25 15:52:57 +05:30
Aditya Bhatt
a1354b010e
Some changes to handle undefined font families
2013-03-25 15:52:57 +05:30
Friedrich W. H. Kossebau
3e09df6b16
Little code improvements for getStyleMap in odf.Style2CSS
2013-03-20 14:11:08 +01:00
Philip Peitsch
1b4cbfd4d6
Style2CSS will skip insignificant white-space only nodes when constructing the document stylemap
...
amended by th:
* rebased;
* fixed minor jslint-violation;
* slightly modified the implementation;
* some whitespace changes
2013-03-20 11:46:01 +01:00
Aditya Bhatt
1f894d0691
Remove lots of whitespace
2013-03-06 19:51:19 +05:30
Aditya Bhatt
7ef88fc872
Retrieve the font face declarations map from Style2CSS in Formatting.js.
...
Expose this map to EditorSession, and add a getUsedFonts method to
EditorSession that removes number-suffixed duplicate font-names like
Arial1, Arial2, etc and returns a reduced font name-to-family map.
2013-03-06 19:51:18 +05:30
Friedrich W. H. Kossebau
0a5f9f6dab
Do not mark mistakenly global vars as assignable in jslint /*global*/ directives
...
"Each name can optionally be followed by a colon and either true or false,
true indicating that the variable may be assigned to by this file,
and false indicating that assignment is not allowed (which is the default)."
(from http://www.jslint.com/lint.html )
2013-02-26 18:00:25 +01:00
Aditya Bhatt
cbfc8690cd
Check if textDecoration is populated
2013-02-20 13:35:47 +05:30
Aditya Bhatt
3c1ce46dac
Add strikethrough support to the style modifier and restore the button
...
in simpleStyles.
Also add special CSS handling for it in Style2CSS
2013-02-20 13:35:47 +05:30
Aditya Bhatt
bd78027b91
Make webodf also take into account default styles, while generating CSS.
...
Documents look much much more accurate now.
2013-01-22 15:35:22 +05:30