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
3fc8c700
Kaydet (Commit)
3fc8c700
authored
Mar 13, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
inline trivial SwClient functions
Change-Id: I1672844d0ad7f95d5c5add62703729588190d20f
üst
e07c6a6f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
25 deletions
+14
-25
calbck.hxx
sw/inc/calbck.hxx
+10
-3
calbck.cxx
sw/source/core/attr/calbck.cxx
+4
-22
No files found.
sw/inc/calbck.hxx
Dosyayı görüntüle @
3fc8c700
...
...
@@ -96,7 +96,7 @@ class SW_DLLPUBLIC SwClient : ::sw::WriterListener
protected
:
// single argument ctors shall be explicit.
explicit
SwClient
(
SwModify
*
pToRegisterIn
);
inline
explicit
SwClient
(
SwModify
*
pToRegisterIn
);
// write access to pRegisteredIn shall be granted only to the object itself (protected access)
SwModify
*
GetRegisteredInNonConst
()
const
{
return
pRegisteredIn
;
}
...
...
@@ -105,7 +105,8 @@ public:
SwClient
()
:
pRegisteredIn
(
nullptr
)
{}
virtual
~
SwClient
();
virtual
void
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
);
virtual
void
Modify
(
const
SfxPoolItem
*
pOldValue
,
const
SfxPoolItem
*
pNewValue
)
{
CheckRegistration
(
pOldValue
,
pNewValue
);
}
// in case an SwModify object is destroyed that itself is registered in another SwModify,
// its SwClient objects can decide to get registered to the latter instead by calling this method
...
...
@@ -123,7 +124,7 @@ public:
TYPEINFO
();
// get information about attribute
virtual
bool
GetInfo
(
SfxPoolItem
&
)
const
;
virtual
bool
GetInfo
(
SfxPoolItem
&
)
const
{
return
true
;
}
};
...
...
@@ -313,6 +314,12 @@ public:
}
};
SwClient
::
SwClient
(
SwModify
*
pToRegisterIn
)
:
pRegisteredIn
(
nullptr
)
{
if
(
pToRegisterIn
)
pToRegisterIn
->
Add
(
this
);
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/core/attr/calbck.cxx
Dosyayı görüntüle @
3fc8c700
...
...
@@ -26,12 +26,11 @@
TYPEINIT0
(
SwClient
);
SwClient
::
SwClient
(
SwModify
*
pToRegisterIn
)
:
pRegisteredIn
(
nullptr
)
SwClient
::~
SwClient
()
{
if
(
pToRegisterIn
)
// connect to SwModify
p
ToRegisterIn
->
Add
(
this
);
OSL_ENSURE
(
!
pRegisteredIn
||
pRegisteredIn
->
GetDepends
(),
"SwModify still known, but Client already disconnected!"
);
if
(
pRegisteredIn
&&
pRegisteredIn
->
GetDepends
()
)
p
RegisteredIn
->
Remove
(
this
);
}
void
SwClient
::
CheckRegistration
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
)
...
...
@@ -57,23 +56,6 @@ void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem* )
}
}
void
SwClient
::
Modify
(
const
SfxPoolItem
*
pOldValue
,
const
SfxPoolItem
*
pNewValue
)
{
CheckRegistration
(
pOldValue
,
pNewValue
);
}
SwClient
::~
SwClient
()
{
OSL_ENSURE
(
!
pRegisteredIn
||
pRegisteredIn
->
GetDepends
(),
"SwModify still known, but Client already disconnected!"
);
if
(
pRegisteredIn
&&
pRegisteredIn
->
GetDepends
()
)
// still connected
pRegisteredIn
->
Remove
(
this
);
}
bool
SwClient
::
GetInfo
(
SfxPoolItem
&
)
const
{
return
true
;
}
SwModify
::
SwModify
()
:
SwClient
(
nullptr
),
pRoot
(
nullptr
)
...
...
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