New Extension SafeCutPaste, which completes the two new options "Disable Drag & Drop" and "disable typing replaces text selection" in LO Writer

This small macro extension completes the new important 2 error-evoiding options in Writer. (Bug ID 169913 and 100998)

The third important error-source by accidentally behavior is cutting text out of long and especially regularly edited text-documents.

Moving text should be just as safe as moving files. CutPasteSafe protects against accidental text loss when moving text. Unlike standard cut operations, the text remains visibly highlighted in the document until it has been successfully pasted again.

The extension is in status for requested publication at https://extensions.libreoffice.org.

You can download the extension already here, status is formally unstable, feel free to test it under MIT License, provided “as is” without any warranties.

DL Link (temporary)
https://www.swisstransfer.com/d/ff96124a-ee6c-4ceb-b5e7-5dc40eef49aa

Description in Details

CutPasteSafe
Version: 0.1.1
License: MIT License
Compatibility: LibreOffice Writer

Acknowledgments: This extension was developed with the assistance of free Google Search AI and ChatGPT (free Version).

CutPasteSafe protects against accidental text loss when moving text within your documents. That’s especially then useful when longer documents are edited regularly. Unlike the standard cut operation, the text remains visible and highlighted at its original location until it is successfully pasted elsewhere. Only then is the original text removed. This protects against forgetting and thereby data loss after saving due to distraction or many other circumstances. This mirrors the secure file-moving behavior of file managers. If you forget to paste it, the cut text is not only preserved but remains also highlighted in yellow as a reminder. Only the most recently cut text is deleted when pasting.
For this the extension only installs a small macro. The two commands CutSafe and PasteSafe (can be renamed) simply need to be added manually to the context menu according to the instructions below.
Only text can be moved safely, graphics, tables, etc. cannot. When moving the text to other documents, the yellow highlighted text in the original document must be deleted manually.
Undo needs 3 clicks. Step 1 restores the moved text to its original location, highlighted in yellow. Step 2 deletes the moved text from its new location, and step 3 removes the yellow highlight from the original location.

Other

100% Offline, Secure: No data is transmitted or processed in the background.

How to Use

  1. Download the safecutpaste.oxt file.
  2. Double-click the file to install it via the LibreOffice Extension Manager.
  3. Restart LibreOffice.
  4. Add the macro to the context menu:
    Open Tools âž” Customize and switch to the Context Menus tab.
    In the upper right corner under Target, make sure that Text is selected.
    Now look at the left side of the window:
    Click on the Category drop-down menu.
    Scroll all the way down this list and select Macros.
    Directly below, your macro directory tree will open:
    Click on the + next to My Macros âž” SafeCutPaste âž” Module1.
    Select your macro SafeCut from the list next to it.
    In the middle of the window, there are two arrow buttons:
    Click the right arrow button (âž”) to move the macro into your context menu (right side). Rename if necessary.
    Sorting on the right side (“Assigned Commands”):
    Select your macro on the right side.
    Use the arrow buttons on the far right (Up / Down) to move the entry to your preferred position. It is highly recommended to move it up, right above the original “Cut” command.
    Confirm by clicking OK at the bottom.
    Repeat the entire process for SafePaste and move SafePaste directly below SafeCut.
    It is recommended to move the original “Cut” and “Paste” commands all the way to the bottom of the menu so you do not accidentally mix them up.
    If you now select text and right-click, the two commands will immediately appear in the Context Menu list.
    Tip: For the best experience, go to the LibreOffice options (Tools âž” Customize âž” Keyboard) and assign the shortcuts Ctrl + X (for SafeCut) and Ctrl + V (for SafePaste) to completely replace the default behavior.

Disclaimer
This tool was created as a lightweight open-source macro with the help of AI and is provided “as is” without any warranties (see LICENSE.txt).

Have a look at release 26.8:
Added an option to prevent typed text from replacing the current selection Tools â–¸ Options â–¸ LibreOffice Writer â–¸ Formatting Aids: Typing: :ballot_box_with_check: Typing replaces selection (Andreas Heinisch) tdf#169913


https://wiki.documentfoundation.org/ReleaseNotes/26.8

I know this, read my headline or read 169913 – Add an option to disable "typing replaces selected (highlighted) text" (it's not overtype mode!) like in MS Word
And look at my name :wink:

Download now at LibreOffice Extensions

If anyone notices a bug, I’d appreciate it if you could let me know.

Unfortunately, most of our contemporaries no longer know the main European languages. :cry:
We would like to improve our knowledge of English before learning other languages…

Sorry, was lost in thought. :sweat_smile:

1 Like

In the new version 0.2.0 (available for download in the coming days), a colored bar (paragraph style highlighting) appears visibly on every page to remind the user to perform the secure insertion, provided this has not yet been done. This feature specifically facilitates the quick and safe reordering of large amounts of text within extensive documents.

SafeCutPaste supports text and (after my new short tests) all objects (like pictures or tables) anchored to the selected text (As Character, To Character and To Paragraph). Page-anchored objects are not included.