diff options
Diffstat (limited to 'libstorycode')
-rw-r--r-- | libstorycode/stylesheet.c | 12 | ||||
-rw-r--r-- | libstorycode/stylesheet.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c index f625b19..77e37e1 100644 --- a/libstorycode/stylesheet.c +++ b/libstorycode/stylesheet.c @@ -560,3 +560,15 @@ const char *stylesheet_get_substyle_name(Stylesheet *s, const char *stn, int i) if ( i >= sty->n_substyles ) return NULL; return sty->substyles[i].name; } + + +const char *stylesheet_get_friendly_name(const char *in) +{ + if ( strcmp(in, "SLIDE") == 0 ) return "Slide"; + if ( strcmp(in, "NARRATIVE") == 0 ) return "Narrative"; + if ( strcmp(in, "BP") == 0 ) return "Bullet point"; + if ( strcmp(in, "SLIDETITLE") == 0 ) return "Slide title"; + if ( strcmp(in, "PRESTITLE") == 0 ) return "Presentation title"; + if ( strcmp(in, "TEXT") == 0 ) return "Text frame"; + return in; +} diff --git a/libstorycode/stylesheet.h b/libstorycode/stylesheet.h index f814e01..f7a3d21 100644 --- a/libstorycode/stylesheet.h +++ b/libstorycode/stylesheet.h @@ -109,4 +109,6 @@ extern const char *stylesheet_get_substyle_name(Stylesheet *s, const char *stn, extern char *stylesheet_serialise(Stylesheet *s); +extern const char *stylesheet_get_friendly_name(const char *in); + #endif /* STYLESHEET_H */ |