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
f93a2e53
Kaydet (Commit)
f93a2e53
authored
Kas 10, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
reduce branch depth in SwModify dtor
Change-Id: I82046cfc191425dc830125944214293b5b9197f9
üst
0b0d80bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
25 deletions
+22
-25
calbck.hxx
sw/inc/calbck.hxx
+1
-1
calbck.cxx
sw/source/core/attr/calbck.cxx
+21
-24
No files found.
sw/inc/calbck.hxx
Dosyayı görüntüle @
f93a2e53
...
@@ -192,7 +192,7 @@ public:
...
@@ -192,7 +192,7 @@ public:
void
UnlockModify
()
{
m_bModifyLocked
=
false
;
}
void
UnlockModify
()
{
m_bModifyLocked
=
false
;
}
void
SetInCache
(
bool
bNew
)
{
m_bInCache
=
bNew
;
}
void
SetInCache
(
bool
bNew
)
{
m_bInCache
=
bNew
;
}
void
SetInSwFntCache
(
bool
bNew
)
{
m_bInSwFntCache
=
bNew
;
}
void
SetInSwFntCache
(
bool
bNew
)
{
m_bInSwFntCache
=
bNew
;
}
void
SetInDocDTOR
()
{
m_bInDocDTOR
=
true
;
}
void
SetInDocDTOR
()
;
bool
IsModifyLocked
()
const
{
return
m_bModifyLocked
;
}
bool
IsModifyLocked
()
const
{
return
m_bModifyLocked
;
}
bool
IsInCache
()
const
{
return
m_bInCache
;
}
bool
IsInCache
()
const
{
return
m_bInCache
;
}
bool
IsInSwFntCache
()
const
{
return
m_bInSwFntCache
;
}
bool
IsInSwFntCache
()
const
{
return
m_bInSwFntCache
;
}
...
...
sw/source/core/attr/calbck.cxx
Dosyayı görüntüle @
f93a2e53
...
@@ -75,6 +75,17 @@ void SwClient::Modify(SfxPoolItem const*const pOldValue, SfxPoolItem const*const
...
@@ -75,6 +75,17 @@ void SwClient::Modify(SfxPoolItem const*const pOldValue, SfxPoolItem const*const
CheckRegistration
(
pOldValue
,
pNewValue
);
CheckRegistration
(
pOldValue
,
pNewValue
);
}
}
void
SwModify
::
SetInDocDTOR
()
{
m_bInDocDTOR
=
true
;
// If the document gets destroyed anyway, just tell clients to
// forget me so that they don't try to get removed from my list
// later when they also get destroyed
SwIterator
<
SwClient
,
SwModify
>
aIter
(
*
this
);
for
(
SwClient
*
pClient
=
aIter
.
First
();
pClient
;
pClient
=
aIter
.
Next
())
pClient
->
pRegisteredIn
=
nullptr
;
}
SwModify
::~
SwModify
()
SwModify
::~
SwModify
()
{
{
DBG_TESTSOLARMUTEX
();
DBG_TESTSOLARMUTEX
();
...
@@ -86,30 +97,16 @@ SwModify::~SwModify()
...
@@ -86,30 +97,16 @@ SwModify::~SwModify()
if
(
IsInSwFntCache
()
)
if
(
IsInSwFntCache
()
)
pSwFontCache
->
Delete
(
this
);
pSwFontCache
->
Delete
(
this
);
if
(
m_pWriterListeners
)
if
(
m_bInDocDTOR
)
{
return
;
// there are depending objects
// notify all clients that they shall remove themselves
if
(
m_bInDocDTOR
)
SwPtrMsgPoolItem
aDyObject
(
RES_OBJECTDYING
,
this
);
{
NotifyClients
(
&
aDyObject
,
&
aDyObject
);
// If the document gets destroyed anyway, just tell clients to
// forget me so that they don't try to get removed from my list
// remove all clients that have not done themselves
// later when they also get destroyed
// mba: possibly a hotfix for forgotten base class calls?!
SwIterator
<
SwClient
,
SwModify
>
aIter
(
*
this
);
while
(
m_pWriterListeners
)
for
(
SwClient
*
pClient
=
aIter
.
First
();
pClient
;
pClient
=
aIter
.
Next
())
static_cast
<
SwClient
*>
(
m_pWriterListeners
)
->
CheckRegistration
(
&
aDyObject
,
&
aDyObject
);
pClient
->
pRegisteredIn
=
nullptr
;
}
else
{
// notify all clients that they shall remove themselves
SwPtrMsgPoolItem
aDyObject
(
RES_OBJECTDYING
,
this
);
NotifyClients
(
&
aDyObject
,
&
aDyObject
);
// remove all clients that have not done themselves
// mba: possibly a hotfix for forgotten base class calls?!
while
(
m_pWriterListeners
)
static_cast
<
SwClient
*>
(
m_pWriterListeners
)
->
CheckRegistration
(
&
aDyObject
,
&
aDyObject
);
}
}
}
}
void
SwModify
::
NotifyClients
(
const
SfxPoolItem
*
pOldValue
,
const
SfxPoolItem
*
pNewValue
)
void
SwModify
::
NotifyClients
(
const
SfxPoolItem
*
pOldValue
,
const
SfxPoolItem
*
pNewValue
)
...
...
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