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
16fdd721
Kaydet (Commit)
16fdd721
authored
Mar 18, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
introduce Sync() helper
Change-Id: I9fbbb8fa1d0fee1b761143923c843658f3fd4053
üst
b72b1011
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
calbck.hxx
sw/inc/calbck.hxx
+9
-8
No files found.
sw/inc/calbck.hxx
Dosyayı görüntüle @
16fdd721
...
...
@@ -286,6 +286,8 @@ namespace sw
// adding objects to a client chain in iteration is forbidden
// SwModify::Add() asserts this
bool
IsChanged
()
const
{
return
m_pPosition
!=
m_pCurrent
;
}
// ensures the iterator to point at a current client
SwClient
*
Sync
()
{
return
m_pCurrent
=
m_pPosition
;
}
};
}
...
...
@@ -294,7 +296,6 @@ template< typename TElementType, typename TSource > class SwIterator SAL_FINAL :
static_assert
(
std
::
is_base_of
<
SwClient
,
TElementType
>::
value
,
"TElementType needs to be derived from SwClient"
);
static_assert
(
std
::
is_base_of
<
SwModify
,
TSource
>::
value
,
"TSource needs to be derived from SwModify"
);
public
:
SwIterator
(
const
TSource
&
rSrc
)
:
sw
::
ClientIteratorBase
(
rSrc
)
{}
TElementType
*
First
()
{
...
...
@@ -309,11 +310,11 @@ public:
if
(
!
m_pPosition
)
m_pPosition
=
const_cast
<
SwClient
*>
(
m_rRoot
.
GetDepends
());
if
(
!
m_pPosition
)
return
PTR_CAST
(
TElementType
,
m_pCurrent
=
nullptr
);
return
PTR_CAST
(
TElementType
,
Sync
()
);
while
(
GetRightOfPos
())
m_pPosition
=
GetRightOfPos
();
if
(
m_pPosition
->
IsA
(
TYPE
(
TElementType
)))
return
PTR_CAST
(
TElementType
,
m_pCurrent
=
m_pPosition
);
return
PTR_CAST
(
TElementType
,
Sync
()
);
return
Previous
();
}
TElementType
*
Next
()
...
...
@@ -322,14 +323,14 @@ public:
m_pPosition
=
GetRightOfPos
();
while
(
m_pPosition
&&
!
m_pPosition
->
IsA
(
TYPE
(
TElementType
)
)
)
m_pPosition
=
GetRightOfPos
();
return
PTR_CAST
(
TElementType
,
m_pCurrent
=
m_pPosition
);
return
PTR_CAST
(
TElementType
,
Sync
()
);
}
TElementType
*
Previous
()
{
m_pPosition
=
GetLeftOfPos
();
while
(
m_pPosition
&&
!
m_pPosition
->
IsA
(
TYPE
(
TElementType
)
)
)
m_pPosition
=
GetLeftOfPos
();
return
PTR_CAST
(
TElementType
,
m_pCurrent
=
m_pPosition
);
return
PTR_CAST
(
TElementType
,
Sync
()
);
}
using
sw
::
ClientIteratorBase
::
IsChanged
;
};
...
...
@@ -349,18 +350,18 @@ public:
return
m_pCurrent
=
nullptr
;
while
(
GetRightOfPos
())
m_pPosition
=
GetRightOfPos
();
return
m_pCurrent
=
m_pPosition
;
return
Sync
()
;
}
SwClient
*
Next
()
{
if
(
m_pPosition
==
m_pCurrent
)
m_pPosition
=
GetRightOfPos
();
return
m_pCurrent
=
m_pPosition
;
return
Sync
()
;
}
SwClient
*
Previous
()
{
m_pPosition
=
GetLeftOfPos
();
return
m_pCurrent
=
m_pPosition
;
return
Sync
()
;
}
using
sw
::
ClientIteratorBase
::
IsChanged
;
};
...
...
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