summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-09 16:35:27 +0200
committerobo <obo@openoffice.org>2010-06-09 16:35:27 +0200
commit0a11354fc949dff5860a0b4240f18c6320561f9b (patch)
treecaffe5954a41a3821057710d64e5995d773c8856 /sw
parent5059f173f05fa57e8f7009dd9c082c8e85a6cc5f (diff)
parent87c6b7fab33c03c6cab6d4365125f1acf9929811 (diff)
CWS-TOOLING: integrate CWS tl74
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/crsrsh.hxx8
-rw-r--r--sw/inc/editsh.hxx1
-rw-r--r--sw/inc/swcrsr.hxx8
-rwxr-xr-x[-rw-r--r--]sw/inc/viewopt.hxx14
-rw-r--r--sw/sdi/_textsh.sdi24
-rw-r--r--sw/sdi/_viewsh.sdi2
-rwxr-xr-xsw/sdi/annotsh.sdi30
-rw-r--r--sw/sdi/drwtxtsh.sdi28
-rw-r--r--sw/sdi/swriter.sdi25
-rw-r--r--sw/sdi/swslots.src1488
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx20
-rw-r--r--sw/source/core/crsr/swcrsr.cxx12
-rw-r--r--sw/source/core/edit/editsh.cxx29
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx3
-rw-r--r--sw/source/ui/config/viewopt.cxx7
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.cxx22
-rwxr-xr-xsw/source/ui/inc/langhelper.hxx22
-rw-r--r--sw/source/ui/inc/olmenu.hxx11
-rw-r--r--sw/source/ui/inc/view.hxx6
-rw-r--r--sw/source/ui/lingu/olmenu.cxx739
-rw-r--r--sw/source/ui/lingu/olmenu.hrc82
-rw-r--r--sw/source/ui/lingu/olmenu.src17
-rwxr-xr-xsw/source/ui/shells/annotsh.cxx52
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx134
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx12
-rw-r--r--[-rwxr-xr-x]sw/source/ui/shells/langhelper.cxx256
-rw-r--r--sw/source/ui/shells/textsh.cxx12
-rw-r--r--sw/source/ui/shells/textsh1.cxx61
-rw-r--r--sw/source/ui/uiview/view.src4
-rwxr-xr-x[-rw-r--r--]sw/source/ui/uiview/viewling.cxx222
-rw-r--r--sw/source/ui/uiview/viewstat.cxx2
-rw-r--r--sw/source/ui/web/web.src4
-rw-r--r--sw/uiconfig/sglobal/menubar/menubar.xml15
-rw-r--r--sw/uiconfig/sweb/menubar/menubar.xml15
-rw-r--r--sw/uiconfig/swform/menubar/menubar.xml15
-rw-r--r--sw/uiconfig/swreport/menubar/menubar.xml15
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml15
-rw-r--r--sw/uiconfig/swxform/menubar/menubar.xml15
39 files changed, 1109 insertions, 2339 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 3adc03dc13a5..a206392aad3b 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -717,7 +717,6 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
--------------------------------------------------------------------*/
#define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* Zeilennumerierung */
-#define FN_THESAURUS_DLG (FN_EXTRA + 3 ) /* Thesaurus */
#define FN_HYPHENATE_OPT_DLG (FN_EXTRA + 5 ) /* Silbentrennung */
#define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* Woerter lernen */
#define FN_DICTIONARY_DLG (FN_EXTRA + 8 ) /* Woerterbuecher */
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index bcf511aa2a5b..fe77e94627d7 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -27,6 +27,8 @@
#ifndef _CRSRSH_HXX
#define _CRSRSH_HXX
+#include <com/sun/star/i18n/WordType.hpp>
+
#include <tools/string.hxx>
#include <tools/link.hxx>
#include <tools/rtti.hxx>
@@ -748,9 +750,9 @@ public:
BOOL SelectWord( const Point* pPt = 0 );
// Position vom akt. Cursor erfragen
- BOOL IsStartWord()const;
- BOOL IsEndWord() const;
- BOOL IsInWord() const;
+ BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
+ BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
BOOL IsStartSentence() const;
BOOL IsEndSentence() const;
BOOL IsSttPara() const;
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 8d2c1a81de49..f247422c089d 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -201,6 +201,7 @@ public:
// change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( sal_uInt32 nType );
+ void TransliterateText( const String& rModuleName );
// count words in current selection
void CountWords( SwDocStat& rStat ) const;
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index 6e26a6a3bfcb..d33c745524c1 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -26,7 +26,9 @@
************************************************************************/
#ifndef _SWCRSR_HXX
#define _SWCRSR_HXX
+
#include <com/sun/star/i18n/WordType.hpp>
+
#include <pam.hxx>
#include <tblsel.hxx>
#include <cshtyp.hxx>
@@ -129,10 +131,10 @@ public:
const SfxItemSet* rReplSet = 0 );
// UI versions
- BOOL IsStartWord() const;
- BOOL IsEndWord() const;
+ BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
BOOL IsStartEndSentence( bool bEnd ) const;
- BOOL IsInWord() const;
BOOL GoStartWord();
BOOL GoEndWord();
BOOL GoNextWord();
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index f0036e7abf35..8d37888ea789 100644..100755
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -41,7 +41,7 @@ class ViewShell;
class SwDocShell;
namespace svtools{ class ColorConfig;}
-#define VIEWOPT_1_IDLE 0x00000001L
+//#define VIEWOPT_1_IDLE 0x00000001L no longer used, see new member 'bIdle'
#define VIEWOPT_1_TAB 0x00000002L
#define VIEWOPT_1_BLANK 0x00000004L
#define VIEWOPT_1_HARDBLANK 0x00000008L
@@ -164,6 +164,7 @@ protected:
BOOL bBookview : 1; // view mode for page preview
BOOL mbViewLayoutBookMode : 1; // book view mode for edit view
sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
+ mutable bool bIdle;
// Maszstab
USHORT nZoom; // Angaben in Prozent
@@ -202,9 +203,14 @@ public:
----------------------------------------------------------------------------*/
inline BOOL IsIdle() const
- { return nCoreOptions & VIEWOPT_1_IDLE ? TRUE : FALSE; }
- inline void SetIdle( BOOL b )
- { (b != 0) ? (nCoreOptions |= VIEWOPT_1_IDLE ) : ( nCoreOptions &= ~VIEWOPT_1_IDLE); }
+ { return bIdle; }
+
+ // logically this is a const function since it does not modify the viewoptions
+ // but only effects idle formatting. Of course that member is already implement
+ // in the wrong place here... Also currently there are many const modifying casts in the code
+ // just to call this function on otherwise const objects. Thus declaring it as const now.
+ inline void SetIdle( BOOL b ) const
+ { bIdle = b; }
inline BOOL IsTab(BOOL bHard = FALSE) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) &&
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index 012ebbd5e68c..e264aec28c28 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -1485,6 +1485,24 @@ interface BaseText
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ SID_TRANSLITERATE_SENTENCE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_TITLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
SID_TRANSLITERATE_UPPER
[
ExecMethod = ExecTransliteration;
@@ -1585,6 +1603,12 @@ interface BaseText
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents
]
+ SID_THES
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents
+ ]
} //ende interface text
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index b45e4a305328..ee5fc431e165 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -398,7 +398,7 @@ interface BaseTextEditView
ExecMethod = Execute ;
StateMethod = GetState ;
]
- FN_THESAURUS_DLG // status(final|play)
+ SID_THESAURUS // status(final|play)
[
ExecMethod = ExecLingu ;
StateMethod = GetState ;
diff --git a/sw/sdi/annotsh.sdi b/sw/sdi/annotsh.sdi
index 441beec686c6..349e17b9d985 100755
--- a/sw/sdi/annotsh.sdi
+++ b/sw/sdi/annotsh.sdi
@@ -31,7 +31,7 @@ interface Annotation : _Annotation
]
{
- FN_THESAURUS_DLG // api:
+ SID_THESAURUS // api:
[
ExecMethod = ExecLingu ;
StateMethod = GetLinguState ;
@@ -178,6 +178,27 @@ interface Annotation : _Annotation
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ SID_TRANSLITERATE_SENTENCE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_TITLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_TOGGLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
SID_TRANSLITERATE_UPPER
[
ExecMethod = ExecTransliteration;
@@ -344,6 +365,13 @@ interface Annotation : _Annotation
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ SID_THES
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetLinguState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents
+ ]
+
}
shell SwAnnotationShell
diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi
index 6887346ee012..d98d368a9460 100644
--- a/sw/sdi/drwtxtsh.sdi
+++ b/sw/sdi/drwtxtsh.sdi
@@ -424,7 +424,7 @@ interface TextDrawText
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
- FN_THESAURUS_DLG // api:
+ SID_THESAURUS // api:
[
ExecMethod = ExecDrawLingu ;
StateMethod = GetState ;
@@ -478,6 +478,24 @@ interface TextDrawText
[
StateMethod = StateInsert ;
]
+ SID_TRANSLITERATE_SENTENCE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_TITLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
SID_TRANSLITERATE_UPPER
[
ExecMethod = ExecTransliteration;
@@ -514,6 +532,7 @@ interface TextDrawText
StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+
SID_LANGUAGE_STATUS
[
ExecMethod = Execute;
@@ -521,6 +540,13 @@ interface TextDrawText
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents
]
+ SID_THES
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents
+ ]
+
FN_FORMAT_FOOTNOTE_DLG // status()
[
ExecMethod = Execute ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index aede24688e1e..c27ac20b0013 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -8319,31 +8319,6 @@ SfxVoidItem TextWrap FN_DRAW_WRAP_DLG
]
//--------------------------------------------------------------------------
-SfxVoidItem ThesaurusDialog FN_THESAURUS_DLG
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_OPTIONS;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem ToggleAnchorType FN_TOOL_ANKER
()
[
diff --git a/sw/sdi/swslots.src b/sw/sdi/swslots.src
deleted file mode 100644
index 030fdee2a157..000000000000
--- a/sw/sdi/swslots.src
+++ /dev/null
@@ -1,1488 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "cmdid.h"
-#include "svx/svxids.hrc"
-#include "globals.hrc"
-SfxSlotInfo FN_ABSTRACT_NEWDOC
-{
- Slotname [ en-US ] = "Document From Abstract";
-};
-SfxSlotInfo FN_ABSTRACT_STARIMPRESS
-{
- Slotname [ en-US ] = "Presentation from Abstract";
-};
-SfxSlotInfo FN_ADD_UNKNOWN
-{
- Slotname [ en-US ] = "Add Unknown Words";
-};
-SfxSlotInfo FN_AUTO_CORRECT
-{
- Slotname [ en-US ] = "AutoCorrect";
-};
-SfxSlotInfo FN_AUTOFORMAT_APPLY
-{
- Slotname [ en-US ] = "Apply AutoFormat Options";
-};
-SfxSlotInfo FN_AUTOFORMAT_AUTO
-{
- Slotname [ en-US ] = "AutoFormat While Typing";
-};
-SfxSlotInfo FN_AUTOFORMAT_REDLINE_APPLY
-{
- Slotname [ en-US ] = "Apply AutoFormat Options and confirm Changes";
-};
-SfxSlotInfo FN_BACKSPACE
-{
- Slotname [ en-US ] = "Backspace";
-};
-SfxSlotInfo FN_CALC_TABLE
-{
- Slotname [ en-US ] = "Calculate Table";
-};
-SfxSlotInfo FN_CALCULATE
-{
- Slotname [ en-US ] = "Calculate Selection";
-};
-SfxSlotInfo FN_CHANGE_DBFIELD
-{
- Slotname [ en-US ] = "Change Database";
-};
-SfxSlotInfo FN_CHANGE_PAGENUM
-{
- Slotname [ en-US ] = "Page Number";
-};
-SfxSlotInfo FN_CHAR_LEFT
-{
- Slotname [ en-US ] = "To Character Left";
-};
-SfxSlotInfo FN_CHAR_LEFT_SEL
-{
- Slotname [ en-US ] = "Select Character Left";
-};
-SfxSlotInfo FN_CHAR_RIGHT
-{
- Slotname [ en-US ] = "Go Right";
-};
-SfxSlotInfo FN_CHAR_RIGHT_SEL
-{
- Slotname [ en-US ] = "Select Character Right";
-};
-SfxSlotInfo FN_CNTNT_TO_NEXT_FRAME
-{
- Slotname [ en-US ] = "To Next Frame";
-};
-SfxSlotInfo FN_CONVERT_TEXT_TABLE
-{
- Slotname [ en-US ] = "Convert Table/Text";
-};
-SfxSlotInfo FN_DEC_INDENT_OFFSET
-{
- Slotname [ en-US ] = "Decrement Indent Value";
-};
-SfxSlotInfo FN_DELETE_BACK_LINE
-{
- Slotname [ en-US ] = "Delete to Start of Line";
-};
-SfxSlotInfo FN_DELETE_BACK_PARA
-{
- Slotname [ en-US ] = "Delete to Start of Paragraph";
-};
-SfxSlotInfo FN_DELETE_BACK_SENT
-{
- Slotname [ en-US ] = "Delete to Start of Sentence";
-};
-SfxSlotInfo FN_DELETE_BACK_WORD
-{
- Slotname [ en-US ] = "Delete to Start of Word";
-};
-SfxSlotInfo FN_DELETE_LINE
-{
- Slotname [ en-US ] = "Delete to End of Line";
-};
-SfxSlotInfo FN_DELETE_PARA
-{
- Slotname [ en-US ] = "Delete to End of Paragraph";
-};
-SfxSlotInfo FN_DELETE_SENT
-{
- Slotname [ en-US ] = "Delete to End of Sentence";
-};
-SfxSlotInfo FN_DELETE_WHOLE_LINE
-{
- Slotname [ en-US ] = "Delete Row";
-};
-SfxSlotInfo FN_DELETE_WORD
-{
- Slotname [ en-US ] = "Delete to End of Word";
-};
-SfxSlotInfo FN_DRAW_WRAP_DLG
-{
- Slotname [ en-US ] = "Text Wrap";
-};
-SfxSlotInfo FN_DRAWTEXT_ATTR_DLG
-{
- Slotname [ en-US ] = "Text Attributes";
-};
-SfxSlotInfo FN_EDIT_FIELD
-{
- Slotname [ en-US ] = "Fields";
-};
-SfxSlotInfo FN_EDIT_FOOTNOTE
-{
- Slotname [ en-US ] = "Footnote";
-};
-SfxSlotInfo FN_EDIT_FORMULA
-{
- Slotname [ en-US ] = "Formula Bar";
-};
-SfxSlotInfo FN_EDIT_IDX_ENTRY_DLG
-{
- Slotname [ en-US ] = "Index Entry";
-};
-SfxSlotInfo FN_EDIT_LINK_DLG
-{
- Slotname [ en-US ] = "Links";
-};
-SfxSlotInfo FN_EDIT_REGION
-{
- Slotname [ en-US ] = "Sections";
-};
-SfxSlotInfo FN_END_DOC_DIRECT
-{
- Slotname [ en-US ] = "Directly to Document End";
-};
-SfxSlotInfo FN_END_OF_COLUMN
-{
- Slotname [ en-US ] = "To Column End";
-};
-SfxSlotInfo FN_END_OF_DOCUMENT
-{
- Slotname [ en-US ] = "To Document End";
-};
-SfxSlotInfo FN_END_OF_DOCUMENT_SEL
-{
- Slotname [ en-US ] = "Select to Document End";
-};
-SfxSlotInfo FN_END_OF_LINE
-{
- Slotname [ en-US ] = "To End of Line";
-};
-SfxSlotInfo FN_END_OF_LINE_SEL
-{
- Slotname [ en-US ] = "Select to End of Line";
-};
-SfxSlotInfo FN_END_OF_NEXT_COLUMN
-{
- Slotname [ en-US ] = "To End of Next Column";
-};
-SfxSlotInfo FN_END_OF_NEXT_PAGE
-{
- Slotname [ en-US ] = "To End of Next Page";
-};
-SfxSlotInfo FN_END_OF_NEXT_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to End of Next Page";
-};
-SfxSlotInfo FN_END_OF_PAGE
-{
- Slotname [ en-US ] = "To Page End";
-};
-SfxSlotInfo FN_END_OF_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to Page End";
-};
-SfxSlotInfo FN_END_OF_PARA
-{
- Slotname [ en-US ] = "To Paragraph End";
-};
-SfxSlotInfo FN_END_OF_PARA_SEL
-{
- Slotname [ en-US ] = "Select to Paragraph End";
-};
-SfxSlotInfo FN_END_OF_PREV_COLUMN
-{
- Slotname [ en-US ] = "To Previous Column";
-};
-SfxSlotInfo FN_END_OF_PREV_PAGE
-{
- Slotname [ en-US ] = "To End of Previous Page";
-};
-SfxSlotInfo FN_END_OF_PREV_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to End of Previous Page";
-};
-SfxSlotInfo FN_END_TABLE
-{
- Slotname [ en-US ] = "To Table End";
-};
-SfxSlotInfo FN_ENVELOP
-{
- Slotname [ en-US ] = "Insert Envelope";
-};
-SfxSlotInfo FN_ESCAPE
-{
- Slotname [ en-US ] = "Cancel";
-};
-SfxSlotInfo FN_EXECUTE_MACROFIELD
-{
- Slotname [ en-US ] = "Run Macro Field";
-};
-SfxSlotInfo FN_EXPAND_GLOSSARY
-{
- Slotname [ en-US ] = "Run AutoText Entry";
-};
-SfxSlotInfo FN_FLIP_HORZ_GRAFIC
-{
- Slotname [ en-US ] = "Flip Vertically";
-};
-SfxSlotInfo FN_FLIP_VERT_GRAFIC
-{
- Slotname [ en-US ] = "Flip Horizontally";
-};
-SfxSlotInfo FN_FOOTNOTE_TO_ANCHOR
-{
- Slotname [ en-US ] = "To Footnote Anchor";
-};
-SfxSlotInfo FN_FORMAT_BACKGROUND_DLG
-{
- Slotname [ en-US ] = "Background";
-};
-SfxSlotInfo FN_FORMAT_BORDER_DLG
-{
- Slotname [ en-US ] = "Borders";
-};
-SfxSlotInfo FN_FORMAT_DROPCAPS
-{
- Slotname [ en-US ] = "Drop Caps";
-};
-SfxSlotInfo FN_FORMAT_FOOTNOTE_DLG
-{
- Slotname [ en-US ] = "Footnotes";
-};
-SfxSlotInfo FN_FORMAT_FRAME_DLG
-{
- Slotname [ en-US ] = "Frame Properties";
-};
-SfxSlotInfo FN_FORMAT_GRAFIC_DLG
-{
- Slotname [ en-US ] = "Edit Graphics";
-};
-SfxSlotInfo FN_FORMAT_PAGE_COLUMN_DLG
-{
- Slotname [ en-US ] = "Page Columns";
-};
-SfxSlotInfo FN_FORMAT_PAGE_DLG
-{
- Slotname [ en-US ] = "Page Settings";
-};
-SfxSlotInfo FN_FORMAT_RESET
-{
- Slotname [ en-US ] = "Reset Font Attributes";
-};
-SfxSlotInfo FN_FORMAT_TABLE_DLG
-{
- Slotname [ en-US ] = "Edit Table";
-};
-SfxSlotInfo FN_FRAME_ALIGN_HORZ_CENTER
-{
- Slotname [ en-US ] = "Center Horizontal";
-};
-SfxSlotInfo FN_FRAME_ALIGN_HORZ_LEFT
-{
- Slotname [ en-US ] = "Align Left";
-};
-SfxSlotInfo FN_FRAME_ALIGN_HORZ_RIGHT
-{
- Slotname [ en-US ] = "Align Right";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_BOTTOM
-{
- Slotname [ en-US ] = "Align Bottom";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_CENTER
-{
- Slotname [ en-US ] = "Align Vertical Center";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_BOTTOM
-{
- Slotname [ en-US ] = "Align to Bottom of Character";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_CENTER
-{
- Slotname [ en-US ] = "Align to Vertical Center of Character";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_TOP
-{
- Slotname [ en-US ] = "Align to Top of Character";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_BOTTOM
-{
- Slotname [ en-US ] = "Align to Bottom of Line";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_CENTER
-{
- Slotname [ en-US ] = "Align to Vertical Center of Line";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_TOP
-{
- Slotname [ en-US ] = "Align to Top of Line";
-};
-SfxSlotInfo FN_FRAME_ALIGN_VERT_TOP
-{
- Slotname [ en-US ] = "Align Top";
-};
-SfxSlotInfo FN_FRAME_CHAIN
-{
- Slotname [ en-US ] = "Link Frames";
-};
-SfxSlotInfo FN_FRAME_DOWN
-{
- Slotname [ en-US ] = "Send Backward";
-};
-SfxSlotInfo FN_FRAME_MIRROR_ON_EVEN_PAGES
-{
- Slotname [ en-US ] = "Mirror Object on Even Pages";
-};
-SfxSlotInfo FN_FRAME_NOWRAP
-{
- Slotname [ en-US ] = "Wrap Off";
-};
-SfxSlotInfo FN_FRAME_TO_ANCHOR
-{
- Slotname [ en-US ] = "Set Cursor To Anchor";
-};
-SfxSlotInfo FN_FRAME_UNCHAIN
-{
- Slotname [ en-US ] = "Unlink Frames";
-};
-SfxSlotInfo FN_FRAME_UP
-{
- Slotname [ en-US ] = "Bring Forward";
-};
-SfxSlotInfo FN_FRAME_WRAP
-{
- Slotname [ en-US ] = "Wrap On";
-};
-SfxSlotInfo FN_FRAME_WRAP_CONTOUR
-{
- Slotname [ en-US ] = "Wrap Contour On";
-};
-SfxSlotInfo FN_FRAME_WRAP_IDEAL
-{
- Slotname [ en-US ] = "Wrap Optimal";
-};
-SfxSlotInfo FN_FRAME_WRAP_LEFT
-{
- Slotname [ en-US ] = "Wrap Left";
-};
-SfxSlotInfo FN_FRAME_WRAP_RIGHT
-{
- Slotname [ en-US ] = "Wrap Right";
-};
-SfxSlotInfo FN_FRAME_WRAPTHRU
-{
- Slotname [ en-US ] = "Wrap Through";
-};
-SfxSlotInfo FN_FRAME_WRAPTHRU_TRANSP
-{
- Slotname [ en-US ] = "Wrap Transparent";
-};
-SfxSlotInfo FN_GLOSSARY_DLG
-{
- Slotname [ en-US ] = "Edit AutoText";
-};
-SfxSlotInfo FN_GOTO_NEXT_INPUTFLD
-{
- Slotname [ en-US ] = "To Next Input Field";
-};
-SfxSlotInfo FN_GOTO_NEXT_MARK
-{
- Slotname [ en-US ] = "To Next Placeholder";
-};
-SfxSlotInfo FN_GOTO_NEXT_OBJ
-{
- Slotname [ en-US ] = "To Next Object";
-};
-SfxSlotInfo FN_GOTO_NEXT_REGION
-{
- Slotname [ en-US ] = "To Next Section";
-};
-SfxSlotInfo FN_GOTO_PREV_INPUTFLD
-{
- Slotname [ en-US ] = "To Previous Input Field";
-};
-SfxSlotInfo FN_GOTO_PREV_MARK
-{
- Slotname [ en-US ] = "To Previous Placeholder";
-};
-SfxSlotInfo FN_GOTO_PREV_OBJ
-{
- Slotname [ en-US ] = "To Previous Object";
-};
-SfxSlotInfo FN_GOTO_PREV_REGION
-{
- Slotname [ en-US ] = "To Previous Section";
-};
-SfxSlotInfo FN_GOTO_REFERENCE
-{
- Slotname [ en-US ] = "To Reference";
-};
-SfxSlotInfo FN_GRAPHIC_MIRROR_ON_EVEN_PAGES
-{
- Slotname [ en-US ] = "Flip Graphics on Even Pages";
-};
-SfxSlotInfo FN_GROW_FONT_SIZE
-{
- Slotname [ en-US ] = "Increase Font";
-};
-SfxSlotInfo FN_HSCROLLBAR
-{
- Slotname [ en-US ] = "Scroll Horizontal";
-};
-SfxSlotInfo FN_HYPHENATE_OPT_DLG
-{
- Slotname [ en-US ] = "Hyphenation";
-};
-SfxSlotInfo FN_IDX_MARK_TO_IDX
-{
- Slotname [ en-US ] = "Index Mark to Index";
-};
-SfxSlotInfo FN_INC_INDENT_OFFSET
-{
- Slotname [ en-US ] = "Increment Indent Value";
-};
-SfxSlotInfo FN_INSERT_BOOKMARK
-{
- Slotname [ en-US ] = "Insert Bookmark";
-};
-SfxSlotInfo FN_INSERT_BREAK
-{
- Slotname [ en-US ] = "Insert Paragraph";
-};
-SfxSlotInfo FN_INSERT_BREAK_DLG
-{
- Slotname [ en-US ] = "Insert Manual Break";
-};
-SfxSlotInfo FN_INSERT_CAPTION
-{
- Slotname [ en-US ] = "Insert Caption";
-};
-SfxSlotInfo FN_INSERT_COLUMN_BREAK
-{
- Slotname [ en-US ] = "Insert Column Break";
-};
-SfxSlotInfo FN_INSERT_CTRL
-{
- Slotname [ en-US ] = "Insert";
-};
-SfxSlotInfo FN_INSERT_ENDNOTE
-{
- Slotname [ en-US ] = "Insert Endnote Directly";
-};
-SfxSlotInfo FN_INSERT_FIELD
-{
- Slotname [ en-US ] = "Fields Dialog";
-};
-SfxSlotInfo FN_INSERT_FIELD_CTRL
-{
- Slotname [ en-US ] = "Insert Fields";
-};
-SfxSlotInfo FN_INSERT_FLD_AUTHOR
-{
- Slotname [ en-US ] = "Insert Author Field";
-};
-SfxSlotInfo FN_INSERT_FLD_DATE
-{
- Slotname [ en-US ] = "Insert Date";
-};
-SfxSlotInfo FN_INSERT_FLD_PGCOUNT
-{
- Slotname [ en-US ] = "Insert Page Count";
-};
-SfxSlotInfo FN_INSERT_FLD_PGNUMBER
-{
- Slotname [ en-US ] = "Insert Page Number";
-};
-SfxSlotInfo FN_INSERT_FLD_TIME
-{
- Slotname [ en-US ] = "Insert Time";
-};
-SfxSlotInfo FN_INSERT_FLD_TITLE
-{
- Slotname [ en-US ] = "Insert Document Title";
-};
-SfxSlotInfo FN_INSERT_FLD_TOPIC
-{
- Slotname [ en-US ] = "Insert Subject";
-};
-SfxSlotInfo FN_INSERT_FOOTNOTE
-{
- Slotname [ en-US ] = "Insert Footnote Directly";
-};
-SfxSlotInfo FN_INSERT_FOOTNOTE_DLG
-{
- Slotname [ en-US ] = "Insert Footnote";
-};
-SfxSlotInfo FN_INSERT_FRAME
-{
- Slotname [ en-US ] = "Insert Frame";
-};
-SfxSlotInfo FN_INSERT_FRAME_INTERACT_NOCOL
-{
- Slotname [ en-US ] = "Insert single-column frame manually";
-};
-SfxSlotInfo FN_INSERT_FRAME_INTERACT
-{
- Slotname [ en-US ] = "Insert Frame Manually";
-};
-SfxSlotInfo FN_INSERT_HARD_SPACE
-{
- Slotname [ en-US ] = "Insert Non-breaking Space";
-};
-SfxSlotInfo FN_INSERT_HARDHYPHEN
-{
- Slotname [ en-US ] = "Insert Non-breaking Hyphen";
-};
-SfxSlotInfo FN_INSERT_HRULER
-{
- Slotname [ en-US ] = "Insert Horizontal Ruler";
-};
-SfxSlotInfo FN_INSERT_HYPERLINK
-{
- Slotname [ en-US ] = "Insert Hyperlink";
-};
-SfxSlotInfo FN_INSERT_IDX_ENTRY_DLG
-{
- Slotname [ en-US ] = "Insert Index Marker";
-};
-SfxSlotInfo FN_INSERT_LINEBREAK
-{
- Slotname [ en-US ] = "Insert Manual Row Break";
-};
-SfxSlotInfo FN_INSERT_OBJ_CTRL
-{
- Slotname [ en-US ] = "Insert Object";
-};
-SfxSlotInfo FN_INSERT_OBJECT_DLG
-{
- Slotname [ en-US ] = "Insert Other Objects";
-};
-SfxSlotInfo FN_INSERT_PAGEBREAK
-{
- Slotname [ en-US ] = "Insert Manual Page Break";
-};
-SfxSlotInfo FN_INSERT_PAGEFOOTER
-{
- Slotname [ en-US ] = "Insert Footer";
-};
-SfxSlotInfo FN_INSERT_PAGEHEADER
-{
- Slotname [ en-US ] = "Insert Header";
-};
-SfxSlotInfo FN_INSERT_REF_FIELD
-{
- Slotname [ en-US ] = "Insert Field Reference";
-};
-SfxSlotInfo FN_INSERT_REGION
-{
- Slotname [ en-US ] = "Insert Section";
-};
-SfxSlotInfo FN_INSERT_SMA
-{
- Slotname [ en-US ] = "Insert %PRODUCTNAME Math object";
-};
-SfxSlotInfo FN_INSERT_SOFT_HYPHEN
-{
- Slotname [ en-US ] = "Insert Optional Hyphen";
-};
-SfxSlotInfo FN_INSERT_SYMBOL
-{
- Slotname [ en-US ] = "Insert Special Character ";
-};
-SfxSlotInfo FN_INSERT_TABLE
-{
- Slotname [ en-US ] = "Insert Table";
-};
-SfxSlotInfo FN_JAVAEDIT
-{
- Slotname [ en-US ] = "Insert Script";
-};
-SfxSlotInfo FN_LABEL
-{
- Slotname [ en-US ] = "Insert Labels";
-};
-SfxSlotInfo FN_BUSINESS_CARD
-{
- Slotname [ en-US ] = "Insert business cards";
-};
-SfxSlotInfo FN_LINE_DOWN
-{
- Slotname [ en-US ] = "To Line Below";
-};
-SfxSlotInfo FN_LINE_DOWN_SEL
-{
- Slotname [ en-US ] = "Select Down";
-};
-SfxSlotInfo FN_LINE_NUMBERING_DLG
-{
- Slotname [ en-US ] = "Set Line Numbering";
-};
-SfxSlotInfo FN_LINE_UP
-{
- Slotname [ en-US ] = "To Top Line";
-};
-SfxSlotInfo FN_LINE_UP_SEL
-{
- Slotname [ en-US ] = "Select to Top Line";
-};
-SfxSlotInfo FN_NAVIGATION_PI_GOTO_PAGE
-{
- Slotname [ en-US ] = "To Page";
-};
-SfxSlotInfo FN_NEW_GLOBAL_DOC
-{
- Slotname [ en-US ] = "Create Master Document";
-};
-SfxSlotInfo FN_NEW_HTML_DOC
-{
- Slotname [ en-US ] = "Create HTML Document";
-};
-SfxSlotInfo FN_NEXT_BOOKMARK
-{
- Slotname [ en-US ] = "To Next Bookmark";
-};
-SfxSlotInfo FN_NEXT_FOOTNOTE
-{
- Slotname [ en-US ] = "To Next Footnote";
-};
-SfxSlotInfo FN_NEXT_PARA
-{
- Slotname [ en-US ] = "To Next Paragraph";
-};
-SfxSlotInfo FN_NEXT_SENT
-{
- Slotname [ en-US ] = "To Next Sentence";
-};
-SfxSlotInfo FN_NEXT_SENT_SEL
-{
- Slotname [ en-US ] = "Select to Next Sentence";
-};
-SfxSlotInfo FN_NEXT_TABLE
-{
- Slotname [ en-US ] = "To Next Table";
-};
-SfxSlotInfo FN_NEXT_TBLFML
-{
- Slotname [ en-US ] = "Go to next table formula";
-};
-SfxSlotInfo FN_NEXT_TBLFML_ERR
-{
- Slotname [ en-US ] = "Go to next faulty table formula";
-};
-SfxSlotInfo FN_NEXT_TOXMARK
-{
- Slotname [ en-US ] = "Go to Next Index Mark";
-};
-SfxSlotInfo FN_NEXT_WORD
-{
- Slotname [ en-US ] = "To Word Right";
-};
-SfxSlotInfo FN_NEXT_WORD_SEL
-{
- Slotname [ en-US ] = "Select to Word Right";
-};
-SfxSlotInfo FN_NUM_BULLET_DOWN
-{
- Slotname [ en-US ] = "Down One Level";
-};
-SfxSlotInfo FN_NUM_BULLET_MOVEDOWN
-{
- Slotname [ en-US ] = "Move Down";
-};
-SfxSlotInfo FN_NUM_BULLET_MOVEUP
-{
- Slotname [ en-US ] = "Move Up";
-};
-SfxSlotInfo FN_NUM_BULLET_NEXT
-{
- Slotname [ en-US ] = "To Next Paragraph in Level";
-};
-SfxSlotInfo FN_NUM_BULLET_NONUM
-{
- Slotname [ en-US ] = "Insert Unnumbered Entry";
-};
-SfxSlotInfo FN_NUM_BULLET_OFF
-{
- Slotname [ en-US ] = "Numbering Off";
-};
-SfxSlotInfo FN_NUM_BULLET_OUTLINE_DOWN
-{
- Slotname [ en-US ] = "Move Down with Subpoints";
-};
-SfxSlotInfo FN_NUM_BULLET_OUTLINE_MOVEDOWN
-{
- Slotname [ en-US ] = "Move Down with Subpoints";
-};
-SfxSlotInfo FN_NUM_BULLET_OUTLINE_MOVEUP
-{
- Slotname [ en-US ] = "Move Up with Subpoints";
-};
-SfxSlotInfo FN_NUM_BULLET_OUTLINE_UP
-{
- Slotname [ en-US ] = "Move Up with Subpoints";
-};
-SfxSlotInfo FN_NUM_BULLET_PREV
-{
- Slotname [ en-US ] = "To Previous Paragraph in Level";
-};
-SfxSlotInfo FN_NUM_BULLET_UP
-{
- Slotname [ en-US ] = "Up One Level";
-};
-SfxSlotInfo FN_NUM_FORMAT_TABLE_DLG
-{
- Slotname [ en-US ] = "Edit Number Format";
-};
-SfxSlotInfo FN_NUM_OR_NONUM
-{
- Slotname [ en-US ] = "Numbering On/Off";
-};
-SfxSlotInfo FN_NUMBER_BULLETS
-{
- Slotname [ en-US ] = "Edit Numbering";
-};
-SfxSlotInfo FN_NUMBER_CURRENCY
-{
- Slotname [ en-US ] = "Number Format: Currency";
-};
-SfxSlotInfo FN_NUMBER_DATE
-{
- Slotname [ en-US ] = "Number Format : Date";
-};
-SfxSlotInfo FN_NUMBER_NEWSTART
-{
- Slotname [ en-US ] = "Restart Numbering";
-};
-SfxSlotInfo FN_NUMBER_PERCENT
-{
- Slotname [ en-US ] = "Number Format: Percent";
-};
-SfxSlotInfo FN_NUMBER_SCIENTIFIC
-{
- Slotname [ en-US ] = "Number Format: Exponential";
-};
-SfxSlotInfo FN_NUMBER_STANDARD
-{
- Slotname [ en-US ] = "Number Format: Standard";
-};
-SfxSlotInfo FN_NUMBER_TIME
-{
- Slotname [ en-US ] = "Number Format: Time";
-};
-SfxSlotInfo FN_NUMBER_TWODEC
-{
- Slotname [ en-US ] = "Number Format: Decimal";
-};
-SfxSlotInfo FN_NUMBERING_OUTLINE_DLG
-{
- Slotname [ en-US ] = "Outline Numbering";
-};
-SfxSlotInfo FN_OPTIMIZE_TABLE
-{
- Slotname [ en-US ] = "Optimize";
-};
-SfxSlotInfo FN_OUTLINE_TO_CLIPBOARD
-{
- Slotname [ en-US ] = "Outline to Clipboard";
-};
-SfxSlotInfo FN_OUTLINE_TO_IMPRESS
-{
- Slotname [ en-US ] = "Outline to Presentation";
-};
-SfxSlotInfo FN_PAGE_STYLE_SET_COLS
-{
- Slotname [ en-US ] = "Page Style: Columns";
-};
-SfxSlotInfo FN_PAGEDOWN
-{
- Slotname [ en-US ] = "Next Page";
-};
-SfxSlotInfo FN_PAGEDOWN_SEL
-{
- Slotname [ en-US ] = "Select to Next Page";
-};
-SfxSlotInfo FN_PAGEUP
-{
- Slotname [ en-US ] = "Previous Page";
-};
-SfxSlotInfo FN_PAGEUP_SEL
-{
- Slotname [ en-US ] = "Select to Previous Page";
-};
-SfxSlotInfo FN_PASTESPECIAL
-{
- Slotname [ en-US ] = "Paste Special";
-};
-SfxSlotInfo FN_PASTEUNFORMATTED
-{
- Slotname [ en-US ] = "Paste Unformatted Text";
-};
-SfxSlotInfo FN_POSTIT
-{
- Slotname [ en-US ] = "Insert Note";
-};
-SfxSlotInfo FN_PREV_BOOKMARK
-{
- Slotname [ en-US ] = "To Previous Bookmark";
-};
-SfxSlotInfo FN_PREV_FOOTNOTE
-{
- Slotname [ en-US ] = "To Previous Footnote";
-};
-SfxSlotInfo FN_PREV_PARA
-{
- Slotname [ en-US ] = "To Previous Paragraph";
-};
-SfxSlotInfo FN_PREV_SENT
-{
- Slotname [ en-US ] = "To Previous Sentence";
-};
-SfxSlotInfo FN_PREV_SENT_SEL
-{
- Slotname [ en-US ] = "Select to Previous Sentence";
-};
-SfxSlotInfo FN_PREV_TABLE
-{
- Slotname [ en-US ] = "To Previous Table";
-};
-SfxSlotInfo FN_PREV_TBLFML
-{
- Slotname [ en-US ] = "Go to previous table formula";
-};
-SfxSlotInfo FN_PREV_TBLFML_ERR
-{
- Slotname [ en-US ] = "Go to previous faulty table formula";
-};
-SfxSlotInfo FN_PREV_TOXMARK
-{
- Slotname [ en-US ] = "Go to Previous Index Mark";
-};
-SfxSlotInfo FN_PREV_WORD
-{
- Slotname [ en-US ] = "To Word Left";
-};
-SfxSlotInfo FN_PREV_WORD_SEL
-{
- Slotname [ en-US ] = "Select to Begin of Word";
-};
-SfxSlotInfo FN_PREVIEW_ZOOM
-{
- Slotname [ en-US ] = "Preview Zoom";
-};
-SfxSlotInfo FN_PRINT_LAYOUT
-{
- Slotname [ en-US ] = "Print Layout On/Off";
-};
-SfxSlotInfo FN_PRINT_PAGEPREVIEW
-{
- Slotname [ en-US ] = "Print document";
-};
-SfxSlotInfo FN_MAILMERGE_WIZARD
-{
- SlotName[ en-US ] = "Mail Merge Wizard";
-};
-SfxSlotInfo FN_QRY_MERGE
-{
- Slotname [ en-US ] = "Prepare Mail Merge";
-};
-SfxSlotInfo FN_REDLINE_ACCEPT
-{
- Slotname [ en-US ] = "Accept or Reject Changes";
-};
-SfxSlotInfo FN_REDLINE_COMMENT
-{
- Slotname [ en-US ] = "Insert Comment";
-};
-SfxSlotInfo FN_REDLINE_ON
-{
- Slotname [ en-US ] = "Switch on Review";
-};
-SfxSlotInfo FN_REDLINE_PROTECT
-{
- Slotname [ en-US ] = "Protect Record of Changes";
-};
-SfxSlotInfo FN_REDLINE_SHOW
-{
- Slotname [ en-US ] = "Highlight Changes";
-};
-SfxSlotInfo FN_REFRESH_VIEW
-{
- Slotname [ en-US ] = "Restore View";
-};
-SfxSlotInfo FN_REPAGINATE
-{
- Slotname [ en-US ] = "Repaginate";
-};
-SfxSlotInfo FN_REPEAT_SEARCH
-{
- Slotname [ en-US ] = "Repeat Search";
-};
-SfxSlotInfo FN_RULER
-{
- Slotname [ en-US ] = "Ruler On/Off";
-};
-SfxSlotInfo FN_SELECT_PARA
-{
- Slotname [ en-US ] = "Select Paragraph";
-};
-SfxSlotInfo FN_SELECT_WORD
-{
- Slotname [ en-US ] = "Select Word";
-};
-SfxSlotInfo FN_SET_ADD_MODE
-{
- Slotname [ en-US ] = "MultiSelection On";
-};
-SfxSlotInfo FN_SET_EXT_MODE
-{
- Slotname [ en-US ] = "Extended Selection On";
-};
-SfxSlotInfo FN_SET_PAGE_STYLE
-{
- Slotname [ en-US ] = "Apply Page Style";
-};
-SfxSlotInfo FN_SET_SUB_SCRIPT
-{
- Slotname [ en-US ] = "Subscript";
-};
-SfxSlotInfo FN_SET_SUPER_SCRIPT
-{
- Slotname [ en-US ] = "Superscript";
-};
-SfxSlotInfo FN_SHADOWCURSOR
-{
- Slotname [ en-US ] = "Direct Cursor On/Off";
-};
-SfxSlotInfo FN_SHIFT_BACKSPACE
-{
- Slotname [ en-US ] = "Backspace";
-};
-SfxSlotInfo FN_SHOW_MULTIPLE_PAGES
-{
- Slotname [ en-US ] = "Page Preview: Multiple Pages";
-};
-SfxSlotInfo FN_SHOW_TWO_PAGES
-{
- Slotname [ en-US ] = "Page Preview: Two Pages";
-};
-SfxSlotInfo FN_SHOW_BOOKVIEW
-{
- SlotName[ en-US ] = "Book Preview";
-};
-SfxSlotInfo FN_SHRINK_FONT_SIZE
-{
- Slotname [ en-US ] = "Reduce Font";
-};
-SfxSlotInfo FN_SORTING_DLG
-{
- Slotname [ en-US ] = "Sort";
-};
-SfxSlotInfo FN_START_DOC_DIRECT
-{
- Slotname [ en-US ] = "Directly to Document Begin";
-};
-SfxSlotInfo FN_START_OF_COLUMN
-{
- Slotname [ en-US ] = "To Column Begin";
-};
-SfxSlotInfo FN_START_OF_DOCUMENT
-{
- Slotname [ en-US ] = "To Document Begin";
-};
-SfxSlotInfo FN_START_OF_DOCUMENT_SEL
-{
- Slotname [ en-US ] = "Select to Document Begin";
-};
-SfxSlotInfo FN_START_OF_LINE
-{
- Slotname [ en-US ] = "To Line Begin";
-};
-SfxSlotInfo FN_START_OF_LINE_SEL
-{
- Slotname [ en-US ] = "Select to Begin of Line";
-};
-SfxSlotInfo FN_START_OF_NEXT_COLUMN
-{
- Slotname [ en-US ] = "To Begin of Next Column";
-};
-SfxSlotInfo FN_START_OF_NEXT_PAGE
-{
- Slotname [ en-US ] = "To Begin of Next Page";
-};
-SfxSlotInfo FN_START_OF_NEXT_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to Begin of Next Page";
-};
-SfxSlotInfo FN_START_OF_PAGE
-{
- Slotname [ en-US ] = "To Page Begin";
-};
-SfxSlotInfo FN_START_OF_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to Page Begin";
-};
-SfxSlotInfo FN_START_OF_PARA
-{
- Slotname [ en-US ] = "To Paragraph Begin";
-};
-SfxSlotInfo FN_START_OF_PARA_SEL
-{
- Slotname [ en-US ] = "Select to Paragraph Begin";
-};
-SfxSlotInfo FN_START_OF_PREV_COLUMN
-{
- Slotname [ en-US ] = "To Begin of Previous Column";
-};
-SfxSlotInfo FN_START_OF_PREV_PAGE
-{
- Slotname [ en-US ] = "To Begin of Previous Page";
-};
-SfxSlotInfo FN_START_OF_PREV_PAGE_SEL
-{
- Slotname [ en-US ] = "Select to Begin of Previous Page";
-};
-SfxSlotInfo FN_START_TABLE
-{
- Slotname [ en-US ] = "To Table Begin";
-};
-SfxSlotInfo FN_STAT_PAGE
-{
- Slotname [ en-US ] = "Page Number";
-};
-SfxSlotInfo FN_STAT_SELMODE
-{
- Slotname [ en-US ] = "Selection Mode";
-};
-SfxSlotInfo FN_STAT_TEMPLATE
-{
- Slotname [ en-US ] = "Page Style";
-};
-SfxSlotInfo FN_TABLE_ADJUST_CELLS
-{
- Slotname [ en-US ] = "Optimal Column Width";
-};
-SfxSlotInfo FN_TABLE_AUTOSUM
-{
- Slotname [ en-US ] = "Sum";
-};
-SfxSlotInfo FN_TABLE_BALANCE_CELLS
-{
- Slotname [ en-US ] = "Space Columns Equally";
-};
-SfxSlotInfo FN_TABLE_BALANCE_ROWS
-{
- Slotname [ en-US ] = "Space Rows Equally ";
-};
-SfxSlotInfo FN_TABLE_DELETE_COL
-{
- Slotname [ en-US ] = "Delete Column";
-};
-SfxSlotInfo FN_TABLE_DELETE_ROW
-{
- Slotname [ en-US ] = "Delete Row";
-};
-SfxSlotInfo FN_TABLE_INSERT_COL
-{
- Slotname [ en-US ] = "Insert Column";
-};
-SfxSlotInfo FN_TABLE_INSERT_ROW
-{
- Slotname [ en-US ] = "Insert Row";
-};
-SfxSlotInfo FN_TABLE_MERGE_CELLS
-{
- Slotname [ en-US ] = "Merge Cells";
-};
-SfxSlotInfo FN_TABLE_MERGE_TABLE
-{
- Slotname [ en-US ] = "Merge Table";
-};
-SfxSlotInfo FN_FORMAT_APPLY_HEAD1
-{
- Slotname [ en-US ] = "Apply Style Heading 1";
-};
-SfxSlotInfo FN_FORMAT_APPLY_HEAD2
-{
- Slotname [ en-US ] = "Apply Style Heading 2";
-};
-SfxSlotInfo FN_FORMAT_APPLY_HEAD3
-{
- Slotname [ en-US ] = "Apply Style Heading 3";
-};
-SfxSlotInfo FN_FORMAT_APPLY_DEFAULT
-{
- Slotname [ en-US ] = "Apply Style Default";
-};
-SfxSlotInfo FN_FORMAT_APPLY_TEXTBODY
-{
- Slotname [ en-US ] = "Apply Style Textbody";
-};
-SfxSlotInfo FN_TABLE_MODE_FIX
-{
- Slotname [ en-US ] = "Table: Fixed";
-};
-SfxSlotInfo FN_TABLE_MODE_FIX_PROP
-{
- Slotname [ en-US ] = "Table: Fixed, Proportional";
-};
-SfxSlotInfo FN_TABLE_MODE_VARIABLE
-{
- Slotname [ en-US ] = "Table: Variable";
-};
-SfxSlotInfo FN_TABLE_OPTIMAL_HEIGHT
-{
- Slotname [ en-US ] = "Optimal Row Height";
-};
-SfxSlotInfo FN_TABLE_SELECT_ALL
-{
- Slotname [ en-US ] = "Select Table";
-};
-SfxSlotInfo FN_TABLE_SELECT_COL
-{
- Slotname [ en-US ] = "Select Column";
-};
-SfxSlotInfo FN_TABLE_SELECT_ROW
-{
- Slotname [ en-US ] = "Select Rows";
-};
-SfxSlotInfo FN_TABLE_SET_READ_ONLY_CELLS
-{
- Slotname [ en-US ] = "Protect Cells";
-};
-SfxSlotInfo FN_TABLE_SET_ROW_HEIGHT
-{
- Slotname [ en-US ] = "Row Height";
-};
-SfxSlotInfo FN_TABLE_SPLIT_CELLS
-{
- Slotname [ en-US ] = "Split Cells";
-};
-SfxSlotInfo FN_TABLE_SPLIT_TABLE
-{
- Slotname [ en-US ] = "Split Table";
-};
-SfxSlotInfo FN_TABLE_UNSET_READ_ONLY
-{
- Slotname [ en-US ] = "Unprotect sheet";
-};
-SfxSlotInfo FN_TABLE_UNSET_READ_ONLY_CELLS
-{
- Slotname [ en-US ] = "Unprotect cells";
-};
-SfxSlotInfo FN_TABLE_VERT_BOTTOM
-{
- Slotname [ en-US ] = "Bottom";
-};
-SfxSlotInfo FN_TABLE_VERT_CENTER
-{
- Slotname [ en-US ] = "Center ( vertical )";
-};
-SfxSlotInfo FN_TABLE_VERT_NONE
-{
- Slotname [ en-US ] = "Top";
-};
-SfxSlotInfo FN_THESAURUS_DLG
-{
- Slotname [ en-US ] = "Thesaurus";
-};
-SfxSlotInfo FN_TO_FOOTER
-{
- Slotname [ en-US ] = "To Footer";
-};
-SfxSlotInfo FN_TO_HEADER
-{
- Slotname [ en-US ] = "To Header";
-};
-SfxSlotInfo FN_TOOL_ANKER
-{
- Slotname [ en-US ] = "Change Anchor";
-};
-SfxSlotInfo FN_TOOL_ANKER_AT_CHAR
-{
- Slotname [ en-US ] = "Anchor to Character";
-};
-SfxSlotInfo FN_TOOL_ANKER_CHAR
-{
- Slotname [ en-US ] = "Anchor as Character";
-};
-SfxSlotInfo FN_TOOL_ANKER_FRAME
-{
- Slotname [ en-US ] = "Anchor To Frame";
-};
-SfxSlotInfo FN_TOOL_ANKER_PAGE
-{
- Slotname [ en-US ] = "Anchor To Page";
-};
-SfxSlotInfo FN_TOOL_ANKER_PARAGRAPH
-{
- Slotname [ en-US ] = "Anchor To Paragraph";
-};
-SfxSlotInfo FN_TOOL_GROUP
-{
- Slotname [ en-US ] = "Group";
-};
-SfxSlotInfo FN_TOOL_HIERARCHIE
-{
- Slotname [ en-US ] = "Change Position";
-};
-SfxSlotInfo FN_TOOL_UNGROUP
-{
- Slotname [ en-US ] = "Ungroup";
-};
-SfxSlotInfo FN_UNDERLINE_DOUBLE
-{
- Slotname [ en-US ] = "Double Underline ";
-};
-SfxSlotInfo FN_UPDATE_ALL
-{
- Slotname [ en-US ] = "Update All";
-};
-SfxSlotInfo FN_UPDATE_ALL_LINKS
-{
- Slotname [ en-US ] = "Update All Links";
-};
-SfxSlotInfo FN_UPDATE_CUR_TOX
-{
- Slotname [ en-US ] = "Update Index";
-};
-SfxSlotInfo FN_EDIT_CURRENT_TOX
-{
- Slotname [ en-US ] = "Edit index";
-};
-SfxSlotInfo FN_UPDATE_FIELDS
-{
- Slotname [ en-US ] = "Update Fields";
-};
-SfxSlotInfo FN_UPDATE_INPUTFIELDS
-{
- Slotname [ en-US ] = "Update Input Fields";
-};
-SfxSlotInfo FN_UPDATE_TOX
-{
- Slotname [ en-US ] = "Update Indexes";
-};
-SfxSlotInfo FN_VIEW_BOUNDS
-{
- Slotname [ en-US ] = "Text Limits";
-};
-SfxSlotInfo FN_VIEW_FIELDNAME
-{
- Slotname [ en-US ] = "Field Names On/Off";
-};
-SfxSlotInfo FN_VIEW_FIELDS
-{
- Slotname [ en-US ] = "Fields";
-};
-SfxSlotInfo FN_VIEW_GRAPHIC
-{
- Slotname [ en-US ] = "Graphics On/Off";
-};
-
-SfxSlotInfo FN_VIEW_HIDDEN_PARA
-{
- Slotname [ en-US ] = "Hidden Paragraphs";
-};
-SfxSlotInfo FN_VIEW_MARKS
-{
- Slotname [ en-US ] = "Field Shadings";
-};
-SfxSlotInfo FN_VIEW_META_CHARS
-{
- Slotname [ en-US ] = "Nonprinting Characters On/Off";
-};
-SfxSlotInfo FN_VIEW_TABLEGRID
-{
- Slotname [ en-US ] = "Table Limits";
-};
-SfxSlotInfo FN_VLINEAL
-{
- Slotname [ en-US ] = "Vertical Ruler";
-};
-SfxSlotInfo FN_VSCROLLBAR
-{
- Slotname [ en-US ] = "Vertical Scroll Bar";
-};
-SfxSlotInfo FN_WRAP_ANCHOR_ONLY
-{
- Slotname [ en-US ] = "Wrap First Paragraph";
-};
-SfxSlotInfo SID_ATTR_CHAR_COLOR_BACKGROUND
-{
- Slotname [ en-US ] = "Highlighting";
-};
-SfxSlotInfo SID_ATTR_CHAR_COLOR_BACKGROUND_EXT
-{
- Slotname [ en-US ] = "Highlight Fill";
-};
-SfxSlotInfo SID_ATTR_CHAR_COLOR_EXT
-{
- Slotname [ en-US ] = "Font Color Fill";
-};
-SfxSlotInfo SID_ATTR_CHAR_COLOR2
-{
- Slotname [ en-US ] = "Font Color";
-};
-SfxSlotInfo SID_TEMPLATE_LOAD
-{
- Slotname [ en-US ] = "Load Styles";
-};
-SfxSlotInfo FN_FORMAT_COLUMN
-{
- Slotname [ en-US ] = "Columns";
-};
-SfxSlotInfo FN_INSERT_MULTI_TOX
-{
-
- Slotname [ en-US ] = "Insert Index";
-};
-SfxSlotInfo FN_INSERT_AUTH_ENTRY_DLG
-{
- Slotname [ en-US ] = "Insert Bibliography Entry";
-};
-
-SfxSlotInfo FN_EDIT_AUTH_ENTRY_DLG
-{
- Slotname [ en-US ] = "Edit Bibliography Entry";
-};
-
-SfxSlotInfo FN_REMOVE_CUR_TOX
-{
- Slotname [ en-US ] = "Delete index";
-};
-SfxSlotInfo FN_EDIT_HYPERLINK
-{
- Slotname [ en-US ] = "Edit hyperlink";
-};
-SfxSlotInfo FN_SET_MODOPT_TBLNUMFMT
-{
- Slotname [ en-US ] = "Number Recognition";
-};
-SfxSlotInfo FN_UPDATE_CHARTS
-{
- Slotname [ en-US ] = "Update Charts";
-};
-SfxSlotInfo FN_NAME_SHAPE
-{
- Slotname [ en-US ] = "Name...";
-};
-// #i68101#
-SfxSlotInfo FN_TITLE_DESCRIPTION_SHAPE
-{
- Slotname [ en-US ] = "Description...";
-};
-SfxSlotInfo FN_CLOSE_PAGEPREVIEW
-{
- Slotname [ en-US ] = "Close Preview";
-};
-
-SfxSlotInfo FN_TO_FOOTNOTE_AREA
-{
- Slotname [ en-US ] = "Edit Footnote/Endnote";
-};
-
-SfxSlotInfo FN_READONLY_SELECTION_MODE
-{
- Slotname [ en-US ] = "Select Text";
-};
-
-SfxSlotInfo FN_TABLE_ROW_SPLIT
-{
- Slotname [ en-US ] = "Break across page and columns";
-};
-SfxSlotInfo FN_WORDCOUNT_DIALOG
-{
- SlotName[ en-US ] = "Word Count";
-};
-SfxSlotInfo FN_TABLE_DELETE_TABLE
-{
- SlotName [ en-US ] = "Delete table";
-};
-SfxSlotInfo FN_TABLE_SELECT_CELL
-{
- SlotName [ en-US ] = "Select cell";
-};
-SfxSlotInfo FN_CONVERT_TEXT_TO_TABLE
-{
- SlotName [ en-US ] = "Convert Text to Table";
-};
-
-SfxSlotInfo FN_CONVERT_TABLE_TO_TEXT
-{
- SlotName [ en-US ] = "Convert Table to Text";
-};
-SfxSlotInfo FN_TABLE_SORT_DIALOG
-{
- SlotName [ en-US ] = "Sort";
-};
-SfxSlotInfo FN_TABLE_HEADLINE_REPEAT
-{
- SlotName [ en-US ] = "Heading Rows Repeat";
-};
-SfxSlotInfo FN_XFORMS_DESIGN_MODE
-{
- SlotName[ en-US ] = "Design Mode On/Off";
-};
-SfxSlotInfo FN_XFORMS_INIT
-{
- SlotName[ en-US ] = "XML Form Document";
-};
-SfxSlotInfo FN_NUM_CONTINUE
-{
- SlotName[ en-US ] = "Continue previous numbering";
-};
-
-SfxSlotInfo FN_INSERT_RLM
-{
- SlotName[ en-US ] = "Right-to-left mark";
-};
-SfxSlotInfo FN_INSERT_LRM
-{
- SlotName[ en-US ] = "Left-to-right mark";
-};
-SfxSlotInfo FN_INSERT_ZWSP
-{
- SlotName[ en-US ] = "No-width no break";
-};
-SfxSlotInfo FN_INSERT_ZWNBSP
-{
- SlotName[ en-US ] = "No-width optional break";
-};
-SfxSlotInfo FN_VIEW_NOTES
-{
- Slotname [ en-US ] = "Notes";
-};
-
diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx
index fcdcd99241f4..85ff12b699e6 100644
--- a/sw/source/core/crsr/crstrvl1.cxx
+++ b/sw/source/core/crsr/crstrvl1.cxx
@@ -33,26 +33,30 @@
#include <viscrs.hxx>
#include <callnk.hxx>
-BOOL SwCrsrShell::IsStartWord() const
+BOOL SwCrsrShell::IsStartWord( sal_Int16 nWordType ) const
{
- return pCurCrsr->IsStartWord();
+ return pCurCrsr->IsStartWord( nWordType );
}
-BOOL SwCrsrShell::IsEndWord() const
+
+BOOL SwCrsrShell::IsEndWord( sal_Int16 nWordType ) const
+{
+ return pCurCrsr->IsEndWord( nWordType );
+}
+
+BOOL SwCrsrShell::IsInWord( sal_Int16 nWordType ) const
{
- return pCurCrsr->IsEndWord();
+ return pCurCrsr->IsInWord( nWordType );
}
+
BOOL SwCrsrShell::IsStartSentence() const
{
return pCurCrsr->IsStartEndSentence( false );
}
+
BOOL SwCrsrShell::IsEndSentence() const
{
return pCurCrsr->IsStartEndSentence( true );
}
-BOOL SwCrsrShell::IsInWord() const
-{
- return pCurCrsr->IsInWord();
-}
BOOL SwCrsrShell::GoStartWord()
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index d8286d007395..5b381cbaaad2 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1141,19 +1141,19 @@ short SwCursor::MaxReplaceArived()
}
-BOOL SwCursor::IsStartWord() const
+BOOL SwCursor::IsStartWord( sal_Int16 nWordType ) const
{
- return IsStartWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
+ return IsStartWordWT( nWordType );
}
-BOOL SwCursor::IsEndWord() const
+BOOL SwCursor::IsEndWord( sal_Int16 nWordType ) const
{
- return IsEndWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
+ return IsEndWordWT( nWordType );
}
-BOOL SwCursor::IsInWord() const
+BOOL SwCursor::IsInWord( sal_Int16 nWordType ) const
{
- return IsInWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
+ return IsInWordWT( nWordType );
}
BOOL SwCursor::GoStartWord()
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 7af79fde80a8..32ab9fa07e94 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -1162,8 +1162,7 @@ void SwEditShell::SetExtTextInputData( const CommandExtTextInputData& rData )
void SwEditShell::TransliterateText( sal_uInt32 nType )
{
- utl::TransliterationWrapper aTrans(
- ::comphelper::getProcessServiceFactory(), nType );
+ utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), nType );
StartAllAction();
SET_CURR_SHELL( this );
@@ -1185,6 +1184,32 @@ void SwEditShell::TransliterateText( sal_uInt32 nType )
EndAllAction();
}
+void SwEditShell::TransliterateText( const String& rModuleName )
+{
+ utl::TransliterationWrapper aTrans(::comphelper::getProcessServiceFactory(), 0 );
+ aTrans.loadModuleByImplName( rModuleName, LANGUAGE_SYSTEM );
+ StartAllAction();
+ SET_CURR_SHELL( this );
+
+ SwPaM* pCrsr = GetCrsr();
+ if( pCrsr->GetNext() != pCrsr )
+ {
+ GetDoc()->StartUndo(UNDO_EMPTY, NULL);
+ FOREACHPAM_START( this )
+
+ if( PCURCRSR->HasMark() )
+ GetDoc()->TransliterateText( *PCURCRSR, aTrans );
+
+ FOREACHPAM_END()
+ GetDoc()->EndUndo(UNDO_EMPTY, NULL);
+ }
+ else
+ GetDoc()->TransliterateText( *pCrsr, aTrans );
+
+ EndAllAction();
+}
+
+
void SwEditShell::CountWords( SwDocStat& rStat ) const
{
FOREACHPAM_START( this )
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 7251d2737256..d5cdbf731375 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3776,7 +3776,8 @@ void MSWordExportBase::OutputStartNode( const SwStartNode & rNode)
void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
{
#ifdef DEBUG
- ::std::clog << "<OutWW8_SwEndNode>" << dbg_out(&rNode) << ::std::endl;
+// someone who knows what he wants should make this linkable when building with 'debug=t' ...
+// ::std::clog << "<OutWW8_SwEndNode>" << dbg_out(&rNode) << ::std::endl;
#endif
ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = mpTableInfo->getTableNodeInfo( &rNode );
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 73e5d69d7764..13cec2b93bb5 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -112,6 +112,7 @@ BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
&& bFormView == rOpt.IsFormView()
&& mbViewLayoutBookMode == rOpt.mbViewLayoutBookMode
&& bShowPlaceHolderFields == rOpt.bShowPlaceHolderFields
+ && bIdle == rOpt.bIdle
#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
&& bTest1 == rOpt.IsTest1()
@@ -226,7 +227,7 @@ SwViewOption::SwViewOption() :
{
// Initialisierung ist jetzt etwas einfacher
// alle Bits auf 0
- nCoreOptions = VIEWOPT_1_IDLE | VIEWOPT_1_HARDBLANK | VIEWOPT_1_SOFTHYPH |
+ nCoreOptions = VIEWOPT_1_HARDBLANK | VIEWOPT_1_SOFTHYPH |
VIEWOPT_1_REF |
VIEWOPT_1_GRAPHIC |
VIEWOPT_1_TABLE | VIEWOPT_1_DRAW | VIEWOPT_1_CONTROL |
@@ -243,6 +244,8 @@ SwViewOption::SwViewOption() :
bSelectionInReadonly = SW_MOD()->GetAccessibilityOptions().IsSelectionInReadonly();
+ bIdle = true;
+
#ifdef DBG_UTIL
// korrespondieren zu den Angaben in ui/config/cfgvw.src
bTest1 = bTest2 = bTest3 = bTest4 =
@@ -277,6 +280,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
bBookview = rVOpt.bBookview;
mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode;
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
+ bIdle = rVOpt.bIdle;
#ifdef DBG_UTIL
bTest1 = rVOpt.bTest1 ;
@@ -317,6 +321,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
bBookview = rVOpt.bBookview;
mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode;
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
+ bIdle = rVOpt.bIdle;
#ifdef DBG_UTIL
bTest1 = rVOpt.bTest1 ;
diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx
index 61d4884157cf..829c79373a61 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -340,26 +340,32 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt )
}
else
{
- SfxPopupMenuManager* aMgr = mrDocView.GetViewFrame()->GetDispatcher()->Popup(0, this,&rCEvt.GetMousePosPixel());
- ((PopupMenu*)aMgr->GetSVMenu())->SetSelectHdl( LINK(this, SidebarTxtControl, Select) );
+ SfxPopupMenuManager* pMgr = mrDocView.GetViewFrame()->GetDispatcher()->Popup(0, this,&rCEvt.GetMousePosPixel());
+ ((PopupMenu*)pMgr->GetSVMenu())->SetSelectHdl( LINK(this, SidebarTxtControl, Select) );
{
- XubString aText = ((PopupMenu*)aMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR );
+ XubString aText = ((PopupMenu*)pMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR );
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, mrSidebarWin.GetAuthor());
aText = aRewriter.Apply(aText);
- ((PopupMenu*)aMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR,aText);
+ ((PopupMenu*)pMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR,aText);
}
+ Point aPos;
if (rCEvt.IsMouseEvent())
- ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,rCEvt.GetMousePosPixel());
+ aPos = rCEvt.GetMousePosPixel();
else
{
const Size aSize = GetSizePixel();
- const Point aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 );
- ((PopupMenu*)aMgr->GetSVMenu())->Execute(this,aPos);
+ aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 );
}
- delete aMgr;
+
+ //!! call different Execute function to get rid of the new thesaurus sub menu
+ //!! pointer created in the call to Popup.
+ //!! Otherwise we would have a memory leak (see also #i107205#)
+ //((PopupMenu*)pMgr->GetSVMenu())->Execute( this, aPos );
+ pMgr->Execute( aPos, this );
+ delete pMgr;
}
}
else
diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx
index 0d05c930284a..3ff795d83f56 100755
--- a/sw/source/ui/inc/langhelper.hxx
+++ b/sw/source/ui/inc/langhelper.hxx
@@ -31,31 +31,37 @@ class SwWrtShell;
class SwView;
class EditEngine;
class EditView;
+class OutlinerView;
class SfxItemSet;
struct ESelection;
namespace SwLangHelper
{
- extern USHORT GetLanguageStatus(OutlinerView* pOLV,SfxItemSet& rSet);
- extern bool SetLanguageStatus(OutlinerView* pOLV,SfxRequest &rReq,SwView &rView,SwWrtShell &rSh);
+ extern USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
+ extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh );
- extern void SetLanguage(SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet);
- extern void SetLanguage(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet);
- extern void SetLanguage_None(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet );
- extern void SetLanguage_None(SwWrtShell &rWrtSh,bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+// extern void SetLanguage( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet );
+// extern void SetLanguage_None( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection );
+// extern void ResetLanguages( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection );
+ extern void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection );
// document
extern void SelectCurrentPara( SwWrtShell &rWrtSh );
// EditView
extern void SelectPara( EditView &rEditView, const ESelection &rCurSel );
- extern String GetTextForLanguageGuessing(EditEngine* rEditEngine, ESelection aDocSelection );
+ extern String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection );
extern String GetTextForLanguageGuessing( SwWrtShell &rSh );
extern LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId );
extern LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId );
- extern LanguageType GetCurrentLanguage(SfxItemSet aSet,USHORT nScriptType );
+ extern LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType );
extern LanguageType GetCurrentLanguage( SwWrtShell &rSh );
}
diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx
index 3bc0eb02d3b6..ef6a26e73f67 100644
--- a/sw/source/ui/inc/olmenu.hxx
+++ b/sw/source/ui/inc/olmenu.hxx
@@ -51,23 +51,22 @@ class SwSpellPopup : public PopupMenu
::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt;
::com::sun::star::uno::Sequence< rtl::OUString > aSuggestions;
- LanguageType nCheckedLanguage;
+ LanguageType nCheckedLanguage;
LanguageType nGuessLangWord;
LanguageType nGuessLangPara;
- USHORT nNumLanguageTextEntries;
- USHORT nNumLanguageParaEntries;
- USHORT nNumLanguageDocEntries;
std::map< sal_Int16, ::rtl::OUString > aLangTable_Text;
std::map< sal_Int16, ::rtl::OUString > aLangTable_Paragraph;
- std::map< sal_Int16, ::rtl::OUString > aLangTable_Document;
+// std::map< sal_Int16, ::rtl::OUString > aLangTable_Document;
bool bGrammarResults; // show grammar results? Or show spellcheck results?
Image aInfo16;
- USHORT fillLangPopupMenu( PopupMenu *pPopupMenu , USHORT Lang_Start, ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq,SwWrtShell* pWrtSh, USHORT nLangTable);
+ void fillLangPopupMenu( PopupMenu *pPopupMenu, USHORT nLangStart,
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq, SwWrtShell* pWrtSh,
+ std::map< sal_Int16, ::rtl::OUString > &rLangTable );
using PopupMenu::Execute;
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 0c16e8bf132e..c59bb1535bad 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -437,6 +437,12 @@ public:
virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
virtual void MarginChanged();
+ // replace word/selection with text from the thesaurus
+ // (this code has special handling for "in word" character)
+ void InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bValidSelection );
+ bool IsValidSelectionForThesaurus() const;
+ String GetThesaurusLookUpText( bool bSelection ) const;
+
// Shell sofort wechseln -> fuer GetSelectionObject
void StopShellTimer();
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 9ebfd8c8cf36..959f566da9a2 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -28,85 +28,84 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <hintids.hxx>
+#include "SwRewriter.hxx"
+#include "chrdlg.hrc"
+#include "cmdid.h"
+#include "comcore.hrc"
+#include "crsskip.hxx"
+#include "doc.hxx"
+#include "docsh.hxx" //CheckSpellChanges
+#include "edtwin.hxx"
+#include "helpid.h"
+#include "hintids.hxx"
+#include "langhelper.hxx"
+#include "ndtxt.hxx"
+#include "olmenu.hrc"
+#include "olmenu.hxx"
+#include "swabstdlg.hxx"
+#include "swmodule.hxx"
+#include "swtypes.hxx"
+#include "swundo.hxx"
+#include "uitool.hxx"
+#include "undobj.hxx"
+#include "unomid.h"
+#include "view.hxx"
+#include "viewopt.hxx"
+#include "wrtsh.hxx"
+#include "wview.hxx"
+#include "swabstdlg.hxx"
+#include "chrdlg.hrc"
+
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
#endif
-#include <unotools/lingucfg.hxx>
-#include <unotools/linguprops.hxx>
-#include <svtools/filter.hxx>
-#include <editeng/svxacorr.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/imagemgr.hxx>
-#include <osl/file.hxx>
-#include <rtl/string.hxx>
+#include <comphelper/processfactory.hxx>
+#include <editeng/acorrcfg.hxx>
+#include <editeng/svxacorr.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/splwrap.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/unolingu.hxx>
#include <i18npool/mslangid.hxx>
#include <linguistic/lngprops.hxx>
#include <linguistic/misc.hxx>
-#include <comphelper/processfactory.hxx>
-#include <editeng/unolingu.hxx>
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
-#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
-#include <com/sun/star/linguistic2/SingleProofreadingError.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/frame/XModuleManager.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/i18n/ScriptType.hpp>
-#include <svx/dlgutil.hxx>
+#include <osl/file.hxx>
+#include <rtl/string.hxx>
+#include <svtools/filter.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/imagemgr.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/sfxdlg.hxx>
#include <svl/itemset.hxx>
-#include <editeng/langitem.hxx>
-#include <editeng/splwrap.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-#include <unotools/lingucfg.hxx>
-#include <editeng/acorrcfg.hxx>
-#include <swmodule.hxx>
-#include <cmdid.h>
-#include <helpid.h>
-#include <swtypes.hxx>
-#include <wrtsh.hxx>
-#include <view.hxx>
-#include <docsh.hxx> //CheckSpellChanges
-#include <olmenu.hxx>
-#include <swundo.hxx>
-#include <crsskip.hxx>
-#include <ndtxt.hxx>
-#include <olmenu.hrc>
-#include <doc.hxx>
-
-// -> #111827#
-#include <SwRewriter.hxx>
-#include <comcore.hrc>
-#include <undobj.hxx>
-// <- #111827#
-
-#include <unomid.h>
#include <svl/languageoptions.hxx>
-#include <map>
-#include <svtools/langtab.hxx>
-#include <com/sun/star/document/XDocumentLanguages.hpp>
-#include <edtwin.hxx>
-#include <sfx2/sfxdlg.hxx>
-#include "swabstdlg.hxx"
-#include "chrdlg.hrc"
-#include <editeng/brshitem.hxx>
#include <svl/stritem.hxx>
-#include <viewopt.hxx>
-#include <uitool.hxx>
+#include <svtools/filter.hxx>
+#include <svtools/langtab.hxx>
+#include <svx/dlgutil.hxx>
+#include <unotools/lingucfg.hxx>
+#include <unotools/linguprops.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
-#include <wview.hxx>
-#include <sfx2/request.hxx>
+#include <map>
-#include <vcl/msgbox.hxx>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/document/XDocumentLanguages.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/linguistic2/SingleProofreadingError.hpp>
+#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
+#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
+#include <com/sun/star/uno/Any.hxx>
-#include <langhelper.hxx>
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -214,63 +213,59 @@ inline bool lcl_checkScriptType( sal_Int16 nScriptType, LanguageType nLang )
return 0 != (nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ));
}
-USHORT SwSpellPopup::fillLangPopupMenu(
+void SwSpellPopup::fillLangPopupMenu(
PopupMenu *pPopupMenu,
- USHORT Lang_Start,
- uno::Sequence< ::rtl::OUString > aSeq,
+ USHORT nLangItemIdStart,
+ uno::Sequence< OUString > aSeq,
SwWrtShell* pWrtSh,
- USHORT nLangTable )
+ std::map< sal_Int16, ::rtl::OUString > &rLangTable )
{
if (!pPopupMenu)
- return 0;
-
- //Reference< awt::XMenuExtended > m_xMenuExtended( m_xPopupMenu, UNO_QUERY );
- std::map< ::rtl::OUString, ::rtl::OUString > LangItems;
+ return;
SvtLanguageTable aLanguageTable;
- USHORT nItemId = Lang_Start;
- rtl::OUString curLang = aSeq[0];
- USHORT nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32());
- rtl::OUString keyboardLang = aSeq[2];
- rtl::OUString guessLang = aSeq[3];
-
- //1--add current language
- if(curLang!=OUString::createFromAscii(""))
- {
- LangItems[curLang]=curLang;
- }
- SvtLanguageTable aLangTable;
+ // set of languages to be displayed in the sub menus
+ std::set< OUString > aLangItems;
+
+ OUString aCurLang( aSeq[0] );
+ USHORT nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32());
+ OUString aKeyboardLang( aSeq[2] );
+ OUString aGuessedTextLang( aSeq[3] );
+
+ if (aCurLang != OUString() &&
+ LANGUAGE_DONTKNOW != aLanguageTable.GetType( aCurLang ))
+ aLangItems.insert( aCurLang );
+
//2--System
- const AllSettings& rAllSettings=Application::GetSettings();
+ const AllSettings& rAllSettings = Application::GetSettings();
LanguageType rSystemLanguage = rAllSettings.GetLanguage();
- if(rSystemLanguage!=LANGUAGE_DONTKNOW)
+ if (rSystemLanguage != LANGUAGE_DONTKNOW)
{
- if (lcl_checkScriptType(nScriptType,rSystemLanguage ))
- LangItems[OUString(aLangTable.GetString(rSystemLanguage))]=OUString(aLangTable.GetString(rSystemLanguage));
+ if (lcl_checkScriptType( nScriptType, rSystemLanguage ))
+ aLangItems.insert( aLanguageTable.GetString(rSystemLanguage) );
}
//3--UI
LanguageType rUILanguage = rAllSettings.GetUILanguage();
- if(rUILanguage!=LANGUAGE_DONTKNOW)
+ if (rUILanguage != LANGUAGE_DONTKNOW)
{
if (lcl_checkScriptType(nScriptType, rUILanguage ))
- LangItems[OUString(aLangTable.GetString(rUILanguage))]=OUString(aLangTable.GetString(rUILanguage));
+ aLangItems.insert( aLanguageTable.GetString(rUILanguage) );
}
//4--guessed language
- if(guessLang!=OUString::createFromAscii(""))
+ if (aGuessedTextLang.getLength() > 0)
{
- if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(guessLang)))
- LangItems[guessLang]=guessLang;
+ if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(aGuessedTextLang)))
+ aLangItems.insert( aGuessedTextLang );
}
-
//5--keyboard language
- if(keyboardLang!=OUString::createFromAscii(""))
+ if (aKeyboardLang.getLength() > 0)
{
- if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(keyboardLang)))
- LangItems[keyboardLang]=keyboardLang;
+ if (lcl_checkScriptType(nScriptType, aLanguageTable.GetType(aKeyboardLang)))
+ aLangItems.insert( aKeyboardLang );
}
//6--all languages used in current document
@@ -278,74 +273,58 @@ USHORT SwSpellPopup::fillLangPopupMenu(
uno::Reference< com::sun::star::frame::XController > xController( pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController(), uno::UNO_QUERY );
if ( xController.is() )
xModel = xController->getModel();
-
uno::Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, uno::UNO_QUERY );
- /*the description of nScriptType
- LATIN : 1
- ASIAN : 2
- COMPLEX:4
- LATIN + ASIAN : 3
- LATIN + COMPLEX : 5
- ASIAN + COMPLEX : 6
- LATIN + ASIAN + COMPLEX : 7
+ /*the description of nScriptType flags
+ LATIN : 0x0001
+ ASIAN : 0x0002
+ COMPLEX: 0x0004
*/
-
- sal_Int16 nCount=7;
- if(xDocumentLanguages.is())
+ const sal_Int16 nMaxCount = 7;
+ if (xDocumentLanguages.is())
{
- uno::Sequence< lang::Locale > rLocales(xDocumentLanguages->getDocumentLanguages(nScriptType,nCount));
- if(rLocales.getLength()>0)
+ uno::Sequence< lang::Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount ) );
+ if (rLocales.getLength() > 0)
{
- for(USHORT i = 0; i<rLocales.getLength();++i)
+ for (USHORT i = 0; i < rLocales.getLength(); ++i)
{
- if (LangItems.size()==7)
+ if (aLangItems.size() == (size_t)nMaxCount)
break;
- const lang::Locale& rLocale=rLocales[i];
- if(lcl_checkScriptType(nScriptType, aLanguageTable.GetType(rLocale.Language)))
- LangItems[ rtl::OUString(rLocale.Language)]=OUString(rLocale.Language);
+ const lang::Locale& rLocale = rLocales[i];
+ if (lcl_checkScriptType( nScriptType, aLanguageTable.GetType( rLocale.Language )))
+ aLangItems.insert( rLocale.Language );
}
}
}
- bool bMultipleLanguages = (nLangTable != 0) || (curLang.compareToAscii( "*" ) == 0);
- bool bNothingSelected = true;
- MenuItemBits nMenuItemStyle = !bMultipleLanguages ? MIB_RADIOCHECK : 0;
- for (std::map< rtl::OUString, rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it)
+
+ USHORT nItemId = nLangItemIdStart;
+ const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection
+ const OUString sEmpty; // 'no language found' from language guessing
+ std::set< OUString >::const_iterator it;
+ for (it = aLangItems.begin(); it != aLangItems.end(); ++it)
{
- rtl::OUString aEntryTxt( it->first );
- if (aEntryTxt != rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&&
- aEntryTxt != rtl::OUString::createFromAscii("*") &&
- aEntryTxt.getLength() > 0)
+ OUString aEntryTxt( *it );
+ if (aEntryTxt != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&&
+ aEntryTxt != sAsterix &&
+ aEntryTxt != sEmpty)
{
- ++nItemId;
- if (nLangTable == 0) // language for selection
- aLangTable_Text[nItemId] = aEntryTxt;
- else if (nLangTable == 1) // language for paragraph
- aLangTable_Paragraph[nItemId] = aEntryTxt;
- else if (nLangTable == 2) // language for document
- aLangTable_Document[nItemId] = aEntryTxt;
-
- pPopupMenu->InsertItem( nItemId, aEntryTxt, nMenuItemStyle );
- if ((nLangTable == 0) && (aEntryTxt == curLang))
+ DBG_ASSERT( nLangItemIdStart <= nItemId && nItemId <= nLangItemIdStart + MN_MAX_NUM_LANG,
+ "nItemId outside of expected range!" );
+ pPopupMenu->InsertItem( nItemId, aEntryTxt, MIB_RADIOCHECK );
+ if (aEntryTxt == aCurLang)
{
//make a check mark for the current language
pPopupMenu->CheckItem( nItemId, TRUE );
bNothingSelected = false;
}
+ rLangTable[ nItemId ] = aEntryTxt;
+ ++nItemId;
}
}
- //7--none
- nItemId++;
- pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), nMenuItemStyle );
- if (bNothingSelected && !bMultipleLanguages)
- pPopupMenu->CheckItem( nItemId, TRUE );
-
- //More...
- nItemId++;
- pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )) );
-
- return nItemId - Lang_Start; // return number of inserted entries
+ pPopupMenu->InsertItem( nLangItemIdStart + MN_NONE_OFFSET, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK );
+ pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, String(SW_RES( STR_RESET_TO_DEFAULT_LANGUAGE )), MIB_RADIOCHECK );
+ pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK );
}
@@ -368,22 +347,22 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
}
-::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL )
+OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
{
- ::rtl::OUString aLabel;
+ OUString aLabel;
if ( aCmdURL.getLength() )
{
try
{
- uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
if ( xNameAccess.is() )
{
uno::Reference< container::XNameAccess > xUICommandLabels;
- const ::rtl::OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) );
+ const OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) );
uno::Any a = xNameAccess->getByName( aModule );
uno::Reference< container::XNameAccess > xUICommands;
a >>= xUICommandLabels;
- rtl::OUString aStr;
+ OUString aStr;
uno::Sequence< beans::PropertyValue > aPropSeq;
a = xUICommandLabels->getByName( aCmdURL );
if ( a >>= aPropSeq )
@@ -448,25 +427,28 @@ bGrammarResults(false)
InsertSeparator(0);
bEnable = sal_True;
- for( sal_uInt16 i = 0, nPos = 1, nId = MN_AUTOCORR_START + 1;
- i < nStringCount; ++i, ++nPos, ++nId )
+ USHORT nAutoCorrItemId = MN_AUTOCORR_START;
+ USHORT nItemId = MN_SUGGESTION_START;
+ for (USHORT i = 0; i < nStringCount; ++i)
{
const String aEntry = aSuggestions[ i ];
- InsertItem( nPos, aEntry, 0, i );
- SetHelpId( nPos, HID_LINGU_REPLACE);
-
+ InsertItem( nItemId, aEntry, 0, i );
+ SetHelpId( nItemId, HID_LINGU_REPLACE);
if (aSuggestionImageUrl.getLength() > 0)
- SetItemImage( nPos, aImage );
+ SetItemImage( nItemId, aImage );
+
+ pMenu->InsertItem( nAutoCorrItemId, aEntry );
+ pMenu->SetHelpId( nAutoCorrItemId, HID_LINGU_AUTOCORR);
- pMenu->InsertItem( nId, aEntry );
- pMenu->SetHelpId( nPos, HID_LINGU_AUTOCORR);
+ ++nAutoCorrItemId;
+ ++nItemId;
}
}
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
- SetItemText( MN_SPELLING, aSpellingAndGrammar );
- USHORT nItemPos = GetItemPos( MN_IGNORE );
+ SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
+ USHORT nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -489,11 +471,9 @@ bGrammarResults(false)
nGuessLangPara = nGuessLangWord;
}
- pMenu = GetPopupMenu(MN_INSERT);
-
- bEnable = FALSE; // enable MN_INSERT?
-
+ pMenu = GetPopupMenu(MN_ADD_TO_DIC);
pMenu->CreateAutoMnemonics();
+ bEnable = FALSE; // enable MN_ADD_TO_DIC?
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
{
@@ -508,6 +488,7 @@ bGrammarResults(false)
const uno::Reference< linguistic2::XDictionary > *pDic = aDics.getConstArray();
USHORT nDicCount = static_cast< USHORT >(aDics.getLength());
+ USHORT nItemId = MN_DICTIONARIES_START;
for( USHORT i = 0; i < nDicCount; i++ )
{
uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
@@ -523,8 +504,7 @@ bGrammarResults(false)
{
// the extra 1 is because of the (possible) external
// linguistic entry above
- USHORT nPos = MN_INSERT_START + i + 1;
- pMenu->InsertItem( nPos, xDicTmp->getName() );
+ pMenu->InsertItem( nItemId, xDicTmp->getName() );
bEnable = sal_True;
uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
@@ -535,18 +515,20 @@ bGrammarResults(false)
if (aDictionaryImageUrl.getLength() > 0)
{
Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
- pMenu->SetItemImage( nPos, aImage );
+ pMenu->SetItemImage( nItemId, aImage );
}
}
+
+ ++nItemId;
}
}
}
- EnableItem( MN_INSERT, bEnable );
+ EnableItem( MN_ADD_TO_DIC, bEnable );
//ADD NEW LANGUAGE MENU ITEM
///////////////////////////////////////////////////////////////////////////
String aScriptTypesInUse( String::CreateFromInt32( pWrtSh->GetScriptType() ) );
- SvtLanguageTable aLangTable;
+ SvtLanguageTable aLanguageTable;
// get keyboard language
String aKeyboardLang;
@@ -554,39 +536,40 @@ bGrammarResults(false)
SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
nLang = rEditWin.GetInputLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
- aKeyboardLang = aLangTable.GetString( nLang );
+ aKeyboardLang = aLanguageTable.GetString( nLang );
// get the language that is in use
const String aMultipleLanguages = String::CreateFromAscii("*");
String aCurrentLang = aMultipleLanguages;
nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh );
if (nLang != LANGUAGE_DONTKNOW)
- aCurrentLang = aLangTable.GetString( nLang );
+ aCurrentLang = aLanguageTable.GetString( nLang );
// build sequence for status value
- uno::Sequence< ::rtl::OUString > aSeq( 4 );
+ uno::Sequence< OUString > aSeq( 4 );
aSeq[0] = aCurrentLang;
aSeq[1] = aScriptTypesInUse;
aSeq[2] = aKeyboardLang;
- aSeq[3] = aLangTable.GetString(nGuessLangWord);
+ aSeq[3] = aLanguageTable.GetString(nGuessLangWord);
- pMenu = GetPopupMenu(MN_LANGUAGE_SELECTION);
- nNumLanguageTextEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_SELECTION_START, aSeq, pWrtSh, 0 );
- EnableItem( MN_LANGUAGE_SELECTION, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_SELECTION);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, aLangTable_Text );
+ EnableItem( MN_SET_LANGUAGE_SELECTION, true );
- pMenu = GetPopupMenu(MN_LANGUAGE_PARAGRAPH);
- nNumLanguageParaEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, 1 );
- EnableItem( MN_LANGUAGE_PARAGRAPH, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph );
+ EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true );
/*
- pMenu = GetPopupMenu(MN_LANGUAGE_ALL_TEXT);
- nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 );
- EnableItem( MN_LANGUAGE_ALL_TEXT, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_ALL_TEXT);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, aLangTable_Document );
+ EnableItem( MN_SET_LANGUAGE_ALL_TEXT, true );
*/
uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
Image rImg = ::GetImage( xFrame,
- ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
+ OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
- SetItemImage( MN_SPELLING, rImg );
+ SetItemImage( MN_SPELLING_DLG, rImg );
+
//////////////////////////////////////////////////////////////////////////////////
RemoveDisabledEntries( TRUE, TRUE );
@@ -601,7 +584,7 @@ SwSpellPopup::SwSpellPopup(
SwWrtShell *pWrtSh,
const linguistic2::ProofreadingResult &rResult,
sal_Int32 nErrorInResult,
- const uno::Sequence< rtl::OUString > &rSuggestions,
+ const uno::Sequence< OUString > &rSuggestions,
const String &rParaText ) :
PopupMenu( SW_RES(MN_SPELL_POPUP) ),
pSh( pWrtSh ),
@@ -611,13 +594,11 @@ aInfo16( SW_RES(IMG_INFO_16) )
{
nCheckedLanguage = SvxLocaleToLanguage( rResult.aLocale );
- sal_Int16 nItemId = 1;
- sal_Int16 nPos = 0;
+ USHORT nPos = 0;
OUString aMessageText( rResult.aErrors[ nErrorInResult ].aShortComment );
InsertSeparator( nPos++ );
- InsertItem( nItemId, aMessageText, MIB_NOSELECT, nPos++ );
- SetItemImage( nItemId, aInfo16 );
- ++nItemId;
+ InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ );
+ SetItemImage( MN_SHORT_COMMENT, aInfo16 );
CreateAutoMnemonics();
@@ -634,12 +615,12 @@ aInfo16( SW_RES(IMG_INFO_16) )
aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
}
+ USHORT nItemId = MN_SUGGESTION_START;
for (sal_uInt16 i = 0; i < nStringCount; ++i)
{
const String aEntry = aSuggestions[ i ];
InsertItem( nItemId, aEntry, 0, nPos++ );
SetHelpId( nItemId, HID_LINGU_REPLACE );
-
if (aSuggestionImageUrl.getLength() > 0)
SetItemImage( nItemId, aImage );
@@ -650,8 +631,8 @@ aInfo16( SW_RES(IMG_INFO_16) )
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
- SetItemText( MN_SPELLING, aSpellingAndGrammar );
- USHORT nItemPos = GetItemPos( MN_IGNORE );
+ SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
+ USHORT nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -674,13 +655,13 @@ aInfo16( SW_RES(IMG_INFO_16) )
nGuessLangPara = nGuessLangWord;
}
- EnableItem( MN_IGNORE, false );
- EnableItem( MN_INSERT, false );
+ EnableItem( MN_IGNORE_WORD, false );
+ EnableItem( MN_ADD_TO_DIC, false );
//ADD NEW LANGUAGE MENU ITEM
///////////////////////////////////////////////////////////////////////////
String aScriptTypesInUse( String::CreateFromInt32( pWrtSh->GetScriptType() ) );
- SvtLanguageTable aLangTable;
+ SvtLanguageTable aLanguageTable;
// get keyboard language
String aKeyboardLang;
@@ -688,39 +669,39 @@ aInfo16( SW_RES(IMG_INFO_16) )
SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
nLang = rEditWin.GetInputLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
- aKeyboardLang = aLangTable.GetString( nLang );
+ aKeyboardLang = aLanguageTable.GetString( nLang );
// get the language that is in use
const String aMultipleLanguages = String::CreateFromAscii("*");
String aCurrentLang = aMultipleLanguages;
nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh );
if (nLang != LANGUAGE_DONTKNOW)
- aCurrentLang = aLangTable.GetString( nLang );
+ aCurrentLang = aLanguageTable.GetString( nLang );
// build sequence for status value
- uno::Sequence< ::rtl::OUString > aSeq( 4 );
+ uno::Sequence< OUString > aSeq( 4 );
aSeq[0] = aCurrentLang;
aSeq[1] = aScriptTypesInUse;
aSeq[2] = aKeyboardLang;
- aSeq[3] = aLangTable.GetString(nGuessLangWord);
+ aSeq[3] = aLanguageTable.GetString(nGuessLangWord);
- PopupMenu *pMenu = GetPopupMenu(MN_LANGUAGE_SELECTION);
- nNumLanguageTextEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_SELECTION_START, aSeq, pWrtSh, 0 );
- EnableItem( MN_LANGUAGE_SELECTION, true );
+ PopupMenu *pMenu = GetPopupMenu(MN_SET_LANGUAGE_SELECTION);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, aLangTable_Text );
+ EnableItem( MN_SET_LANGUAGE_SELECTION, true );
- pMenu = GetPopupMenu(MN_LANGUAGE_PARAGRAPH);
- nNumLanguageParaEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, 1 );
- EnableItem( MN_LANGUAGE_PARAGRAPH, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph );
+ EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true );
/*
- pMenu = GetPopupMenu(MN_LANGUAGE_ALL_TEXT);
- nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 );
- EnableItem( MN_LANGUAGE_ALL_TEXT, true );
+ pMenu = GetPopupMenu(MN_SET_LANGUAGE_ALL_TEXT);
+ fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, aLangTable_Document );
+ EnableItem( MN_SET_LANGUAGE_ALL_TEXT, true );
*/
uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
Image rImg = ::GetImage( xFrame,
- ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
+ OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
- SetItemImage( MN_SPELLING, rImg );
+ SetItemImage( MN_SPELLING_DLG, rImg );
//////////////////////////////////////////////////////////////////////////////////
@@ -743,25 +724,23 @@ sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, Window* pWin )
-----------------------------------------------------------------------*/
void SwSpellPopup::Execute( USHORT nId )
{
- if (bGrammarResults && nId == 1)
- return; // nothing to do since it is the error message (short comment)
+ if (nId == USHRT_MAX)
+ return;
- sal_Bool bAutoCorr = sal_False;
- if( nId > MN_AUTOCORR_START && nId < MN_LANGUAGE_SELECTION_START && nId != USHRT_MAX )
- {
- nId -= MN_AUTOCORR_START;
- bAutoCorr = sal_True;
- }
+ if (/*bGrammarResults && */nId == MN_SHORT_COMMENT)
+ return; // nothing to do since it is the error message (short comment)
- if( nId && nId != USHRT_MAX)
+ if ((MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ||
+ (MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END))
{
- int nAltIdx = bGrammarResults ? nId - 2 : nId - 1;
- if ( nAltIdx >= 0 && nAltIdx < aSuggestions.getLength() && (bGrammarResults || xSpellAlt.is()) )
+ sal_Int32 nAltIdx = (MN_SUGGESTION_START <= nId && nId <= MN_SUGGESTION_END) ?
+ nId - MN_SUGGESTION_START : nId - MN_AUTOCORR_START;
+ DBG_ASSERT( 0 <= nAltIdx && nAltIdx < aSuggestions.getLength(), "index out of range" );
+ if (0 <= nAltIdx && nAltIdx < aSuggestions.getLength() && (bGrammarResults || xSpellAlt.is()))
{
sal_Bool bOldIns = pSh->IsInsMode();
pSh->SetInsMode( sal_True );
- DBG_ASSERT( 0 <= nAltIdx && nAltIdx <= aSuggestions.getLength(), "index out of range");
String aTmp( aSuggestions[ nAltIdx ] );
String aOrig( bGrammarResults ? OUString() : xSpellAlt->getWord() );
@@ -780,40 +759,30 @@ void SwSpellPopup::Execute( USHORT nId )
aRewriter.AddRule(UNDO_ARG1, pSh->GetCrsrDescr());
aRewriter.AddRule(UNDO_ARG2, String(SW_RES(STR_YIELDS)));
- {
- String aTmpStr;
-
- aTmpStr += String(SW_RES(STR_START_QUOTE));
- aTmpStr += aTmp;
- aTmpStr += String(SW_RES(STR_END_QUOTE));
- aRewriter.AddRule(UNDO_ARG3, aTmpStr);
- }
+ String aTmpStr( SW_RES(STR_START_QUOTE) );
+ aTmpStr += aTmp;
+ aTmpStr += String(SW_RES(STR_END_QUOTE));
+ aRewriter.AddRule(UNDO_ARG3, aTmpStr);
pSh->StartUndo(UNDO_UI_REPLACE, &aRewriter);
pSh->StartAction();
pSh->DelLeft();
pSh->Insert( aTmp );
+
/* #102505# EndAction/EndUndo moved down since insertion
of temporary auto correction is now undoable two and
must reside in the same undo group.*/
-
// nur aufnehmen, wenn es NICHT schon in der Autokorrektur vorhanden ist
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
String aOrigWord( bGrammarResults ? OUString() : xSpellAlt->getWord() ) ;
- String aNewWord;
- if( nId )
- aNewWord = aSuggestions[ nAltIdx ];
- else
- aNewWord = aOrigWord;
+ String aNewWord( aSuggestions[ nAltIdx ] );
SvxPrepareAutoCorrect( aOrigWord, aNewWord );
- if( bAutoCorr )
- {
+ if (MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END)
pACorr->PutText( aOrigWord, aNewWord, nCheckedLanguage );
- }
/* #102505# EndAction/EndUndo moved down since insertion
of temporary auto correction is now undoable two and
@@ -823,180 +792,140 @@ void SwSpellPopup::Execute( USHORT nId )
pSh->SetInsMode( bOldIns );
}
- else
+ }
+ else if (nId == MN_SPELLING_DLG)
+ {
+ if (bGrammarResults)
+ {
+ SvtLinguConfig().SetProperty( A2OU( UPN_IS_GRAMMAR_INTERACTIVE ), uno::makeAny( sal_True ));
+ }
+ pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
{
- if (nId < MN_LANGUAGE_SELECTION_START)
+ uno::Reference<linguistic2::XDictionaryList> xDictionaryList( SvxGetDictionaryList() );
+ SvxDicListChgClamp aClamp( xDictionaryList );
+ pSh->GetView().GetViewFrame()->GetDispatcher()->
+ Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON );
+ }
+ }
+ else if (nId == MN_IGNORE_SELECTION)
+ {
+ SwPaM *pPaM = pSh->GetCrsr();
+ if (pPaM)
+ pSh->IgnoreGrammarErrorAt( *pPaM );
+ }
+ else if (nId == MN_IGNORE_WORD)
+ {
+ uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY );
+ linguistic::AddEntryToDic( xDictionary,
+ xSpellAlt->getWord(), sal_False, aEmptyStr, LANGUAGE_NONE );
+ }
+ else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END)
+ {
+ OUString aWord( xSpellAlt->getWord() );
+ USHORT nDicIdx = nId - MN_DICTIONARIES_START;
+ DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" );
+
+ if (nDicIdx < aDics.getLength())
{
- switch( nId )
+ uno::Reference< linguistic2::XDictionary > xDic = aDics.getConstArray()[nDicIdx];
+ INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE );
+ // save modified user-dictionary if it is persistent
+ uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
+ if (xSavDic.is())
+ xSavDic->store();
+
+ if (DIC_ERR_NONE != nAddRes
+ && !xDic->getEntry( aWord ).is())
{
- case MN_SPELLING:
- {
- if (bGrammarResults)
- {
- SvtLinguConfig().SetProperty( A2OU( UPN_IS_GRAMMAR_INTERACTIVE ), uno::makeAny( sal_True ));
- }
- pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
- {
- uno::Reference<linguistic2::XDictionaryList> xDictionaryList( SvxGetDictionaryList() );
- SvxDicListChgClamp aClamp( xDictionaryList );
- pSh->GetView().GetViewFrame()->GetDispatcher()->
- Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON );
- }
- }
- break;
- case MN_IGNORE_SELECTION :
- {
- SwPaM *pPaM = pSh->GetCrsr();
- if (pPaM)
- pSh->IgnoreGrammarErrorAt( *pPaM );
- }
- break;
- case MN_IGNORE :
- {
- uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY );
- linguistic::AddEntryToDic(
- xDictionary,
- xSpellAlt->getWord(), sal_False,
- aEmptyStr, LANGUAGE_NONE );
- }
- break;
- case MN_INSERT:
- DBG_ERROR("geht noch nicht!");
- break;
- case MN_LANGUAGE_WORD:
- case MN_LANGUAGE_PARA:
- {
- pSh->StartAction();
-
- if( MN_LANGUAGE_PARA == nId )
- {
- if( !pSh->IsSttPara() )
- pSh->MovePara( fnParaCurr, fnParaStart );
- pSh->SwapPam();
- if( !pSh->IsEndPara() )
- pSh->MovePara( fnParaCurr, fnParaEnd );
- }
-
- LanguageType nLangToUse = (MN_LANGUAGE_PARA == nId) ? nGuessLangPara : nGuessLangWord;
- sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLangToUse );
- USHORT nResId = 0;
- switch (nScriptType)
- {
- case SCRIPTTYPE_COMPLEX : nResId = RES_CHRATR_CTL_LANGUAGE; break;
- case SCRIPTTYPE_ASIAN : nResId = RES_CHRATR_CJK_LANGUAGE; break;
- default /*SCRIPTTYPE_LATIN*/: nResId = RES_CHRATR_LANGUAGE; break;
- }
- SfxItemSet aSet(pSh->GetAttrPool(), nResId, nResId );
- aSet.Put( SvxLanguageItem( nLangToUse, nResId ) );
- pSh->SetAttr( aSet );
-
- pSh->EndAction();
- }
- break;
- default:
- if(nId >= MN_INSERT_START )
- {
- OUString aWord( xSpellAlt->getWord() );
- INT32 nDicIdx = nId - MN_INSERT_START - 1;
- DBG_ASSERT( nDicIdx < aDics.getLength(),
- "dictionary index out of range" );
- uno::Reference< linguistic2::XDictionary > xDic =
- aDics.getConstArray()[nDicIdx];
- INT16 nAddRes = linguistic::AddEntryToDic( xDic,
- aWord, FALSE, aEmptyStr, LANGUAGE_NONE );
- // save modified user-dictionary if it is persistent
- uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
- if (xSavDic.is())
- xSavDic->store();
-
- if (DIC_ERR_NONE != nAddRes
- && !xDic->getEntry( aWord ).is())
- {
- SvxDicError(
- &pSh->GetView().GetViewFrame()->GetWindow(),
- nAddRes );
- }
- }
+ SvxDicError(
+ &pSh->GetView().GetViewFrame()->GetWindow(),
+ nAddRes );
}
}
- else
- {
- SfxItemSet aCoreSet( pSh->GetView().GetPool(),
- RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
- RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE,
- RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
- 0 );
- String aNewLangTxt;
-
-// pSh->StartAction();
+ }
+ else
+ {
+ // Set language for selection or for paragraph...
- if (nId >= MN_LANGUAGE_SELECTION_START && nId < MN_LANGUAGE_SELECTION_START + nNumLanguageTextEntries - 1)
- {
- //Set language for current selection
- aNewLangTxt=aLangTable_Text[nId];
- SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
- }
- else if (nId == MN_LANGUAGE_SELECTION_START + nNumLanguageTextEntries - 1)
- {
- //Set Language_None for current selection
- SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
- }
- else if (nId == MN_LANGUAGE_SELECTION_START + nNumLanguageTextEntries)
- {
- //Open Format/Character Dialog
- lcl_CharDialog( *pSh, true, nId, 0, 0 );
- }
- else if (nId >= MN_LANGUAGE_PARAGRAPH_START && nId < MN_LANGUAGE_PARAGRAPH_START + nNumLanguageParaEntries - 1)
- {
- //Set language for current paragraph
- aNewLangTxt=aLangTable_Paragraph[nId];
- pSh->Push(); // save cursor
- SwLangHelper::SelectCurrentPara( *pSh );
- SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
- pSh->Pop( FALSE ); // restore cursor
- }
- else if (nId == MN_LANGUAGE_PARAGRAPH_START + nNumLanguageParaEntries - 1)
- {
- //Set Language_None for current paragraph
- pSh->Push(); // save cursor
- SwLangHelper::SelectCurrentPara( *pSh );
- SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
- pSh->Pop( FALSE ); // restore cursor
- }
- else if (nId == MN_LANGUAGE_PARAGRAPH_START + nNumLanguageParaEntries)
- {
- pSh->Push(); // save cursor
- SwLangHelper::SelectCurrentPara( *pSh );
- //Open Format/Character Dialog
- lcl_CharDialog( *pSh, true, nId, 0, 0 );
- pSh->Pop( FALSE ); // restore cursor
- }
- else if (nId >= MN_LANGUAGE_ALL_TEXT_START && nId < MN_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1)
- {
- //Set selected language as the default language
- aNewLangTxt=aLangTable_Document[nId];
- SwLangHelper::SetLanguage( *pSh, aNewLangTxt, false, aCoreSet );
- }
- else if (nId == MN_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1)
- {
- //Set Language_None as the default language
- SwLangHelper::SetLanguage_None( *pSh, false, aCoreSet );
- }
- else if (nId == MN_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries)
- {
- // open the dialog "Tools/Options/Language Settings - Language"
- SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- if (pFact)
- {
- VclAbstractDialog* pDlg = pFact->CreateVclDialog( pSh->GetView().GetWindow(), SID_LANGUAGE_OPTIONS );
- pDlg->Execute();
- delete pDlg;
- }
- }
+ SfxItemSet aCoreSet( pSh->GetView().GetPool(),
+ RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
+ RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE,
+ RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
+ 0 );
+ String aNewLangTxt;
-// pSh->EndAction();
+ if (MN_SET_LANGUAGE_SELECTION_START <= nId && nId <= MN_SET_LANGUAGE_SELECTION_END)
+ {
+ //Set language for current selection
+ aNewLangTxt = aLangTable_Text[nId];
+ SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
+ }
+ else if (nId == MN_SET_SELECTION_NONE)
+ {
+ //Set Language_None for current selection
+ SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
+ }
+ else if (nId == MN_SET_SELECTION_RESET)
+ {
+ //reset languages for current selection
+ SwLangHelper::ResetLanguages( *pSh, true );
+ }
+ else if (nId == MN_SET_SELECTION_MORE)
+ {
+ //Open Format/Character Dialog
+ lcl_CharDialog( *pSh, true, nId, 0, 0 );
+ }
+ else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END)
+ {
+ //Set language for current paragraph
+ aNewLangTxt = aLangTable_Paragraph[nId];
+ pSh->Push(); // save cursor
+ SwLangHelper::SelectCurrentPara( *pSh );
+ SwLangHelper::SetLanguage( *pSh, aNewLangTxt, true, aCoreSet );
+ pSh->Pop( FALSE ); // restore cursor
+ }
+ else if (nId == MN_SET_PARA_NONE)
+ {
+ //Set Language_None for current paragraph
+ pSh->Push(); // save cursor
+ SwLangHelper::SelectCurrentPara( *pSh );
+ SwLangHelper::SetLanguage_None( *pSh, true, aCoreSet );
+ pSh->Pop( FALSE ); // restore cursor
+ }
+ else if (nId == MN_SET_PARA_RESET)
+ {
+ //reset languages for current paragraph
+ pSh->Push(); // save cursor
+ SwLangHelper::SelectCurrentPara( *pSh );
+ SwLangHelper::ResetLanguages( *pSh, true );
+ pSh->Pop( FALSE ); // restore cursor
+ }
+ else if (nId == MN_SET_PARA_MORE)
+ {
+ pSh->Push(); // save cursor
+ SwLangHelper::SelectCurrentPara( *pSh );
+ //Open Format/Character Dialog
+ lcl_CharDialog( *pSh, true, nId, 0, 0 );
+ pSh->Pop( FALSE ); // restore cursor
+ }
+#if 0
+ else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries - 1)
+ {
+ //Set Language_None as the default language
+ SwLangHelper::SetLanguage_None( *pSh, false, aCoreSet );
+ }
+ else if (nId == MN_SET_LANGUAGE_ALL_TEXT_START + nNumLanguageDocEntries)
+ {
+ // open the dialog "Tools/Options/Language Settings - Language"
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ if (pFact)
+ {
+ VclAbstractDialog* pDlg = pFact->CreateVclDialog( pSh->GetView().GetWindow(), SID_LANGUAGE_OPTIONS );
+ pDlg->Execute();
+ delete pDlg;
}
}
+#endif
}
pSh->EnterStdMode();
diff --git a/sw/source/ui/lingu/olmenu.hrc b/sw/source/ui/lingu/olmenu.hrc
index 11e7b03d440b..887f8a2ad3af 100644
--- a/sw/source/ui/lingu/olmenu.hrc
+++ b/sw/source/ui/lingu/olmenu.hrc
@@ -30,35 +30,65 @@
#include "rcid.hrc"
-#define MN_SPELL_POPUP (RC_LINGU_BEGIN + 1)
-#define STR_SPELL_OK (RC_LINGU_BEGIN + 2)
-#define STR_HYP_OK (RC_LINGU_BEGIN + 3)
-#define STR_WORD (RC_LINGU_BEGIN + 4)
-#define STR_PARAGRAPH (RC_LINGU_BEGIN + 5)
-#define STR_LANGSTATUS_NONE (RC_LINGU_BEGIN + 6)
-#define STR_LANGSTATUS_MORE (RC_LINGU_BEGIN + 7)
-#define STR_IGNORE_SELECTION (RC_LINGU_BEGIN + 8)
+#define MN_SPELL_POPUP (RC_LINGU_BEGIN + 1)
+#define STR_SPELL_OK (RC_LINGU_BEGIN + 2)
+#define STR_HYP_OK (RC_LINGU_BEGIN + 3)
+#define STR_WORD (RC_LINGU_BEGIN + 4)
+#define STR_PARAGRAPH (RC_LINGU_BEGIN + 5)
+#define STR_LANGSTATUS_NONE (RC_LINGU_BEGIN + 6)
+#define STR_LANGSTATUS_MORE (RC_LINGU_BEGIN + 7)
+#define STR_IGNORE_SELECTION (RC_LINGU_BEGIN + 8)
+#define STR_RESET_TO_DEFAULT_LANGUAGE (RC_LINGU_BEGIN + 9)
-#define IMG_INFO_16 (RC_LINGU_BEGIN + 8)
+#define IMG_INFO_16 (RC_LINGU_BEGIN + 100)
//! Don't change these values. You may break context menu modifying extensions!
-#define MN_SPELLING 100
-#define MN_IGNORE_SELECTION 101
-#define MN_IGNORE 102
-#define MN_INSERT 103
-#define MN_AUTOCORR 104
-#define MN_LANGUAGE_WORD 105
-#define MN_LANGUAGE_PARA 106
-#define MN_LANGUAGE_SELECTION 107
-#define MN_LANGUAGE_PARAGRAPH 108
-#define MN_LANGUAGE_ALL_TEXT 109
-
-#define MN_INSERT_START 500
-#define MN_AUTOCORR_START 900
-
-#define MN_LANGUAGE_SELECTION_START 1170
-#define MN_LANGUAGE_PARAGRAPH_START 1270
-#define MN_LANGUAGE_ALL_TEXT_START 1370
+#define MN_SPELLING_DLG 200
+#define MN_IGNORE_SELECTION 201
+#define MN_IGNORE_WORD 202
+#define MN_ADD_TO_DIC 203
+#define MN_AUTOCORR 204
+#define MN_SET_LANGUAGE_SELECTION 205
+#define MN_SET_LANGUAGE_PARAGRAPH 206
+#define MN_SET_LANGUAGE_ALL_TEXT 207
+#define MN_SHORT_COMMENT 208
+
+// id range for dictionaries sub menu
+#define MN_DICTIONARIES_START 300
+#define MN_DICTIONARIES_END (MN_DICTIONARIES_START + 99)
+
+// id range for suggestions from spell and grammar checker
+#define MN_SUGGESTION_START 500
+#define MN_SUGGESTION_END (MN_SUGGESTION_START + MN_MAX_NUM_LANG)
+
+// id range for auto correction sub menu entries
+#define MN_AUTOCORR_START 700
+#define MN_AUTOCORR_END (MN_AUTOCORR_START + MN_MAX_NUM_LANG)
+
+// max number of language entries sub menus
+#define MN_MAX_NUM_LANG 99
+
+#define MN_NONE_OFFSET (MN_MAX_NUM_LANG + 1)
+#define MN_RESET_OFFSET (MN_MAX_NUM_LANG + 2)
+#define MN_MORE_OFFSET (MN_MAX_NUM_LANG + 3)
+
+// id range for 'set language for selection' sub menu entries
+#define MN_SET_LANGUAGE_SELECTION_START 900
+#define MN_SET_LANGUAGE_SELECTION_END (MN_SET_LANGUAGE_SELECTION_START + MN_MAX_NUM_LANG)
+#define MN_SET_SELECTION_NONE (MN_SET_LANGUAGE_SELECTION_START + MN_NONE_OFFSET)
+#define MN_SET_SELECTION_RESET (MN_SET_LANGUAGE_SELECTION_START + MN_RESET_OFFSET)
+#define MN_SET_SELECTION_MORE (MN_SET_LANGUAGE_SELECTION_START + MN_MORE_OFFSET)
+
+// id range for 'set language for paragraph' sub menu entries
+#define MN_SET_LANGUAGE_PARAGRAPH_START 1100
+#define MN_SET_LANGUAGE_PARAGRAPH_END (MN_SET_LANGUAGE_PARAGRAPH_START + MN_MAX_NUM_LANG)
+#define MN_SET_PARA_NONE (MN_SET_LANGUAGE_PARAGRAPH_START + MN_NONE_OFFSET)
+#define MN_SET_PARA_RESET (MN_SET_LANGUAGE_PARAGRAPH_START + MN_RESET_OFFSET)
+#define MN_SET_PARA_MORE (MN_SET_LANGUAGE_PARAGRAPH_START + MN_MORE_OFFSET)
+
+// id range for 'set language for all text' sub menu entries
+#define MN_SET_LANGUAGE_ALL_TEXT_START 1300
+#define MN_SET_LANGUAGE_ALL_TEXT_END (MN_SET_LANGUAGE_ALL_TEXT_START + MN_MAX_NUM_LANG)
#endif
diff --git a/sw/source/ui/lingu/olmenu.src b/sw/source/ui/lingu/olmenu.src
index 487215c2bff6..b8d9124d2e52 100644
--- a/sw/source/ui/lingu/olmenu.src
+++ b/sw/source/ui/lingu/olmenu.src
@@ -38,13 +38,13 @@ Menu MN_SPELL_POPUP
{
MenuItem
{
- Identifier = MN_IGNORE ;
+ Identifier = MN_IGNORE_WORD ;
HelpID = HID_LINGU_IGNORE_WORD ;
Text [ en-US ] = "Ignore All" ;
};
MenuItem
{
- Identifier = MN_INSERT ;
+ Identifier = MN_ADD_TO_DIC ;
HelpID = HID_LINGU_ADD_WORD ;
SubMenu = Menu
{
@@ -62,14 +62,14 @@ Menu MN_SPELL_POPUP
};
MenuItem
{
- Identifier = MN_SPELLING ;
+ Identifier = MN_SPELLING_DLG ;
HelpID = HID_LINGU_SPELLING_DLG ;
Text [ en-US ] = "~Spellcheck..." ;
};
SEPARATOR
MenuItem
{
- Identifier = MN_LANGUAGE_SELECTION ;
+ Identifier = MN_SET_LANGUAGE_SELECTION ;
SubMenu = Menu
{
};
@@ -77,7 +77,7 @@ Menu MN_SPELL_POPUP
};
MenuItem
{
- Identifier = MN_LANGUAGE_PARAGRAPH ;
+ Identifier = MN_SET_LANGUAGE_PARAGRAPH ;
SubMenu = Menu
{
};
@@ -86,7 +86,7 @@ Menu MN_SPELL_POPUP
/*
MenuItem
{
- Identifier = MN_LANGUAGE_ALL_TEXT ;
+ Identifier = MN_SET_LANGUAGE_ALL_TEXT ;
SubMenu = Menu
{
};
@@ -115,6 +115,11 @@ String STR_LANGSTATUS_NONE
{
Text [ en-US ] = "None (Do not check spelling)" ;
};
+String STR_RESET_TO_DEFAULT_LANGUAGE
+{
+ Text [ en-US ] = "Reset to Default Language" ;
+ Text [ x-comment ] = " ";
+};
String STR_LANGSTATUS_MORE
{
Text [ en-US ] = "More..." ;
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 52c4d10c3f02..e795c123d3a2 100755
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -27,13 +27,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
-#include <tools/shl.hxx>
#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+
+#include <tools/shl.hxx>
+#include <i18npool/mslangid.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/bindings.hxx>
@@ -117,8 +121,8 @@
#include <docsh.hxx>
#include <svl/undo.hxx>
-#include "swabstdlg.hxx" //CHINA001
-#include "chrdlg.hrc" //CHINA001
+#include "swabstdlg.hxx"
+#include "chrdlg.hrc"
#include "misc.hrc"
#include <app.hrc>
@@ -1138,7 +1142,17 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
bRestoreSelection = SwLangHelper::SetLanguageStatus(pOLV,rReq,rView,rSh);
break;
}
- case FN_THESAURUS_DLG:
+ case SID_THES:
+ {
+ String aReplaceText;
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False );
+ if (pItem2)
+ aReplaceText = pItem2->GetValue();
+ if (aReplaceText.Len() > 0)
+ ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText );
+ break;
+ }
+ case SID_THESAURUS:
{
pOLV->StartThesaurus();
break;
@@ -1246,8 +1260,25 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
SwLangHelper::GetLanguageStatus(pOLV,rSet);
break;
}
+
+ case SID_THES:
+ {
+ String aStatusVal;
+ LanguageType nLang = LANGUAGE_NONE;
+ bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, pOLV->GetEditView() );
+ rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+
+ // disable "Thesaurus" context menu entry if there is nothing to look up
+ uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
+ lang::Locale aLocale( SvxCreateLocale( nLang ) );
+ if (!bIsLookUpWord ||
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ rSet.DisableItem( SID_THES );
+ break;
+ }
+
// disable "Thesaurus" if the language is not supported
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
{
const SfxPoolItem &rItem = rView.GetWrtShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
@@ -1257,7 +1288,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
if (!xThes.is() || nLang == LANGUAGE_NONE ||
!xThes->hasLocale( SvxCreateLocale( nLang ) ))
- rSet.DisableItem( FN_THESAURUS_DLG );
+ rSet.DisableItem( SID_THESAURUS );
}
break;
case SID_HANGUL_HANJA_CONVERSION:
@@ -1295,6 +1326,15 @@ void SwAnnotationShell::ExecTransliteration(SfxRequest &rReq)
switch( rReq.GetSlot() )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nMode = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nMode = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nMode = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nMode = TransliterationModules_LOWERCASE_UPPERCASE;
break;
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 94d49720a50c..c95ad7e64c1c 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -27,8 +27,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <hintids.hxx>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+
+#include <comphelper/processfactory.hxx>
+#include <i18npool/mslangid.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/request.hxx>
#include <tools/shl.hxx>
#include <svx/svdview.hxx>
#include <editeng/spltitem.hxx>
@@ -37,9 +43,7 @@
#include <editeng/widwitem.hxx>
#include <editeng/kernitem.hxx>
#include <editeng/escpitem.hxx>
-#ifndef _SVX_PARAITEM_HXX //autogen
#include <editeng/lspcitem.hxx>
-#endif
#include <editeng/adjitem.hxx>
#include <editeng/crsditem.hxx>
#include <editeng/shdditem.hxx>
@@ -49,9 +53,7 @@
#include <editeng/fhgtitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/wghtitem.hxx>
-#ifndef _SVX_CNTRITEM_HXX //autogen
#include <editeng/cntritem.hxx>
-#endif
#include <editeng/postitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <svx/svdoutl.hxx>
@@ -59,6 +61,8 @@
#include <svl/whiter.hxx>
#include <svl/cjkoptions.hxx>
#include <svl/ctloptions.hxx>
+#include <svtools/langtab.hxx>
+#include <svl/languageoptions.hxx>
#include <sfx2/bindings.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/dispatch.hxx>
@@ -67,48 +71,66 @@
#include <editeng/editstat.hxx>
#include <svx/hlnkitem.hxx>
#include <svx/htmlmode.hxx>
+#include <svl/languageoptions.hxx>
+#include <svl/slstitm.hxx>
#include <editeng/langitem.hxx>
+#include <svtools/langtab.hxx>
#include <editeng/unolingu.hxx>
#include <editeng/scripttypeitem.hxx>
#include <editeng/writingmodeitem.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editdata.hxx>
+#include <editeng/outliner.hxx>
+#include <vcl/window.hxx>
+#include <editeng/editview.hxx>
+#include <vcl/outdev.hxx>
+#include <editeng/hyznitem.hxx>
+#include <editeng/kernitem.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/orphitem.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/shdditem.hxx>
+#include <editeng/spltitem.hxx>
+#include <svx/svdoutl.hxx>
+#include <svx/svdview.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/unolingu.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/widwitem.hxx>
+#include <editeng/writingmodeitem.hxx>
+#include <tools/shl.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/window.hxx>
+
+#include <cmdid.h>
#include <doc.hxx>
-#include <wview.hxx>
-#include <viewopt.hxx>
-#include <wrtsh.hxx>
-#include <uitool.hxx>
+#include <docstat.hxx>
+#include <drwtxtsh.hxx>
+#include <edtwin.hxx>
+#include <globals.hrc>
+#include <hintids.hxx>
+#include <initui.hxx> // fuer SpellPointer
+#include <langhelper.hxx>
#include <pardlg.hxx>
+#include <shells.hrc>
+#include <string.h>
#include <swdtflvr.hxx>
-#include <drwtxtsh.hxx>
#include <swmodule.hxx>
-#include <initui.hxx> // fuer SpellPointer
-#include <edtwin.hxx>
#include <swwait.hxx>
-#include <docstat.hxx>
-
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <uitool.hxx>
+#include <viewopt.hxx>
+#include <wrtsh.hxx>
+#include <wview.hxx>
-#include <cmdid.h>
-#include <globals.hrc>
-#include <shells.hrc>
#include "swabstdlg.hxx"
#include "chrdlg.hrc"
#include "misc.hrc"
-//modified on Jul. 30th
-#include <svl/languageoptions.hxx>
-#include <editeng/langitem.hxx>
-#include <svtools/langtab.hxx>
-#include <svl/slstitm.hxx>
-#include <string.h>
-
-#include <editeng/eeitem.hxx>
-#include <editeng/editeng.hxx>
-#include <editeng/editdata.hxx>
-#include <editeng/outliner.hxx>
-#include <vcl/window.hxx>
-#include <editeng/editview.hxx>
-#include <vcl/outdev.hxx>
#include <langhelper.hxx>
@@ -148,6 +170,18 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
bRestoreSelection = SwLangHelper::SetLanguageStatus(pOLV,rReq,GetView(),rSh);
break;
}
+
+ case SID_THES:
+ {
+ String aReplaceText;
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False );
+ if (pItem2)
+ aReplaceText = pItem2->GetValue();
+ if (aReplaceText.Len() > 0)
+ ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText );
+ break;
+ }
+
case SID_ATTR_CHAR_FONT:
case SID_ATTR_CHAR_FONTHEIGHT:
case SID_ATTR_CHAR_WEIGHT:
@@ -569,7 +603,27 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
nSlotId = SwLangHelper::GetLanguageStatus(pOLV,rSet);;
break;
}
- case SID_ATTR_PARA_ADJUST_LEFT: eAdjust = SVX_ADJUST_LEFT; goto ASK_ADJUST;
+
+ case SID_THES:
+ {
+ String aStatusVal;
+ LanguageType nLang = LANGUAGE_NONE;
+ bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, pOLV->GetEditView() );
+ rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+
+ // disable "Thesaurus" context menu entry if there is nothing to look up
+ uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
+ lang::Locale aLocale( SvxCreateLocale( nLang ) );
+ if (!bIsLookUpWord ||
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ rSet.DisableItem( SID_THES );
+
+ //! avoid puting the same item as SfxBoolItem at the end of this function
+ nSlotId = 0;
+ break;
+ }
+
+ case SID_ATTR_PARA_ADJUST_LEFT: eAdjust = SVX_ADJUST_LEFT; goto ASK_ADJUST;
case SID_ATTR_PARA_ADJUST_RIGHT: eAdjust = SVX_ADJUST_RIGHT; goto ASK_ADJUST;
case SID_ATTR_PARA_ADJUST_CENTER: eAdjust = SVX_ADJUST_CENTER; goto ASK_ADJUST;
case SID_ATTR_PARA_ADJUST_BLOCK: eAdjust = SVX_ADJUST_BLOCK; goto ASK_ADJUST;
@@ -620,19 +674,17 @@ ASK_ESCAPE:
}
break;
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
{
// disable "Thesaurus" if the language is not supported
const SfxPoolItem &rItem = GetShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
- LanguageType nLang = ((const SvxLanguageItem &)
- rItem).GetLanguage();
- //
+ LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage();
+
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
- if (!xThes.is() || nLang == LANGUAGE_NONE ||
- !xThes->hasLocale( SvxCreateLocale( nLang ) ))
- rSet.DisableItem( FN_THESAURUS_DLG );
+ if (!xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( SvxCreateLocale( nLang ) ))
+ rSet.DisableItem( SID_THESAURUS );
nSlotId = 0;
}
break;
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 4b8e2c65c5fc..78a9b05ce70b 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -52,6 +52,7 @@
#include <editeng/editstat.hxx>
#include <svx/svdoutl.hxx>
#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -392,7 +393,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
{
switch(rReq.GetSlot())
{
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
pOLV->StartThesaurus();
break;
@@ -717,6 +718,15 @@ void SwDrawTextShell::ExecTransliteration( SfxRequest & rReq )
switch( rReq.GetSlot() )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nMode = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nMode = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nMode = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nMode = TransliterationModules_LOWERCASE_UPPERCASE;
break;
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index 3a0fe1421a0c..37d5e1ed5d69 100755..100644
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -66,7 +66,8 @@ using namespace ::com::sun::star;
namespace SwLangHelper
{
- USHORT GetLanguageStatus(OutlinerView* pOLV,SfxItemSet& rSet)
+
+ USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet )
{
ESelection aSelection = pOLV->GetSelection();
EditView& rEditView=pOLV->GetEditView();
@@ -110,7 +111,7 @@ namespace SwLangHelper
return 0;
}
- bool SetLanguageStatus(OutlinerView* pOLV,SfxRequest &rReq,SwView &rView,SwWrtShell &rSh)
+ bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh )
{
bool bRestoreSelection = false;
SfxItemSet aEditAttr(pOLV->GetAttribs());
@@ -130,126 +131,132 @@ namespace SwLangHelper
//!! SwTextShell got destroyed meanwhile.)
SfxViewFrame *pViewFrame = rView.GetViewFrame();
- if (aNewLangTxt.EqualsAscii( "*" ))
+ if (aNewLangTxt.EqualsAscii( "*" ))
+ {
+ // open the dialog "Tools/Options/Language Settings - Language"
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ if (pFact)
{
- // open the dialog "Tools/Options/Language Settings - Language"
- SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- if (pFact)
- {
- VclAbstractDialog* pDlg = pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS );
- pDlg->Execute();
- delete pDlg;
- }
+ VclAbstractDialog* pDlg = pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS );
+ pDlg->Execute();
+ delete pDlg;
}
- else
+ }
+ else
+ {
+ // setting the new language...
+ if (aNewLangTxt.Len() > 0)
{
- // setting the new language...
- if (aNewLangTxt.Len() > 0)
+ const String aSelectionLangPrefix( String::CreateFromAscii("Current_") );
+ const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") );
+ const String aDocumentLangPrefix( String::CreateFromAscii("Default_") );
+ const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") );
+ const String aStrResetLangs( String::CreateFromAscii("RESET_LANGUAGES") );
+
+ xub_StrLen nPos = 0;
+ bool bForSelection = true;
+ bool bForParagraph = false;
+ if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aSelectionLangPrefix, 0 )))
{
- const String aSelectionLangPrefix( String::CreateFromAscii("Current_") );
- const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") );
- const String aDocumentLangPrefix( String::CreateFromAscii("Default_") );
- const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") );
-
- xub_StrLen nPos = 0;
- bool bForSelection = true;
- bool bForParagraph = false;
- if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aSelectionLangPrefix, 0 )))
- {
- // ... for the current selection
- aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.Len() );
- bForSelection = true;
- }
- else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 )))
- {
- // ... for the current paragraph language
- aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.Len() );
- bForSelection = true;
- bForParagraph = true;
- }
- else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 )))
- {
- // ... as default document language
- aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.Len() );
- bForSelection = false;
- }
+ // ... for the current selection
+ aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.Len() );
+ bForSelection = true;
+ }
+ else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 )))
+ {
+ // ... for the current paragraph language
+ aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.Len() );
+ bForSelection = true;
+ bForParagraph = true;
+ }
+ else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 )))
+ {
+ // ... as default document language
+ aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.Len() );
+ bForSelection = false;
+ }
- if (bForParagraph)
- {
- bRestoreSelection = true;
- SwLangHelper::SelectPara( rEditView, aSelection );
- aSelection = pOLV->GetSelection();
- }
- if (!bForSelection) // document language to be changed...
- {
- rSh.StartAction();
- rSh.LockView( TRUE );
- rSh.Push();
+ if (bForParagraph)
+ {
+ bRestoreSelection = true;
+ SwLangHelper::SelectPara( rEditView, aSelection );
+ aSelection = pOLV->GetSelection();
+ }
+ if (!bForSelection) // document language to be changed...
+ {
+ rSh.StartAction();
+ rSh.LockView( TRUE );
+ rSh.Push();
- // prepare to apply new language to all text in document
- rSh.SelAll();
- rSh.ExtendedSelectAll();
- }
+ // prepare to apply new language to all text in document
+ rSh.SelAll();
+ rSh.ExtendedSelectAll();
+ }
+
+ if (aNewLangTxt == aStrNone)
+ SwLangHelper::SetLanguage_None( rSh, pOLV, aSelection, bForSelection, aEditAttr );
+ else if (aNewLangTxt == aStrResetLangs)
+ SwLangHelper::ResetLanguages( rSh, pOLV, aSelection, bForSelection );
+ else
+ SwLangHelper::SetLanguage( rSh, pOLV, aSelection, aNewLangTxt, bForSelection, aEditAttr );
- if (aNewLangTxt != aStrNone)
- SwLangHelper::SetLanguage( rSh, pEditEngine, aSelection, aNewLangTxt, bForSelection, aEditAttr );
+ // ugly hack, as it seems that EditView/EditEngine does not update their spellchecking marks
+ // when setting a new language attribute
+ if (bForSelection)
+ {
+ const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions();
+ ULONG nCntrl = pEditEngine->GetControlWord();
+ // turn off
+ if (!pVOpt->IsOnlineSpell())
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
else
- SwLangHelper::SetLanguage_None( rSh, pEditEngine, aSelection, bForSelection, aEditAttr );
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ pEditEngine->SetControlWord(nCntrl);
- // ugly hack, as it seems that EditView/EditEngine does not update their spellchecking marks
- // when setting a new language attribute
- if (bForSelection)
- {
- const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = pEditEngine->GetControlWord();
- // turn off
- if (!pVOpt->IsOnlineSpell())
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- pEditEngine->SetControlWord(nCntrl);
-
- //turn back on
- if (pVOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
- else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- pEditEngine->SetControlWord(nCntrl);
-
- pEditEngine->CompleteOnlineSpelling();
- rEditView.Invalidate();
- }
+ //turn back on
+ if (pVOpt->IsOnlineSpell())
+ nCntrl |= EE_CNTRL_ONLINESPELLING;
+ else
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ pEditEngine->SetControlWord(nCntrl);
- if (!bForSelection)
- {
- // need to release view and restore selection...
- rSh.Pop( FALSE );
- rSh.LockView( FALSE );
- rSh.EndAction();
- }
+ pEditEngine->CompleteOnlineSpelling();
+ rEditView.Invalidate();
+ }
+
+ if (!bForSelection)
+ {
+ // need to release view and restore selection...
+ rSh.Pop( FALSE );
+ rSh.LockView( FALSE );
+ rSh.EndAction();
}
}
+ }
- // invalidate slot to get the new language displayed
- pViewFrame->GetBindings().Invalidate( rReq.GetSlot() );
+ // invalidate slot to get the new language displayed
+ pViewFrame->GetBindings().Invalidate( rReq.GetSlot() );
- rReq.Done();
- return bRestoreSelection;
+ rReq.Done();
+ return bRestoreSelection;
}
- void SetLanguage(SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
+ void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
{
- SetLanguage(rWrtSh,0,ESelection(),rLangText,bIsForSelection,rCoreSet);
+ SetLanguage( rWrtSh, 0 , ESelection(), rLangText, bIsForSelection, rCoreSet );
}
- void SetLanguage(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
+ void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
{
const LanguageType nLang = SvtLanguageTable().GetType( rLangText );
if (nLang != LANGUAGE_DONTKNOW)
{
USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+ EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
+ DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
+
//get ScriptType
USHORT nLangWhichId = 0;
bool bIsSingleScriptType = true;
@@ -264,6 +271,9 @@ namespace SwLangHelper
}
if (bIsSingleScriptType)
{
+ // change language for selection or paragraph
+ // (for paragraph is handled by previosuly having set the selection to the
+ // whole paragraph)
if (bIsForSelection)
{
// apply language to current selection
@@ -279,7 +289,7 @@ namespace SwLangHelper
rWrtSh.SetAttr( rCoreSet );
}
}
- else // change document language
+ else // change language for all text
{
// set document default language
switch (nLangWhichId)
@@ -300,12 +310,12 @@ namespace SwLangHelper
}
}
- void SetLanguage_None(SwWrtShell &rWrtSh,bool bIsForSelection, SfxItemSet &rCoreSet )
+ void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet )
{
- SetLanguage_None(rWrtSh,0,ESelection(),bIsForSelection,rCoreSet);
+ SetLanguage_None( rWrtSh,0,ESelection(),bIsForSelection,rCoreSet );
}
- void SetLanguage_None(SwWrtShell &rWrtSh, EditEngine* pEditEngine,ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
+ void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
{
// EditEngine IDs
const USHORT aLangWhichId_EE[3] =
@@ -325,7 +335,12 @@ namespace SwLangHelper
if (bIsForSelection)
{
- // apply language to current selection
+ // change language for selection or paragraph
+ // (for paragraph is handled by previosuly having set the selection to the
+ // whole paragraph)
+
+ EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
+ DBG_ASSERT( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
if (pEditEngine)
{
for (sal_uInt16 i = 0; i < 3; ++i)
@@ -340,7 +355,7 @@ namespace SwLangHelper
rWrtSh.SetAttr( rCoreSet );
}
}
- else // change document language
+ else // change language for all text
{
SvUShortsSort aAttribs;
for (sal_uInt16 i = 0; i < 3; ++i)
@@ -355,6 +370,39 @@ namespace SwLangHelper
}
}
+ void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection )
+ {
+ ResetLanguages( rWrtSh, 0 , ESelection(), bIsForSelection );
+ }
+
+ void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection )
+ {
+ (void) bIsForSelection;
+ (void) aSelection;
+
+ // reset language for current selection.
+ // The selection should already have been expanded to the whole paragraph or
+ // to all text in the document if those are the ranges where to reset
+ // the language attributes
+
+ if (pOLV)
+ {
+ EditView &rEditView = pOLV->GetEditView();
+ rEditView.RemoveAttribs( true, EE_CHAR_LANGUAGE );
+ rEditView.RemoveAttribs( true, EE_CHAR_LANGUAGE_CJK );
+ rEditView.RemoveAttribs( true, EE_CHAR_LANGUAGE_CTL );
+ }
+ else
+ {
+ SvUShortsSort aAttribs;
+ aAttribs.Insert( RES_CHRATR_LANGUAGE );
+ aAttribs.Insert( RES_CHRATR_CJK_LANGUAGE );
+ aAttribs.Insert( RES_CHRATR_CTL_LANGUAGE );
+ rWrtSh.ResetAttr( &aAttribs );
+ }
+ }
+
+
/// @returns : the language for the selected text that is set for the
/// specified attribute (script type).
/// If there are more than one languages used LANGUAGE_DONTKNOW will be returned.
@@ -450,7 +498,7 @@ namespace SwLangHelper
/// 'In use' means the language(s) matching the script type(s) of the
/// selected text. Or in other words, the language a spell checker would use.
/// If there is more than one language LANGUAGE_DONTKNOW will be returned.
- LanguageType GetCurrentLanguage(SfxItemSet aSet,USHORT nScriptType )
+ LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType )
{
//set language attribute to use according to the script type
USHORT nLangWhichId = 0;
@@ -517,7 +565,7 @@ namespace SwLangHelper
return aText;
}
- String GetTextForLanguageGuessing(EditEngine* rEditEngine, ESelection aDocSelection )
+ String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection )
{
// string for guessing language
String aText;
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index c2308b9def0a..0de14dc3dacb 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -62,7 +62,8 @@
#include <svx/htmlmode.hxx>
#include <svx/pfiledlg.hxx>
#include <svtools/htmlcfg.hxx>
-#include <com/sun/star/i18n/TransliterationModules.hdl>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <sot/clsids.hxx>
#include <editeng/acorrcfg.hxx>
@@ -1027,6 +1028,15 @@ void SwTextShell::ExecTransliteration( SfxRequest & rReq )
switch( rReq.GetSlot() )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nMode = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nMode = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nMode = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nMode = TransliterationModules_LOWERCASE_UPPERCASE;
break;
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index b7aa72acfb2c..e7d7ef613f2b 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -27,7 +27,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
+#include <com/sun/star/i18n/WordType.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+
#include <comphelper/processfactory.hxx>
#include <svx/dialogs.hrc>
#include <hintids.hxx>
@@ -338,6 +341,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") );
const String aDocumentLangPrefix( String::CreateFromAscii("Default_") );
const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") );
+ const String aStrResetLangs( String::CreateFromAscii("RESET_LANGUAGES") );
SfxItemSet aCoreSet( GetPool(),
RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
@@ -376,10 +380,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.SelAll();
rWrtSh.ExtendedSelectAll();
}
- if (aNewLangTxt != aStrNone)
- SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet );
- else
+ if (aNewLangTxt == aStrNone)
SwLangHelper::SetLanguage_None( rWrtSh, bForSelection, aCoreSet );
+ else if (aNewLangTxt == aStrResetLangs)
+ SwLangHelper::ResetLanguages( rWrtSh, bForSelection );
+ else
+ SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet );
}
// restore selection...
@@ -396,6 +402,23 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
}
+ case SID_THES:
+ {
+ // replace word/selection with text from selected sub menu entry
+ String aReplaceText;
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , sal_False );
+ if (pItem2)
+ aReplaceText = pItem2->GetValue();
+ if (aReplaceText.Len() > 0)
+ {
+ SwView &rView2 = rWrtSh.GetView();
+ const bool bSelection = rWrtSh.HasSelection();
+ const String aLookUpText = rView2.GetThesaurusLookUpText( bSelection );
+ rView2.InsertThesaurusSynonym( aReplaceText, aLookUpText, bSelection );
+ }
+ }
+ break;
+
case SID_CHARMAP:
{
InsertSymbol( rReq );
@@ -1375,6 +1398,38 @@ void SwTextShell::GetState( SfxItemSet &rSet )
}
break;
+ case SID_THES:
+ {
+ // is there a valid selection to get text from?
+ String aText;
+ sal_Bool bValid = !rSh.HasSelection() ||
+ (rSh.IsSelOnePara() && !rSh.IsMultiSelection());
+ // prevent context menu from showing when cursor is not in or at the end of a word
+ // (GetCurWord will return the next word if there is none at the current position...)
+ const sal_Int16 nWordType = ::i18n::WordType::DICTIONARY_WORD;
+ bool bWord = rSh.IsInWord( nWordType ) || rSh.IsStartWord( nWordType ) || rSh.IsEndWord( nWordType );
+ if (bValid && bWord)
+ aText = rSh.HasSelection()? rSh.GetSelTxt() : rSh.GetCurWord();
+
+ LanguageType nLang = rSh.GetCurLang();
+ lang::Locale aLocale = SvxCreateLocale( nLang );
+ String aLangText( MsLangId::convertLanguageToIsoString( nLang ) );
+
+ // set word and locale to look up as status value
+ String aStatusVal( aText );
+ aStatusVal.AppendAscii( "#" );
+ aStatusVal += aLangText;
+
+ rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+
+ // disable "Thesaurus" context menu entry if there is nothing to look up
+ uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
+ if (aText.Len() == 0 ||
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ rSet.DisableItem( SID_THES );
+ }
+ break;
+
case FN_NUMBER_NEWSTART :
if(!rSh.GetCurNumRule())
rSet.DisableItem(nWhich);
diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src
index 7c47fe6ef208..9cf4f910f183 100644
--- a/sw/source/ui/uiview/view.src
+++ b/sw/source/ui/uiview/view.src
@@ -299,8 +299,8 @@ ToolBox RID_TOOLS_TOOLBOX
};
ToolBoxItem
{
- Identifier = FN_THESAURUS_DLG;
- HelpID = FN_THESAURUS_DLG;
+ Identifier = SID_THESAURUS;
+ HelpID = SID_THESAURUS;
Hide = TRUE;
};
ToolBoxItem
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 04414b5d83db..b3f73f7c38e4 100644..100755
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -120,7 +120,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
{
switch(rReq.GetSlot())
{
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
StartThesaurus();
rReq.Ignore();
break;
@@ -252,64 +252,31 @@ void SwView::StartTextConversion(
// do not do text conversion if it is active elsewhere
if (GetWrtShell().HasConvIter())
{
-// MessBox( 0, WB_OK, String( SW_RES( STR_SPELL_TITLE ) ),
-// String( SW_RES( STR_MULT_INTERACT_SPELL_WARN ) ) ).Execute();
return;
}
-/*
- SfxErrorContext aContext( ERRCTX_SVX_LINGU_SPELLING, aEmptyStr, pEditWin,
- RID_SVXERRCTX, DIALOG_MGR() );
- Reference< XSpellChecker1 > xSpell = ::GetSpellChecker();
- if(!xSpell.is())
- { // keine Arme keine Kekse
- ErrorHandler::HandleError( ERRCODE_SVX_LINGU_LINGUNOTEXISTS );
- return;
- }
-*/
SpellKontext(sal_True);
- SwViewOption* pVOpt = (SwViewOption*)pWrtShell->GetViewOptions();
- sal_Bool bOldIdle = pVOpt->IsIdle();
+ const SwViewOption* pVOpt = pWrtShell->GetViewOptions();
+ const sal_Bool bOldIdle = pVOpt->IsIdle();
pVOpt->SetIdle( sal_False );
sal_Bool bOldIns = pWrtShell->IsInsMode();
pWrtShell->SetInsMode( sal_True );
+ sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection() ||
+ pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext();
- {
- sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection() ||
- pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext();
-
-// sal_Bool bIsSpellSpecial = sal_True;
-
- sal_Bool bStart = bSelection || pWrtShell->IsStartOfDoc();
- sal_Bool bOther = !bSelection && !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
+ sal_Bool bStart = bSelection || pWrtShell->IsStartOfDoc();
+ sal_Bool bOther = !bSelection && !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
-/*
- if( bOther && !bIsSpellSpecial )
- // kein Sonderbereich eingeschaltet
- {
- // Ich will auch in Sonderbereichen trennen
- QueryBox aBox( &GetEditWin(), SW_RES( DLG_SPECIAL_FORCED ) );
- if( aBox.Execute() == RET_YES && xProp.is())
- {
- sal_Bool bTrue = sal_True;
- Any aTmp(&bTrue, ::getBooleanCppuType());
- xProp->setPropertyValue( C2U(UPN_IS_SPELL_SPECIAL), aTmp );
- }
- else
- return; // Nein Es wird nicht gespellt
- }
-*/
- {
- const uno::Reference< lang::XMultiServiceFactory > xMgr(
- comphelper::getProcessServiceFactory() );
- SwHHCWrapper aWrap( this, xMgr, nSourceLang, nTargetLang, pTargetFont,
- nOptions, bIsInteractive,
- bStart, bOther, bSelection );
- aWrap.Convert();
- }
+ {
+ const uno::Reference< lang::XMultiServiceFactory > xMgr(
+ comphelper::getProcessServiceFactory() );
+ SwHHCWrapper aWrap( this, xMgr, nSourceLang, nTargetLang, pTargetFont,
+ nOptions, bIsInteractive,
+ bStart, bOther, bSelection );
+ aWrap.Convert();
}
pWrtShell->SetInsMode( bOldIns );
@@ -557,16 +524,77 @@ void SwView::HyphenateDocument()
}
/*--------------------------------------------------------------------
+ --------------------------------------------------------------------*/
+
+bool SwView::IsValidSelectionForThesaurus() const
+{
+ // must not be a multi-selection, and if it is a selection it needs
+ // to be within a single paragraph
+
+ const bool bMultiSel = pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext();
+ const sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection();
+ return !bMultiSel && (!bSelection || pWrtShell->IsSelOnePara() );
+}
+
+
+String SwView::GetThesaurusLookUpText( bool bSelection ) const
+{
+ return bSelection ? pWrtShell->GetSelTxt() : pWrtShell->GetCurWord();
+}
+
+
+void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bSelection )
+{
+ sal_Bool bOldIns = pWrtShell->IsInsMode();
+ pWrtShell->SetInsMode( sal_True );
+
+ pWrtShell->StartAllAction();
+ pWrtShell->StartUndo(UNDO_DELETE);
+
+ if( !bSelection )
+ {
+ if(pWrtShell->IsEndWrd())
+ pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
+
+ pWrtShell->SelWrd();
+
+ // make sure the selection build later from the
+ // data below does not include footnotes and other
+ // "in word" character to the left and right in order
+ // to preserve those. Therefore count those "in words"
+ // in order to modify the selection accordingly.
+ const sal_Unicode* pChar = rLookUpText.GetBuffer();
+ xub_StrLen nLeft = 0;
+ while (pChar && *pChar++ == CH_TXTATR_INWORD)
+ ++nLeft;
+ pChar = rLookUpText.Len() ? rLookUpText.GetBuffer() + rLookUpText.Len() - 1 : 0;
+ xub_StrLen nRight = 0;
+ while (pChar && *pChar-- == CH_TXTATR_INWORD)
+ ++nRight;
+
+ // adjust existing selection
+ SwPaM *pCrsr = pWrtShell->GetCrsr();
+ pCrsr->GetPoint()->nContent/*.nIndex*/ -= nRight;
+ pCrsr->GetMark()->nContent/*.nIndex*/ += nLeft;
+ }
+
+ pWrtShell->Insert( rSynonmText );
+
+ pWrtShell->EndUndo(UNDO_DELETE);
+ pWrtShell->EndAllAction();
+
+ pWrtShell->SetInsMode( bOldIns );
+}
+
+
+/*--------------------------------------------------------------------
Beschreibung: Thesaurus starten
--------------------------------------------------------------------*/
void SwView::StartThesaurus()
{
- if( pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext() )
- return;
- sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection();
- if( bSelection && !pWrtShell->IsSelOnePara() )
+ if (!IsValidSelectionForThesaurus())
return;
SfxErrorContext aContext( ERRCTX_SVX_LINGU_THESAURUS, aEmptyStr, pEditWin,
@@ -589,114 +617,32 @@ void SwView::StartThesaurus()
sal_Bool bOldIdle = pVOpt->IsIdle();
pVOpt->SetIdle( sal_False );
-#ifdef TL_NEVER
-//!!! hier mu� noch was getan werden... (Umsetzung der Funktionalitaet)
- // ErrorLink setzen, alten merken
- Link aOldLnk = pSpell->ChgErrorLink(LINK(this, SwView, SpellError));
-#endif
-
-
// get initial LookUp text
- String aTmp = bSelection ?
- pWrtShell->GetSelTxt() : pWrtShell->GetCurWord();
+ const sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection();
+ String aTmp = GetThesaurusLookUpText( bSelection );
Reference< XThesaurus > xThes( ::GetThesaurus() );
AbstractThesaurusDialog *pDlg = NULL;
if ( !xThes.is() || !xThes->hasLocale( SvxCreateLocale( eLang ) ) )
- {
SpellError( &eLang );
- }
else
{
// create dialog
{ //Scope for SwWait-Object
SwWait aWait( *GetDocShell(), sal_True );
+ // load library with dialog only on demand ...
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- pDlg = pFact->CreateThesaurusDialog( &GetEditWin(),
- xThes, aTmp, eLang );
- }
-
- {
- // Hier wird der Thesaurus-Dialog im Applikationsfenster zentriert,
- // und zwar oberhalb oder unterhalb der Cursorposition, je nachdem,
- // wo mehr Platz ist.
-
- // Current Word:
- SwRect aRect( pWrtShell->GetCharRect() );
- Point aTopPos = aRect.Pos();
- Point aBtmPos( aTopPos.X(), aRect.Bottom() );
- aTopPos = GetEditWin().LogicToPixel( aTopPos );
- aTopPos = GetEditWin().OutputToScreenPixel( aTopPos );
- aBtmPos = GetEditWin().LogicToPixel( aBtmPos );
- aBtmPos = GetEditWin().OutputToScreenPixel( aBtmPos );
- // ::frame::Desktop:
- Rectangle aRct = GetEditWin().GetDesktopRectPixel();
- Point aWinTop( aRct.TopLeft() );
- Point aWinBtm( aRct.BottomRight() );
- if ( aTopPos.Y() - aWinTop.Y() > aWinBtm.Y() - aBtmPos.Y() )
- aWinBtm.Y() = aTopPos.Y();
- else
- aWinTop.Y() = aBtmPos.Y();
-
- Size aSz = pDlg->GetWindow()->GetSizePixel();
- if ( aWinBtm.Y() - aWinTop.Y() > aSz.Height() )
- {
- aWinTop.X() = ( aWinTop.X() + aWinBtm.X() - aSz.Width() ) / 2;
- aWinTop.Y() = ( aWinTop.Y() + aWinBtm.Y() - aSz.Height() ) / 2;
- pDlg->GetWindow()->SetPosPixel( aWinTop );
- }
+ pDlg = pFact->CreateThesaurusDialog( &GetEditWin(), xThes, aTmp, eLang );
}
if ( pDlg->Execute()== RET_OK )
- {
- sal_Bool bOldIns = pWrtShell->IsInsMode();
- pWrtShell->SetInsMode( sal_True );
-
- pWrtShell->StartAllAction();
- pWrtShell->StartUndo(UNDO_DELETE);
-
- if( !bSelection )
- {
- if(pWrtShell->IsEndWrd())
- pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
-
- pWrtShell->SelWrd();
-
- // make sure the selection build later from the
- // data below does not include footnotes and other
- // "in word" character to the left and right in order
- // to preserve those. Therefore count those "in words"
- // in order to modify the selection accordingly.
- const sal_Unicode* pChar = aTmp.GetBuffer();
- xub_StrLen nLeft = 0;
- while (pChar && *pChar++ == CH_TXTATR_INWORD)
- ++nLeft;
- pChar = aTmp.Len() ? aTmp.GetBuffer() + aTmp.Len() - 1 : 0;
- xub_StrLen nRight = 0;
- while (pChar && *pChar-- == CH_TXTATR_INWORD)
- ++nRight;
-
- // adjust existing selection
- SwPaM *pCrsr = pWrtShell->GetCrsr();
- pCrsr->GetPoint()->nContent/*.nIndex*/ -= nRight;
- pCrsr->GetMark()->nContent/*.nIndex*/ += nLeft;
- }
-
- pWrtShell->Insert( pDlg->GetWord() );
-
- pWrtShell->EndUndo(UNDO_DELETE);
- pWrtShell->EndAllAction();
-
- pWrtShell->SetInsMode( bOldIns );
-
- }
+ InsertThesaurusSynonym( pDlg->GetWord(), aTmp, bSelection );
}
delete pDlg;
pVOpt->SetIdle( bOldIdle );
-
}
/*--------------------------------------------------------------------
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index 23415b630252..f23b73f5dfad 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -303,7 +303,7 @@ void SwView::GetState(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
}
break;
- case FN_THESAURUS_DLG:
+ case SID_THESAURUS:
{
SwWrtShell &rSh = GetWrtShell();
if (2 <= rSh.GetCrsrCnt()) // multi selection?
diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src
index 1aa7fc03b4c6..3d24d885dfa8 100644
--- a/sw/source/ui/web/web.src
+++ b/sw/source/ui/web/web.src
@@ -138,8 +138,8 @@ ToolBox RID_WEBTOOLS_TOOLBOX
};
ToolBoxItem
{
- Identifier = FN_THESAURUS_DLG;
- HelpID = FN_THESAURUS_DLG;
+ Identifier = SID_THESAURUS;
+ HelpID = SID_THESAURUS;
Hide = TRUE;
};
ToolBoxItem
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml
index 7fb8db664b59..c3bef67c8c12 100644
--- a/sw/uiconfig/sglobal/menubar/menubar.xml
+++ b/sw/uiconfig/sglobal/menubar/menubar.xml
@@ -217,12 +217,15 @@
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:RubyDialog"/>
diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml
index 308406bfdffa..4b482e373d3f 100644
--- a/sw/uiconfig/sweb/menubar/menubar.xml
+++ b/sw/uiconfig/sweb/menubar/menubar.xml
@@ -165,12 +165,15 @@
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:FormatColumns"/>
diff --git a/sw/uiconfig/swform/menubar/menubar.xml b/sw/uiconfig/swform/menubar/menubar.xml
index 726b8905eadb..69b65cfd3e59 100644
--- a/sw/uiconfig/swform/menubar/menubar.xml
+++ b/sw/uiconfig/swform/menubar/menubar.xml
@@ -217,12 +217,15 @@
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:RubyDialog"/>
diff --git a/sw/uiconfig/swreport/menubar/menubar.xml b/sw/uiconfig/swreport/menubar/menubar.xml
index 726b8905eadb..69b65cfd3e59 100644
--- a/sw/uiconfig/swreport/menubar/menubar.xml
+++ b/sw/uiconfig/swreport/menubar/menubar.xml
@@ -217,12 +217,15 @@
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:RubyDialog"/>
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index 9634079ddeb2..fb10ca615b50 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -220,12 +220,15 @@
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:RubyDialog"/>
diff --git a/sw/uiconfig/swxform/menubar/menubar.xml b/sw/uiconfig/swxform/menubar/menubar.xml
index 89ab81e790cf..ae0df22748fe 100644
--- a/sw/uiconfig/swxform/menubar/menubar.xml
+++ b/sw/uiconfig/swxform/menubar/menubar.xml
@@ -218,12 +218,15 @@
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
</menu:menupopup>
</menu:menu>
<menu:menuitem menu:id=".uno:RubyDialog"/>