[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: KWord scripting
From:       David Faure <faure () kde ! org>
Date:       2005-02-24 10:43:58
Message-ID: 200502241143.59332.faure () kde ! org
[Download RAW message or body]

On Wednesday 23 February 2005 20:31, Matej Cepl wrote:
> OK, I can try DCOP calls, but is there anywhere a commented list of all
> available ones? 
I'm afraid there isn't. The long-term plan is to provide the docu in kdcop
[via dcopidlng]. But this needs both a dcopidlng improvement and to
actually document the DCOP calls in the *Iface.h files, which isn't done yet.

> How can I do with the DCOP calls this? 
After the usual "startEditing" stuff (see www.koffice.org's kword dcop example),

>  <select-character-before-cursor>
moveCursorLeft(true)

>  <cut-selection-to-some-temporary-variable> (OK, I would settle
>   for <cut-selection-to-clipboard>, but I prefer the
>   former)
cut() (to clipboard) preserves formatting. selectedText() would give you only plain text.

>  <move-cursor-one-character-forward>
moveCursorRight(false)

>  <paste-character-from-temporary-variable>
paste()

>  <move-cursor-one-character-backward>
moveCursorLeft(false)

> Moreover, how can I attach this script to key shortcut (<Ctrl-T>)? 
You can't - DCOP is out of process... We'd need a dialog for defining new actions
and binding arbitrary shell commands to them... And those actions would need
to be saved - into the document? or into the app's config file?

[snip kommander - no clue about that myself]

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
https://mail.kde.org/mailman/listinfo/koffice
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic