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
a86bc66f
Kaydet (Commit)
a86bc66f
authored
Eyl 17, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert Link<> to typed
Change-Id: I3512f54657eb055fa306739d27d18012b46134ac
üst
9de789e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
23 deletions
+34
-23
autocdlg.hxx
cui/source/inc/autocdlg.hxx
+8
-6
autocdlg.cxx
cui/source/tabpages/autocdlg.cxx
+26
-17
No files found.
cui/source/inc/autocdlg.hxx
Dosyayı görüntüle @
a86bc66f
...
...
@@ -183,7 +183,7 @@ public:
class
AutoCorrEdit
:
public
Edit
{
Link
<>
aActionLink
;
Link
<
AutoCorrEdit
&
,
bool
>
aActionLink
;
bool
bSpaces
;
public
:
...
...
@@ -192,7 +192,7 @@ class AutoCorrEdit : public Edit
AutoCorrEdit
(
vcl
::
Window
*
pParent
)
:
Edit
(
pParent
),
bSpaces
(
false
){}
void
SetActionHdl
(
const
Link
<>&
rLink
)
void
SetActionHdl
(
const
Link
<
AutoCorrEdit
&
,
bool
>&
rLink
)
{
aActionLink
=
rLink
;}
void
SetSpaces
(
bool
bSet
)
...
...
@@ -253,9 +253,10 @@ private:
bool
bSWriter
:
1
;
DECL_LINK_TYPED
(
SelectHdl
,
SvTreeListBox
*
,
void
);
DECL_LINK_TYPED
(
NewDelHdl
,
Button
*
,
void
);
DECL_LINK
(
NewDelActionHdl
,
PushButton
*
);
DECL_LINK_TYPED
(
NewDel
Button
Hdl
,
Button
*
,
void
);
DECL_LINK
_TYPED
(
NewDelActionHdl
,
AutoCorrEdit
&
,
bool
);
DECL_LINK
(
ModifyHdl
,
Edit
*
);
bool
NewDelHdl
(
void
*
);
void
RefillReplaceBox
(
bool
bFromReset
,
LanguageType
eOldLanguage
,
...
...
@@ -314,10 +315,11 @@ private:
CollatorWrapper
*
pCompareClass
;
LanguageType
eLang
;
DECL_LINK_TYPED
(
NewDelHdl
,
Button
*
,
void
);
DECL_LINK
(
NewDelActionHdl
,
void
*
);
DECL_LINK_TYPED
(
NewDel
Button
Hdl
,
Button
*
,
void
);
DECL_LINK
_TYPED
(
NewDelActionHdl
,
AutoCorrEdit
&
,
bool
);
DECL_LINK
(
SelectHdl
,
ListBox
*
);
DECL_LINK
(
ModifyHdl
,
Edit
*
);
bool
NewDelHdl
(
void
*
);
/// Box filled with new language
void
RefillReplaceBoxes
(
bool
bFromReset
,
LanguageType
eOldLanguage
,
...
...
cui/source/tabpages/autocdlg.cxx
Dosyayı görüntüle @
a86bc66f
...
...
@@ -898,8 +898,8 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( vcl::Window* pParent,
m_pReplaceTLB
->
SetStyle
(
m_pReplaceTLB
->
GetStyle
()
|
WB_HSCROLL
|
WB_CLIPCHILDREN
);
m_pReplaceTLB
->
SetSelectHdl
(
LINK
(
this
,
OfaAutocorrReplacePage
,
SelectHdl
)
);
m_pNewReplacePB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrReplacePage
,
NewDelHdl
)
);
m_pDeleteReplacePB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrReplacePage
,
NewDelHdl
)
);
m_pNewReplacePB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrReplacePage
,
NewDel
Button
Hdl
)
);
m_pDeleteReplacePB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrReplacePage
,
NewDel
Button
Hdl
)
);
m_pShortED
->
SetModifyHdl
(
LINK
(
this
,
OfaAutocorrReplacePage
,
ModifyHdl
)
);
m_pReplaceED
->
SetModifyHdl
(
LINK
(
this
,
OfaAutocorrReplacePage
,
ModifyHdl
)
);
m_pShortED
->
SetActionHdl
(
LINK
(
this
,
OfaAutocorrReplacePage
,
NewDelActionHdl
)
);
...
...
@@ -1238,12 +1238,16 @@ void OfaAutocorrReplacePage::DeleteEntry(const OUString& sShort, const OUString&
rDeletedArray
.
push_back
(
aDeletedString
);
}
IMPL_LINK_TYPED
(
OfaAutocorrReplacePage
,
NewDelHdl
,
Button
*
,
pBtn
,
void
)
IMPL_LINK_TYPED
(
OfaAutocorrReplacePage
,
NewDel
Button
Hdl
,
Button
*
,
pBtn
,
void
)
{
NewDel
ActionHdl
(
static_cast
<
PushButton
*>
(
pBtn
)
);
NewDel
Hdl
(
pBtn
);
}
IMPL_LINK
(
OfaAutocorrReplacePage
,
NewDelActionHdl
,
PushButton
*
,
pBtn
)
IMPL_LINK_TYPED
(
OfaAutocorrReplacePage
,
NewDelActionHdl
,
AutoCorrEdit
&
,
rEdit
,
bool
)
{
return
NewDelHdl
(
&
rEdit
);
}
bool
OfaAutocorrReplacePage
::
NewDelHdl
(
void
*
pBtn
)
{
SvTreeListEntry
*
pEntry
=
m_pReplaceTLB
->
FirstSelected
();
if
(
pBtn
==
m_pDeleteReplacePB
)
...
...
@@ -1254,7 +1258,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelActionHdl, PushButton*, pBtn)
DeleteEntry
(
SvTabListBox
::
GetEntryText
(
pEntry
,
0
),
SvTabListBox
::
GetEntryText
(
pEntry
,
1
));
m_pReplaceTLB
->
GetModel
()
->
Remove
(
pEntry
);
ModifyHdl
(
m_pShortED
);
return
0
;
return
false
;
}
}
if
(
pBtn
==
m_pNewReplacePB
||
m_pNewReplacePB
->
IsEnabled
())
...
...
@@ -1308,10 +1312,10 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelActionHdl, PushButton*, pBtn)
{
// this can only be an enter in one of the two edit fields
// which means EndDialog() - has to be evaluated in KeyInput
return
0
;
return
false
;
}
ModifyHdl
(
m_pShortED
);
return
1
;
return
true
;
}
IMPL_LINK
(
OfaAutocorrReplacePage
,
ModifyHdl
,
Edit
*
,
pEdt
)
...
...
@@ -1439,10 +1443,10 @@ OfaAutocorrExceptPage::OfaAutocorrExceptPage(vcl::Window* pParent, const SfxItem
pCompareClass
=
new
CollatorWrapper
(
comphelper
::
getProcessComponentContext
()
);
pCompareClass
->
loadDefaultCollator
(
aLcl
,
0
);
m_pNewAbbrevPB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
NewDelHdl
));
m_pDelAbbrevPB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
NewDelHdl
));
m_pNewDoublePB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
NewDelHdl
));
m_pDelDoublePB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
NewDelHdl
));
m_pNewAbbrevPB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
NewDel
Button
Hdl
));
m_pDelAbbrevPB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
NewDel
Button
Hdl
));
m_pNewDoublePB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
NewDel
Button
Hdl
));
m_pDelDoublePB
->
SetClickHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
NewDel
Button
Hdl
));
m_pAbbrevLB
->
SetSelectHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
SelectHdl
));
m_pDoubleCapsLB
->
SetSelectHdl
(
LINK
(
this
,
OfaAutocorrExceptPage
,
SelectHdl
));
...
...
@@ -1687,12 +1691,17 @@ void OfaAutocorrExceptPage::Reset( const SfxItemSet* )
m_pAutoCapsCB
->
SaveValue
();
}
IMPL_LINK_TYPED
(
OfaAutocorrExceptPage
,
NewDelHdl
,
Button
*
,
pBtn
,
void
)
IMPL_LINK_TYPED
(
OfaAutocorrExceptPage
,
NewDel
Button
Hdl
,
Button
*
,
pBtn
,
void
)
{
NewDel
Action
Hdl
(
pBtn
);
NewDelHdl
(
pBtn
);
}
IMPL_LINK
(
OfaAutocorrExceptPage
,
NewDelActionHdl
,
void
*
,
pBtn
)
IMPL_LINK_TYPED
(
OfaAutocorrExceptPage
,
NewDelActionHdl
,
AutoCorrEdit
&
,
rEdit
,
bool
)
{
return
NewDelHdl
(
&
rEdit
);
}
bool
OfaAutocorrExceptPage
::
NewDelHdl
(
void
*
pBtn
)
{
if
((
pBtn
==
m_pNewAbbrevPB
||
pBtn
==
m_pAbbrevED
.
get
()
)
&&
!
m_pAbbrevED
->
GetText
().
isEmpty
())
...
...
@@ -1716,7 +1725,7 @@ IMPL_LINK(OfaAutocorrExceptPage, NewDelActionHdl, void*, pBtn)
m_pDoubleCapsLB
->
RemoveEntry
(
m_pDoubleCapsED
->
GetText
());
ModifyHdl
(
m_pDoubleCapsED
);
}
return
0
;
return
false
;
}
IMPL_LINK
(
OfaAutocorrExceptPage
,
SelectHdl
,
ListBox
*
,
pBox
)
...
...
@@ -1770,7 +1779,7 @@ void AutoCorrEdit::KeyInput( const KeyEvent& rKEvt )
{
// if there's nothing done on enter, call the
// base class after all to close the dialog
if
(
!
nModifier
&&
!
aActionLink
.
Call
(
this
))
if
(
!
nModifier
&&
!
aActionLink
.
Call
(
*
this
))
Edit
::
KeyInput
(
rKEvt
);
}
else
if
(
bSpaces
||
aKeyCode
.
GetCode
()
!=
KEY_SPACE
)
...
...
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