Class: Uniword::Themes::ThemeApplicator
- Inherits:
-
Object
- Object
- Uniword::Themes::ThemeApplicator
- Defined in:
- lib/uniword/theme/theme_applicator.rb
Overview
Applies themes to documents by setting theme data and updating styles
When a theme is applied to a document:
-
The theme XML is stored for serialization to word/theme/theme1.xml
-
Document defaults get theme font references (minorAscii, etc.)
-
Heading styles get major font and theme color references
-
Hyperlink styles get theme color references
Instance Method Summary collapse
-
#apply(theme, document) ⇒ void
Apply theme to document.
Instance Method Details
#apply(theme, document) ⇒ void
This method returns an undefined value.
Apply theme to document
18 19 20 21 22 23 |
# File 'lib/uniword/theme/theme_applicator.rb', line 18 def apply(theme, document) word_theme = normalize_theme(theme) document.theme = word_theme.dup update_doc_defaults(document, word_theme) update_builtin_styles(document, word_theme) end |