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
b0dae8c4
Kaydet (Commit)
b0dae8c4
authored
Mar 14, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixes for moving stuff to SwIterator
Change-Id: I834afb711920e480045a9f932770dab27dd1f3ad
üst
059b2b03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
calbck.hxx
sw/inc/calbck.hxx
+11
-1
switerator.hxx
sw/inc/switerator.hxx
+9
-9
No files found.
sw/inc/calbck.hxx
Dosyayı görüntüle @
b0dae8c4
...
...
@@ -257,6 +257,8 @@ class SwClientIter SAL_FINAL : public sw::Ring<SwClientIter>
// is marked down to become the current object in the next step
// this is necessary because iteration requires access to members of the current object
SwClient
*
m_pPosition
;
SwClient
*
GetLeftOfPos
()
{
return
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pLeft
);
}
SwClient
*
GetRighOfPos
()
{
return
static_cast
<
SwClient
*>
(
m_pPosition
->
m_pRight
);
}
// iterator can be limited to return only SwClient objects of a certain type
TypeId
m_aSearchType
;
...
...
@@ -330,8 +332,16 @@ SwClient::SwClient( SwModify* pToRegisterIn )
void
SwModify
::
ModifyBroadcast
(
const
SfxPoolItem
*
pOldValue
,
const
SfxPoolItem
*
pNewValue
,
TypeId
nType
)
{
SwClientIter
aIter
(
*
this
);
for
(
aIter
.
First
(
nType
);
aIter
;
aIter
.
Next
())
aIter
.
GoStart
();
while
(
aIter
)
{
if
(
aIter
.
m_pPosition
==
aIter
.
m_pCurrent
)
aIter
.
m_pPosition
=
static_cast
<
SwClient
*>
(
aIter
.
m_pPosition
->
m_pRight
);
while
(
aIter
.
m_pPosition
&&
!
aIter
.
m_pPosition
->
IsA
(
nType
)
)
aIter
.
m_pPosition
=
static_cast
<
SwClient
*>
(
aIter
.
m_pPosition
->
m_pRight
);
aIter
.
m_pCurrent
=
aIter
.
m_pPosition
;
aIter
->
Modify
(
pOldValue
,
pNewValue
);
}
}
void
SwModify
::
CallSwClientNotify
(
const
SfxHint
&
rHint
)
const
...
...
sw/inc/switerator.hxx
Dosyayı görüntüle @
b0dae8c4
...
...
@@ -35,34 +35,34 @@ public:
if
(
!
aClientIter
.
m_pPosition
)
return
nullptr
;
aClientIter
.
m_pCurrent
=
nullptr
;
return
PTR_CAST
(
TElementType
,
aClientIter
.
Next
()
);
return
Next
(
);
}
TElementType
*
Last
()
{
aClientIter
.
m_aSearchType
=
TYPE
(
TElementType
);
GoEnd
();
aClientIter
.
GoEnd
();
if
(
!
aClientIter
.
m_pPosition
)
return
nullptr
;
if
(
aClientIter
.
m_pPosition
->
IsA
(
TYPE
(
TElementType
))
if
(
aClientIter
.
m_pPosition
->
IsA
(
TYPE
(
TElementType
))
)
return
PTR_CAST
(
TElementType
,
aClientIter
.
m_pPosition
);
return
P
TR_CAST
(
TElementType
,
aClientIter
.
Previous
()
);
return
P
revious
(
);
}
TElementType
*
Next
()
{
if
(
aClientIter
.
m_pPosition
==
aClientIter
.
m_pCurrent
)
aClientIter
.
m_pPosition
=
static_cast
<
SwClient
*>
(
aClientIter
.
m_pPosition
->
m_pRight
);
aClientIter
.
m_pPosition
=
aClientIter
.
GetRighOfPos
(
);
while
(
aClientIter
.
m_pPosition
&&
!
aClientIter
.
m_pPosition
->
IsA
(
TYPE
(
TElementType
)
)
)
aClientIter
.
m_pPosition
=
static_cast
<
SwClient
*>
(
aClientIter
.
m_pPosition
->
m_pRight
);
aClientIter
.
m_pPosition
=
aClientIter
.
GetRighOfPos
(
);
return
PTR_CAST
(
TElementType
,
aClientIter
.
m_pCurrent
=
aClientIter
.
m_pPosition
);
}
TElementType
*
Previous
()
{
aClientIter
.
m_pPosition
=
static_cast
<
SwClient
*>
(
aClientIter
.
m_pPosition
->
m_pLeft
);
aClientIter
.
m_pPosition
=
aClientIter
.
GetLeftOfPos
(
);
while
(
aClientIter
.
m_pPosition
&&
!
aClientIter
.
m_pPosition
->
IsA
(
TYPE
(
TElementType
)
)
)
aClientIter
.
m_pPosition
=
static_cast
<
SwClient
*>
(
aClientIter
.
m_pPosition
->
m_pLeft
);
aClientIter
.
m_pPosition
=
aClientIter
.
GetLeftOfPos
(
);
return
PTR_CAST
(
TElementType
,
aClientIter
.
m_pCurrent
=
aClientIter
.
m_pPosition
);
}
static
TElementType
*
FirstElement
(
const
TSource
&
rMod
)
{
SwClient
*
p
=
SwClientIter
(
rMod
).
First
(
TYPE
(
TElementType
));
return
PTR_CAST
(
TElementType
,
p
);
}
static
TElementType
*
FirstElement
(
const
TSource
&
rMod
)
{
return
SwIterator
<
TElementType
,
TSource
>
(
rMod
).
First
(
);
}
bool
IsChanged
()
{
return
aClientIter
.
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