From 97d1fbc1653280857499d76f5203a379892a8e3e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 1 May 2019 15:59:10 +0200 Subject: Add style for footer --- libstorycode/storycode.y | 5 +++++ libstorycode/stylesheet.c | 2 ++ 2 files changed, 7 insertions(+) (limited to 'libstorycode') diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y index 4c418eb..a9c3f13 100644 --- a/libstorycode/storycode.y +++ b/libstorycode/storycode.y @@ -371,6 +371,7 @@ style_slide_def: | style_slide_def style_slide_prestitle { } | style_slide_def style_slide_text { } | style_slide_def style_slide_title { } +| style_slide_def style_slide_footer { } ; background: @@ -400,6 +401,10 @@ style_slide_text: TEXTFRAME '{' styledefs '}' { set_style(ctx, "SLIDE.TEXT"); } ; +style_slide_footer: + FOOTER '{' styledefs '}' { set_style(ctx, "SLIDE.FOOTER"); } +; + styledefs: %empty | styledefs styledef diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c index eb8b2cb..c4625f2 100644 --- a/libstorycode/stylesheet.c +++ b/libstorycode/stylesheet.c @@ -220,6 +220,7 @@ Stylesheet *stylesheet_new() create_style(ss, "SLIDE", "TEXT"); create_style(ss, "SLIDE", "PRESTITLE"); create_style(ss, "SLIDE", "SLIDETITLE"); + create_style(ss, "SLIDE", "FOOTER"); return ss; } @@ -552,5 +553,6 @@ const char *stylesheet_get_friendly_name(const char *in) if ( strcmp(in, "SLIDETITLE") == 0 ) return "Slide title"; if ( strcmp(in, "PRESTITLE") == 0 ) return "Presentation title"; if ( strcmp(in, "TEXT") == 0 ) return "Text frame"; + if ( strcmp(in, "FOOTER") == 0 ) return "Footer"; return in; } -- cgit v1.2.3