diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-12-18 01:05:09 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2011-12-18 01:05:09 +0100 |
commit | 0f0b800481ee358cbe2bd5eb068b4ab58b327ab7 (patch) | |
tree | 46931121410acdfd1ac0ea333524e83300c3ca96 /src/presentation.c | |
parent | b2811318f359d51cb892f53964dcb7ecbd71f0f5 (diff) |
Auto-furniture: part 1
Diffstat (limited to 'src/presentation.c')
-rw-r--r-- | src/presentation.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/presentation.c b/src/presentation.c index cdb4a14..9261307 100644 --- a/src/presentation.c +++ b/src/presentation.c @@ -140,6 +140,40 @@ struct slide *add_slide(struct presentation *p, int pos) free_slide(s); return NULL; } + + if ( pos >= 0 ) { + struct slide *ex = p->slides[pos]; + + s->roles[S_ROLE_PTITLE_REF] = ex->roles[S_ROLE_PTITLE_REF]; + s->roles[S_ROLE_PAUTHOR_REF] = ex->roles[S_ROLE_PAUTHOR_REF]; + s->roles[S_ROLE_PDATE_REF] = ex->roles[S_ROLE_PDATE_REF]; + + if ( ex->roles[S_ROLE_PTITLE] != NULL ) { + p->text_tool->create_default(p, + ex->roles[S_ROLE_PTITLE]->style, s, + p->text_tool); + } + + if ( ex->roles[S_ROLE_SLIDENUMBER] != NULL ) { + p->text_tool->create_default(p, + ex->roles[S_ROLE_SLIDENUMBER]->style, s, + p->text_tool); + } + + if ( ex->roles[S_ROLE_PAUTHOR] != NULL ) { + p->text_tool->create_default(p, + ex->roles[S_ROLE_PAUTHOR]->style, s, + p->text_tool); + } + + if ( ex->roles[S_ROLE_PDATE] != NULL ) { + p->text_tool->create_default(p, + ex->roles[S_ROLE_PDATE]->style, s, + p->text_tool); + } + + } + return s; } |