https://issues.apache.org/ooo/show_bug.cgi?id=125195
--- Comment #9 from Ariel Constenla-Haile <[email protected]> --- (In reply to Darius Daniel Grigoras from comment #6) > Of course you can delete them now, because the text to which these styles > were applied is deleted, It is possible to delete custom styles even if they are used in the document (you will lose the formatting, though). > but as long as the text is there (which is > confidential), you cannot delete them. Can you replace all text with X? (In reply to Darius Daniel Grigoras from comment #8) > So my requests are these: > - allow selection of multiple styles > - allow deletion of styles in use AFAIK this is possible. Just try with a new Writer document, create a paragraph style, apply it to a paragraph, go to the Stylist and erase. You can delete all custom styles that are not being used with a simple macro: REM ***** BASIC ***** Option Explicit Sub Main Dim oStyles Dim oFamily Dim oStyle oStyles = ThisComponent.getStyleFamilies() Dim sStyleFamily$, aElementNames$() Dim sStyle$, aStyles$() aElementNames = oStyles.getElementNames() For Each sStyleFamily In aElementNames oFamily = oStyles.getByName(sStyleFamily) aStyles = oFamily.getElementNames() For Each sStyle In aStyles oStyle = oFamily.getByName(sStyle) If oStyle.isUserDefined() AND NOT oStyle.isInUse() Then oFamily.removeByName(sStyle) End If Next Next End Sub -- You are receiving this mail because: You are the assignee for the issue. You are watching all issue changes.
