LO Writer: Highlighting; setting page properties; some more nitpicking

I am reposting this message as the first never did show up. Sorry if
some of you see it twice.

I often highlight some text and have to un-highlight it a little later. This should work like setting/resetting italic or bold attributes: pressing the highlight icon does highlight the marked text and pressing it again (with the same text marked) should remove the highlight.

Surely toggling makes sense only if there are only two choices available: highlighted or not highlighted? But that's not so: instead, there is a wide range of colours available for highlighting. You'll notice that the chosen colour does stick. Evidently the designers though it was more likely that users would want to highlight other parts of the text with the same colour than to change their minds and remove previous highlighting.

It occurs to me that you are probably misusing this facility. Highlighting appears in the printout: it is a formatting facility, not something used to mark some text temporarily whilst you are working. Have you tried comments? Go to Insert | Comment (or Ctrl+Alt+C). Type a comment (or just some random letter or two). You will see the selected text highlighted - but conveniently in such a way as will not print. When you wish to remove this marking, click the down-arrow in the comment box and select Delete Comment. You don't even need to select the marked text again!

Either I'm too thick ...

I wouldn't assume that.

These are not bugs of course, just suggestions that'd make things a little easier. Is this the best way of posting such things?

It's perfectly sensible to start here with a discussion of your ideas, but to suggest enhancements you need to do so at the web site. Start at https://www.libreoffice.org/get-help/bug/ .

I trust this helps.

Brian Barker

FWFW, I've also seen this same behaviour in the LO macro editor: mark
some text, press Ctrl-C and wait... and wait...

It seems I'm really having some bad luck with LO.

Jon

Hi :slight_smile:
Is the hanging only happening with 'large' files of 2Mb or more? Have you
massively bumped up the "memory" settings in
Tools - Options - Memory
(or something like that)
I think those are still set for machines that only have 125Mb Ram or
something like that and with most of ram just struggling to cope with the
OS. So you can probably bump those up hugely.

As for the highlight on/off is it possible to define a custom button to do
that?
Tools - Customise?
I couldn't figure it out tbh but it kinda looks plausible.
Good luck and regards from
Tom :slight_smile:

Jon,

suggestions are welcome here, but this is a users' list, so don't expect to
get developer lever answers.

OTOH, it's sometimes good to hear what other users think about such suggestions.

The formal way to propose enhancements is Bugzilla[1]. As Bugzilla is a
devs' tool and thus a bit hard to use for normal people, you might prefer to
file your proposals through the Submission Assistant[2], which is a simpler
interface to Bugzilla.

Best,
Nino

https://bugs.freedesktop.org/
https://www.libreoffice.org/get-help/bug/

>I often highlight some text and have to un-highlight it a little
>later. This should work like setting/resetting italic or bold
>attributes: pressing the highlight icon does highlight the marked
>text and pressing it again (with the same text marked) should remove
>the highlight.

Surely toggling makes sense only if there are only two choices
available: highlighted or not highlighted? But that's not so:
instead, there is a wide range of colours available for highlighting.
You'll notice that the chosen colour does stick. Evidently the
designers though it was more likely that users would want to
highlight other parts of the text with the same colour than to change
their minds and remove previous highlighting.

I completely understand what you're saying and I agree. The point here
is that your idea how it should work and my idea are not at all
incompatible. I'd simply like an extension to how highlighting is
implemented:

if (selected_text_is_hilited && selected_text_hilitecolour ==
  current_hilitecolour)
    remove_hilite_from_selected_text();

That's all.

It occurs to me that you are probably misusing this facility.

That may well be the case. However, I've been misusing this facility for
decades now and I'm not going to change my misusing it any time soon...
muscle memory and all that.

Jon

Is the hanging only happening with 'large' files of 2Mb or more?

No. It happens even with an empty file and it's reproducible.

Have you
massively bumped up the "memory" settings in
Tools - Options - Memory
(or something like that)
I think those are still set for machines that only have 125Mb Ram or
something like that and with most of ram just struggling to cope with the
OS. So you can probably bump those up hugely.

I've left those bits as they were set. In an age where Windows needs 1GB
of RAM, this setting may be a tad conservative.

As for the highlight on/off is it possible to define a custom button to do
that?

I've written two small macros to deal with that and put them on keyboard
shortcuts. I'm a keyboard man anyway.

Jon

Hi :slight_smile:
That sounds like the best way of handling it. Nicely done!

I wonder if such a thing can be done as an Extension so that others can
benefit from it too? If it is easy and gets released under the GPL or LGPL
license then others could add a tool-bar button if they felt the need.
It's beyond my own abilities.

Is there a place for sharing macros, as there is for sharing Extensions and
Templates? Could the Extensions place be used?
http://extensions.libreoffice.org/

Congrats and regards from
Tom :slight_smile:

Someone with more knowledge about LO extensions than I have (nil) could
probably do that, but then again those two macros are dead simple: I
basically just macro-recorded the two actions, cleaned up the resulting
macros a bit and put them on shortcuts. No magic at all.

Cheers Jon

Could you post the macros' code here?

I don't remember seeing that behavior for toggling the highlight on/off in version 3.x, but noticed it in either 4.0 or 4.1 (maybe both) and liked it. But by 4.2 it was gone again. I did some work with macros/vba in Excel (v4 thru 1997), but not in MS Word, and have not touched macros in OOo or LO. Maybe this would be where I could start using them.

-- Tim

Sure, see below. However, as I said, it's utterly simple to do this (or
similar small changes) on your own by simply macro-recording (*) the
action of setting a highlight colour as one macro and removing it (ie no
fill) as another.

* Before you can record macros you probably have to enable "Enable macro
recording (limited)" in the LibreOffice>Advanced options. (I am using
4.2.5.)

Additionally, I've put the first macro on Ctrl-H and the second on
Shift-Ctrl-H (ignoring spurious (and annoying) error messages about Java
RE not being installed...).

HTH Jon

sub HiliteOn
dim document, 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"
args1(0).Value = 16777113
dispatcher.executeDispatch(document, ".uno:BackColor", "", 0, args1())
end sub

sub HiliteOff
dim document, dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:BackColor", "", 0, Array())
end sub