Tip jar

If you like CaB and wish to support it, you can use PayPal or KoFi. Thank you, and I hope you continue to enjoy the site - Neil.

Buy Me a Coffee at ko-fi.com

Support CaB

Recent

Welcome to Cook'd and Bomb'd. Please login or sign up.

April 16, 2024, 11:22:24 AM

Login with username, password and session length

Been full system restoring for some time now

Started by Retinend, September 04, 2020, 08:09:37 PM

Previous topic - Next topic

Retinend

I do it so often I made myself a handy guide to get everything the way I like it quicker: https://drive.google.com/file/d/10A4YuS-c63rxCEF6Q3Vsf5LVqIEgiKvO/view?usp=sharing

How good are you at doing it? What does your perfect clean start look like?

Blumf

Why you still using OpenOffice? LibreOffice is where everyone went.

Retinend

Thanks for the tip! I am far from satisfied with OpenOffice.

Retinend


Retinend

I mean holy shit this is a bit off topic already but what is the deal here? This is exactly the same software but it AKTULLY WERKS

Blumf

Long story short: Oracle bought up Sun, which included OO.o, unsurprisingly turned it all to shit, load of devs forked it to make LibreOffice, Oracle shrugs and throws OO.o to the Apache Foundation, who have no real resources to do anything, and that's where it's left, stagnating.

Retinend

Unless I'm mistaken, LibreOffice seems unable to assign any arbitrarily-chosen colour (e.g. red) to selected text via a hotkey (e.g. Ctrl+D) in such a way you would want it to work if, for example, you wanted to highlight parts of a text in red, for example to mark it wrong.

In OpenOffice this is achieved via the application of the function "Font Colour Fill" to the hotkey "Ctrl+D". Again, if I am not mistaken, doing the same thing in LibreOffice gets no results. Or "funny" results. I was able to set ready-coloured text back to black, but not actually do what I wanted. My current solution is to use the "Character Styles" panel to make presets for various colours. This seems to be a fragile solution. Any ideas?

Blumf

Don't use Writer much (hardly ever use word processors), and it looks like a known bug:
https://bugs.documentfoundation.org/show_bug.cgi?id=34804

That sucks, I can see why it's usefulrequired!

Humm....

Okay!

Go to 'Tools/Macros/Edit Macros...'

Select 'My Macros & Dialogs/Standard/Module1' and after any pre-existing text add the following:

sub Highlighter
dim document   as object
dim dispatcher as object
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "BackColor"
rem Replace your preferred colour here as a hex RGB colour code with &H in front
args1(0).Value = clng("&HFFFF00")

dispatcher.executeDispatch(document, ".uno:CharBackgroundExt", "", 0, args1())
end sub


Save that, then back in the main Writer window go to 'Tools/Customise...' and select the 'Keyboard' tab

Make sure 'Writer' is checked in the top-right

Pick your preferred key combo (you can override pre-existing ones)

Then on the bottom-left list, at the bottom select 'LibreOffice Macros/My Macros/Standard/Module1'
In the middle list select 'Highlighter' and back on the top-right click on 'Modify'

Okay out of the Customise dialog.

That seems to work, and works with the highlighter toolbar button too.

Retinend

Wow! ... is all I can say. I'll tell you how I get on with that.

Retinend

That worked brilliantly! I feel I should add a bunch of keywords for the sake of frustrated googlers:

Libreoffice Libre Office hotkey hot key change font colour font color font highlight fill font colour font color not working highlight text with hotkey using hotkey in Libreoffice quickly highlight words with customized hotkey

needless to say, this is going straight into the update of my system restore guide (congratulations)

At the risk of looking a gift horse in the mouth... do you have the skills to write a similar macro but for changing the font colour, instead of changing the highlight colour?

Blumf

It's pretty much the same script, just changing a few of the property names:

sub ColorText
dim document   as object
dim dispatcher as object
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Color"
rem Replace your preferred colour here as a hex RGB colour code with &H in front
args1(0).Value = clng("&HFF0000")

dispatcher.executeDispatch(document, ".uno:Color", "", 0, args1())
end sub


Noticed that just leaving the cursor on a single word changes it all without having to highlight it, might be useful to know.

Retinend


Retinend

#12
edit: Version 2, thanks to Blumf: https://drive.google.com/file/d/1LyObj8WcpHarRAdQEXOaZZzDb9hoNx6U/view?usp=sharing



Does no one else do this, by the way? I'm a bit nosy to know what others consider essential tweaks.