change table of content direction

hi
my document is in RTL direction, also has several headings, when i create index table or table of contents it’s direction is LTR, how can i change it to RTL? the usual button is locked and shortkeys don’t work

Please indicate more clearly what “the usual button” is. Also indicate your operating system, LO version, and file format (DOC/X, ODT) as all these factors can influence behaviour. The current list of RTL bugs is lengthy. Have a look to see if one describes your particular issue. If it does, please post an answer below with a link to the bug. Thanks.

OP: @MustafaNasri