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
8a2e5420
Kaydet (Commit)
8a2e5420
authored
Mar 18, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use SolarMutexGuard directly
Change-Id: I0ff561aecfd16f59be90f054d076d771179c77cd
üst
98861476
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
22 deletions
+6
-22
dispatchrecordersupplier.hxx
framework/inc/recording/dispatchrecordersupplier.hxx
+1
-6
dispatchrecordersupplier.cxx
framework/source/recording/dispatchrecordersupplier.cxx
+5
-16
No files found.
framework/inc/recording/dispatchrecordersupplier.hxx
Dosyayı görüntüle @
8a2e5420
...
...
@@ -20,7 +20,6 @@
#ifndef INCLUDED_FRAMEWORK_INC_RECORDING_DISPATCHRECORDERSUPPLIER_HXX
#define INCLUDED_FRAMEWORK_INC_RECORDING_DISPATCHRECORDERSUPPLIER_HXX
#include <threadhelp/threadhelpbase.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
...
...
@@ -45,11 +44,7 @@ namespace framework{
@threadsafe yes
*/
class
DispatchRecorderSupplier
:
// baseclasses
// Order is necessary for right initialization!
private
ThreadHelpBase
,
// interfaces
public
::
cppu
::
WeakImplHelper2
<
class
DispatchRecorderSupplier
:
public
::
cppu
::
WeakImplHelper2
<
css
::
lang
::
XServiceInfo
,
css
::
frame
::
XDispatchRecorderSupplier
>
{
...
...
framework/source/recording/dispatchrecordersupplier.cxx
Dosyayı görüntüle @
8a2e5420
...
...
@@ -18,7 +18,6 @@
*/
#include <recording/dispatchrecordersupplier.hxx>
#include <threadhelp/guard.hxx>
#include <services.h>
#include <com/sun/star/frame/XRecordableDispatch.hpp>
...
...
@@ -55,11 +54,7 @@ DEFINE_INIT_SERVICE(
it's not necessary to do anything here.
*/
DispatchRecorderSupplier
::
DispatchRecorderSupplier
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>&
)
// init baseclasses first!
// Attention: Don't change order of initialization!
:
ThreadHelpBase
(
&
Application
::
GetSolarMutex
()
)
// init member
,
m_xDispatchRecorder
(
NULL
)
:
m_xDispatchRecorder
(
NULL
)
{
}
...
...
@@ -95,10 +90,8 @@ DispatchRecorderSupplier::~DispatchRecorderSupplier()
*/
void
SAL_CALL
DispatchRecorderSupplier
::
setDispatchRecorder
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XDispatchRecorder
>&
xRecorder
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
// SAFE =>
Guard
aWriteLock
(
m_aLock
);
SolarMutexGuard
g
;
m_xDispatchRecorder
=
xRecorder
;
// => SAFE
}
/**
...
...
@@ -117,10 +110,8 @@ void SAL_CALL DispatchRecorderSupplier::setDispatchRecorder( const css::uno::Ref
*/
css
::
uno
::
Reference
<
css
::
frame
::
XDispatchRecorder
>
SAL_CALL
DispatchRecorderSupplier
::
getDispatchRecorder
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
// SAFE =>
Guard
aReadLock
(
m_aLock
);
SolarMutexGuard
g
;
return
m_xDispatchRecorder
;
// => SAFE
}
...
...
@@ -141,11 +132,9 @@ void SAL_CALL DispatchRecorderSupplier::dispatchAndRecord( const css::util::URL&
const
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>&
lArguments
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XDispatch
>&
xDispatcher
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
// SAFE =>
Guard
aReadLock
(
m_aLock
);
SolarMutexClearableGuard
aReadLock
;
css
::
uno
::
Reference
<
css
::
frame
::
XDispatchRecorder
>
xRecorder
=
m_xDispatchRecorder
;
aReadLock
.
unlock
();
// => SAFE
aReadLock
.
clear
();
// clear unspecific situations
if
(
!
xDispatcher
.
is
())
...
...
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