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
cc27d038
Kaydet (Commit)
cc27d038
authored
Ara 12, 2016
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: prefix members of SwClient
Change-Id: If35981bce951dfab4a784d4cb54ac911249572ed
üst
9c76f393
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
calbck.hxx
sw/inc/calbck.hxx
+6
-6
calbck.cxx
sw/source/core/attr/calbck.cxx
+13
-13
No files found.
sw/inc/calbck.hxx
Dosyayı görüntüle @
cc27d038
...
...
@@ -100,18 +100,18 @@ class SW_DLLPUBLIC SwClient : public ::sw::WriterListener
friend
class
sw
::
ClientIteratorBase
;
template
<
typename
E
,
typename
S
>
friend
class
SwIterator
;
SwModify
*
pRegisteredIn
;
///< event source
SwModify
*
m_
pRegisteredIn
;
///< event source
protected
:
// single argument ctors shall be explicit.
inline
explicit
SwClient
(
SwModify
*
pToRegisterIn
);
// write access to pRegisteredIn shall be granted only to the object itself (protected access)
SwModify
*
GetRegisteredInNonConst
()
const
{
return
pRegisteredIn
;
}
SwModify
*
GetRegisteredInNonConst
()
const
{
return
m_
pRegisteredIn
;
}
public
:
SwClient
()
:
pRegisteredIn
(
nullptr
)
{}
SwClient
()
:
m_
pRegisteredIn
(
nullptr
)
{}
virtual
~
SwClient
()
override
;
// callbacks received from SwModify (friend class - so these methods can be private)
// should be called only from SwModify the client is registered in
...
...
@@ -130,8 +130,8 @@ public:
void
ModifyNotification
(
const
SfxPoolItem
*
pOldValue
,
const
SfxPoolItem
*
pNewValue
)
{
this
->
Modify
(
pOldValue
,
pNewValue
);
}
void
SwClientNotifyCall
(
const
SwModify
&
rModify
,
const
SfxHint
&
rHint
)
{
SwClientNotify
(
rModify
,
rHint
);
}
const
SwModify
*
GetRegisteredIn
()
const
{
return
pRegisteredIn
;
}
SwModify
*
GetRegisteredIn
()
{
return
pRegisteredIn
;
}
const
SwModify
*
GetRegisteredIn
()
const
{
return
m_
pRegisteredIn
;
}
SwModify
*
GetRegisteredIn
()
{
return
m_
pRegisteredIn
;
}
// get information about attribute
...
...
@@ -342,7 +342,7 @@ public:
};
SwClient
::
SwClient
(
SwModify
*
pToRegisterIn
)
:
pRegisteredIn
(
nullptr
)
:
m_
pRegisteredIn
(
nullptr
)
{
if
(
pToRegisterIn
)
pToRegisterIn
->
Add
(
this
);
...
...
sw/source/core/attr/calbck.cxx
Dosyayı görüntüle @
cc27d038
...
...
@@ -31,9 +31,9 @@ SwClient::~SwClient()
{
if
(
GetRegisteredIn
())
DBG_TESTSOLARMUTEX
();
OSL_ENSURE
(
!
pRegisteredIn
||
pRegisteredIn
->
HasWriterListeners
(),
"SwModify still known, but Client already disconnected!"
);
if
(
pRegisteredIn
&&
pRegisteredIn
->
HasWriterListeners
()
)
pRegisteredIn
->
Remove
(
this
);
OSL_ENSURE
(
!
m_pRegisteredIn
||
m_
pRegisteredIn
->
HasWriterListeners
(),
"SwModify still known, but Client already disconnected!"
);
if
(
m_pRegisteredIn
&&
m_
pRegisteredIn
->
HasWriterListeners
()
)
m_
pRegisteredIn
->
Remove
(
this
);
}
void
SwClient
::
CheckRegistration
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
)
...
...
@@ -44,10 +44,10 @@ void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem* )
return
;
const
SwPtrMsgPoolItem
*
pDead
=
static_cast
<
const
SwPtrMsgPoolItem
*>
(
pOld
);
if
(
pDead
&&
pDead
->
pObject
==
pRegisteredIn
)
if
(
pDead
&&
pDead
->
pObject
==
m_
pRegisteredIn
)
{
// I've got a notification from the object I know
SwModify
*
pAbove
=
pRegisteredIn
->
GetRegisteredIn
();
SwModify
*
pAbove
=
m_
pRegisteredIn
->
GetRegisteredIn
();
if
(
pAbove
)
{
// if the dying object itself was listening at an SwModify, I take over
...
...
@@ -56,7 +56,7 @@ void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem* )
return
;
}
// destroy connection
pRegisteredIn
->
Remove
(
this
);
m_
pRegisteredIn
->
Remove
(
this
);
}
}
...
...
@@ -80,7 +80,7 @@ void SwModify::SetInDocDTOR()
// later when they also get destroyed
SwIterator
<
SwClient
,
SwModify
>
aIter
(
*
this
);
for
(
SwClient
*
pClient
=
aIter
.
First
();
pClient
;
pClient
=
aIter
.
Next
())
pClient
->
pRegisteredIn
=
nullptr
;
pClient
->
m_
pRegisteredIn
=
nullptr
;
m_pWriterListeners
=
nullptr
;
}
...
...
@@ -160,7 +160,7 @@ void SwModify::Add( SwClient* pDepend )
DBG_TESTSOLARMUTEX
();
OSL_ENSURE
(
!
m_bLockClientList
,
"Client inserted while in Modify"
);
if
(
pDepend
->
pRegisteredIn
!=
this
)
if
(
pDepend
->
m_
pRegisteredIn
!=
this
)
{
#if OSL_DEBUG_LEVEL > 0
if
(
sw
::
ClientIteratorBase
::
our_pClientIters
)
...
...
@@ -172,8 +172,8 @@ void SwModify::Add( SwClient* pDepend )
}
#endif
// deregister new client in case it is already registered elsewhere
if
(
pDepend
->
pRegisteredIn
!=
nullptr
)
pDepend
->
pRegisteredIn
->
Remove
(
pDepend
);
if
(
pDepend
->
m_
pRegisteredIn
!=
nullptr
)
pDepend
->
m_
pRegisteredIn
->
Remove
(
pDepend
);
if
(
!
m_pWriterListeners
)
{
...
...
@@ -193,14 +193,14 @@ void SwModify::Add( SwClient* pDepend )
}
// connect client to me
pDepend
->
pRegisteredIn
=
this
;
pDepend
->
m_
pRegisteredIn
=
this
;
}
}
SwClient
*
SwModify
::
Remove
(
SwClient
*
pDepend
)
{
DBG_TESTSOLARMUTEX
();
assert
(
pDepend
->
pRegisteredIn
==
this
);
assert
(
pDepend
->
m_
pRegisteredIn
==
this
);
// SwClient is my listener
// remove it from my list
...
...
@@ -229,7 +229,7 @@ SwClient* SwModify::Remove( SwClient* pDepend )
}
pDepend
->
m_pLeft
=
nullptr
;
pDepend
->
m_pRight
=
nullptr
;
pDepend
->
pRegisteredIn
=
nullptr
;
pDepend
->
m_
pRegisteredIn
=
nullptr
;
return
pDepend
;
}
...
...
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