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
fa6ac05b
Kaydet (Commit)
fa6ac05b
authored
Eki 13, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#84938 - replace LIST_ACTION constants with enum
Change-Id: I21c05ada0a793b1e3ddf87481e66b60b83529767
üst
b80c468e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
56 deletions
+61
-56
treelist.hxx
include/svtools/treelist.hxx
+25
-22
treelistbox.hxx
include/svtools/treelistbox.hxx
+1
-1
treelist.cxx
svtools/source/contnr/treelist.cxx
+27
-27
treelistbox.cxx
svtools/source/contnr/treelistbox.cxx
+8
-6
No files found.
include/svtools/treelist.hxx
Dosyayı görüntüle @
fa6ac05b
...
@@ -32,17 +32,20 @@
...
@@ -32,17 +32,20 @@
#include <vector>
#include <vector>
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#define LISTACTION_INSERTED 1
enum
class
SvListAction
#define LISTACTION_REMOVING 2
{
#define LISTACTION_REMOVED 3
INSERTED
=
1
,
#define LISTACTION_MOVING 4
REMOVING
=
2
,
#define LISTACTION_MOVED 5
REMOVED
=
3
,
#define LISTACTION_CLEARING 6
MOVING
=
4
,
#define LISTACTION_INSERTED_TREE 7
MOVED
=
5
,
#define LISTACTION_INVALIDATE_ENTRY 8
CLEARING
=
6
,
#define LISTACTION_RESORTING 9
INSERTED_TREE
=
7
,
#define LISTACTION_RESORTED 10
INVALIDATE_ENTRY
=
8
,
#define LISTACTION_CLEARED 11
RESORTING
=
9
,
RESORTED
=
10
,
CLEARED
=
11
};
class
SvTreeListEntry
;
class
SvTreeListEntry
;
class
SvListView
;
class
SvListView
;
...
@@ -142,27 +145,27 @@ public:
...
@@ -142,27 +145,27 @@ public:
{
return
(
nPos
<
aViewList
.
size
()
)
?
aViewList
[
nPos
]
:
NULL
;
}
{
return
(
nPos
<
aViewList
.
size
()
)
?
aViewList
[
nPos
]
:
NULL
;
}
void
Broadcast
(
void
Broadcast
(
sal_uInt16
nActionId
,
SvListAction
nActionId
,
SvTreeListEntry
*
pEntry1
=
0
,
SvTreeListEntry
*
pEntry1
=
0
,
SvTreeListEntry
*
pEntry2
=
0
,
SvTreeListEntry
*
pEntry2
=
0
,
sal_uLong
nPos
=
0
sal_uLong
nPos
=
0
);
);
void
EnableInvalidate
(
bool
bEnable
);
void
EnableInvalidate
(
bool
bEnable
);
// Notify all Listeners
// Notify all Listeners
void
InvalidateEntry
(
SvTreeListEntry
*
);
void
InvalidateEntry
(
SvTreeListEntry
*
);
sal_uLong
GetEntryCount
()
const
{
return
nEntryCount
;
}
sal_uLong
GetEntryCount
()
const
{
return
nEntryCount
;
}
SvTreeListEntry
*
First
()
const
;
SvTreeListEntry
*
First
()
const
;
SvTreeListEntry
*
Next
(
SvTreeListEntry
*
pEntry
,
sal_uInt16
*
pDepth
=
0
)
const
;
SvTreeListEntry
*
Next
(
SvTreeListEntry
*
pEntry
,
sal_uInt16
*
pDepth
=
0
)
const
;
SvTreeListEntry
*
Prev
(
SvTreeListEntry
*
pEntry
,
sal_uInt16
*
pDepth
=
0
)
const
;
SvTreeListEntry
*
Prev
(
SvTreeListEntry
*
pEntry
,
sal_uInt16
*
pDepth
=
0
)
const
;
SvTreeListEntry
*
Last
()
const
;
SvTreeListEntry
*
Last
()
const
;
SvTreeListEntry
*
FirstChild
(
SvTreeListEntry
*
pParent
)
const
;
SvTreeListEntry
*
FirstChild
(
SvTreeListEntry
*
pParent
)
const
;
SvTreeListEntry
*
NextSibling
(
SvTreeListEntry
*
pEntry
)
const
;
SvTreeListEntry
*
NextSibling
(
SvTreeListEntry
*
pEntry
)
const
;
SvTreeListEntry
*
PrevSibling
(
SvTreeListEntry
*
pEntry
)
const
;
SvTreeListEntry
*
PrevSibling
(
SvTreeListEntry
*
pEntry
)
const
;
SvTreeListEntry
*
LastSibling
(
SvTreeListEntry
*
pEntry
)
const
;
SvTreeListEntry
*
LastSibling
(
SvTreeListEntry
*
pEntry
)
const
;
sal_uLong
Insert
(
SvTreeListEntry
*
pEntry
,
SvTreeListEntry
*
pPar
,
sal_uLong
nPos
=
TREELIST_APPEND
);
sal_uLong
Insert
(
SvTreeListEntry
*
pEntry
,
SvTreeListEntry
*
pPar
,
sal_uLong
nPos
=
TREELIST_APPEND
);
sal_uLong
Insert
(
SvTreeListEntry
*
pEntry
,
sal_uLong
nRootPos
=
TREELIST_APPEND
)
sal_uLong
Insert
(
SvTreeListEntry
*
pEntry
,
sal_uLong
nRootPos
=
TREELIST_APPEND
)
...
@@ -273,7 +276,7 @@ public:
...
@@ -273,7 +276,7 @@ public:
void
Clear
();
void
Clear
();
virtual
void
SetModel
(
SvTreeList
*
);
virtual
void
SetModel
(
SvTreeList
*
);
virtual
void
ModelNotification
(
virtual
void
ModelNotification
(
sal_uInt16
nActionId
,
SvListAction
nActionId
,
SvTreeListEntry
*
pEntry1
,
SvTreeListEntry
*
pEntry1
,
SvTreeListEntry
*
pEntry2
,
SvTreeListEntry
*
pEntry2
,
sal_uLong
nPos
sal_uLong
nPos
...
...
include/svtools/treelistbox.hxx
Dosyayı görüntüle @
fa6ac05b
...
@@ -752,7 +752,7 @@ public:
...
@@ -752,7 +752,7 @@ public:
void
RemoveParentKeepChildren
(
SvTreeListEntry
*
pParent
);
void
RemoveParentKeepChildren
(
SvTreeListEntry
*
pParent
);
DECL_LINK
(
DefaultCompare
,
SvSortData
*
);
DECL_LINK
(
DefaultCompare
,
SvSortData
*
);
virtual
void
ModelNotification
(
sal_uInt16
nActionId
,
SvTreeListEntry
*
pEntry1
,
virtual
void
ModelNotification
(
SvListAction
nActionId
,
SvTreeListEntry
*
pEntry1
,
SvTreeListEntry
*
pEntry2
,
sal_uLong
nPos
)
SAL_OVERRIDE
;
SvTreeListEntry
*
pEntry2
,
sal_uLong
nPos
)
SAL_OVERRIDE
;
void
EndSelection
();
void
EndSelection
();
...
...
svtools/source/contnr/treelist.cxx
Dosyayı görüntüle @
fa6ac05b
...
@@ -44,7 +44,7 @@ SvTreeList::~SvTreeList()
...
@@ -44,7 +44,7 @@ SvTreeList::~SvTreeList()
}
}
void
SvTreeList
::
Broadcast
(
void
SvTreeList
::
Broadcast
(
sal_uInt16
nActionId
,
SvListAction
nActionId
,
SvTreeListEntry
*
pEntry1
,
SvTreeListEntry
*
pEntry1
,
SvTreeListEntry
*
pEntry2
,
SvTreeListEntry
*
pEntry2
,
sal_uLong
nPos
sal_uLong
nPos
...
@@ -119,10 +119,10 @@ bool SvTreeList::IsAtRootDepth( const SvTreeListEntry* pEntry ) const
...
@@ -119,10 +119,10 @@ bool SvTreeList::IsAtRootDepth( const SvTreeListEntry* pEntry ) const
void
SvTreeList
::
Clear
()
void
SvTreeList
::
Clear
()
{
{
Broadcast
(
LISTACTION_
CLEARING
);
Broadcast
(
SvListAction
::
CLEARING
);
pRootItem
->
ClearChildren
();
pRootItem
->
ClearChildren
();
nEntryCount
=
0
;
nEntryCount
=
0
;
Broadcast
(
LISTACTION_
CLEARED
);
Broadcast
(
SvListAction
::
CLEARED
);
}
}
bool
SvTreeList
::
IsChild
(
const
SvTreeListEntry
*
pParent
,
const
SvTreeListEntry
*
pChild
)
const
bool
SvTreeList
::
IsChild
(
const
SvTreeListEntry
*
pParent
,
const
SvTreeListEntry
*
pChild
)
const
...
@@ -182,7 +182,7 @@ sal_uLong SvTreeList::Move(SvTreeListEntry* pSrcEntry,SvTreeListEntry* pTargetPa
...
@@ -182,7 +182,7 @@ sal_uLong SvTreeList::Move(SvTreeListEntry* pSrcEntry,SvTreeListEntry* pTargetPa
pTargetParent
=
pRootItem
;
pTargetParent
=
pRootItem
;
DBG_ASSERT
(
pSrcEntry
!=
pTargetParent
,
"Move:Source=Target"
);
DBG_ASSERT
(
pSrcEntry
!=
pTargetParent
,
"Move:Source=Target"
);
Broadcast
(
LISTACTION_
MOVING
,
pSrcEntry
,
pTargetParent
,
nListPos
);
Broadcast
(
SvListAction
::
MOVING
,
pSrcEntry
,
pTargetParent
,
nListPos
);
if
(
pSrcEntry
==
pTargetParent
)
if
(
pSrcEntry
==
pTargetParent
)
// You can't move an entry onto itself as the parent. Just return its
// You can't move an entry onto itself as the parent. Just return its
...
@@ -260,7 +260,7 @@ sal_uLong SvTreeList::Move(SvTreeListEntry* pSrcEntry,SvTreeListEntry* pTargetPa
...
@@ -260,7 +260,7 @@ sal_uLong SvTreeList::Move(SvTreeListEntry* pSrcEntry,SvTreeListEntry* pTargetPa
sal_uLong
nRetVal
=
findEntryPosition
(
rDst
,
pSrcEntry
);
sal_uLong
nRetVal
=
findEntryPosition
(
rDst
,
pSrcEntry
);
OSL_ENSURE
(
nRetVal
==
pSrcEntry
->
GetChildListPos
(),
"ListPos not valid"
);
OSL_ENSURE
(
nRetVal
==
pSrcEntry
->
GetChildListPos
(),
"ListPos not valid"
);
Broadcast
(
LISTACTION_
MOVED
,
pSrcEntry
,
pTargetParent
,
nRetVal
);
Broadcast
(
SvListAction
::
MOVED
,
pSrcEntry
,
pTargetParent
,
nRetVal
);
return
nRetVal
;
return
nRetVal
;
}
}
...
@@ -292,7 +292,7 @@ sal_uLong SvTreeList::Copy(SvTreeListEntry* pSrcEntry,SvTreeListEntry* pTargetPa
...
@@ -292,7 +292,7 @@ sal_uLong SvTreeList::Copy(SvTreeListEntry* pSrcEntry,SvTreeListEntry* pTargetPa
SetListPositions
(
rDst
);
// correct list position in target list
SetListPositions
(
rDst
);
// correct list position in target list
Broadcast
(
LISTACTION_
INSERTED_TREE
,
pClonedEntry
);
Broadcast
(
SvListAction
::
INSERTED_TREE
,
pClonedEntry
);
sal_uLong
nRetVal
=
findEntryPosition
(
rDst
,
pClonedEntry
);
sal_uLong
nRetVal
=
findEntryPosition
(
rDst
,
pClonedEntry
);
return
nRetVal
;
return
nRetVal
;
}
}
...
@@ -347,7 +347,7 @@ void SvTreeList::InsertTree(SvTreeListEntry* pSrcEntry,
...
@@ -347,7 +347,7 @@ void SvTreeList::InsertTree(SvTreeListEntry* pSrcEntry,
nEntryCount
+=
GetChildCount
(
pSrcEntry
);
nEntryCount
+=
GetChildCount
(
pSrcEntry
);
nEntryCount
++
;
// the parent is new, too
nEntryCount
++
;
// the parent is new, too
Broadcast
(
LISTACTION_
INSERTED_TREE
,
pSrcEntry
);
Broadcast
(
SvListAction
::
INSERTED_TREE
,
pSrcEntry
);
}
}
SvTreeListEntry
*
SvTreeList
::
CloneEntry
(
SvTreeListEntry
*
pSource
)
const
SvTreeListEntry
*
SvTreeList
::
CloneEntry
(
SvTreeListEntry
*
pSource
)
const
...
@@ -904,7 +904,7 @@ sal_uLong SvTreeList::Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,s
...
@@ -904,7 +904,7 @@ sal_uLong SvTreeList::Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,s
else
else
pEntry
->
nListPos
=
rList
.
size
()
-
1
;
pEntry
->
nListPos
=
rList
.
size
()
-
1
;
Broadcast
(
LISTACTION_
INSERTED
,
pEntry
);
Broadcast
(
SvListAction
::
INSERTED
,
pEntry
);
return
nPos
;
// pEntry->nListPos;
return
nPos
;
// pEntry->nListPos;
}
}
...
@@ -1011,7 +1011,7 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
...
@@ -1011,7 +1011,7 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
return
false
;
return
false
;
}
}
Broadcast
(
LISTACTION_
REMOVING
,
const_cast
<
SvTreeListEntry
*>
(
pEntry
));
Broadcast
(
SvListAction
::
REMOVING
,
const_cast
<
SvTreeListEntry
*>
(
pEntry
));
sal_uLong
nRemoved
=
1
+
GetChildCount
(
pEntry
);
sal_uLong
nRemoved
=
1
+
GetChildCount
(
pEntry
);
bAbsPositionsValid
=
false
;
bAbsPositionsValid
=
false
;
...
@@ -1043,7 +1043,7 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
...
@@ -1043,7 +1043,7 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
SetListPositions
(
rList
);
SetListPositions
(
rList
);
nEntryCount
-=
nRemoved
;
nEntryCount
-=
nRemoved
;
Broadcast
(
LISTACTION_
REMOVED
,
const_cast
<
SvTreeListEntry
*>
(
pEntry
));
Broadcast
(
SvListAction
::
REMOVED
,
const_cast
<
SvTreeListEntry
*>
(
pEntry
));
delete
pEntry
;
delete
pEntry
;
return
true
;
return
true
;
...
@@ -1109,7 +1109,7 @@ void SvTreeList::InvalidateEntry( SvTreeListEntry* pEntry )
...
@@ -1109,7 +1109,7 @@ void SvTreeList::InvalidateEntry( SvTreeListEntry* pEntry )
if
(
!
mbEnableInvalidate
)
if
(
!
mbEnableInvalidate
)
return
;
return
;
Broadcast
(
LISTACTION_
INVALIDATE_ENTRY
,
pEntry
);
Broadcast
(
SvListAction
::
INVALIDATE_ENTRY
,
pEntry
);
}
}
SvTreeListEntry
*
SvTreeList
::
GetRootLevelParent
(
SvTreeListEntry
*
pEntry
)
const
SvTreeListEntry
*
SvTreeList
::
GetRootLevelParent
(
SvTreeListEntry
*
pEntry
)
const
...
@@ -1225,7 +1225,7 @@ void SvListView::SetModel( SvTreeList* pNewModel )
...
@@ -1225,7 +1225,7 @@ void SvListView::SetModel( SvTreeList* pNewModel )
{
{
pModel
->
RemoveView
(
this
);
pModel
->
RemoveView
(
this
);
bBroadcastCleared
=
true
;
bBroadcastCleared
=
true
;
ModelNotification
(
LISTACTION_
CLEARING
,
0
,
0
,
0
);
ModelNotification
(
SvListAction
::
CLEARING
,
0
,
0
,
0
);
if
(
pModel
->
GetRefCount
()
==
0
)
if
(
pModel
->
GetRefCount
()
==
0
)
delete
pModel
;
delete
pModel
;
}
}
...
@@ -1233,7 +1233,7 @@ void SvListView::SetModel( SvTreeList* pNewModel )
...
@@ -1233,7 +1233,7 @@ void SvListView::SetModel( SvTreeList* pNewModel )
InitTable
();
InitTable
();
pNewModel
->
InsertView
(
this
);
pNewModel
->
InsertView
(
this
);
if
(
bBroadcastCleared
)
if
(
bBroadcastCleared
)
ModelNotification
(
LISTACTION_
CLEARED
,
0
,
0
,
0
);
ModelNotification
(
SvListAction
::
CLEARED
,
0
,
0
,
0
);
}
}
...
@@ -1394,49 +1394,49 @@ void SvListView::ActionClear()
...
@@ -1394,49 +1394,49 @@ void SvListView::ActionClear()
Clear
();
Clear
();
}
}
void
SvListView
::
ModelNotification
(
sal_uInt16
nActionId
,
SvTreeListEntry
*
pEntry1
,
void
SvListView
::
ModelNotification
(
SvListAction
nActionId
,
SvTreeListEntry
*
pEntry1
,
SvTreeListEntry
*
pEntry2
,
sal_uLong
nPos
)
SvTreeListEntry
*
pEntry2
,
sal_uLong
nPos
)
{
{
switch
(
nActionId
)
switch
(
nActionId
)
{
{
case
LISTACTION_
INSERTED
:
case
SvListAction
:
:
INSERTED
:
ActionInserted
(
pEntry1
);
ActionInserted
(
pEntry1
);
ModelHasInserted
(
pEntry1
);
ModelHasInserted
(
pEntry1
);
break
;
break
;
case
LISTACTION_
INSERTED_TREE
:
case
SvListAction
:
:
INSERTED_TREE
:
ActionInsertedTree
(
pEntry1
);
ActionInsertedTree
(
pEntry1
);
ModelHasInsertedTree
(
pEntry1
);
ModelHasInsertedTree
(
pEntry1
);
break
;
break
;
case
LISTACTION_
REMOVING
:
case
SvListAction
:
:
REMOVING
:
ModelIsRemoving
(
pEntry1
);
ModelIsRemoving
(
pEntry1
);
ActionRemoving
(
pEntry1
);
ActionRemoving
(
pEntry1
);
break
;
break
;
case
LISTACTION_
REMOVED
:
case
SvListAction
:
:
REMOVED
:
ActionRemoved
(
pEntry1
);
ActionRemoved
(
pEntry1
);
ModelHasRemoved
(
pEntry1
);
ModelHasRemoved
(
pEntry1
);
break
;
break
;
case
LISTACTION_
MOVING
:
case
SvListAction
:
:
MOVING
:
ModelIsMoving
(
pEntry1
,
pEntry2
,
nPos
);
ModelIsMoving
(
pEntry1
,
pEntry2
,
nPos
);
ActionMoving
(
pEntry1
,
pEntry2
,
nPos
);
ActionMoving
(
pEntry1
,
pEntry2
,
nPos
);
break
;
break
;
case
LISTACTION_
MOVED
:
case
SvListAction
:
:
MOVED
:
ActionMoved
(
pEntry1
,
pEntry2
,
nPos
);
ActionMoved
(
pEntry1
,
pEntry2
,
nPos
);
ModelHasMoved
(
pEntry1
);
ModelHasMoved
(
pEntry1
);
break
;
break
;
case
LISTACTION_
CLEARING
:
case
SvListAction
:
:
CLEARING
:
ActionClear
();
ActionClear
();
ModelHasCleared
();
// sic! for compatibility reasons!
ModelHasCleared
();
// sic! for compatibility reasons!
break
;
break
;
case
LISTACTION_
CLEARED
:
case
SvListAction
:
:
CLEARED
:
break
;
break
;
case
LISTACTION_
INVALIDATE_ENTRY
:
case
SvListAction
:
:
INVALIDATE_ENTRY
:
// no action for the base class
// no action for the base class
ModelHasEntryInvalidated
(
pEntry1
);
ModelHasEntryInvalidated
(
pEntry1
);
break
;
break
;
case
LISTACTION_
RESORTED
:
case
SvListAction
:
:
RESORTED
:
bVisPositionsValid
=
false
;
bVisPositionsValid
=
false
;
break
;
break
;
case
LISTACTION_
RESORTING
:
case
SvListAction
:
:
RESORTING
:
break
;
break
;
default
:
default
:
OSL_FAIL
(
"unknown ActionId"
);
OSL_FAIL
(
"unknown ActionId"
);
...
@@ -1503,10 +1503,10 @@ sal_Int32 SvTreeList::Compare(const SvTreeListEntry* pLeft, const SvTreeListEntr
...
@@ -1503,10 +1503,10 @@ sal_Int32 SvTreeList::Compare(const SvTreeListEntry* pLeft, const SvTreeListEntr
void
SvTreeList
::
Resort
()
void
SvTreeList
::
Resort
()
{
{
Broadcast
(
LISTACTION_
RESORTING
);
Broadcast
(
SvListAction
::
RESORTING
);
bAbsPositionsValid
=
false
;
bAbsPositionsValid
=
false
;
ResortChildren
(
pRootItem
);
ResortChildren
(
pRootItem
);
Broadcast
(
LISTACTION_
RESORTED
);
Broadcast
(
SvListAction
::
RESORTED
);
}
}
namespace
{
namespace
{
...
...
svtools/source/contnr/treelistbox.cxx
Dosyayı görüntüle @
fa6ac05b
...
@@ -3644,18 +3644,18 @@ IMPL_LINK( SvTreeListBox, DefaultCompare, SvSortData*, pData )
...
@@ -3644,18 +3644,18 @@ IMPL_LINK( SvTreeListBox, DefaultCompare, SvSortData*, pData )
return
pImp
->
m_pStringSorter
->
compare
(
aLeft
,
aRight
);
return
pImp
->
m_pStringSorter
->
compare
(
aLeft
,
aRight
);
}
}
void
SvTreeListBox
::
ModelNotification
(
sal_uInt16
nActionId
,
SvTreeListEntry
*
pEntry1
,
void
SvTreeListBox
::
ModelNotification
(
SvListAction
nActionId
,
SvTreeListEntry
*
pEntry1
,
SvTreeListEntry
*
pEntry2
,
sal_uLong
nPos
)
SvTreeListEntry
*
pEntry2
,
sal_uLong
nPos
)
{
{
SolarMutexGuard
aSolarGuard
;
SolarMutexGuard
aSolarGuard
;
if
(
nActionId
==
LISTACTION_
CLEARING
)
if
(
nActionId
==
SvListAction
::
CLEARING
)
CancelTextEditing
();
CancelTextEditing
();
SvListView
::
ModelNotification
(
nActionId
,
pEntry1
,
pEntry2
,
nPos
);
SvListView
::
ModelNotification
(
nActionId
,
pEntry1
,
pEntry2
,
nPos
);
switch
(
nActionId
)
switch
(
nActionId
)
{
{
case
LISTACTION_
INSERTED
:
case
SvListAction
:
:
INSERTED
:
{
{
SvTreeListEntry
*
pEntry
(
dynamic_cast
<
SvTreeListEntry
*
>
(
pEntry1
)
);
SvTreeListEntry
*
pEntry
(
dynamic_cast
<
SvTreeListEntry
*
>
(
pEntry1
)
);
if
(
!
pEntry
)
if
(
!
pEntry
)
...
@@ -3681,20 +3681,22 @@ void SvTreeListBox::ModelNotification( sal_uInt16 nActionId, SvTreeListEntry* pE
...
@@ -3681,20 +3681,22 @@ void SvTreeListBox::ModelNotification( sal_uInt16 nActionId, SvTreeListEntry* pE
}
}
break
;
break
;
case
LISTACTION_
RESORTING
:
case
SvListAction
:
:
RESORTING
:
SetUpdateMode
(
false
);
SetUpdateMode
(
false
);
break
;
break
;
case
LISTACTION_
RESORTED
:
case
SvListAction
:
:
RESORTED
:
// after a selection: show first entry and also keep the selection
// after a selection: show first entry and also keep the selection
MakeVisible
(
(
SvTreeListEntry
*
)
pModel
->
First
(),
true
);
MakeVisible
(
(
SvTreeListEntry
*
)
pModel
->
First
(),
true
);
SetUpdateMode
(
true
);
SetUpdateMode
(
true
);
break
;
break
;
case
LISTACTION_
CLEARED
:
case
SvListAction
:
:
CLEARED
:
if
(
IsUpdateMode
()
)
if
(
IsUpdateMode
()
)
Update
();
Update
();
break
;
break
;
default
:
break
;
}
}
}
}
...
...
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