WP DELETE STYLE SHEET
WP DELETE STYLE SHEET ( styleSheetObj : Object )
WP DELETE STYLE SHEET (wpDoc : Object ; styleSheetName : Text {; listLevelIndex : Integer })
| Parámetros | Tipo | Descripción | |
|---|---|---|---|
| styleSheetObj | Object | → | Objeto hoja de estilo |
| wpDoc | Object | → | Documento 4D Write Pro |
| listLevelIndex | Integer | → | Nivel de la hoja de estilo en la jerarquía |
| styleSheetName | Text | → | Nombre de la hoja de estilo |
Historia
| Lanzamiento | Modificaciones |
|---|---|
| 4D 18 | Created |
| 4D 21 R3 | *Se ha añadido el parámetro listLevelIndex |
Descripción
The WP DELETE STYLE SHEET command removes the designated paragraph or character style sheet from the current document. When a style sheet is removed, every character or paragraph that it was applied to reverts to its original style (i.e. the default).
This command provides two ways to remove a style sheet. You can specify:
- the style sheet object (created with the WP New style sheet or returned by the WP Get style sheet command) to remove in the styleSheetType parameter, or
- the 4D Write Pro document along with the name of the style sheet to remove in the wpDoc and styleSheetName parameters.
When the style sheet to delete belongs to a hierarchical list style sheet, the behavior depends on the level being removed. You can delete:
- the root-level style sheet, or
- una hoja de estilo de subnivel específica ofreciendo el parámetro opcional listLevelIndex.
When you delete the root-level style sheet (by passing 1 in the listLevelIndex parameter or ommitting it), all associated sub-level style sheets are deleted automatically and the entire hierarchical structure is removed from the document.
Al eliminar una hoja de estilo de subnivel:
- The
wk list level indexof all subsequent sub-level style sheets is decremented to maintain continuous level numbering. - Los nombres de las hojas de estilo de subnivel afectadas se actualizan para reflejar su nuevo índice de nivel.
- The
wk list level countattribute of the root style sheet and all remaining sub-level style sheets is decremented to match the new total number of levels.
The command performs no action if the specified level does not exist, or if the style sheet is not part of a hierarchical list and listLevelIndex is greater than 1.
Nota: la hoja de estilo por defecto ("Normal") no se puede eliminar.
Ejemplo
The following example deletes the second level of a hierarchical list style sheet:
// Borrar el nivel 2 de la hoja de estilo jerárquica "MainList"
WP DELETE STYLE SHEET(wpArea; "MainList"; 2)
Después de la ejecución:
- The
wk list level indexvalues are updated (former level 3 becomes level 2). - Se decrementa el
wk list level count.
To delete the entire hierarchical style sheet (root and all associated sub-levels):
WP DELETE STYLE SHEET(wpArea; "MainList")
Ver también
Style sheets
WP Get style sheet
WP Get style sheets
WP IMPORT STYLE SHEETS
WP New style sheet