Hi Bart,

Bart Aimar wrote:

There is a little bug in manage hierachical Cell Styles.

All the properties along the hierachy can be modifyed and "reset to default" any time now (By UI)
With exception for the cellBackcolor!

This cood seem a good workaround:

SUB Property_2_default
    oSheet = ThisComponent.Sheets.getByName(_
        ThisComponent.currentcontroller.activesheet.name)
      ocell = thiscomponent.currentselection()
    sCellStyle = ocell.CellStyle
    print sCellStyle
'________________________________________________________________________________________
     Thiscomponent.StyleFamilies.CellStyles.getByName(_
        sCellStyle).setAllPropertiesToDefault
     ' this work fine, but all propertie are reset to default
     ' ok ma questo mette TUTTE le proprieta a default
'________________________________________________________________________________________
'     Thiscomponent.StyleFamilies.CellStyles.getByName(_
'        sStyle).PropertyToDefault ???
'    Thiscomponent.StyleFamilies.CellStyles.getByName(_
'        sStyle).setPropertiesToDefault ???
END SUB

But ALL the properties are resetted !

To reset ONLY the backGroundColor I found:
... StyleFamilies.CellStyles.getByName(sStyle).PropertyToDefault ???
... StyleFamilies.CellStyles.getByName(sStyle).setPropertiesToDefault ???

Obviously I have problems about the parametres...

I once had to set a colour to default. Value had to be '-1'.
Maybe that helps?

--

Cor Nouws
Arnhem - Netherlands
www.nouenoff.nl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to