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
d7ab0bc3
Kaydet (Commit)
d7ab0bc3
authored
Mar 14, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make typed iteration private in SwClientIter now
Change-Id: If3887cd7a126834a8c3bfd156dc25335229d929b
üst
1fb1016e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
38 deletions
+42
-38
calbck.hxx
sw/inc/calbck.hxx
+42
-38
No files found.
sw/inc/calbck.hxx
Dosyayı görüntüle @
d7ab0bc3
...
...
@@ -64,6 +64,8 @@ class SfxHint;
class
SwModify
;
class
SwClient
;
class
SwClientIter
;
template
<
typename
E
,
typename
S
>
class
SwIterator
;
namespace
sw
{
struct
LegacyModifyHint
SAL_FINAL
:
SfxHint
...
...
@@ -241,8 +243,10 @@ protected:
class
SwClientIter
SAL_FINAL
:
public
sw
::
Ring
<
SwClientIter
>
{
friend
SwClient
*
SwModify
::
Remove
(
SwClient
*
);
///< for pointer adjustments
friend
void
SwModify
::
Add
(
SwClient
*
pDepend
);
///< for pointer adjustments
friend
SwClient
*
SwModify
::
Remove
(
SwClient
*
);
///< for pointer adjustments
friend
void
SwModify
::
Add
(
SwClient
*
);
///< for pointer adjustments
template
<
typename
E
,
typename
S
>
friend
class
SwIterator
;
///< for typed interation
friend
void
SwModify
::
ModifyBroadcast
(
const
SfxPoolItem
*
,
const
SfxPoolItem
*
,
TypeId
);
///< for typed iteration
const
SwModify
&
m_rRoot
;
...
...
@@ -259,6 +263,42 @@ class SwClientIter SAL_FINAL : public sw::Ring<SwClientIter>
static
SW_DLLPUBLIC
SwClientIter
*
our_pClientIters
;
SwClient
*
First
(
TypeId
nType
)
{
m_aSearchType
=
nType
;
GoStart
();
if
(
!
m_pPosition
)
return
nullptr
;
m_pCurrent
=
nullptr
;
return
Next
();
}
SwClient
*
Last
(
TypeId
nType
)
{
m_aSearchType
=
nType
;
GoEnd
();
if
(
!
m_pPosition
)
return
nullptr
;
if
(
m_pPosition
->
IsA
(
m_aSearchType
)
)
return
m_pPosition
;
return
Previous
();
}
SwClient
*
Next
()
{
if
(
m_pPosition
==
m_pCurrent
)
m_pPosition
=
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pRight
);
while
(
m_pPosition
&&
!
m_pPosition
->
IsA
(
m_aSearchType
)
)
m_pPosition
=
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pRight
);
return
m_pCurrent
=
m_pPosition
;
}
SwClient
*
Previous
()
{
m_pPosition
=
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pLeft
);
while
(
m_pPosition
&&
!
m_pPosition
->
IsA
(
m_aSearchType
)
)
m_pPosition
=
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pLeft
);
return
m_pCurrent
=
m_pPosition
;
}
public
:
SwClientIter
(
const
SwModify
&
rModify
)
:
m_rRoot
(
rModify
)
...
...
@@ -314,42 +354,6 @@ public:
// adding objects to a client chain in iteration is forbidden
// SwModify::Add() asserts this
bool
IsChanged
()
const
{
return
m_pPosition
!=
m_pCurrent
;
}
SwClient
*
First
(
TypeId
nType
)
{
m_aSearchType
=
nType
;
GoStart
();
if
(
!
m_pPosition
)
return
nullptr
;
m_pCurrent
=
nullptr
;
return
Next
();
}
SwClient
*
Last
(
TypeId
nType
)
{
m_aSearchType
=
nType
;
GoEnd
();
if
(
!
m_pPosition
)
return
nullptr
;
if
(
m_pPosition
->
IsA
(
m_aSearchType
)
)
return
m_pPosition
;
return
Previous
();
}
SwClient
*
Next
()
{
if
(
m_pPosition
==
m_pCurrent
)
m_pPosition
=
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pRight
);
while
(
m_pPosition
&&
!
m_pPosition
->
IsA
(
m_aSearchType
)
)
m_pPosition
=
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pRight
);
return
m_pCurrent
=
m_pPosition
;
}
SwClient
*
Previous
()
{
m_pPosition
=
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pLeft
);
while
(
m_pPosition
&&
!
m_pPosition
->
IsA
(
m_aSearchType
)
)
m_pPosition
=
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pLeft
);
return
m_pCurrent
=
m_pPosition
;
}
};
SwClient
::
SwClient
(
SwModify
*
pToRegisterIn
)
...
...
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