diff options
author | Thomas Lange <tl@openoffice.org> | 2009-10-19 08:12:25 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2009-10-19 08:12:25 +0000 |
commit | 4d8fe0ad149fe01976f2a23d598cfaf5eafbcc82 (patch) | |
tree | 97cdfcd74060fbbbf456ec14723c7145cb4ffd57 | |
parent | dba84e79fc20ced9af1243f4f6ba7f7c0eaee170 (diff) |
#106019# 'reset languages' menu entry
-rw-r--r-- | sw/sdi/swslots.src | 1462 | ||||
-rwxr-xr-x | sw/source/ui/inc/langhelper.hxx | 22 | ||||
-rw-r--r-- | sw/source/ui/inc/olmenu.hxx | 11 | ||||
-rw-r--r-- | sw/source/ui/lingu/olmenu.cxx | 734 | ||||
-rw-r--r-- | sw/source/ui/lingu/olmenu.hrc | 82 | ||||
-rw-r--r-- | sw/source/ui/lingu/olmenu.src | 17 | ||||
-rwxr-xr-x | sw/source/ui/shells/langhelper.cxx | 256 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh1.cxx | 9 |
8 files changed, 574 insertions, 2019 deletions
diff --git a/sw/sdi/swslots.src b/sw/sdi/swslots.src index d62d1da6b35b..f094994b2c2a 100644 --- a/sw/sdi/swslots.src +++ b/sw/sdi/swslots.src @@ -30,1466 +30,6 @@ #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_PRINT_OPTIONS -{ - Slotname [ en-US ] = "Print options page view"; -}; -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 page view"; -}; -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"; -}; +//! this file is supposed not to be needed anymore... lets try... diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx index 751cff109eee..bcf5de8cfc27 100755 --- a/sw/source/ui/inc/langhelper.hxx +++ b/sw/source/ui/inc/langhelper.hxx @@ -34,31 +34,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 0985c3bdc4da..c7fd1f4e71f3 100644 --- a/sw/source/ui/inc/olmenu.hxx +++ b/sw/source/ui/inc/olmenu.hxx @@ -54,23 +54,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/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 865908568cd6..41bed8ff7650 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -31,86 +31,75 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <hintids.hxx> - -#ifndef _SVSTDARR_HXX -#define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> -#endif -#include <svtools/lingucfg.hxx> -#include <svtools/linguprops.hxx> -#include <svtools/filter.hxx> -#include <svx/impgrf.hxx> -#include <svx/svxacorr.hxx> -#include <sfx2/dispatch.hxx> -#include <sfx2/imagemgr.hxx> -#include <osl/file.hxx> -#include <rtl/string.hxx> - -#include <i18npool/mslangid.hxx> -#include <linguistic/lngprops.hxx> -#include <linguistic/misc.hxx> -#include <comphelper/processfactory.hxx> -#include <svx/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/document/XDocumentLanguages.hpp> #include <com/sun/star/frame/XModuleManager.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/i18n/ScriptType.hpp> -#include <svx/dlgutil.hxx> +#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 <comphelper/processfactory.hxx> +#include <i18npool/mslangid.hxx> +#include <linguistic/lngprops.hxx> +#include <linguistic/misc.hxx> +#include <osl/file.hxx> +#include <rtl/string.hxx> +#include <sfx2/dispatch.hxx> +#include <sfx2/imagemgr.hxx> +#include <sfx2/request.hxx> +#include <sfx2/sfxdlg.hxx> +#include <svtools/filter.hxx> #include <svtools/itemset.hxx> +#include <svtools/languageoptions.hxx> +#include <svtools/lingucfg.hxx> +#include <svtools/linguprops.hxx> +#include <svx/acorrcfg.hxx> +#include <svx/dlgutil.hxx> +#include <svx/impgrf.hxx> #include <svx/langitem.hxx> #include <svx/splwrap.hxx> -#include <vcl/svapp.hxx> +#include <svx/svxacorr.hxx> +#include <svx/unolingu.hxx> +#include <vcl/msgbox.hxx> #include <vcl/settings.hxx> -#include <svtools/lingucfg.hxx> -#include <svx/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 <svtools/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 <svx/brshitem.hxx> -#include <svtools/stritem.hxx> -#include <viewopt.hxx> -#include <uitool.hxx> - -#include <wview.hxx> -#include <sfx2/request.hxx> +#include <vcl/svapp.hxx> -#include <vcl/msgbox.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 "svtools/langtab.hxx" +#include "svtools/stritem.hxx" +#include "svx/brshitem.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 <langhelper.hxx> +#include <map> using namespace ::com::sun::star; using ::rtl::OUString; @@ -218,63 +207,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 @@ -282,68 +267,57 @@ 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() == 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 ); } } } - 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; - + DBG_ASSERT( nLangItemIdStart <= nItemId && nItemId <= nLangItemIdStart + MN_MAX_NUM_LANG, + "nItemId outside of expected range!" ); pPopupMenu->InsertItem( nItemId, aEntryTxt, MIB_RADIOCHECK ); - if (aEntryTxt == curLang) + if (aEntryTxt == aCurLang) { //make a check mark for the current language pPopupMenu->CheckItem( nItemId, TRUE ); } + rLangTable[ nItemId ] = aEntryTxt; + ++nItemId; } } - //7--none - nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK ); - - //More... - nItemId++; - pPopupMenu->InsertItem( nItemId, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK ); - - 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 ); } @@ -366,22 +340,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 ) @@ -446,25 +420,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); @@ -487,11 +464,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()) { @@ -506,6 +481,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 ); @@ -521,8 +497,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 ); @@ -533,18 +508,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; @@ -552,39 +529,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().GetWindowColor().IsDark() ); - SetItemImage( MN_SPELLING, rImg ); + SetItemImage( MN_SPELLING_DLG, rImg ); + ////////////////////////////////////////////////////////////////////////////////// RemoveDisabledEntries( TRUE, TRUE ); @@ -599,7 +577,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 ), @@ -609,13 +587,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(); @@ -632,12 +608,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 ); @@ -648,8 +624,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); @@ -672,13 +648,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; @@ -686,39 +662,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().GetWindowColor().IsDark() ); - SetItemImage( MN_SPELLING, rImg ); + SetItemImage( MN_SPELLING_DLG, rImg ); ////////////////////////////////////////////////////////////////////////////////// @@ -741,25 +717,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()) ) + USHORT 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() ); @@ -778,40 +752,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 @@ -821,180 +785,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; + } + else + { + // Set language for selection or for paragraph... -// pSh->StartAction(); + 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; - 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; - } - } - -// 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 4e13b83bf10a..e69d51fbc98b 100644 --- a/sw/source/ui/lingu/olmenu.hrc +++ b/sw/source/ui/lingu/olmenu.hrc @@ -33,35 +33,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 82175a74bc23..0a07b41d64ed 100644 --- a/sw/source/ui/lingu/olmenu.src +++ b/sw/source/ui/lingu/olmenu.src @@ -41,13 +41,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 { @@ -65,14 +65,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 { }; @@ -80,7 +80,7 @@ Menu MN_SPELL_POPUP }; MenuItem { - Identifier = MN_LANGUAGE_PARAGRAPH ; + Identifier = MN_SET_LANGUAGE_PARAGRAPH ; SubMenu = Menu { }; @@ -89,7 +89,7 @@ Menu MN_SPELL_POPUP /* MenuItem { - Identifier = MN_LANGUAGE_ALL_TEXT ; + Identifier = MN_SET_LANGUAGE_ALL_TEXT ; SubMenu = Menu { }; @@ -118,6 +118,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/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx index e5e4dbe81b29..fb6e0e6e7594 100755 --- a/sw/source/ui/shells/langhelper.cxx +++ b/sw/source/ui/shells/langhelper.cxx @@ -69,7 +69,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(); @@ -113,7 +114,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()); @@ -133,126 +134,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; @@ -267,6 +274,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 @@ -282,7 +292,7 @@ namespace SwLangHelper rWrtSh.SetAttr( rCoreSet ); } } - else // change document language + else // change language for all text { // set document default language switch (nLangWhichId) @@ -303,12 +313,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] = @@ -328,7 +338,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) @@ -343,7 +358,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) @@ -358,6 +373,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. @@ -453,7 +501,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; @@ -520,7 +568,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/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 77de4c0821ff..736221981631 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -341,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, @@ -379,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... |