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
54c08983
Kaydet (Commit)
54c08983
authored
Şub 02, 2013
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: replace SwEventListenerContainer in SwXFrame
Change-Id: I9136d14364196810f0f64b086b9b06e5b558286d
üst
3c177e98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
17 deletions
+38
-17
unoframe.hxx
sw/inc/unoframe.hxx
+6
-4
unoframe.cxx
sw/source/core/unocore/unoframe.cxx
+32
-13
No files found.
sw/inc/unoframe.hxx
Dosyayı görüntüle @
54c08983
...
...
@@ -16,8 +16,8 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef _UNOFRAME_HXX
#define _UNOFRAME_HXX
#ifndef
SW
_UNOFRAME_HXX
#define
SW
_UNOFRAME_HXX
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/container/XNamed.hpp>
...
...
@@ -37,7 +37,6 @@
#include <flyenum.hxx>
#include <frmfmt.hxx>
#include <unoevtlstnr.hxx>
#include <unotext.hxx>
class
SdrObject
;
...
...
@@ -57,7 +56,10 @@ class SwXFrame : public cppu::WeakImplHelper6
>
,
public
SwClient
{
SwEventListenerContainer
aLstnrCntnr
;
private
:
class
Impl
;
::
sw
::
UnoImplPtr
<
Impl
>
m_pImpl
;
const
SfxItemPropertySet
*
m_pPropSet
;
SwDoc
*
m_pDoc
;
...
...
sw/source/core/unocore/unoframe.cxx
Dosyayı görüntüle @
54c08983
...
...
@@ -754,6 +754,19 @@ bool SwOLEProperties_Impl::AnyToItemSet(
return
sal_True
;
}
class
SwXFrame
::
Impl
{
private
:
::
osl
::
Mutex
m_Mutex
;
// just for OInterfaceContainerHelper
public
:
::
cppu
::
OInterfaceContainerHelper
m_EventListeners
;
Impl
()
:
m_EventListeners
(
m_Mutex
)
{
}
};
namespace
{
class
theSwXFrameUnoTunnelId
:
public
rtl
::
Static
<
UnoTunnelIdInit
,
theSwXFrameUnoTunnelId
>
{};
...
...
@@ -800,8 +813,9 @@ uno::Sequence< OUString > SwXFrame::getSupportedServiceNames(void) throw( uno::R
return
aRet
;
}
SwXFrame
::
SwXFrame
(
FlyCntType
eSet
,
const
::
SfxItemPropertySet
*
pSet
,
SwDoc
*
pDoc
)
:
aLstnrCntnr
(
(
container
::
XNamed
*
)
this
),
SwXFrame
::
SwXFrame
(
FlyCntType
eSet
,
const
::
SfxItemPropertySet
*
pSet
,
SwDoc
*
pDoc
)
:
m_pImpl
(
new
Impl
)
,
m_pPropSet
(
pSet
),
m_pDoc
(
pDoc
),
eType
(
eSet
),
...
...
@@ -851,9 +865,10 @@ SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pD
}
}
SwXFrame
::
SwXFrame
(
SwFrmFmt
&
rFrmFmt
,
FlyCntType
eSet
,
const
::
SfxItemPropertySet
*
pSet
)
:
SwClient
(
&
rFrmFmt
),
aLstnrCntnr
(
(
container
::
XNamed
*
)
this
),
SwXFrame
::
SwXFrame
(
SwFrmFmt
&
rFrmFmt
,
FlyCntType
eSet
,
const
::
SfxItemPropertySet
*
pSet
)
:
SwClient
(
&
rFrmFmt
)
,
m_pImpl
(
new
Impl
)
,
m_pPropSet
(
pSet
),
m_pDoc
(
0
),
eType
(
eSet
),
...
...
@@ -1989,17 +2004,20 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName )
return
aRet
;
}
void
SwXFrame
::
addEventListener
(
const
uno
::
Reference
<
lang
::
XEventListener
>
&
aListener
)
throw
(
uno
::
RuntimeException
)
void
SAL_CALL
SwXFrame
::
addEventListener
(
const
uno
::
Reference
<
lang
::
XEventListener
>
&
xListener
)
throw
(
uno
::
RuntimeException
)
{
if
(
!
GetRegisteredIn
())
throw
uno
::
RuntimeException
();
aLstnrCntnr
.
AddListener
(
aListener
);
// no need to lock here as m_pImpl is const and container threadsafe
m_pImpl
->
m_EventListeners
.
addInterface
(
xListener
);
}
void
SwXFrame
::
removeEventListener
(
const
uno
::
Reference
<
lang
::
XEventListener
>
&
aListener
)
throw
(
uno
::
RuntimeException
)
void
SAL_CALL
SwXFrame
::
removeEventListener
(
const
uno
::
Reference
<
lang
::
XEventListener
>
&
xListener
)
throw
(
uno
::
RuntimeException
)
{
if
(
!
GetRegisteredIn
()
||
!
aLstnrCntnr
.
RemoveListener
(
aListener
))
throw
uno
::
RuntimeException
(
);
// no need to lock here as m_pImpl is const and container threadsafe
m_pImpl
->
m_EventListeners
.
removeInterface
(
xListener
);
}
void
SwXFrame
::
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
...
...
@@ -2010,7 +2028,8 @@ void SwXFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
mxStyleData
.
clear
();
mxStyleFamily
.
clear
();
m_pDoc
=
0
;
aLstnrCntnr
.
Disposing
();
lang
::
EventObject
const
ev
(
static_cast
<
::
cppu
::
OWeakObject
&>
(
*
this
));
m_pImpl
->
m_EventListeners
.
disposeAndClear
(
ev
);
}
}
...
...
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