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
03fdec57
Kaydet (Commit)
03fdec57
authored
Kas 19, 2013
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
winaccessibility: use WeakImplHelper
Change-Id: I5872e520ca009a0f9277827d72e72befe3323a06
üst
76ff4c53
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
76 deletions
+15
-76
AccEventListener.hxx
winaccessibility/inc/AccEventListener.hxx
+6
-9
AccTopWindowListener.hxx
winaccessibility/inc/AccTopWindowListener.hxx
+4
-9
AccEventListener.cxx
winaccessibility/source/service/AccEventListener.cxx
+3
-30
AccTopWindowListener.cxx
winaccessibility/source/service/AccTopWindowListener.cxx
+2
-28
No files found.
winaccessibility/inc/AccEventListener.hxx
Dosyayı görüntüle @
03fdec57
...
...
@@ -22,7 +22,9 @@
#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <osl/mutex.hxx>
class
AccObjectManagerAgent
;
...
...
@@ -32,12 +34,10 @@ using namespace ::com::sun::star::uno;
* procedure of all the event handling and provides the basic support for some simple
* methods.
*/
class
AccEventListener
:
public
com
::
sun
::
star
::
accessibility
::
XAccessibleEventListener
,
public
::
cppu
::
OWeakObject
class
AccEventListener
:
public
::
cppu
::
WeakImplHelper1
<
com
::
sun
::
star
::
accessibility
::
XAccessibleEventListener
>
{
private
:
oslInterlockedCount
m_refcount
;
protected
:
//accessible owner's pointer
com
::
sun
::
star
::
accessibility
::
XAccessible
*
pAccessible
;
...
...
@@ -74,9 +74,6 @@ public:
//for interface
virtual
void
SAL_CALL
disposing
(
const
::
com
::
sun
::
star
::
lang
::
EventObject
&
Source
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
queryInterface
(
const
::
com
::
sun
::
star
::
uno
::
Type
&
aType
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
acquire
()
throw
();
virtual
void
SAL_CALL
release
()
throw
();
//get the accessible role of pAccessible
virtual
short
SAL_CALL
getRole
();
//get the accessible parent's role
...
...
winaccessibility/inc/AccTopWindowListener.hxx
Dosyayı görüntüle @
03fdec57
...
...
@@ -23,7 +23,8 @@
#include <com/sun/star/awt/XTopWindowListener.hpp>
#include <com/sun/star/awt/XExtendedToolkit.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include "AccObjectManagerAgent.hxx"
...
...
@@ -34,14 +35,11 @@
* In this method, all the accessible objects (including COM object and Uno objects) are created and
* cached into bridge managers, and they are monitored by listeners for later accessible evnet handling.
*/
class
AccTopWindowListener
:
public
com
::
sun
::
star
::
awt
::
XTopWindowListener
,
public
::
cppu
::
OWeakObject
class
AccTopWindowListener
:
public
::
cppu
::
WeakImplHelper1
<
com
::
sun
::
star
::
awt
::
XTopWindowListener
>
{
private
:
AccObjectManagerAgent
accManagerAgent
;
oslInterlockedCount
m_refcount
;
public
:
AccTopWindowListener
();
virtual
~
AccTopWindowListener
();
...
...
@@ -53,9 +51,6 @@ public:
virtual
void
SAL_CALL
windowActivated
(
const
::
com
::
sun
::
star
::
lang
::
EventObject
&
e
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
windowDeactivated
(
const
::
com
::
sun
::
star
::
lang
::
EventObject
&
e
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
disposing
(
const
::
com
::
sun
::
star
::
lang
::
EventObject
&
Source
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
queryInterface
(
const
::
com
::
sun
::
star
::
uno
::
Type
&
aType
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
acquire
(
)
throw
();
virtual
void
SAL_CALL
release
(
)
throw
();
virtual
void
AddAllListeners
(
com
::
sun
::
star
::
accessibility
::
XAccessible
*
pAccessible
,
com
::
sun
::
star
::
accessibility
::
XAccessible
*
pParentXAcc
,
HWND
pWND
);
//for On-Demand load.
virtual
void
handleWindowOpened
(
com
::
sun
::
star
::
accessibility
::
XAccessible
*
pAccessible
);
...
...
winaccessibility/source/service/AccEventListener.cxx
Dosyayı görüntüle @
03fdec57
...
...
@@ -47,10 +47,9 @@ using namespace cppu;
AccEventListener
::
AccEventListener
(
com
::
sun
::
star
::
accessibility
::
XAccessible
*
pAcc
,
AccObjectManagerAgent
*
Agent
)
:
pAccessible
(
pAcc
),
pAgent
(
Agent
),
m_isDisposed
(
false
),
m_refcount
(
0
)
:
pAccessible
(
pAcc
)
,
pAgent
(
Agent
)
,
m_isDisposed
(
false
)
{}
AccEventListener
::~
AccEventListener
()
...
...
@@ -280,30 +279,4 @@ throw (::com::sun::star::uno::RuntimeException)
removeMeFromBroadcaster
();
}
//need to investigate further
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
AccEventListener
::
queryInterface
(
const
::
com
::
sun
::
star
::
uno
::
Type
&
aType
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
if
(
aType
.
equals
(
::
getCppuType
(
(
Reference
<
com
::
sun
::
star
::
accessibility
::
XAccessibleEventListener
>
const
*
)
0
)
))
{
Reference
<
com
::
sun
::
star
::
accessibility
::
XAccessibleEventListener
>
xEventListener
(
static_cast
<
com
::
sun
::
star
::
accessibility
::
XAccessibleEventListener
*
>
(
this
));
return
makeAny
(
xEventListener
);
}
return
Any
();
}
void
AccEventListener
::
acquire
(
)
throw
()
{
::
osl_incrementInterlockedCount
(
&
m_refcount
);
}
void
AccEventListener
::
release
()
throw
()
{
// thread-safe decrementation of reference count
if
(
0
==
::
osl_decrementInterlockedCount
(
&
m_refcount
))
{
delete
this
;
// shutdown this object
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
winaccessibility/source/service/AccTopWindowListener.cxx
Dosyayı görüntüle @
03fdec57
...
...
@@ -117,9 +117,8 @@ void AccTopWindowListener::handleWindowOpened( com::sun::star::accessibility::XA
}
}
AccTopWindowListener
::
AccTopWindowListener
()
:
accManagerAgent
(),
m_refcount
(
1
)
AccTopWindowListener
::
AccTopWindowListener
()
:
accManagerAgent
()
{
}
...
...
@@ -272,29 +271,4 @@ void AccTopWindowListener::disposing( const ::com::sun::star::lang::EventObject&
{
}
//need to investigate further
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
AccTopWindowListener
::
queryInterface
(
const
::
com
::
sun
::
star
::
uno
::
Type
&
aType
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
if
(
aType
.
equals
(
::
getCppuType
(
(
Reference
<
com
::
sun
::
star
::
awt
::
XTopWindowListener
>
const
*
)
0
)
))
{
Reference
<
com
::
sun
::
star
::
awt
::
XTopWindowListener
>
xTopListener
(
static_cast
<
com
::
sun
::
star
::
awt
::
XTopWindowListener
*
>
(
this
));
return
makeAny
(
xTopListener
);
}
return
Any
();
}
void
AccTopWindowListener
::
acquire
(
)
throw
()
{
::
osl_incrementInterlockedCount
(
&
m_refcount
);
}
void
AccTopWindowListener
::
release
()
throw
()
{
// thread-safe decrementation of reference count
if
(
0
==
::
osl_decrementInterlockedCount
(
&
m_refcount
))
{
delete
this
;
// shutdown this object
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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