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
9baa3cf7
Kaydet (Commit)
9baa3cf7
authored
Mar 20, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use an osl::Mutex directly
Change-Id: I22d6d17bbd6886733df645e4d217c6fd1d995929
üst
3a94a46f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
21 deletions
+12
-21
helponstartup.hxx
framework/inc/jobs/helponstartup.hxx
+2
-4
helponstartup.cxx
framework/source/jobs/helponstartup.cxx
+10
-17
No files found.
framework/inc/jobs/helponstartup.hxx
Dosyayı görüntüle @
9baa3cf7
...
...
@@ -20,7 +20,6 @@
#ifndef INCLUDED_FRAMEWORK_INC_JOBS_HELPONSTARTUP_HXX
#define INCLUDED_FRAMEWORK_INC_JOBS_HELPONSTARTUP_HXX
#include <threadhelp/threadhelpbase.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
...
...
@@ -45,13 +44,12 @@ namespace framework{
@author as96863
*/
class
HelpOnStartup
:
private
ThreadHelpBase
,
public
::
cppu
::
WeakImplHelper3
<
::
com
::
sun
::
star
::
lang
::
XServiceInfo
,
::
com
::
sun
::
star
::
lang
::
XEventListener
,
::
com
::
sun
::
star
::
task
::
XJob
>
class
HelpOnStartup
:
public
::
cppu
::
WeakImplHelper3
<
::
com
::
sun
::
star
::
lang
::
XServiceInfo
,
::
com
::
sun
::
star
::
lang
::
XEventListener
,
::
com
::
sun
::
star
::
task
::
XJob
>
{
// member
private
:
osl
::
Mutex
m_mutex
;
/** @short reference to an uno service manager. */
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
m_xContext
;
...
...
framework/source/jobs/helponstartup.cxx
Dosyayı görüntüle @
9baa3cf7
...
...
@@ -21,7 +21,6 @@
// include own header
#include <jobs/helponstartup.hxx>
#include <threadhelp/guard.hxx>
#include <loadenv/targethelper.hxx>
#include <services.h>
...
...
@@ -101,8 +100,7 @@ DEFINE_INIT_SERVICE(HelpOnStartup,
HelpOnStartup
::
HelpOnStartup
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
)
:
ThreadHelpBase
(
)
,
m_xContext
(
xContext
)
:
m_xContext
(
xContext
)
{
}
...
...
@@ -163,18 +161,13 @@ css::uno::Any SAL_CALL HelpOnStartup::execute(const css::uno::Sequence< css::bea
void
SAL_CALL
HelpOnStartup
::
disposing
(
const
css
::
lang
::
EventObject
&
aEvent
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
// SAFE ->
Guard
aLock
(
m_aLock
);
osl
::
MutexGuard
g
(
m_mutex
);
if
(
aEvent
.
Source
==
m_xModuleManager
)
m_xModuleManager
.
clear
();
else
if
(
aEvent
.
Source
==
m_xDesktop
)
m_xDesktop
.
clear
();
else
if
(
aEvent
.
Source
==
m_xConfig
)
m_xConfig
.
clear
();
aLock
.
unlock
();
// <- SAFE
}
...
...
@@ -211,9 +204,9 @@ OUString HelpOnStartup::its_getModuleIdFromEnv(const css::uno::Sequence< css::be
// OK - now we are sure this document is a top level document.
// Classify it.
// SAFE ->
Guard
aLock
(
m_aLock
);
osl
::
ClearableMutexGuard
aLock
(
m_mutex
);
css
::
uno
::
Reference
<
css
::
frame
::
XModuleManager2
>
xModuleManager
=
m_xModuleManager
;
aLock
.
unlock
();
aLock
.
clear
();
// <- SAFE
OUString
sModuleId
;
...
...
@@ -233,9 +226,9 @@ OUString HelpOnStartup::its_getModuleIdFromEnv(const css::uno::Sequence< css::be
OUString
HelpOnStartup
::
its_getCurrentHelpURL
()
{
// SAFE ->
Guard
aLock
(
m_aLock
);
osl
::
ClearableMutexGuard
aLock
(
m_mutex
);
css
::
uno
::
Reference
<
css
::
frame
::
XDesktop2
>
xDesktop
=
m_xDesktop
;
aLock
.
unlock
();
aLock
.
clear
();
// <- SAFE
if
(
!
xDesktop
.
is
())
...
...
@@ -278,11 +271,11 @@ OUString HelpOnStartup::its_getCurrentHelpURL()
return
sal_False
;
// SAFE ->
Guard
aLock
(
m_aLock
);
osl
::
ClearableMutexGuard
aLock
(
m_mutex
);
css
::
uno
::
Reference
<
css
::
container
::
XNameAccess
>
xConfig
=
m_xConfig
;
OUString
sLocale
=
m_sLocale
;
OUString
sSystem
=
m_sSystem
;
aLock
.
unlock
();
aLock
.
clear
();
// <- SAFE
if
(
!
xConfig
.
is
())
...
...
@@ -322,11 +315,11 @@ OUString HelpOnStartup::its_getCurrentHelpURL()
OUString
HelpOnStartup
::
its_checkIfHelpEnabledAndGetURL
(
const
OUString
&
sModule
)
{
// SAFE ->
Guard
aLock
(
m_aLock
);
osl
::
ClearableMutexGuard
aLock
(
m_mutex
);
css
::
uno
::
Reference
<
css
::
container
::
XNameAccess
>
xConfig
=
m_xConfig
;
OUString
sLocale
=
m_sLocale
;
OUString
sSystem
=
m_sSystem
;
aLock
.
unlock
();
aLock
.
clear
();
// <- SAFE
OUString
sHelpURL
;
...
...
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