Commit Graph
60 Commits
Author SHA1 Message Date
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
Tobias Hintze 375457d233 update license and copyright headers 2012-10-21 20:46:20 +02:00
Tobias Hintze 758333d210 update "@source:" references to gitorious.org/webodf
(as in master: de1a79c36f)
2012-10-21 12:18:15 +02:00
Jos van den Oever 9cac11cf01 Fix warnings reported by Firefox. 2012-08-25 00:42:10 +02:00
Jos van den Oever 30bd086382 Use the attribute svg:font-family for setting the css value for the font family instead of style:name. 2012-08-22 22:25:25 +02:00
Jos van den Oever 58aa1fdcd3 Verify that the DOM node is an Element be for calling getAttributeNS. 2012-08-08 17:59:36 +02:00
Aditya Bhatt 785e8174bf Remove TODO and console.log statement 2012-08-03 22:03:06 +05:30
Aditya Bhatt 52e7c408cb Added a font-face declaration resolver method, makeFontFaceDeclsMap, that creates a hash table that maps names to font-family. Updated Style2CSS.style2css() to pass on the fontFaceDecls node to the mapper. 2012-08-03 21:56:43 +05:30
Jos van den Oever 8416ca1220 Improve bullet lists.
Patch by Stuart Dickson

"
Here's the latest patch for the bullets functionality.

This includes the testdoc subfolder and there are two documents for testing the nested docs, one in LO and the other in Calligra.

The LO authored doc runs fine in Chrome, but on Firefox, the continued numbering has issues. It resets with each list, I believe the id-based selector may not be getting applied correclty, I'll add some additional decoration to the bullet block to confirm whether this is the case.

The Calligra document does not render correctly, which I was lookoing at before hitting build environment issues, which have taken my time the last couple of days (although look to be at an end now).

The things I wasn't too sure/happy with were:

    Having to copy code from Style2CSS into OdfCanvas (would prefer to have exposed the function and reused.
    I needed to get hold of the document in order to read the already added styles - and used window.document there (this works with jslint, but I'm not convinced it is the right approach)
"
2012-07-11 18:50:36 +02:00
Jos van den Oever 6e0d235263 Merge style properties. 2012-04-27 14:09:38 +02:00
Tobias Hintze bdef5cca4a add stuarts table-work. 2012-04-27 12:39:11 +02:00
Jos van den Oever 94797632bd Add support for table and column width.
And a few other properties.
2012-04-27 09:46:01 +02:00
Jos van den Oever 65089c44dc Fix warning in Firefox 6. 2011-09-30 16:00:30 +02:00
Jos van den Oever cd4f75c624 Use "use strict" to have more sanity checks. 2011-09-30 12:23:09 +02:00
Jos van den Oever 1a82610f9f Update to a new JSLint
and fix all the new errors it finds.
2011-09-29 13:57:04 +02:00
Jos van den Oever 2c4835fd8e Better positioning of frames that are anchored to paragraphs. 2011-09-29 11:29:51 +02:00
Jos van den Oever a97612ce83 Upgrade to new version of JSLint.
And update code to meet better checks.
2011-07-13 10:21:31 +02:00
Jos van den Oever 13c077b970 Add licenses and copyright statements to all javascript files. 2011-06-06 12:30:35 +02:00
Jos van den Oever a9416f5b65 Use advanced optimizations (experimental!). 2011-06-03 21:40:42 +02:00