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
81140558
Kaydet (Commit)
81140558
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: I37264f25b5ad89f72d25f78808ff796f581536c4
üst
f9c73e45
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
23 deletions
+6
-23
configaccess.hxx
framework/inc/jobs/configaccess.hxx
+2
-2
configaccess.cxx
framework/source/fwi/jobs/configaccess.cxx
+4
-21
No files found.
framework/inc/jobs/configaccess.hxx
Dosyayı görüntüle @
81140558
...
...
@@ -20,7 +20,6 @@
#ifndef INCLUDED_FRAMEWORK_INC_JOBS_CONFIGACCESS_HXX
#define INCLUDED_FRAMEWORK_INC_JOBS_CONFIGACCESS_HXX
#include <threadhelp/threadhelpbase.hxx>
#include <general.h>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
...
...
@@ -39,7 +38,7 @@ namespace framework{
instead of using soecialize config items of the svtools
project. This class can wrapp such configuration access.
*/
class
FWI_DLLPUBLIC
ConfigAccess
:
public
ThreadHelpBase
class
FWI_DLLPUBLIC
ConfigAccess
{
...
...
@@ -60,6 +59,7 @@ class FWI_DLLPUBLIC ConfigAccess : public ThreadHelpBase
// member
private
:
mutable
osl
::
Mutex
m_mutex
;
/**
reference to the uno service manager
...
...
framework/source/fwi/jobs/configaccess.cxx
Dosyayı görüntüle @
81140558
...
...
@@ -18,7 +18,6 @@
*/
#include <jobs/configaccess.hxx>
#include <threadhelp/guard.hxx>
#include <general.h>
#include <services.h>
...
...
@@ -47,8 +46,7 @@ namespace framework{
*/
ConfigAccess
::
ConfigAccess
(
/*IN*/
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
rxContext
,
/*IN*/
const
OUString
&
sRoot
)
:
ThreadHelpBase
(
)
,
m_xContext
(
rxContext
)
:
m_xContext
(
rxContext
)
,
m_sRoot
(
sRoot
)
,
m_eMode
(
E_CLOSED
)
{
...
...
@@ -76,10 +74,8 @@ ConfigAccess::~ConfigAccess()
*/
ConfigAccess
::
EOpenMode
ConfigAccess
::
getMode
()
const
{
/* SAFE { */
Guard
aReadLock
(
m_aLock
);
osl
::
MutexGuard
g
(
m_mutex
);
return
m_eMode
;
/* } SAFE */
}
...
...
@@ -99,10 +95,7 @@ ConfigAccess::EOpenMode ConfigAccess::getMode() const
*/
void
ConfigAccess
::
open
(
/*IN*/
EOpenMode
eMode
)
{
/* SAFE { */
// We must lock the whole method to be shure, that nobody
// outside uses our internal member m_xAccess!
Guard
aWriteLock
(
m_aLock
);
osl
::
MutexGuard
g
(
m_mutex
);
// check if configuration is already open in the right mode.
// By the way: Don't allow closing by using this method!
...
...
@@ -146,9 +139,6 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode )
if
(
m_xConfig
.
is
())
m_eMode
=
eMode
;
}
aWriteLock
.
unlock
();
/* } SAFE */
}
...
...
@@ -159,11 +149,7 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode )
*/
void
ConfigAccess
::
close
()
{
/* SAFE { */
// Lock the whole method, to be shure that nobody else uses our internal members
// during this time.
Guard
aWriteLock
(
m_aLock
);
osl
::
MutexGuard
g
(
m_mutex
);
// check already closed configuration
if
(
m_xConfig
.
is
())
{
...
...
@@ -173,9 +159,6 @@ void ConfigAccess::close()
m_xConfig
=
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
();
m_eMode
=
E_CLOSED
;
}
aWriteLock
.
unlock
();
/* } SAFE */
}
...
...
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