Macro TextClip

(Independent text clipboard with column block features)

| Main features | How to do it? | Limitations | History of changes |

Author: Tomas Bilek – © 2006-2007
Licence: LGPL, see http://www.opensource.org/licenses/lgpl-license.php

This macro is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.

Main features:


Secondary features:


How to do it?:

Keynote for control of column blocks: Instead of Ctrl (+ arrow, X, C, V...) use Alt.

Select by mouse:

Hold down left Alt + left mouse and mark start of column block (blue highlighting on right side of cursor appear). After it, each next left mouse click sets up new end of block. When left mouse clicks without ALT, it resets whole block selection.

Or, shift cursor by click to column block start place, after it clicks to button Start. Shift cursor clicking to column block end and click to button End.

Or, use standard selection by mouse (holding down left mouse and dragging) but hold down Alt and release mouse button.

Instead of Alt + mouse click it is possible apply Ctrl + click.

Select by keyboard:

Hold down Alt + arrow. Press any arrow without Alt reset whole block selection.
Alternative:
Alt+F7 set up start of column block without reset selection at next shift cursor by moving any arrow. End of block will be set by Alt+F8. Alike by mouse, via buttons Start and End.

Select whole column between tabs:

1. mark start of block (Alt+F7).
2. mark as end of block place before any next tabulator or the end of row. Column will be selected no matter of number of characters until corresponding tabulator or end of row. Be sure that
Include Tabs is enabled.

Copy to clipboard:

Via Alt+C or by mouse and button Copy.

Cut column selection:

Via Alt+X or by mouse and button Cut.

Paste column selection:

Via Alt+V or by mouse and button Paste. With pasting it depends on state of check box "Adding spaces": if enabled, missing spaces or tabs will be inserting, namely before pasting rows with regard to initial place of cursor.

Convert normal selection to column block:

Perform by mouse or keyboard normal selection. Pressing key Alt+F8 or button End will be done conversion to column block. Reversal conversion is not possible.

When using standard selection by mouse (holding down left mouse and dragging) and hold down Alt or Ctrl and release mouse button, conversion will be done too.

Multiple non-contiguous selections:

1. Perform multiple non-contiguous selections (by Ctrl+mouse dragging for 2th and next part of selection); Copy via Alt+C.
2. Past to destination place, see above. Individual parts of non-contiguous selections will be insert as rows in order in what they were chosen.

Filling selection by text string:

Normal selection as well as column block selection is possible to fill by text string. If check box "Adding spaces" is enabled, rows of block will be filled by text string according this rule: whole length of selection will be filled up. Otherwise, each row of selection will be replaced with text string, no matter of the length of the original selection.

Copying from one document to another:

1. Select and copy block, see above. 2. Switch to another document and run TextClip macro again. Macro dialog can be showed always in only one document, but contents of text clipboard stays preserved to restart OOo.


Limitations:


Fundamentals of selection of column block:

For selection of column block is used multiple non-contiguous selection with the help of highlighting (characters background colour) special colour.


History of changes:

Version 1.0   6/07
* fix error selection of column block in Linux
+ possibility use Ctrl + mouse click for selection of column block (Alt don't work in Linux)

Version 0.9   5/07 - first published


Known issues:

Problem with length of rows of column block if notes (small yellow box) is in text.

Sometimes the rest of blue highlighting (e.g. after undo). It sets right after new block is set, convert or end or start TextClip dialog.

Sometimes, with first Alt+mouse is used, cursor skips to a different place then we want.