| View previous topic :: View next topic |
| Author |
Message |
ariel_ar_de General User

Joined: 16 Sep 2006 Posts: 9
|
Posted: Mon Jan 29, 2007 6:08 am Post subject: ACCESSING/ CREATING CONDITIONAL STYLES |
|
|
ACCESSING/ CREATING CONDITIONAL STYLES
Does the property ParaStyleConditions of the service STYLE realy exist?
If I access a conditional style, there is no such property as defined in com.sun.star.style.Style
oConditStyle = ThisComponent.StyleFamilies.getByName("ParagraphStyles").getByName("Text body")
oParaCond = oConditStyle.ParaStyleConditions
'error, there is no such property or method
And the following code without the ParaStyleConditions creates a conditional style. Including the ParaStyleConditions causes an error.
oDoc = thiscomponent
oCondStyle = oDoc.createInstance("com.sun.star.style.ConditionalParagraphStyle")
oFamily = oDoc.StyleFamilies.getByName("ParagraphStyles")
sNameNewCondStyle = "OOoBasic conditional style"
Dim ParaConditions(2) as New com.sun.star.beans.NamedValue
ParaConditions(0).Name = "TableHeader"
ParaConditions(0).Value = "Style name 1"
ParaConditions(1).Name = "Table"
ParaConditions(1).Value = "Style name 2"
ParaConditions(2).Name = "OutlineLevel1"
ParaConditions(2).Value = "Style name 3"
'ERROR on this line: no such property found
oCondStyle.ParaStyleConditions = ParaConditions()
oFamily .insertbyName( sNameNewCondStyle, oCondStyle) |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Mon Jan 29, 2007 4:06 pm Post subject: |
|
|
Neither "TableHeader", "Table" nor "OutlineLevel1" are names of properties.
I have no idea how to acomplish your task, but the xray-tool should help:
http://ooomacros.org/dev.php#101416 _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
ariel_ar_de General User

Joined: 16 Sep 2006 Posts: 9
|
Posted: Sat Feb 10, 2007 5:54 pm Post subject: |
|
|
Hy and thanks for your your answer. As you say there exist NO such property, but if it IS in the API reference com.sun.star.tyle.Style and in the Dev's Guide. So??!!!
It's just blah blah blah???!!!!!
The API reference to that service is NOT unpublished, so it should in theory be accesible. BUT.........[/b] |
|
| Back to top |
|
 |
|