@Maxim: With styles in the Style menu using UNO commands like .uno:StyleApply?Style:string=Standard&FamilyName:string=ParagraphStyles, is it possible to assign icons to them and if so, how would it be named, as it is possible to add icons to them in the customization dialog. Was thinking that the work around would be to make alias commands for each of the styles and then it is easy to assign icons to those.
(In reply to Yousuf Philips (jay) from comment #0) > @Maxim: With styles in the Style menu using UNO commands like > .uno:StyleApply?Style:string=Standard&FamilyName:string=ParagraphStyles, > is it possible to assign icons to them and if so, how would it be named It's possible after escaping all problematic characters, see the lclConvertToCanonicalName function from http://opengrok.libreoffice.org/xref/core/framework/source/uiconfiguration/CommandImageResolver.cxx#lclConvertToCanonicalName There is however one problem if you're going to use links.txt with a command that has a space (e.g. for "Heading 1"), as the links.txt parser assumes that a space separates a link from the original image. But this can be easily solved by adding a space escaping into lclConvertToCanonicalName. > Was thinking that the work around would be to make alias commands for each > of the styles and then it is easy to assign icons to those. Yes, that should work too. But keep in mind that it won't work with styles that user might add via the Add Commands dialog. But if this isn't a problem, then it's a good solution too.
(In reply to Maxim Monastirsky from comment #1) > It's possible after escaping all problematic characters, see the > lclConvertToCanonicalName function from > http://opengrok.libreoffice.org/xref/core/framework/source/uiconfiguration/ > CommandImageResolver.cxx#lclConvertToCanonicalName > > There is however one problem if you're going to use links.txt with a command > that has a space (e.g. for "Heading 1"), as the links.txt parser assumes > that a space separates a link from the original image. But this can be > easily solved by adding a space escaping into lclConvertToCanonicalName. Seems very complicated and couldnt figure out the conversion. :D > Yes, that should work too. But keep in mind that it won't work with styles > that user might add via the Add Commands dialog. But if this isn't a > problem, then it's a good solution too. Yes it would only be for built-in styles that we place in the Styles menu, so this seems to be the simplest option. ;D
(In reply to Yousuf Philips (jay) from comment #2) > (In reply to Maxim Monastirsky from comment #1) > > Yes, that should work too. But keep in mind that it won't work with styles > > that user might add via the Add Commands dialog. But if this isn't a > > problem, then it's a good solution too. > Yes it would only be for built-in styles that we place in the Styles menu, > so this seems to be the simplest option. ;D I don't follow you both. While working with an own company's style toolbar, I'm already assigning icons to these styles via the Add commands window in the Customize dialog. It's working with styles I added manually as described by Regina and it's also working with styles I added in 5.4/5.5 via Add commands.
(In reply to Yousuf Philips (jay) from comment #2) > (In reply to Maxim Monastirsky from comment #1) > > It's possible after escaping all problematic characters, see the > > lclConvertToCanonicalName function from > Seems very complicated and couldnt figure out the conversion. :D Like this: sc_styleapply%3fstyle%3astring=standard&familyname%3astring=paragraphstyles.png Supporting spaces in lclConvertToCanonicalName is only a matter of adding there this one line: case ' ': aBuffer.append("%20"); bRemoveSlash = false; break; ... and replacing spaces in the image file name with %20. > Yes it would only be for built-in styles that we place in the Styles menu, > so this seems to be the simplest option. ;D Agree. I would suggest that too. (In reply to Thomas Lendo from comment #3) > I don't follow you both. While working with an own company's style toolbar, > I'm already assigning icons to these styles via the Add commands window in > the Customize dialog. It's working with styles I added manually as described > by Regina and it's also working with styles I added in 5.4/5.5 via Add > commands. Yes, you can assign icons manually. It just that they won't pick icons automatically, once we assign them for internal use (e.g. for the Styles menu).
Initial patch is in for styles formatting toolbar. https://gerrit.libreoffice.org/38009
Yousuf Philips committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fe6fb37dff61f83e80076a0c9d9caf3714ed590f tdf#107915 Add paragraph and character style aliases It will be available in 5.5.0. 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.
Yousuf Philips committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f9cbf67fb2cf817b6d201604eb7d4bf6182a1392 tdf#107915 More paragraph and character style aliases It will be available in 6.0.0. 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.
A polite ping to Yousuf Philips: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks
Icons for tango and breeze were added, so this can be closed. Breeze commit https://gerrit.libreoffice.org/#/c/41918/
Yousuf Philips committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c105eddc462f12c50fea4244e1bf49e8fb37da9b tdf#107915 tdf#75256 numbering style icons for style toolbar It will be available in 6.0.0. 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.
(In reply to Yousuf Philips (jay) from comment #9) > Icons for tango and breeze were added, so this can be closed. I don't see Tango icons for paragraph and character styles in the Styles formatting toolbar. Version: 6.0.0.0.alpha1+ (x64) Build ID: a5af0fd9f27af42cf2e8571f659cdad6e606215b CPU threads: 8; OS: Windows 10.0; UI render: default; TinderBox: Win-x86_64@42, Branch:master, Time: 2017-11-07_00:30:02 Locale: de-DE (de_DE); Calc: group