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
44df3bdc
Kaydet (Commit)
44df3bdc
authored
Şub 03, 2013
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: replace SwEventListenerContainer in SwXFootnote
Change-Id: I03c1b3ad6a774f00993279c0830029708ee966ba
üst
9652b5b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
18 deletions
+11
-18
unoftn.cxx
sw/source/core/unocore/unoftn.cxx
+11
-18
No files found.
sw/source/core/unocore/unoftn.cxx
Dosyayı görüntüle @
44df3bdc
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <osl/mutex.hxx>
#include <osl/mutex.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/servicehelper.hxx>
...
@@ -30,7 +31,6 @@
...
@@ -30,7 +31,6 @@
#include <unoparagraph.hxx>
#include <unoparagraph.hxx>
#include <unomap.hxx>
#include <unomap.hxx>
#include <unoprnms.hxx>
#include <unoprnms.hxx>
#include <unoevtlstnr.hxx>
#include <doc.hxx>
#include <doc.hxx>
#include <ftnidx.hxx>
#include <ftnidx.hxx>
#include <fmtftn.hxx>
#include <fmtftn.hxx>
...
@@ -49,12 +49,14 @@ using ::rtl::OUString;
...
@@ -49,12 +49,14 @@ using ::rtl::OUString;
class
SwXFootnote
::
Impl
class
SwXFootnote
::
Impl
:
public
SwClient
:
public
SwClient
{
{
private
:
::
osl
::
Mutex
m_Mutex
;
// just for OInterfaceContainerHelper
public
:
public
:
SwXFootnote
&
m_rThis
;
SwXFootnote
&
m_rThis
;
const
bool
m_bIsEndnote
;
const
bool
m_bIsEndnote
;
SwEventListenerContainer
m_ListenerContainer
;
::
cppu
::
OInterfaceContainerHelper
m_EventListeners
;
bool
m_bIsDescriptor
;
bool
m_bIsDescriptor
;
const
SwFmtFtn
*
m_pFmtFtn
;
const
SwFmtFtn
*
m_pFmtFtn
;
::
rtl
::
OUString
m_sLabel
;
::
rtl
::
OUString
m_sLabel
;
...
@@ -65,7 +67,7 @@ public:
...
@@ -65,7 +67,7 @@ public:
:
SwClient
((
pDoc
)
?
pDoc
->
GetUnoCallBack
()
:
0
)
:
SwClient
((
pDoc
)
?
pDoc
->
GetUnoCallBack
()
:
0
)
,
m_rThis
(
rThis
)
,
m_rThis
(
rThis
)
,
m_bIsEndnote
(
bIsEndnote
)
,
m_bIsEndnote
(
bIsEndnote
)
,
m_
ListenerContainer
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
&
rThis
)
)
,
m_
EventListeners
(
m_Mutex
)
// #i111177#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this
// #i111177#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this
// , m_bIsDescriptor(0 == pFootnote)
// , m_bIsDescriptor(0 == pFootnote)
,
m_bIsDescriptor
((
0
==
pFootnote
)
?
true
:
false
)
,
m_bIsDescriptor
((
0
==
pFootnote
)
?
true
:
false
)
...
@@ -99,9 +101,10 @@ void SwXFootnote::Impl::Invalidate()
...
@@ -99,9 +101,10 @@ void SwXFootnote::Impl::Invalidate()
{
{
const_cast
<
SwModify
*>
(
GetRegisteredIn
())
->
Remove
(
this
);
const_cast
<
SwModify
*>
(
GetRegisteredIn
())
->
Remove
(
this
);
}
}
m_ListenerContainer
.
Disposing
();
m_pFmtFtn
=
0
;
m_pFmtFtn
=
0
;
m_rThis
.
SetDoc
(
0
);
m_rThis
.
SetDoc
(
0
);
lang
::
EventObject
const
ev
(
static_cast
<
::
cppu
::
OWeakObject
&>
(
m_rThis
));
m_EventListeners
.
disposeAndClear
(
ev
);
}
}
void
SwXFootnote
::
Impl
::
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
void
SwXFootnote
::
Impl
::
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
...
@@ -399,13 +402,8 @@ SwXFootnote::addEventListener(
...
@@ -399,13 +402,8 @@ SwXFootnote::addEventListener(
const
uno
::
Reference
<
lang
::
XEventListener
>
&
xListener
)
const
uno
::
Reference
<
lang
::
XEventListener
>
&
xListener
)
throw
(
uno
::
RuntimeException
)
throw
(
uno
::
RuntimeException
)
{
{
SolarMutexGuard
g
;
// no need to lock here as m_pImpl is const and container threadsafe
m_pImpl
->
m_EventListeners
.
addInterface
(
xListener
);
if
(
!
m_pImpl
->
GetFootnoteFormat
())
{
throw
uno
::
RuntimeException
();
}
m_pImpl
->
m_ListenerContainer
.
AddListener
(
xListener
);
}
}
void
SAL_CALL
void
SAL_CALL
...
@@ -413,13 +411,8 @@ SwXFootnote::removeEventListener(
...
@@ -413,13 +411,8 @@ SwXFootnote::removeEventListener(
const
uno
::
Reference
<
lang
::
XEventListener
>
&
xListener
)
const
uno
::
Reference
<
lang
::
XEventListener
>
&
xListener
)
throw
(
uno
::
RuntimeException
)
throw
(
uno
::
RuntimeException
)
{
{
SolarMutexGuard
g
;
// no need to lock here as m_pImpl is const and container threadsafe
m_pImpl
->
m_EventListeners
.
removeInterface
(
xListener
);
if
(
!
m_pImpl
->
GetFootnoteFormat
()
||
!
m_pImpl
->
m_ListenerContainer
.
RemoveListener
(
xListener
))
{
throw
uno
::
RuntimeException
();
}
}
}
const
SwStartNode
*
SwXFootnote
::
GetStartNode
()
const
const
SwStartNode
*
SwXFootnote
::
GetStartNode
()
const
...
...
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