Bug Hunting Session
Bug 54812 - Remove unnecessary 'Size optimization for ODF format' option
Summary: Remove unnecessary 'Size optimization for ODF format' option
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: Other All
: medium enhancement
Assignee: Samuel Mehrbrodt (CIB)
URL:
Whiteboard: target:4.2.0
Keywords: easyHack
Depends on:
Blocks:
 
Reported: 2012-09-12 12:29 UTC by Fabian Alexander Wilms
Modified: 2015-12-18 10:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Alexander Wilms 2012-09-12 12:29:00 UTC
The option under Load/Save > General is unnecessary, since most developers prefer external tools to make the underlying XML human-readable.

The option and the affiliated code should be removed.
Comment 1 Thorsten Behrens (CIB) 2012-09-12 14:57:43 UTC
(In reply to comment #0)
> The option and the affiliated code should be removed.
>
Let me clarify that - the UI code can go, but I'd very much like to keep the code in xmloff that adds the line breaks, such that pro users / hackers can use the hidden config item to tweak this.
Comment 2 Jan Holesovsky 2012-09-12 15:04:11 UTC
Adding some code pointers, in order to this really qualify as an EasyHack :-)  I am not that eager to keep some functionality that is not going to be used much because high bitrot probability; but the easy hack is this:

git grep BTN_NOPRETTYPRINTING

in the sources, and you'll see something like:

cui/source/options/optsave.cxx:    aSizeOptimizationCB ( this, CUI_RES(
BTN_NOPRETTYPRINTING ) ),
cui/source/options/optsave.hrc:#define BTN_NOPRETTYPRINTING    20
cui/source/options/optsave.src:    CheckBox BTN_NOPRETTYPRINTING
cui/source/options/optsave.src:        HelpID =
"cui:CheckBox:RID_SFXPAGE_SAVE:BTN_NOPRETTYPRINTING";

Remove the mentions of this, the definitions of the button etc., and also anything that is calling it.  In this case, also the aSizeOptimizationCB member, and make the code behave as if it was always 'on' (ie. PrettyPrinting off).

If you have any questions, please mail the libreoffice@lists.freedesktop.org
mailing list, and CC me :-)  We can investigate later if we want to keep the underlying functionality, or not.  Thank you!
Comment 3 Jean-Baptiste Faure 2012-09-12 17:02:44 UTC
(In reply to comment #0)
> The option under Load/Save > General is unnecessary, since most developers
> prefer external tools to make the underlying XML human-readable.
> 
> The option and the affiliated code should be removed.

What is the benefit of removing this option? It is useful for advanced users who need to understand or hack these xml files.
I agree that the option could be replaced by a command-line parameter. 

Best regards. JBF
Comment 4 Fabian Alexander Wilms 2012-09-12 17:59:38 UTC
The benefit of removing it from the UI would be a cleaner options dialog, which would be less overwhelming to most users. In order to satisfy advanced users, an advanced options pane could be added which would work like Firefox' about:config
Comment 5 pierre-yves samyn 2012-09-15 13:11:27 UTC
(In reply to comment #3)
> What is the benefit of removing this option? It is useful for advanced users
> who need to understand or hack these xml files.

Hello Jean-Baptiste

As said, most developers prefer external tools to make the underlying XML human-readable. Anyway the "advanced" user  must also unzip the file...

Regards
Pierre-Yves
Comment 6 Thorsten Behrens (CIB) 2012-10-26 20:17:42 UTC
(In reply to comment #2)
> We can investigate later if we want to keep the
> underlying functionality, or not.
>
I clearly *do* want to keep the code in xmloff. Beyond that, what you say - kill the UI code in cui, please. :)
Comment 7 sasha.libreoffice 2012-12-05 10:09:24 UTC
IMHO this option should be available at least if "Experimental features" are enabled.
Comment 8 Thorsten Behrens (CIB) 2012-12-13 16:09:02 UTC
(In reply to comment #7)
> IMHO this option should be available at least if "Experimental features" are
> enabled.
>
Nope. Let's kill the UI for that alright. Expert users can tweak config directly or via an extension.
Comment 9 Commit Notification 2013-10-01 22:49:32 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=111a2b94fd6f217d91c9a057086b3d2dfa752c5b

fdo#54812 Remove option 'Size optimization for ODF format'



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Stanislav Horacek 2013-10-02 19:41:25 UTC
I pushed help update for Gerrit review:
https://gerrit.libreoffice.org/#/c/6113/

Btw, I am not fan of removing options - I think that the approach "find a documented and categorized option in GUI" is better than "find it in tons of unstructured options in about::config" (thanks for it, much better than remove the option completely). Of course this particular option doesn't matter (even if it is very handy for me), but LibreOffice way was chosen and more removals will follow... Hopefully someone will create an extension like GUI config for Firefox and everyone will be happy:))
Comment 11 Commit Notification 2013-10-04 13:09:27 UTC
Stanislav Horacek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=8ae99d7acf90b02d7ae8b90587d721a95724b754

fdo#54812 remove size optimization option



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Robinson Tryon (qubit) 2015-12-18 10:03:06 UTC
Migrating Whiteboard tags to Keywords: (EasyHack)
[NinjaEdit]