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
4421bb8e
Kaydet (Commit)
4421bb8e
authored
Eki 15, 2015
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#94495 - protect lstbox usage post-dispose, and fix ItemWin focus.
Change-Id: I2e4d1c79f57ec048d66111ed393491b7803ee3b9
üst
6cd11e4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
10 deletions
+34
-10
itemwin.cxx
svx/source/tbxctrls/itemwin.cxx
+15
-9
lstbox.cxx
vcl/source/control/lstbox.cxx
+19
-1
No files found.
svx/source/tbxctrls/itemwin.cxx
Dosyayı görüntüle @
4421bb8e
...
...
@@ -419,16 +419,19 @@ bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt )
{
MouseNotifyEvent
nType
=
rNEvt
.
GetType
();
if
(
MouseNotifyEvent
::
MOUSEBUTTONDOWN
==
nType
||
MouseNotifyEvent
::
GETFOCUS
==
nType
)
nCurPos
=
GetSelectEntryPos
();
else
if
(
MouseNotifyEvent
::
LOSEFOCUS
==
nType
&&
Application
::
GetFocusWindow
()
&&
!
IsWindowOrChild
(
Application
::
GetFocusWindow
(),
true
)
)
if
(
!
isDisposed
())
{
if
(
!
bSelect
)
SelectEntryPos
(
nCurPos
);
else
bSelect
=
false
;
if
(
MouseNotifyEvent
::
MOUSEBUTTONDOWN
==
nType
||
MouseNotifyEvent
::
GETFOCUS
==
nType
)
nCurPos
=
GetSelectEntryPos
();
else
if
(
MouseNotifyEvent
::
LOSEFOCUS
==
nType
&&
Application
::
GetFocusWindow
()
&&
!
IsWindowOrChild
(
Application
::
GetFocusWindow
(),
true
)
)
{
if
(
!
bSelect
)
SelectEntryPos
(
nCurPos
);
else
bSelect
=
false
;
}
}
return
FillTypeLB
::
PreNotify
(
rNEvt
);
...
...
@@ -440,6 +443,9 @@ bool SvxFillTypeBox::Notify( NotifyEvent& rNEvt )
{
bool
bHandled
=
FillTypeLB
::
Notify
(
rNEvt
);
if
(
isDisposed
())
return
false
;
if
(
rNEvt
.
GetType
()
==
MouseNotifyEvent
::
KEYINPUT
)
{
const
KeyEvent
*
pKEvt
=
rNEvt
.
GetKeyEvent
();
...
...
vcl/source/control/lstbox.cxx
Dosyayı görüntüle @
4421bb8e
...
...
@@ -971,6 +971,8 @@ void ListBox::DoubleClick()
void
ListBox
::
Clear
()
{
if
(
!
mpImplLB
)
return
;
mpImplLB
->
Clear
();
if
(
IsDropDownBox
()
)
{
...
...
@@ -1026,13 +1028,15 @@ void ListBox::RemoveEntry( sal_Int32 nPos )
Image
ListBox
::
GetEntryImage
(
sal_Int32
nPos
)
const
{
if
(
mpImplLB
->
GetEntryList
()
->
HasEntryImage
(
nPos
)
)
if
(
mpImplLB
&&
mpImplLB
->
GetEntryList
()
->
HasEntryImage
(
nPos
)
)
return
mpImplLB
->
GetEntryList
()
->
GetEntryImage
(
nPos
);
return
Image
();
}
sal_Int32
ListBox
::
GetEntryPos
(
const
OUString
&
rStr
)
const
{
if
(
!
mpImplLB
)
return
LISTBOX_ENTRY_NOTFOUND
;
sal_Int32
nPos
=
mpImplLB
->
GetEntryList
()
->
FindEntry
(
rStr
);
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
nPos
=
nPos
-
mpImplLB
->
GetEntryList
()
->
GetMRUCount
();
...
...
@@ -1041,6 +1045,8 @@ sal_Int32 ListBox::GetEntryPos( const OUString& rStr ) const
sal_Int32
ListBox
::
GetEntryPos
(
const
void
*
pData
)
const
{
if
(
!
mpImplLB
)
return
LISTBOX_ENTRY_NOTFOUND
;
sal_Int32
nPos
=
mpImplLB
->
GetEntryList
()
->
FindEntry
(
pData
);
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
nPos
=
nPos
-
mpImplLB
->
GetEntryList
()
->
GetMRUCount
();
...
...
@@ -1049,11 +1055,15 @@ sal_Int32 ListBox::GetEntryPos( const void* pData ) const
OUString
ListBox
::
GetEntry
(
sal_Int32
nPos
)
const
{
if
(
!
mpImplLB
)
return
OUString
();
return
mpImplLB
->
GetEntryList
()
->
GetEntryText
(
nPos
+
mpImplLB
->
GetEntryList
()
->
GetMRUCount
()
);
}
sal_Int32
ListBox
::
GetEntryCount
()
const
{
if
(
!
mpImplLB
)
return
0
;
return
mpImplLB
->
GetEntryList
()
->
GetEntryCount
()
-
mpImplLB
->
GetEntryList
()
->
GetMRUCount
();
}
...
...
@@ -1064,11 +1074,16 @@ OUString ListBox::GetSelectEntry(sal_Int32 nIndex) const
sal_Int32
ListBox
::
GetSelectEntryCount
()
const
{
if
(
!
mpImplLB
)
return
0
;
return
mpImplLB
->
GetEntryList
()
->
GetSelectEntryCount
();
}
sal_Int32
ListBox
::
GetSelectEntryPos
(
sal_Int32
nIndex
)
const
{
if
(
!
mpImplLB
||
!
mpImplLB
->
GetEntryList
())
return
LISTBOX_ENTRY_NOTFOUND
;
sal_Int32
nPos
=
mpImplLB
->
GetEntryList
()
->
GetSelectEntryPos
(
nIndex
);
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
{
...
...
@@ -1096,6 +1111,9 @@ void ListBox::SelectEntry( const OUString& rStr, bool bSelect )
void
ListBox
::
SelectEntryPos
(
sal_Int32
nPos
,
bool
bSelect
)
{
if
(
!
mpImplLB
)
return
;
if
(
0
<=
nPos
&&
nPos
<
mpImplLB
->
GetEntryList
()
->
GetEntryCount
()
)
{
sal_Int32
oldSelectCount
=
GetSelectEntryCount
(),
newSelectCount
=
0
,
nCurrentPos
=
mpImplLB
->
GetCurrentPos
();
...
...
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