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
e31813b0
Kaydet (Commit)
e31813b0
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 SwXParagraph
Change-Id: Icda5087a4d80309701799df85b1dc9412e8c876a
üst
fb24b722
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
unoparagraph.cxx
sw/source/core/unocore/unoparagraph.cxx
+15
-19
No files found.
sw/source/core/unocore/unoparagraph.cxx
Dosyayı görüntüle @
e31813b0
...
@@ -18,13 +18,15 @@
...
@@ -18,13 +18,15 @@
*/
*/
#include <unoparagraph.hxx>
#include <unoparagraph.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cmdid.h>
#include <cmdid.h>
#include <unomid.h>
#include <unomid.h>
#include <unoparaframeenum.hxx>
#include <unoparaframeenum.hxx>
#include <unotext.hxx>
#include <unotext.hxx>
#include <unotextrange.hxx>
#include <unotextrange.hxx>
#include <unoport.hxx>
#include <unoport.hxx>
#include <unoevtlstnr.hxx>
#include <unomap.hxx>
#include <unomap.hxx>
#include <unocrsr.hxx>
#include <unocrsr.hxx>
#include <unoprnms.hxx>
#include <unoprnms.hxx>
...
@@ -101,10 +103,12 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState(
...
@@ -101,10 +103,12 @@ static beans::PropertyState lcl_SwXParagraph_getPropertyState(
class
SwXParagraph
::
Impl
class
SwXParagraph
::
Impl
:
public
SwClient
:
public
SwClient
{
{
private
:
::
osl
::
Mutex
m_Mutex
;
// just for OInterfaceContainerHelper
public
:
public
:
SwXParagraph
&
m_rThis
;
SwXParagraph
&
m_rThis
;
SwEventListenerContainer
m_ListenerContainer
;
::
cppu
::
OInterfaceContainerHelper
m_EventListeners
;
SfxItemPropertySet
const
&
m_rPropSet
;
SfxItemPropertySet
const
&
m_rPropSet
;
bool
m_bIsDescriptor
;
bool
m_bIsDescriptor
;
sal_Int32
m_nSelectionStartPos
;
sal_Int32
m_nSelectionStartPos
;
...
@@ -118,7 +122,7 @@ public:
...
@@ -118,7 +122,7 @@ public:
const
sal_Int32
nSelStart
=
-
1
,
const
sal_Int32
nSelEnd
=
-
1
)
const
sal_Int32
nSelStart
=
-
1
,
const
sal_Int32
nSelEnd
=
-
1
)
:
SwClient
(
pTxtNode
)
:
SwClient
(
pTxtNode
)
,
m_rThis
(
rThis
)
,
m_rThis
(
rThis
)
,
m_
ListenerContainer
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
&
rThis
)
)
,
m_
EventListeners
(
m_Mutex
)
,
m_rPropSet
(
*
aSwMapProvider
.
GetPropertySet
(
PROPERTY_MAP_PARAGRAPH
))
,
m_rPropSet
(
*
aSwMapProvider
.
GetPropertySet
(
PROPERTY_MAP_PARAGRAPH
))
// #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
// #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
,
m_bIsDescriptor
((
0
==
pTxtNode
)
?
true
:
false
)
,
m_bIsDescriptor
((
0
==
pTxtNode
)
?
true
:
false
)
...
@@ -175,7 +179,8 @@ void SwXParagraph::Impl::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNe
...
@@ -175,7 +179,8 @@ void SwXParagraph::Impl::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNe
ClientModify
(
this
,
pOld
,
pNew
);
ClientModify
(
this
,
pOld
,
pNew
);
if
(
!
GetRegisteredIn
())
if
(
!
GetRegisteredIn
())
{
{
m_ListenerContainer
.
Disposing
();
lang
::
EventObject
const
ev
(
static_cast
<
::
cppu
::
OWeakObject
&>
(
m_rThis
));
m_EventListeners
.
disposeAndClear
(
ev
);
}
}
}
}
...
@@ -1116,7 +1121,8 @@ void SAL_CALL SwXParagraph::dispose() throw (uno::RuntimeException)
...
@@ -1116,7 +1121,8 @@ void SAL_CALL SwXParagraph::dispose() throw (uno::RuntimeException)
SwParaSelection
aParaSel
(
aCursor
);
SwParaSelection
aParaSel
(
aCursor
);
pTxtNode
->
GetDoc
()
->
DelFullPara
(
aCursor
);
pTxtNode
->
GetDoc
()
->
DelFullPara
(
aCursor
);
}
}
m_pImpl
->
m_ListenerContainer
.
Disposing
();
lang
::
EventObject
const
ev
(
static_cast
<
::
cppu
::
OWeakObject
&>
(
*
this
));
m_pImpl
->
m_EventListeners
.
disposeAndClear
(
ev
);
}
}
}
}
...
@@ -1124,26 +1130,16 @@ void SAL_CALL SwXParagraph::addEventListener(
...
@@ -1124,26 +1130,16 @@ void SAL_CALL SwXParagraph::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
->
GetTxtNode
())
{
throw
uno
::
RuntimeException
();
}
m_pImpl
->
m_ListenerContainer
.
AddListener
(
xListener
);
}
}
void
SAL_CALL
SwXParagraph
::
removeEventListener
(
void
SAL_CALL
SwXParagraph
::
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
->
GetTxtNode
()
||
!
m_pImpl
->
m_ListenerContainer
.
RemoveListener
(
xListener
))
{
throw
uno
::
RuntimeException
();
}
}
}
uno
::
Reference
<
container
::
XEnumeration
>
SAL_CALL
uno
::
Reference
<
container
::
XEnumeration
>
SAL_CALL
...
...
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