summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2000-12-21 12:02:28 +0000
committerjp <jp@openoffice.org>2000-12-21 12:02:28 +0000
commitf843b98b5579f8e07226a9521da0248bb8f3dbf4 (patch)
treec9626a05ff6a40306b64eb1295e00ecd5b5227e4 /sw
parentee6401c8ac3cf961825cb4db7eb7d524d0c073bf (diff)
new: transliteration
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/cmdid.h11
-rw-r--r--sw/inc/helpid.h6
-rw-r--r--sw/sdi/_textsh.sdi46
-rw-r--r--sw/source/ui/inc/app.hrc5
-rw-r--r--sw/source/ui/inc/textsh.hxx5
-rw-r--r--sw/source/ui/shells/textsh.cxx49
6 files changed, 110 insertions, 12 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 6def38fd4597..91a9dc86c5d5 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -2,9 +2,9 @@
*
* $RCSfile: cmdid.h,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: os $ $Date: 2000-11-27 11:12:41 $
+ * last change: $Author: jp $ $Date: 2000-12-21 13:00:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -720,6 +720,13 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_TABLE_MERGE_TABLE (FN_FORMAT2 + 152)
+#define FN_TRANSLITERATE_UPPER (FN_FORMAT2 + 153)
+#define FN_TRANSLITERATE_LOWER (FN_FORMAT2 + 154)
+#define FN_TRANSLITERATE_HALFWIDTH (FN_FORMAT2 + 155)
+#define FN_TRANSLITERATE_FULLWIDTH (FN_FORMAT2 + 156)
+#define FN_TRANSLITERATE_HIRAGANA (FN_FORMAT2 + 157)
+#define FN_TRANSLITERATE_KATAGANA (FN_FORMAT2 + 158)
+
/*--------------------------------------------------------------------
Bereich: Extras
--------------------------------------------------------------------*/
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 51d80db859f7..0e6c2aa8d453 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -2,9 +2,9 @@
*
* $RCSfile: helpid.h,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:14:26 $
+ * last change: $Author: jp $ $Date: 2000-12-21 13:00:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -457,6 +457,8 @@
#define HID_MD_COPY_TO_CLIPBOARD (HID_BASE + 673)
#define HID_MD_GLOS_IMPORT (HID_BASE + 674)
+#define HID_MN_SUB_TRANSLITERATE (HID_BASE + 675)
+
// Weiter Help-IDs **********************************************************
#define HID_CLOSE_FILE (HID_BASE + 1001)
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index a3e47861969e..e96c39141328 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -2,7 +2,7 @@
$Workfile: _textsh.sdi $
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/sdi/_textsh.sdi,v 1.3 2000-11-13 12:25:09 jp Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/sdi/_textsh.sdi,v 1.4 2000-12-21 13:02:28 jp Exp $
Beschreibung: Basis-interfaces fuer Text
@@ -485,7 +485,6 @@ interface BaseText : Selection
StateMethod = NoState ;
]
-
//
// Get - Properties
//
@@ -1179,12 +1178,55 @@ interface BaseText : Selection
StateMethod = GetAttrState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+
+
+ FN_TRANSLITERATE_UPPER
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TRANSLITERATE_LOWER
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TRANSLITERATE_HALFWIDTH
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TRANSLITERATE_FULLWIDTH
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TRANSLITERATE_HIRAGANA
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TRANSLITERATE_KATAGANA
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
} //ende interface text
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.3 2000/11/13 12:25:09 jp
+ character attribute use the method of the BaseShell
+
Revision 1.2 2000/10/05 11:58:51 jp
should change: remove image
diff --git a/sw/source/ui/inc/app.hrc b/sw/source/ui/inc/app.hrc
index 1f2c3c728d9c..8d8f61a8a95e 100644
--- a/sw/source/ui/inc/app.hrc
+++ b/sw/source/ui/inc/app.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: app.hrc,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jp $ $Date: 2000-10-20 13:03:45 $
+ * last change: $Author: jp $ $Date: 2000-12-21 13:01:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -185,6 +185,7 @@
#define MN_EXTRA_PORT (RC_APP_BEGIN + 60)
#define MN_WIN_PORT (RC_APP_BEGIN + 61)
#define MN_HELP_PORT (RC_APP_BEGIN + 62)
+#define MN_SUB_TRANSLITERATE (RC_APP_BEGIN + 63)
#define RC_INTRO_BEGIN (RC_APP_BEGIN + 90)
diff --git a/sw/source/ui/inc/textsh.hxx b/sw/source/ui/inc/textsh.hxx
index 87a74551a251..5089657fdc03 100644
--- a/sw/source/ui/inc/textsh.hxx
+++ b/sw/source/ui/inc/textsh.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: textsh.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jp $ $Date: 2000-11-13 12:32:03 $
+ * last change: $Author: jp $ $Date: 2000-12-21 13:01:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -121,6 +121,7 @@ public:
void ExecParaAttrArgs(SfxRequest &);
void ExecAttr(SfxRequest &);
void ExecDB(SfxRequest &);
+ void ExecTransliteration(SfxRequest &);
void GetAttrState(SfxItemSet &);
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 0129cc0f2f46..44c394a55f34 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: textsh.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jp $ $Date: 2000-11-14 18:32:27 $
+ * last change: $Author: jp $ $Date: 2000-12-21 13:01:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -182,6 +182,9 @@
#ifndef _OFAACCFG_HXX //autogen
#include <offmgr/ofaaccfg.hxx>
#endif
+#ifndef _COM_SUN_STAR_I18N_TRANSLITERATIONMODULES_HDL_
+#include <com/sun/star/i18n/transliterationmodules.hdl>
+#endif
#ifndef _SWWDOCSH_HXX //autogen
#include <wdocsh.hxx>
@@ -881,6 +884,45 @@ void SwTextShell::ExecDelete(SfxRequest &rReq)
}
}
+void SwTextShell::ExecTransliteration( SfxRequest & rReq )
+{
+ using namespace ::com::sun::star::i18n;
+ {
+ sal_uInt32 nMode = 0;
+
+ switch( rReq.GetSlot() )
+ {
+ case FN_TRANSLITERATE_UPPER:
+ nMode = TransliterationModules_LOWERCASE_UPPERCASE;
+ break;
+ case FN_TRANSLITERATE_LOWER:
+ nMode = TransliterationModules_UPPERCASE_LOWERCASE;
+ break;
+
+ case FN_TRANSLITERATE_HALFWIDTH:
+ nMode = TransliterationModules_FULLWIDTH_HALFWIDTH;
+ break;
+ case FN_TRANSLITERATE_FULLWIDTH:
+ nMode = TransliterationModules_HALFWIDTH_FULLWIDTH;
+ break;
+
+ case FN_TRANSLITERATE_HIRAGANA:
+ nMode = TransliterationModules_KATAKANA_HIRAGANA;
+ break;
+ case FN_TRANSLITERATE_KATAGANA:
+ nMode = TransliterationModules_HIRAGANA_KATAKANA;
+ break;
+
+ default:
+ ASSERT(!this, "falscher Dispatcher");
+ }
+
+ if( nMode )
+ GetShell().TransliterateText( nMode );
+ }
+}
+
+
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
@@ -986,6 +1028,9 @@ void SwTextShell::InsertSymbol(const String& rChars, const String& rFontName)
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.3 2000/11/14 18:32:27 jp
+ use moduleoptions
+
Revision 1.2 2000/10/05 12:27:50 jp
should change: remove image