Bug 156769 - Special characters not appearing as autotext replacements
Summary: Special characters not appearing as autotext replacements
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.5.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:24.8.0
Keywords:
Depends on:
Blocks: AutoText
  Show dependency treegraph
 
Reported: 2023-08-14 16:47 UTC by Anthony
Modified: 2024-01-24 22:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Auto Text Dialog Preview with ? Shortcut (28.22 KB, image/png)
2024-01-11 08:12 UTC, Andreas Heinisch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony 2023-08-14 16:47:22 UTC
Description:
Trying to create an autotext to insert "¿" in document.  The character is not captured and does not appear in autotext preview pane and is not inserted when the autotext is triggered.

Steps to Reproduce:
1. Insert "¿" in document
2. Highlight ¿ and press CTRL-F3
3. Autotext panel appears, but there is no character in the preview pane


Actual Results:
Autotext is saved but on playback no text is inserted

Expected Results:
I expected that the ¿ char would appear in the preview pane, be saved, and be inserted when autotext triggered


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 Mike Kaganski 2023-08-14 17:18:23 UTC
1. Preview panel only shows a preview of already existing autotext entries. It could be reasonable to add a preview for a new (edited) entry - but possibly not easy, because it uses existing autotext *documents* IIRC, and there's no document (yet) for a new entry...

2. Did you forget to *add* the new entry, using Autotext button -> New?
Comment 2 Anthony 2023-08-14 19:00:44 UTC
1 You are correct and I misstated what I was experiencing.  It is only after re-opening the autotext window to see the contents of this particular autotext function that I see that it's body is blank in the pane.

2  Good question but no, I did not forget. I do the "Autotext button -> New?" step, close the auto text window, type the autotext char+ F3 and nothing is inserted (to be super-clear, the character that is triggering the autotext is erased, and no text is inserted in it's place).
Comment 3 Mike Kaganski 2023-08-14 19:17:11 UTC
(In reply to Anthony from comment #2)
> 2  Good question but no, I did not forget. I do the "Autotext button ->
> New?" step, close the auto text window, type the autotext char+ F3 and
> nothing is inserted (to be super-clear, the character that is triggering the
> autotext is erased, and no text is inserted in it's place).

Which char did you use?
Comment 4 Anthony 2023-08-14 20:43:09 UTC
The inverted question-mark (¿), triggered by ?-F3
Comment 5 Mike Kaganski 2023-08-14 21:37:34 UTC
(In reply to Anthony from comment #4)
> ?-F3

Repro.
Comment 6 Laurent Balland 2023-12-01 09:55:12 UTC
I would suggest to not use AutoText for such replacement but instead AutoCorrect replacement table:
1. Copy your special character ¿
2. Tools > AutoCorrect > AutoCorrect options > Replace
3. Replace = a unique code, such as __? for instance
4. With = paste your special character ¿
5. Click New, OK

Now you can type the chosen code and a space and the special character is inserted.

This is not a resolution of the bug but an easy workaround
Comment 7 Andreas Heinisch 2024-01-11 08:12:38 UTC
Created attachment 191865 [details]
Auto Text Dialog Preview with ? Shortcut

It seems that it depends on the questionmark. Using another character as shortcut works correctly.
Comment 8 Andreas Heinisch 2024-01-11 11:33:46 UTC
If you use the questionmark an exception occurs:
core/package/source/xstor/xstorage.cxx:2312: Unexpected entry name syntax. at C:/cygwin/home/andre/lode/dev/core/package/source/xstor/xstorage.cxx:2312
Comment 9 Commit Notification 2024-01-11 18:25:56 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a03a9236b01437b573cb68112959b9403418e11b

tdf#156769 - Escape the question mark in the storage name

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.