Re: copy an existing style

2015-01-03 Thread Oliver Brinzing
Hi Jörg, the_style = ThisComponent.getStyleFamilies.getByName(ParagraphStyles).getByName(jms1) ThisComponent.getStyleFamilies.getByName(ParagraphStyles).insertByName(jms3, the_style) i think you have to copy all Properties from old to new style. this should work for Pagestyles: REM *

Re: copy an existing style

2015-01-03 Thread Oliver Brinzing
Hi Jörg, or try to set the parent style: newStyle.ParentStyle = oldStyle.Name oStyles.insertByName(myNewStyle, newStyle) so newStyle inherits all properties from oldStyle Regards Oliver - To unsubscribe, e-mail:

Re: copy an existing style

2015-01-03 Thread Jörg Schmidt
From: Oliver Brinzing [mailto:oliver.brinz...@gmx.de] i think you have to copy all Properties from old to new style. this should work for Pagestyles: REM * BASIC * OPTION EXPLICIT Sub PageStyle [...] Thank You. The following works for me: Sub Vorlage_kopieren()

Re: copy an existing style

2015-01-03 Thread Jörg Schmidt
From: Oliver Brinzing [mailto:oliver.brinz...@gmx.de] Sent: Saturday, January 03, 2015 10:00 AM To: api@openoffice.apache.org Subject: Re: copy an existing style Hi Jörg, or try to set the parent style: newStyle.ParentStyle = oldStyle.Name oStyles.insertByName(myNewStyle, newStyle)