https://bugs.documentfoundation.org/show_bug.cgi?id=172899
--- Comment #16 from MartinPC <[email protected]> --- Created attachment 208132 --> https://bugs.documentfoundation.org/attachment.cgi?id=208132&action=edit Variant 2 - Soft Hyphen Macros with Dynamic Toolbar Button Labels Variant 2 finally indicates the current state of the "Soft hyphens" setting without interfering with any other document or UI functionalities. However, without editing, it requires that toolbar buttons corresponding to SoftHyphensOn and SoftHyphensOff be created in the STANDARD toolbar. I BELIEVE that's the default toolbar for the "Toggle Index Marks" button (¶), and the natural location for these "soft-hyphen-toggling" buttons is right next to the ¶ button, so this code block of macros should work out of the box for most users. The first time you click on the SoftHyphensOn macro's button, its button label should get renamed to "-ON [x]" and the button label for SoftHyphensOff should get renamed to "-OFF". When you run the SoftHyphensOff macro, its button label should get renamed to "-OFF [x]" and the button label for SoftHyphensOn should get renamed to "-ON". (These button labels can easily be found and changed to something different in the macros' code block.) It *is* possible for the labels to get out of sync with "Soft hypens" current setting … if you go into Tools > Options > LibreOffice Writer > Formatting Aids and change it there manually. But why would you want or need to do that? Besides the toolbar buttons' "status indicators" will be right back in sync with the actual current state of "Soft hyphens" the next time you click on one of the buttons. This edge case is no one I'm inclined to ask Gemini to try and guard against, as it was unable to find a reliable way of determining the REAL current state of "Soft hyphens" when I asked it to write a single macro that toggles "Soft Hyphens" ON and OFF (like the ¶ button). That's why I gave up and setted for two separate macros. Anyway, both variants work great. Previous "rules" apply: only one block of "workaround macro" code per macro module (paste over previous blocks if applicable), save the module before doing anything else, and only directy call macros "SoftHyphensOn" and "SoftHyphensOff". If you opt for Variant 2, just make sure you create toolbar buttons for those two macros in the STANDARD toolbar. I'm using Variant 2 and I'm pretty happy with it. -- You are receiving this mail because: You are the assignee for the bug.
