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
c867a303
Kaydet (Commit)
c867a303
authored
May 17, 2012
tarafından
Rob Snelders
Kaydeden (comit)
Caolán McNamara
May 18, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fd0#40778 - Remove dictionary choice when adding new entry
Change-Id: Ieaaf2466474463d19f91c74ea7f164962ba19936
üst
2f5a85a6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
7 deletions
+22
-7
olmenu.hxx
sw/source/ui/inc/olmenu.hxx
+1
-0
olmenu.cxx
sw/source/ui/lingu/olmenu.cxx
+14
-7
olmenu.hrc
sw/source/ui/lingu/olmenu.hrc
+1
-0
olmenu.src
sw/source/ui/lingu/olmenu.src
+6
-0
No files found.
sw/source/ui/inc/olmenu.hxx
Dosyayı görüntüle @
c867a303
...
...
@@ -62,6 +62,7 @@ class SwSpellPopup : public PopupMenu
std
::
map
<
sal_Int16
,
::
rtl
::
OUString
>
aLangTable_Paragraph
;
// std::map< sal_Int16, ::rtl::OUString > aLangTable_Document;
String
aDicNameSingle
;
bool
bGrammarResults
;
// show grammar results? Or show spellcheck results?
Image
aInfo16
;
...
...
sw/source/ui/lingu/olmenu.cxx
Dosyayı görüntüle @
c867a303
...
...
@@ -460,8 +460,8 @@ SwSpellPopup::SwSpellPopup(
pMenu
=
GetPopupMenu
(
MN_ADD_TO_DIC
);
pMenu
->
SetMenuFlags
(
MENU_FLAG_NOAUTOMNEMONICS
);
//! necessary to retrieve the correct dictionary name in 'Execute' below
bEnable
=
sal_False
;
// enable MN_ADD_TO_DIC?
uno
::
Reference
<
linguistic2
::
XDictionaryList
>
xDicList
(
SvxGetDictionaryList
()
);
sal_uInt16
nItemId
=
MN_DICTIONARIES_START
;
if
(
xDicList
.
is
())
{
// add the default positive dictionary to dic-list (if not already done).
...
...
@@ -475,7 +475,6 @@ SwSpellPopup::SwSpellPopup(
const
uno
::
Reference
<
linguistic2
::
XDictionary
>
*
pDic
=
aDics
.
getConstArray
();
sal_uInt16
nDicCount
=
static_cast
<
sal_uInt16
>
(
aDics
.
getLength
());
sal_uInt16
nItemId
=
MN_DICTIONARIES_START
;
for
(
sal_uInt16
i
=
0
;
i
<
nDicCount
;
i
++
)
{
uno
::
Reference
<
linguistic2
::
XDictionary
>
xDicTmp
(
pDic
[
i
],
uno
::
UNO_QUERY
);
...
...
@@ -492,7 +491,7 @@ SwSpellPopup::SwSpellPopup(
// the extra 1 is because of the (possible) external
// linguistic entry above
pMenu
->
InsertItem
(
nItemId
,
xDicTmp
->
getName
()
);
bEnable
=
sal_True
;
aDicNameSingle
=
xDicTmp
->
getName
()
;
uno
::
Reference
<
lang
::
XServiceInfo
>
xSvcInfo
(
xDicTmp
,
uno
::
UNO_QUERY
);
if
(
xSvcInfo
.
is
())
...
...
@@ -510,7 +509,8 @@ SwSpellPopup::SwSpellPopup(
}
}
}
EnableItem
(
MN_ADD_TO_DIC
,
bEnable
);
EnableItem
(
MN_ADD_TO_DIC
,
((
nItemId
-
MN_DICTIONARIES_START
)
>
1
)
?
sal_True
:
sal_False
);
EnableItem
(
MN_ADD_TO_DIC_SINGLE
,
((
nItemId
-
MN_DICTIONARIES_START
)
==
1
)
?
sal_True
:
sal_False
);
//ADD NEW LANGUAGE MENU ITEM
///////////////////////////////////////////////////////////////////////////
...
...
@@ -656,6 +656,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
EnableItem
(
MN_IGNORE_WORD
,
false
);
EnableItem
(
MN_ADD_TO_DIC
,
false
);
EnableItem
(
MN_ADD_TO_DIC_SINGLE
,
false
);
//ADD NEW LANGUAGE MENU ITEM
///////////////////////////////////////////////////////////////////////////
...
...
@@ -807,12 +808,18 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
linguistic
::
AddEntryToDic
(
xDictionary
,
xSpellAlt
->
getWord
(),
sal_False
,
aEmptyStr
,
LANGUAGE_NONE
);
}
else
if
(
MN_DICTIONARIES_START
<=
nId
&&
nId
<=
MN_DICTIONARIES_END
)
else
if
(
(
MN_DICTIONARIES_START
<=
nId
&&
nId
<=
MN_DICTIONARIES_END
)
||
nId
==
MN_ADD_TO_DIC_SINGLE
)
{
OUString
aWord
(
xSpellAlt
->
getWord
()
);
String
aDicName
;
PopupMenu
*
pMenu
=
GetPopupMenu
(
MN_ADD_TO_DIC
);
String
aDicName
(
pMenu
->
GetItemText
(
nId
)
);
if
(
MN_DICTIONARIES_START
<=
nId
&&
nId
<=
MN_DICTIONARIES_END
)
{
PopupMenu
*
pMenu
=
GetPopupMenu
(
MN_ADD_TO_DIC
);
aDicName
=
pMenu
->
GetItemText
(
nId
);
}
else
aDicName
=
aDicNameSingle
;
uno
::
Reference
<
linguistic2
::
XDictionary
>
xDic
;
uno
::
Reference
<
linguistic2
::
XDictionaryList
>
xDicList
(
SvxGetDictionaryList
()
);
...
...
sw/source/ui/lingu/olmenu.hrc
Dosyayı görüntüle @
c867a303
...
...
@@ -54,6 +54,7 @@
#define MN_SET_LANGUAGE_ALL_TEXT 207
#define MN_SHORT_COMMENT 208
#define MN_EXPLANATION_LINK 209
#define MN_ADD_TO_DIC_SINGLE 210
// id range for dictionaries sub menu
#define MN_DICTIONARIES_START 300
...
...
sw/source/ui/lingu/olmenu.src
Dosyayı görüntüle @
c867a303
...
...
@@ -52,6 +52,12 @@ Menu MN_SPELL_POPUP
Text [ en-US ] = "~Add" ;
};
MenuItem
{
Identifier = MN_ADD_TO_DIC_SINGLE ;
HelpID = HID_LINGU_ADD_WORD ;
Text [ en-US ] = "~Add" ;
};
MenuItem
{
Identifier = MN_AUTOCORR ;
HelpID = HID_LINGU_AUTOCORR ;
...
...
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