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:Normal selection of text is possible Cutting, Copying, Pasting through special independent "text" clipboard.
It is possible to select multi-line text block (column block) - e.g. from each of selected rows is chosen 10th to 20th character, when row is always either one paragraph or part of paragraph between line breaks inserting with Shift+Enter. That selection respects (when is enabled) tabulators, it means it is possible to select a text e.g. between 2th and 4th tabulators in each row. Cutting, Copying, Pasting is possible from dialog or Alt shortcut keys.
Filling selection by text string (two modes).
To get information about selection (number of chars, rows, columns/columns between tabulators)
Conversion from normal selection to column block.
Multiple non-contiguous selections (selected with Ctrl+left mouse) is possible cutting, copying, pasting as a column block.
Pasting column selection with option adding missing spaces or tabs.
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.
Row for column block selection doesn't need to be identical with line how it shows in editor. For column block is valid 1 row = 1 paragraph (or part of paragraph between line breaks inserting with Shift+Enter), while in editor one paragraph is over more lines. Column block selections always refers to order of characters in a paragraph, or to order of tabulators.
Text format is not transferred at pasting (only unformatted text).
Column block has max. 64000 rows with 64000 characters.
For block selecting is used highlighting.
If column block is used in document's area where it is used
highlighting, it will bee disturbed.
Attention! If in document
is used highlighting with special colour #abcdef
(RGB 171,205,239), then that highlighting will be dissolved in whole
document!
Shortcut keys work only if document is focused, no in dialog.
Column block selecting is relatively slow. When number of rows is more than maybe 30, progress of selecting is showed in information area of dialog.
Undo function does not work in one step after column is selected or paste. Therefore I recommend to set sufficient number undo steps.
For selection of column block is used multiple non-contiguous selection with the help of highlighting (characters background colour) special colour.
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
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.