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
9123a2f7
Kaydet (Commit)
9123a2f7
authored
Ock 19, 2011
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmlfix3: #i113682#: unoxml: CEvent gets a mutex member;
also initialize member variables in constructors.
üst
57c23f63
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
104 additions
and
22 deletions
+104
-22
event.cxx
unoxml/source/events/event.cxx
+28
-6
event.hxx
unoxml/source/events/event.hxx
+4
-7
mouseevent.cxx
unoxml/source/events/mouseevent.cxx
+26
-1
mouseevent.hxx
unoxml/source/events/mouseevent.hxx
+6
-1
mutationevent.cxx
unoxml/source/events/mutationevent.cxx
+15
-2
mutationevent.hxx
unoxml/source/events/mutationevent.hxx
+6
-1
uievent.cxx
unoxml/source/events/uievent.cxx
+13
-3
uievent.hxx
unoxml/source/events/uievent.hxx
+6
-1
No files found.
unoxml/source/events/event.cxx
Dosyayı görüntüle @
9123a2f7
...
...
@@ -25,62 +25,84 @@
*
************************************************************************/
#include
"event.hxx"
#include
<event.hxx>
namespace
DOM
{
namespace
events
{
CEvent
::
CEvent
()
:
m_canceled
(
sal_False
)
,
m_phase
(
PhaseType_CAPTURING_PHASE
)
,
m_bubbles
(
sal_False
)
,
m_cancelable
(
sal_True
)
{
}
CEvent
::~
CEvent
()
{
}
OUString
SAL_CALL
CEvent
::
getType
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_eventType
;
}
Reference
<
XEventTarget
>
SAL_CALL
CEvent
::
getTarget
()
throw
(
RuntimeException
)
Reference
<
XEventTarget
>
SAL_CALL
CEvent
::
getTarget
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_target
;
}
Reference
<
XEventTarget
>
SAL_CALL
CEvent
::
getCurrentTarget
()
throw
(
RuntimeException
)
Reference
<
XEventTarget
>
SAL_CALL
CEvent
::
getCurrentTarget
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_currentTarget
;
}
PhaseType
SAL_CALL
CEvent
::
getEventPhase
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_phase
;
}
sal_Bool
SAL_CALL
CEvent
::
getBubbles
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_bubbles
;
}
sal_Bool
SAL_CALL
CEvent
::
getCancelable
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_cancelable
;
}
com
::
sun
::
star
::
util
::
Time
SAL_CALL
CEvent
::
getTimeStamp
()
throw
(
RuntimeException
)
com
::
sun
::
star
::
util
::
Time
SAL_CALL
CEvent
::
getTimeStamp
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_time
;
}
void
SAL_CALL
CEvent
::
stopPropagation
()
throw
(
RuntimeException
)
{
if
(
m_cancelable
)
m_canceled
=
sal_True
;
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
if
(
m_cancelable
)
{
m_canceled
=
sal_True
;
}
}
void
SAL_CALL
CEvent
::
preventDefault
()
throw
(
RuntimeException
)
{
}
void
SAL_CALL
CEvent
::
initEvent
(
const
OUString
&
eventTypeArg
,
sal_Bool
canBubbleArg
,
void
SAL_CALL
CEvent
::
initEvent
(
OUString
const
&
eventTypeArg
,
sal_Bool
canBubbleArg
,
sal_Bool
cancelableArg
)
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
m_eventType
=
eventTypeArg
;
m_bubbles
=
canBubbleArg
;
m_cancelable
=
cancelableArg
;
...
...
unoxml/source/events/event.hxx
Dosyayı görüntüle @
9123a2f7
...
...
@@ -31,6 +31,7 @@
#include <sal/types.h>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/xml/dom/events/XEvent.hpp>
#include <com/sun/star/xml/dom/events/XEventTarget.hpp>
#include <com/sun/star/util/Time.hpp>
...
...
@@ -56,16 +57,12 @@ friend class CText;
friend
class
CCharacterData
;
friend
class
CAttr
;
private
:
sal_Bool
m_canceled
;
protected
:
::
osl
::
Mutex
m_Mutex
;
sal_Bool
m_canceled
;
OUString
m_eventType
;
Reference
<
XEventTarget
>
m_target
;
Reference
<
XEventTarget
>
m_currentTarget
;
//xmlNodePtr m_target;
//xmlNodePtr m_currentTarget;
PhaseType
m_phase
;
sal_Bool
m_bubbles
;
sal_Bool
m_cancelable
;
...
...
@@ -73,7 +70,7 @@ protected:
public
:
CEvent
()
:
m_canceled
(
sal_False
){}
explicit
CEvent
();
virtual
~
CEvent
();
virtual
OUString
SAL_CALL
getType
()
throw
(
RuntimeException
);
...
...
unoxml/source/events/mouseevent.cxx
Dosyayı görüntüle @
9123a2f7
...
...
@@ -25,49 +25,72 @@
*
************************************************************************/
#include
"mouseevent.hxx"
#include
<mouseevent.hxx>
namespace
DOM
{
namespace
events
{
CMouseEvent
::
CMouseEvent
()
:
CMouseEvent_Base
()
,
m_screenX
(
0
)
,
m_screenY
(
0
)
,
m_clientX
(
0
)
,
m_clientY
(
0
)
,
m_ctrlKey
(
sal_False
)
,
m_shiftKey
(
sal_False
)
,
m_altKey
(
sal_False
)
,
m_metaKey
(
sal_False
)
,
m_button
(
0
)
{
}
sal_Int32
SAL_CALL
CMouseEvent
::
getScreenX
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_screenX
;
}
sal_Int32
SAL_CALL
CMouseEvent
::
getScreenY
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_screenY
;
}
sal_Int32
SAL_CALL
CMouseEvent
::
getClientX
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_clientX
;
}
sal_Int32
SAL_CALL
CMouseEvent
::
getClientY
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_clientY
;
}
sal_Bool
SAL_CALL
CMouseEvent
::
getCtrlKey
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_ctrlKey
;
}
sal_Bool
SAL_CALL
CMouseEvent
::
getShiftKey
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_shiftKey
;
}
sal_Bool
SAL_CALL
CMouseEvent
::
getAltKey
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_altKey
;
}
sal_Bool
SAL_CALL
CMouseEvent
::
getMetaKey
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_metaKey
;
}
sal_Int16
SAL_CALL
CMouseEvent
::
getButton
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_button
;
}
Reference
<
XEventTarget
>
SAL_CALL
CMouseEvent
::
getRelatedTarget
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_relatedTarget
;
}
...
...
@@ -89,6 +112,8 @@ namespace DOM { namespace events
const
Reference
<
XEventTarget
>&
/*relatedTargetArg*/
)
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
CUIEvent
::
initUIEvent
(
typeArg
,
canBubbleArg
,
cancelableArg
,
viewArg
,
detailArg
);
m_screenX
=
screenXArg
;
m_screenY
=
screenYArg
;
...
...
unoxml/source/events/mouseevent.hxx
Dosyayı görüntüle @
9123a2f7
...
...
@@ -40,7 +40,11 @@ using ::rtl::OUString;
namespace
DOM
{
namespace
events
{
class
CMouseEvent
:
public
cppu
::
ImplInheritanceHelper1
<
CUIEvent
,
XMouseEvent
>
typedef
::
cppu
::
ImplInheritanceHelper1
<
CUIEvent
,
XMouseEvent
>
CMouseEvent_Base
;
class
CMouseEvent
:
public
CMouseEvent_Base
{
friend
class
CEventDispatcher
;
protected
:
...
...
@@ -56,6 +60,7 @@ protected:
Reference
<
XEventTarget
>
m_relatedTarget
;
public
:
explicit
CMouseEvent
();
virtual
sal_Int32
SAL_CALL
getScreenX
()
throw
(
RuntimeException
);
virtual
sal_Int32
SAL_CALL
getScreenY
()
throw
(
RuntimeException
);
...
...
unoxml/source/events/mutationevent.cxx
Dosyayı görüntüle @
9123a2f7
...
...
@@ -25,36 +25,47 @@
*
************************************************************************/
#include
"mutationevent.hxx"
#include
<mutationevent.hxx>
namespace
DOM
{
namespace
events
{
CMutationEvent
::
CMutationEvent
()
:
CMutationEvent_Base
()
,
m_attrChangeType
(
AttrChangeType_MODIFICATION
)
{
}
CMutationEvent
::~
CMutationEvent
()
{
}
Reference
<
XNode
>
SAL_CALL
CMutationEvent
::
getRelatedNode
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_relatedNode
;
}
OUString
SAL_CALL
CMutationEvent
::
getPrevValue
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_prevValue
;
}
OUString
SAL_CALL
CMutationEvent
::
getNewValue
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_newValue
;
}
OUString
SAL_CALL
CMutationEvent
::
getAttrName
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_attrName
;
}
AttrChangeType
SAL_CALL
CMutationEvent
::
getAttrChange
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_attrChangeType
;
}
...
...
@@ -64,7 +75,9 @@ namespace DOM { namespace events
const
OUString
&
newValueArg
,
const
OUString
&
attrNameArg
,
AttrChangeType
attrChangeArg
)
throw
(
RuntimeException
)
{
initEvent
(
typeArg
,
canBubbleArg
,
cancelableArg
);
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
CEvent
::
initEvent
(
typeArg
,
canBubbleArg
,
cancelableArg
);
m_relatedNode
=
relatedNodeArg
;
m_prevValue
=
prevValueArg
;
m_newValue
=
newValueArg
;
...
...
unoxml/source/events/mutationevent.hxx
Dosyayı görüntüle @
9123a2f7
...
...
@@ -45,7 +45,11 @@ using ::rtl::OUString;
namespace
DOM
{
namespace
events
{
class
CMutationEvent
:
public
cppu
::
ImplInheritanceHelper1
<
CEvent
,
XMutationEvent
>
typedef
::
cppu
::
ImplInheritanceHelper1
<
CEvent
,
XMutationEvent
>
CMutationEvent_Base
;
class
CMutationEvent
:
public
CMutationEvent_Base
{
friend
class
CEventDispatcher
;
protected
:
...
...
@@ -56,6 +60,7 @@ protected:
AttrChangeType
m_attrChangeType
;
public
:
explicit
CMutationEvent
();
virtual
~
CMutationEvent
();
...
...
unoxml/source/events/uievent.cxx
Dosyayı görüntüle @
9123a2f7
...
...
@@ -25,18 +25,26 @@
*
************************************************************************/
#include
"uievent.hxx"
#include
<uievent.hxx>
namespace
DOM
{
namespace
events
{
CUIEvent
::
CUIEvent
()
:
CUIEvent_Base
()
,
m_detail
(
0
)
{
}
Reference
<
XAbstractView
>
SAL_CALL
CUIEvent
::
getView
()
throw
(
RuntimeException
)
Reference
<
XAbstractView
>
SAL_CALL
CUIEvent
::
getView
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_view
;
}
sal_Int32
SAL_CALL
CUIEvent
::
getDetail
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
return
m_detail
;
}
...
...
@@ -46,7 +54,9 @@ namespace DOM { namespace events
const
Reference
<
XAbstractView
>&
viewArg
,
sal_Int32
detailArg
)
throw
(
RuntimeException
)
{
initEvent
(
typeArg
,
canBubbleArg
,
cancelableArg
);
::
osl
::
MutexGuard
const
g
(
m_Mutex
);
CEvent
::
initEvent
(
typeArg
,
canBubbleArg
,
cancelableArg
);
m_view
=
viewArg
;
m_detail
=
detailArg
;
}
...
...
unoxml/source/events/uievent.hxx
Dosyayı görüntüle @
9123a2f7
...
...
@@ -44,7 +44,10 @@ using namespace com::sun::star::xml::dom::views;
namespace
DOM
{
namespace
events
{
class
CUIEvent
:
public
cppu
::
ImplInheritanceHelper1
<
CEvent
,
XUIEvent
>
typedef
::
cppu
::
ImplInheritanceHelper1
<
CEvent
,
XUIEvent
>
CUIEvent_Base
;
class
CUIEvent
:
public
CUIEvent_Base
{
friend
class
CEventDispatcher
;
protected
:
...
...
@@ -52,6 +55,8 @@ protected:
Reference
<
XAbstractView
>
m_view
;
public
:
explicit
CUIEvent
();
virtual
Reference
<
XAbstractView
>
SAL_CALL
getView
()
throw
(
RuntimeException
);
virtual
sal_Int32
SAL_CALL
getDetail
()
throw
(
RuntimeException
);
virtual
void
SAL_CALL
initUIEvent
(
const
OUString
&
typeArg
,
...
...
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