Issue 98123 - embedding shortcut key configuration in document has errors
Summary: embedding shortcut key configuration in document has errors
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: DEV300m37
Hardware: PC Windows XP
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-15 19:16 UTC by Regina Henschel
Modified: 2013-08-07 15:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
file contains custom style and macro (21.28 KB, application/vnd.oasis.opendocument.text)
2009-01-15 19:18 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2009-01-15 19:16:40 UTC
I'll give a detailed description, because the feature itself is widely unknown.
Therefore the text is a little big longer :)

The attached document contains a custom character style "red" and a macro
"makered", that assigns the style to a marked text.

Enable macros. Work on a copy of the original file each time.

1. Open the attached document and confirm enabling macros.
2. Goto Tools > Customize > Keyboard.
3. Choose "Writer" to display the shortcut keys for Writer.
4. Click on "Ctrl+6" in the "Shortcut keys"-list.
5. In "Function Category"-list open tree "OOo macros > [Filename of the open
document] > Standard > Formatting". You get two items in the "Functions
Function"-list.
6. Select "makered" in "Functions Function"-list.
7. Click on "Modify". You get the entry "Ctrl+6  makered" in the "Shortcut
keys"-list and the entry "Ctrl+6" in the "Functions Keys"-list.
8. Click on "Save".
9. Goto the actual opened document in the file dialog and choose it. Save. Click
on "Yes" in the replace warning.
10. Click on OK to close the customize dialog.
11. Close the document immediately with the X-closer. You should not get a
modify warning.

With the next steps you remove the shortcut key from the user settings for to
get a fresh situation for the following tests.
R1. Open a new Writer document.
R2. Goto Tools > Customize > Keyboard.
R3. Click on "Ctrl+6" in the "Shortcut keys"-list.
R4. Click on "Delete" and then on "OK".
R5. Close the document. 

You should go to the file with the file explorer of your OS. Notice that the
file size has increased. If you unpack the file you can find the configuration
in the folder "Configurations2 > accelerator".


Problems:

Use a fresh situation (see steps R1 to R5).
P1. Do steps 1.-10., document is still open.
P2. Mark a word and press Ctrl+6 to assure that the macro works.
P3. Close the document with the X-closer. Click "Save" in the modify warning.
Notice that the file size is the same as the original file. If you unpack the
file, you can see that the folder "accelerator" is empty.
Expected behavior: The stored configuration after step 10 is not disturbed when
working on the file and saving it later on.

Use a fresh situation.
P4. Do steps 1.-11.
P5. Goto Tools > Customize > Keyboard and scroll in the "Shortcut keys"-list
till "Ctrl+6". Notice that the associated command now is
"vnd.sun.star.script:Standard.Formatting.makered?language=Basic&location=document".
Expected behavior: The full command is already shown in step 7.

Use a fresh situation.
P6. Open the document, which contains the shortcut key as generated in steps 1.-11.
P7. Mark a word and press Ctrl+6 to assure that the macro works.
P8. Goto Tools > Customize > Keyboard and scroll in the "Shortcut keys"-list
till "Ctrl+6". Notice, that there is no associated command.
P9. In "Function Category"-list open tree "OOo macros > [Filename of open
document] > Standard > Formatting". Mark the item "makered" in the "Functions
Function"-list. Notice that there is no shortcut key in the "Functions Keys"-list.
Expected behavior: The "Shortcut keys"-list shows _all_ associated commands,
including those which come from a configuration which is embedded in the document.
Perhaps a new option "Document" is needed in addition to "Writer" and "OOo"?

I have discussed the problems with Carsten Driesner on users@de.openoffice.org.
Comment 1 Regina Henschel 2009-01-15 19:18:28 UTC
Created attachment 59414 [details]
file contains custom style and macro
Comment 2 ab 2009-01-16 07:56:40 UTC
Then I'm sure Carsten will know what to do or who else should care about it... :-)
At least this is no scripting but more a customizing problem.
Comment 3 carsten.driesner 2009-01-16 10:48:37 UTC
cd: Confirmed, change subcomponent to code. There are some of problems regarding
keyboard customization in documents.