Ask Your Question
0

wish: purge unused styles

asked 2012-04-26 14:06:56 +0200

unichan gravatar image unichan
60 1 6

updated 2013-01-07 22:27:40 +0200

qubit gravatar image qubit flag of United States
5721 3 48 41

I would like the abilty to purge unused style.

delete close flag offensive retag edit

Comments

@jorendc -- perhaps you can help out here?

qubit ( 2013-04-28 02:23:21 +0200 )edit

4 Answers

Sort by » oldest newest most voted
2

answered 2012-08-09 13:01:10 +0200

pilotsguide gravatar image pilotsguide
51 1 4

You can use the macro posted here to accomplish this

link delete flag offensive edit
1

answered 2013-04-28 23:30:13 +0200

jorendc gravatar image jorendc flag of Belgium
466 6 5

Currently there is no build in feature to delete unused styles at once. I was investigating to solve fdo#46719 (to add an "unused styles" filter), but I think I need to unassign me from this task due my lack of development skills.

So current status: not yet implemented.

link delete flag offensive edit
1

answered 2013-04-29 06:11:26 +0200

ROSt52 gravatar image ROSt52 flag of Japan
1906 30 32

updated 2013-04-29 06:17:48 +0200

Reading @CyanCG's excellent answer gave me the idea to ask for a feature enahcnement that LibO should have filters

  • show only used styles

  • show only unused custom styles

By doing so the styles which cannot be deleted (= not customized styles) and are not used can be hidden but made visible when needed.

When importing Word files, I observe that always a long list of unused styles appear in the styles window, but only very little of these styles are used. All imported styles are customized styles, thus can be deleted However to identify which of them are used or unused is a time consuming task. Thus, being able to see only unused custom styles (they include the unused imported styles) and have the functionality to delete the unused custom styles

  • one by one

  • or as selected groups

  • or all at once

would be a very good feature. (More or less like deleting files and folders in windows)

Before I post an enhancement request, I would like to see what opinions others have and look forward to answers.

link delete flag offensive edit

Comments

I think you’ve nailed it: I had Word documents in mind when I posted my answer, and what you describe is exactly what LibO needs in my opinion. This would e.g. allow a LibO user who is collaborating with a Word user on a document to evaluate the use of styles and their significance and account for the Word user’s intentions with respect to structure and formatting.

CyanCG ( 2013-04-29 16:09:05 +0200 )edit
1

@CanCG - Thanks for your comment. I will wait af ew days more to allow for more comments and will then file an enhancement request.

ROSt52 ( 2013-04-30 10:20:07 +0200 )edit
0

answered 2013-04-29 03:24:53 +0200

CyanCG gravatar image CyanCG flag of Canada
422 2 7 17
http://waidanian.wordpres...

Careful here. I also wish one could easily delete all unused custom styles at once in a document. However, here is an important distinction to make if this feature is implemented:

  • Allowing one to delete unused custom styles is generally benign and beneficial, but in many cases a lack of applied styles should ring a bell: it often means that the template on which the document was based was not correctly used (i.e. the stylistic resources were underused) and in such cases structure always suffers. The conclusion is that the application should, before purging all unused custom styles, remind the user that they should apply the following:

    • Heading styles that correspond to the ones selected as part of the document’s outline numbering;
    • Paragraph styles (distinct from heading styles in the ODF format) that semantically distinguish key parts of the document such as long quotations, asides and examples;
    • Character styles that semantically denote the status or meaning of key terms (e.g. emphasis, a term in a foreign language, an idiomatic expression, a title, the name of an author or institution etc.) and visually distinguish hyperlinks, fields and ruby annotations.
  • As for the unused default styles, the application should never allow one to delete them, because they all have a purpose and are all potentially important. For example, a subset of those default styles are used to preserve the structure of HTML documents. Furthermore, some OpenDocument Text elements, such as ruby annotations, can only be created by applying a ruby character style, even though ruby annotations are not character styles per se. Finally, the default styles are the backbone of LibreOffice’s (and OpenDocument’s) style inheritance model, a powerful system which has no direct equivalent in Microsoft Office (this is one big advantage that ODF and LibreOffice have over MS Office) In fact, this inheritance model as specified in ODF and as implemented in LibreOffice is very similar to CSS’s, and that is A Good Thing™.

In conclusion, styles in a document are always potentially a precious resource and should not be seen as pollution, even though they take up space in the style list.

link delete flag offensive edit

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-04-26 14:06:56 +0200

Seen: 150 times

Last updated: Apr 29