Ask Your Question
3

wish: purge unused styles [closed]

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

unichan gravatar image

updated 2013-10-22 23:32:44 +0100

manj_k gravatar image

I would like the abilty to purge unused style.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-30 21:43:05.972970

Comments

@jorendc -- perhaps you can help out here?

qubit gravatar imagequbit ( 2013-04-28 02:23:21 +0100 )edit

4 Answers

Sort by » oldest newest most voted
2

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

jorendc gravatar image

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.

edit flag offensive delete link more
3

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

pilotsguide gravatar image

You can use the macro posted here to accomplish this

edit flag offensive delete link more

Comments

thank you: that's precious in writer but deleted my personal-used-styles in presenter

unichan gravatar imageunichan ( 2013-07-01 11:30:37 +0100 )edit

Well, I can't post an answer, because the the thread is locked, so I will just comment here. I just thought of another way, if you don't want to use the macro above.

  1. Select the whole document.
  2. Copy and paste into a new blank document.
  3. Now you have a document with only default styles and the styles you are actually using. (But the default styles will not match any customization that was done to them in the original document, and you will have no macros, etc.)
  4. Delete all the text in the original document, then display custom styles and delete them all. Keep any ones you know you will use later.
  5. Now paste all the text from the temp document back to the original. Done.

I am sure there will be some issues in certain complex documents. I know for one thing, if you have any locked content ...(more)

lomacar gravatar imagelomacar ( 2019-02-27 10:21:21 +0100 )edit
2

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

ROSt52 gravatar image

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

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.

edit flag offensive delete link more

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 gravatar imageCyanCG ( 2013-04-29 16:09:05 +0100 )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 gravatar imageROSt52 ( 2013-04-30 10:20:07 +0100 )edit

that's the idea, sorry I'm late

unichan gravatar imageunichan ( 2013-07-01 11:31:11 +0100 )edit

@unichan - I did not file a separate enhancement request but added a comment to the the bug fdo#46719 kindly introduce in the threat by @jorendc

Hope there will be a dev who can tackle this topic.

ROSt52 gravatar imageROSt52 ( 2013-07-01 13:10:18 +0100 )edit
2

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

CyanCG gravatar image

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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

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

Seen: 2,721 times

Last updated: Apr 29 '13