Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
5d6a605a
Kaydet (Commit)
5d6a605a
authored
Şub 17, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert editeng spell menu to .ui format
Change-Id: Iaae8e6d6ee3c9cafad343fefb4f357b080df3a08
üst
b64bdb8d
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
115 additions
and
75 deletions
+115
-75
Repository.mk
Repository.mk
+1
-0
Module_editeng.mk
editeng/Module_editeng.mk
+1
-0
UIConfig_editeng.mk
editeng/UIConfig_editeng.mk
+16
-0
editeng.hrc
editeng/inc/editeng.hrc
+2
-9
helpid.hrc
editeng/inc/helpid.hrc
+0
-4
editeng.src
editeng/source/editeng/editeng.src
+0
-49
editview.cxx
editeng/source/editeng/editview.cxx
+20
-12
spellmenu.ui
editeng/uiconfig/ui/spellmenu.ui
+74
-0
editrids.hrc
include/editeng/editrids.hrc
+1
-1
No files found.
Repository.mk
Dosyayı görüntüle @
5d6a605a
...
...
@@ -1105,6 +1105,7 @@ $(eval $(call gb_Helper_register_uiconfigs,\
cui \
$(call gb_Helper_optional,DBCONNECTIVITY,dbaccess) \
desktop \
editeng \
filter \
formula \
fps \
...
...
editeng/Module_editeng.mk
Dosyayı görüntüle @
5d6a605a
...
...
@@ -26,6 +26,7 @@ $(eval $(call gb_Module_add_targets,editeng,\
$(eval $(call gb_Module_add_l10n_targets,editeng,\
AllLangResTarget_editeng \
UIConfig_editeng \
))
$(eval $(call gb_Module_add_check_targets,editeng,\
...
...
editeng/UIConfig_editeng.mk
0 → 100644
Dosyayı görüntüle @
5d6a605a
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UIConfig_UIConfig,editeng))
$(eval $(call gb_UIConfig_add_uifiles,editeng,\
editeng/uiconfig/ui/spellmenu \
))
# vim: set noet sw=4 ts=4:
editeng/inc/editeng.hrc
Dosyayı görüntüle @
5d6a605a
...
...
@@ -21,15 +21,8 @@
#include <editeng/editrids.hrc>
#define MN_SPELLING 1
#define MN_INSERT 2
#define MN_IGNORE 3
#define MN_AUTOCORR 4
#define MN_WORDLANGUAGE 5
#define MN_PARALANGUAGE 6
#define MN_INSERT_SINGLE 7
#define MN_AUTO_CORRECT_DLG 8
#define MN_WORDLANGUAGE 998
#define MN_PARALANGUAGE 999
#define MN_ALTSTART 1000
#define MN_AUTOSTART 2000
#define MN_DICTSTART 3000
...
...
editeng/inc/helpid.hrc
Dosyayı görüntüle @
5d6a605a
...
...
@@ -21,10 +21,6 @@
#define HID_EDITENG_SPELLER_WORDLANGUAGE "EDITENG_HID_EDITENG_SPELLER_WORDLANGUAGE"
#define HID_EDITENG_SPELLER_PARALANGUAGE "EDITENG_HID_EDITENG_SPELLER_PARALANGUAGE"
#define HID_EDITENG_SPELLER_ADDWORD "EDITENG_HID_EDITENG_SPELLER_ADDWORD"
#define HID_EDITENG_SPELLER_AUTOCORRECT "EDITENG_HID_EDITENG_SPELLER_AUTOCORRECT"
#define HID_EDITENG_SPELLER_IGNORE "EDITENG_HID_EDITENG_SPELLER_IGNORE"
#define HID_EDITENG_SPELLER_START "EDITENG_HID_EDITENG_SPELLER_START"
#endif
...
...
editeng/source/editeng/editeng.src
Dosyayı görüntüle @
5d6a605a
...
...
@@ -65,55 +65,6 @@ String RID_EDITUNDO_TRANSLITERATE
Text [ en-US ] = "Change Case";
};
Menu RID_MENU_SPELL
{
ItemList =
{
MenuItem
{
Identifier = MN_IGNORE ;
HelpId = HID_EDITENG_SPELLER_IGNORE;
Text [ en-US ] = "I~gnore All" ;
};
MenuItem
{
Identifier = MN_INSERT ;
HelpId = HID_EDITENG_SPELLER_ADDWORD;
SubMenu = Menu
{
};
Text [ en-US ] = "~Add to Dictionary" ;
};
MenuItem
{
Identifier = MN_INSERT_SINGLE ;
HelpId = HID_EDITENG_SPELLER_ADDWORD;
Text [ en-US ] = "~Add to Dictionary" ;
};
MenuItem
{
Identifier = MN_SPELLING ;
HelpId = HID_EDITENG_SPELLER_START;
Text [ en-US ] = "~Spellcheck..." ;
};
MenuItem { Separator = TRUE ; };
MenuItem
{
Identifier = MN_AUTOCORR ;
HelpId = HID_EDITENG_SPELLER_AUTOCORRECT;
SubMenu = Menu
{
};
Text [ en-US ] = "AutoCorrect ~To" ;
};
MenuItem
{
Identifier = MN_AUTO_CORRECT_DLG ;
Text [ en-US ] = "Auto~Correct Options..." ;
};
};
};
String RID_STR_WORD
{
Text [ en-US ] = "Word is %x";
...
...
editeng/source/editeng/editview.cxx
Dosyayı görüntüle @
5d6a605a
...
...
@@ -817,10 +817,17 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
ESelection
aOldSel
=
GetSelection
();
if
(
xSpeller
.
is
()
&&
pImpEditView
->
IsWrongSpelledWord
(
aPaM
,
true
)
)
{
ScopedVclPtrInstance
<
PopupMenu
>
aPopupMenu
(
EditResId
(
RID_MENU_SPELL
)
);
PopupMenu
*
pAutoMenu
=
aPopupMenu
->
GetPopupMenu
(
MN_AUTOCORR
);
PopupMenu
*
pInsertMenu
=
aPopupMenu
->
GetPopupMenu
(
MN_INSERT
);
// add word to user-dictionaries
VclBuilder
aBuilder
(
nullptr
,
VclBuilderContainer
::
getUIRootDir
(),
"editeng/ui/spellmenu.ui"
,
""
);
VclPtr
<
PopupMenu
>
aPopupMenu
(
aBuilder
.
get_menu
(
"menu"
));
const
sal_uInt16
nAutoCorrId
=
aPopupMenu
->
GetItemId
(
"autocorrect"
);
PopupMenu
*
pAutoMenu
=
aPopupMenu
->
GetPopupMenu
(
nAutoCorrId
);
const
sal_uInt16
nInsertId
=
aPopupMenu
->
GetItemId
(
"insert"
);
PopupMenu
*
pInsertMenu
=
aPopupMenu
->
GetPopupMenu
(
nInsertId
);
// add word to user-dictionaries
pInsertMenu
->
SetMenuFlags
(
MenuFlags
::
NoAutoMnemonics
);
//! necessary to retrieve the correct dictionary names later
const
sal_uInt16
nAddId
=
aPopupMenu
->
GetItemId
(
"add"
);
const
sal_uInt16
nIgnoreId
=
aPopupMenu
->
GetItemId
(
"ignore"
);
const
sal_uInt16
nCheckId
=
aPopupMenu
->
GetItemId
(
"check"
);
const
sal_uInt16
nAutoCorrectDlgId
=
aPopupMenu
->
GetItemId
(
"autocorrectdlg"
);
EditPaM
aPaM2
(
aPaM
);
aPaM2
.
SetIndex
(
aPaM2
.
GetIndex
()
+
1
);
...
...
@@ -910,7 +917,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
aPopupMenu
->
InsertSeparator
(
OString
(),
nWords
);
}
else
aPopupMenu
->
RemoveItem
(
MN_AUTOCORR
);
// delete?
aPopupMenu
->
RemoveItem
(
nAutoCorrId
);
// delete?
SvtLinguConfig
aCfg
;
...
...
@@ -963,10 +970,11 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
}
}
}
if
(
pInsertMenu
->
GetItemCount
()
!=
1
)
aPopupMenu
->
EnableItem
(
MN_INSERT_SINGLE
,
false
);
if
(
pInsertMenu
->
GetItemCount
()
<
2
)
aPopupMenu
->
EnableItem
(
MN_INSERT
,
false
);
if
(
pInsertMenu
->
GetItemCount
()
!=
1
)
aPopupMenu
->
EnableItem
(
nAddId
,
false
);
if
(
pInsertMenu
->
GetItemCount
()
<
2
)
aPopupMenu
->
EnableItem
(
nInsertId
,
false
);
aPopupMenu
->
RemoveDisabledEntries
(
true
,
true
);
...
...
@@ -976,7 +984,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
aTempRect
=
pImpEditView
->
GetWindow
()
->
LogicToPixel
(
Rectangle
(
aScreenPos
,
aTempRect
.
GetSize
()
));
sal_uInt16
nId
=
aPopupMenu
->
Execute
(
pImpEditView
->
GetWindow
(),
aTempRect
,
PopupMenuFlags
::
NoMouseUpClose
);
if
(
nId
==
MN_IGNORE
)
if
(
nId
==
nIgnoreId
)
{
OUString
aWord
=
pImpEditView
->
SpellIgnoreWord
();
if
(
pCallBack
)
...
...
@@ -1015,7 +1023,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
}
SetSelection
(
aOldSel
);
}
else
if
(
nId
==
MN_SPELLING
)
else
if
(
nId
==
nCheckId
)
{
if
(
!
pCallBack
)
{
...
...
@@ -1033,12 +1041,12 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
pCallBack
->
Call
(
aInf
);
}
}
else
if
(
nId
==
MN_AUTO_CORRECT_DLG
&&
pCallBack
)
else
if
(
nId
==
nAutoCorrectDlgId
&&
pCallBack
)
{
SpellCallbackInfo
aInf
(
SpellCallbackCommand
::
AUTOCORRECT_OPTIONS
,
OUString
()
);
pCallBack
->
Call
(
aInf
);
}
else
if
(
nId
>=
MN_DICTSTART
||
nId
==
MN_INSERT_SINGLE
)
else
if
(
nId
>=
MN_DICTSTART
||
nId
==
nAddId
)
{
OUString
aDicName
;
if
(
nId
>=
MN_DICTSTART
)
...
...
editeng/uiconfig/ui/spellmenu.ui
0 → 100644
Dosyayı görüntüle @
5d6a605a
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
<requires
lib=
"gtk+"
version=
"3.10"
/>
<object
class=
"GtkMenu"
id=
"menu"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<child>
<object
class=
"GtkMenuItem"
id=
"ignore"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
I_gnore All
</property>
</object>
</child>
<child>
<object
class=
"GtkMenuItem"
id=
"insert"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
_Add to Dictionary
</property>
<property
name=
"use_underline"
>
True
</property>
<child
type=
"submenu"
>
<object
class=
"GtkMenu"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkMenuItem"
id=
"add"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
_Add to Dictionary
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
<child>
<object
class=
"GtkMenuItem"
id=
"check"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
_Spellcheck...
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
<child>
<object
class=
"GtkSeparatorMenuItem"
id=
"menuitem1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
</child>
<child>
<object
class=
"GtkMenuItem"
id=
"autocorrect"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
AutoCorrect _To
</property>
<property
name=
"use_underline"
>
True
</property>
<child
type=
"submenu"
>
<object
class=
"GtkMenu"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkMenuItem"
id=
"autocorrectdlg"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Auto_Correct Options...
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
</child>
</object>
</interface>
include/editeng/editrids.hrc
Dosyayı görüntüle @
5d6a605a
...
...
@@ -358,7 +358,7 @@
#define RID_EDITUNDO_RESETATTRIBS (RID_EDIT_START + 308)
#define RID_EDITUNDO_INDENT (RID_EDIT_START + 309)
#define RID_EDITUNDO_TRANSLITERATE (RID_EDIT_START + 310)
#define RID_MENU_SPELL (RID_EDIT_START + 311)
//free
#define RID_STR_PARAGRAPH (RID_EDIT_START + 312)
#define RID_STR_WORD (RID_EDIT_START + 313)
#define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION (RID_EDIT_START + 314)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment