On Wed, 2011-03-09 at 15:50 +0100, Bálint Dózsa wrote:
Hi,
Here is the correction patch
This looks reasonable so far, though it might be better to avoid
hardcoding a "case KEY_F3 | KEY_SHIFT" to run this stuff, and instead
move it around a bit to make it configurable, (though that seems like a
good default)
Doing it the configurable way is a bit[1] involved, but here's the rough
guide
search for something similar, e.g. SID_TRANSLITERATE_TOGGLE_CASE
starting at
http://opengrok.libreoffice.org/xref/libs-core/svx/inc/svx/svxids.hrc
add a new one, e.g. SID_TRANSLITERATE_ROTATE_CASE
In svx/sdi/svx.sdi copy and paste the
SfxVoidItem ChangeCaseToToggleCase SID_TRANSLITERATE_TOGGLE_CASE entry
to e.g.
SfxVoidItem ChangeCaseRotateCase SID_TRANSLITERATE_ROTATE_CASE
Where SID_TRANSLITERATE_TOGGLE_CASE appears in the other .sdi files (use
opengrok to find them, e.g. sw/sdi/_textsh.sdi) add an entry for
SID_TRANSLITERATE_ROTATE_CASE by copying and pasting the
SID_TRANSLITERATE_ROTATE_CASE one except change the impl name e.g.
ExecTransliteration -> ExecRotateTransliteration
For writer you can then implement ExecRotateTransliteration like you've
already done to call TransliterateText with a nMode which advances from
the previous one on each attempt.
In officecfg/registry grep for ChangeCaseToToggleCase and some cut and
paste to give yourself a ChangeCaseRotateCase entry in there
To set an accelerator key combo for it then see
officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
Doing is this involved way allows the feature to appear in
tools->customize->keyboard etc.
C.
[1] understatement of the year
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.