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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
26 deletions
+15
-26
calbck.hxx
sw/inc/calbck.hxx
+11
-4
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
...
@@ -96,7 +96,7 @@ class SW_DLLPUBLIC SwClient : ::sw::WriterListener
protected
:
protected
:
// single argument ctors shall be explicit.
// 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)
// write access to pRegisteredIn shall be granted only to the object itself (protected access)
SwModify
*
GetRegisteredInNonConst
()
const
{
return
pRegisteredIn
;
}
SwModify
*
GetRegisteredInNonConst
()
const
{
return
pRegisteredIn
;
}
...
@@ -105,7 +105,8 @@ public:
...
@@ -105,7 +105,8 @@ public:
SwClient
()
:
pRegisteredIn
(
nullptr
)
{}
SwClient
()
:
pRegisteredIn
(
nullptr
)
{}
virtual
~
SwClient
();
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,
// 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
// its SwClient objects can decide to get registered to the latter instead by calling this method
...
@@ -114,7 +115,7 @@ public:
...
@@ -114,7 +115,7 @@ public:
// controlled access to Modify method
// controlled access to Modify method
// mba: this is still considered a hack and it should be fixed; the name makes grep-ing easier
// mba: this is still considered a hack and it should be fixed; the name makes grep-ing easier
void
ModifyNotification
(
const
SfxPoolItem
*
pOldValue
,
const
SfxPoolItem
*
pNewValue
)
{
this
->
Modify
(
pOldValue
,
pNewValue
);
}
void
ModifyNotification
(
const
SfxPoolItem
*
pOldValue
,
const
SfxPoolItem
*
pNewValue
)
{
this
->
Modify
(
pOldValue
,
pNewValue
);
}
void
SwClientNotifyCall
(
const
SwModify
&
rModify
,
const
SfxHint
&
rHint
)
{
SwClientNotify
(
rModify
,
rHint
);
}
void
SwClientNotifyCall
(
const
SwModify
&
rModify
,
const
SfxHint
&
rHint
)
{
SwClientNotify
(
rModify
,
rHint
);
}
const
SwModify
*
GetRegisteredIn
()
const
{
return
pRegisteredIn
;
}
const
SwModify
*
GetRegisteredIn
()
const
{
return
pRegisteredIn
;
}
SwModify
*
GetRegisteredIn
()
{
return
pRegisteredIn
;
}
SwModify
*
GetRegisteredIn
()
{
return
pRegisteredIn
;
}
...
@@ -123,7 +124,7 @@ public:
...
@@ -123,7 +124,7 @@ public:
TYPEINFO
();
TYPEINFO
();
// get information about attribute
// get information about attribute
virtual
bool
GetInfo
(
SfxPoolItem
&
)
const
;
virtual
bool
GetInfo
(
SfxPoolItem
&
)
const
{
return
true
;
}
};
};
...
@@ -313,6 +314,12 @@ public:
...
@@ -313,6 +314,12 @@ public:
}
}
};
};
SwClient
::
SwClient
(
SwModify
*
pToRegisterIn
)
:
pRegisteredIn
(
nullptr
)
{
if
(
pToRegisterIn
)
pToRegisterIn
->
Add
(
this
);
}
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/core/attr/calbck.cxx
Dosyayı görüntüle @
3fc8c700
...
@@ -26,12 +26,11 @@
...
@@ -26,12 +26,11 @@
TYPEINIT0
(
SwClient
);
TYPEINIT0
(
SwClient
);
SwClient
::
SwClient
(
SwModify
*
pToRegisterIn
)
SwClient
::~
SwClient
()
:
pRegisteredIn
(
nullptr
)
{
{
if
(
pToRegisterIn
)
OSL_ENSURE
(
!
pRegisteredIn
||
pRegisteredIn
->
GetDepends
(),
"SwModify still known, but Client already disconnected!"
);
// connect to SwModify
if
(
pRegisteredIn
&&
pRegisteredIn
->
GetDepends
()
)
p
ToRegisterIn
->
Add
(
this
);
p
RegisteredIn
->
Remove
(
this
);
}
}
void
SwClient
::
CheckRegistration
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
)
void
SwClient
::
CheckRegistration
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
)
...
@@ -57,23 +56,6 @@ 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
()
SwModify
::
SwModify
()
:
SwClient
(
nullptr
),
pRoot
(
nullptr
)
:
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