new: Transliteration for TextBoxes

This commit is contained in:
jp 2001-03-09 11:02:06 +00:00
parent d09e41f2f3
commit 3a918425ee
4 changed files with 93 additions and 9 deletions

View file

@ -2,7 +2,7 @@
$Workfile: drwtxtsh.sdi $
$Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/sdi/drwtxtsh.sdi,v 1.1.1.1 2000-09-18 17:14:30 hr Exp $
$Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/sdi/drwtxtsh.sdi,v 1.2 2001-03-09 12:00:37 jp Exp $
Beschreibung: IDL - File DrawTextshell fuer Sw3
@ -353,6 +353,42 @@ interface TextDrawText : Selection
[
StateMethod = StateInsert ;
]
SID_TRANSLITERATE_UPPER
[
ExecMethod = ExecTransliteration;
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_TRANSLITERATE_LOWER
[
ExecMethod = ExecTransliteration;
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_TRANSLITERATE_HALFWIDTH
[
ExecMethod = ExecTransliteration;
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_TRANSLITERATE_FULLWIDTH
[
ExecMethod = ExecTransliteration;
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_TRANSLITERATE_HIRAGANA
[
ExecMethod = ExecTransliteration;
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_TRANSLITERATE_KATAGANA
[
ExecMethod = ExecTransliteration;
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
}
interface TextDrawFont : Object
@ -393,6 +429,9 @@ shell SwDrawTextShell
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
Revision 1.1.1.1 2000/09/18 17:14:30 hr
initial import
Revision 1.72 2000/05/26 07:06:16 os
old SW Basic API Slots removed

View file

@ -2,9 +2,9 @@
*
* $RCSfile: mn.src,v $
*
* $Revision: 1.9 $
* $Revision: 1.10 $
*
* last change: $Author: kz $ $Date: 2001-03-02 20:31:46 $
* last change: $Author: jp $ $Date: 2001-03-09 12:02:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -360,6 +360,8 @@ Menu MN_DRWTXT_POPUPMENU
SEPARATOR ;
MN_TEXT_ATTR
SEPARATOR ;
ITEM_TRANSLITERATE_MENU
SEPARATOR ;
MN_DRWTXT
MN_FRM_CAPTION_ITEM
};

View file

@ -2,9 +2,9 @@
*
* $RCSfile: drwtxtsh.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:39 $
* last change: $Author: jp $ $Date: 2001-03-09 12:01:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -115,6 +115,7 @@ public:
void ExecClpbrd(SfxRequest &rReq);
void StateClpbrd(SfxItemSet &rSet);
void StateInsert(SfxItemSet &rSet);
void ExecTransliteration(SfxRequest &);
void Init();
void StateStatusline(SfxItemSet &rSet);

View file

@ -2,9 +2,9 @@
*
* $RCSfile: drwtxtsh.cxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: jp $ $Date: 2001-02-21 17:38:28 $
* last change: $Author: jp $ $Date: 2001-03-09 12:01:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -137,6 +137,9 @@
#ifndef _XDEF_HXX //autogen
#include <xdef.hxx>
#endif
#ifndef _COM_SUN_STAR_I18N_TRANSLITERATIONMODULES_HDL_
#include <com/sun/star/i18n/TransliterationModules.hdl>
#endif
#ifndef _SWTYPES_HXX
#include <swtypes.hxx>
@ -600,12 +603,48 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
}
}
void SwDrawTextShell::ExecTransliteration( SfxRequest & rReq )
{
using namespace ::com::sun::star::i18n;
{
sal_uInt32 nMode = 0;
switch( rReq.GetSlot() )
{
case SID_TRANSLITERATE_UPPER:
nMode = TransliterationModules_LOWERCASE_UPPERCASE;
break;
case SID_TRANSLITERATE_LOWER:
nMode = TransliterationModules_UPPERCASE_LOWERCASE;
break;
case SID_TRANSLITERATE_HALFWIDTH:
nMode = TransliterationModules_FULLWIDTH_HALFWIDTH;
break;
case SID_TRANSLITERATE_FULLWIDTH:
nMode = TransliterationModules_HALFWIDTH_FULLWIDTH;
break;
case SID_TRANSLITERATE_HIRAGANA:
nMode = TransliterationModules_KATAKANA_HIRAGANA;
break;
case SID_TRANSLITERATE_KATAGANA:
nMode = TransliterationModules_HIRAGANA_KATAKANA;
break;
default:
ASSERT(!this, "falscher Dispatcher");
}
if( nMode )
pOLV->TransliterateText( nMode );
}
}
/*--------------------------------------------------------------------
Beschreibung: Sonderzeichen einfuegen (siehe SDraw: FUBULLET.CXX)
--------------------------------------------------------------------*/
void SwDrawTextShell::InsertSymbol()
{
SvxCharacterMap* pDlg = new SvxCharacterMap( NULL, FALSE );
@ -673,6 +712,9 @@ void SwDrawTextShell::InsertSymbol()
Source Code Control System - History
$Log: not supported by cvs2svn $
Revision 1.2 2001/02/21 17:38:28 jp
use new function GetWhichOfScript/GetScriptTypeOfLanguage
Revision 1.1.1.1 2000/09/18 17:14:46 hr
initial import