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
1b69a166
Kaydet (Commit)
1b69a166
authored
Eyl 15, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
boost::scoped_ptr is sufficient here
üst
31526bc1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
ChainablePropertySet.cxx
comphelper/source/property/ChainablePropertySet.cxx
+5
-5
MasterPropertySet.cxx
comphelper/source/property/MasterPropertySet.cxx
+11
-11
No files found.
comphelper/source/property/ChainablePropertySet.cxx
Dosyayı görüntüle @
1b69a166
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#include <comphelper/ChainablePropertySetInfo.hxx>
#include <comphelper/ChainablePropertySetInfo.hxx>
#include <osl/mutex.hxx>
#include <osl/mutex.hxx>
#include <
memory> // STL auto_ptr
#include <
boost/scoped_ptr.hpp>
using
namespace
::
rtl
;
using
namespace
::
rtl
;
...
@@ -78,7 +78,7 @@ void SAL_CALL ChainablePropertySet::setPropertyValue( const ::rtl::OUString& rPr
...
@@ -78,7 +78,7 @@ void SAL_CALL ChainablePropertySet::setPropertyValue( const ::rtl::OUString& rPr
throw
(
UnknownPropertyException
,
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
)
throw
(
UnknownPropertyException
,
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
)
{
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
if
(
mpMutex
)
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
...
@@ -96,7 +96,7 @@ Any SAL_CALL ChainablePropertySet::getPropertyValue( const ::rtl::OUString& rPro
...
@@ -96,7 +96,7 @@ Any SAL_CALL ChainablePropertySet::getPropertyValue( const ::rtl::OUString& rPro
throw
(
UnknownPropertyException
,
WrappedTargetException
,
RuntimeException
)
throw
(
UnknownPropertyException
,
WrappedTargetException
,
RuntimeException
)
{
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
if
(
mpMutex
)
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
...
@@ -142,7 +142,7 @@ void SAL_CALL ChainablePropertySet::setPropertyValues( const Sequence< ::rtl::OU
...
@@ -142,7 +142,7 @@ void SAL_CALL ChainablePropertySet::setPropertyValues( const Sequence< ::rtl::OU
throw
(
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
)
throw
(
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
)
{
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
if
(
mpMutex
)
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
...
@@ -176,7 +176,7 @@ Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues( const Sequence
...
@@ -176,7 +176,7 @@ Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues( const Sequence
throw
(
RuntimeException
)
throw
(
RuntimeException
)
{
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
if
(
mpMutex
)
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
...
...
comphelper/source/property/MasterPropertySet.cxx
Dosyayı görüntüle @
1b69a166
...
@@ -35,26 +35,26 @@
...
@@ -35,26 +35,26 @@
#include <comphelper/ChainablePropertySetInfo.hxx>
#include <comphelper/ChainablePropertySetInfo.hxx>
#include <osl/mutex.hxx>
#include <osl/mutex.hxx>
#include <
memory> // STL auto_ptr
#include <
boost/scoped_ptr.hpp>
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
class
AutoOGuardArray
class
AutoOGuardArray
{
{
sal_Int32
nSize
;
sal_Int32
nSize
;
std
::
auto
_ptr
<
osl
::
SolarGuard
>
*
pGuardArray
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
*
pGuardArray
;
public
:
public
:
AutoOGuardArray
(
sal_Int32
nNumElements
);
AutoOGuardArray
(
sal_Int32
nNumElements
);
~
AutoOGuardArray
();
~
AutoOGuardArray
();
std
::
auto
_ptr
<
osl
::
SolarGuard
>
&
operator
[]
(
sal_Int32
i
)
{
return
pGuardArray
[
i
];
}
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
&
operator
[]
(
sal_Int32
i
)
{
return
pGuardArray
[
i
];
}
};
};
AutoOGuardArray
::
AutoOGuardArray
(
sal_Int32
nNumElements
)
AutoOGuardArray
::
AutoOGuardArray
(
sal_Int32
nNumElements
)
{
{
nSize
=
nNumElements
;
nSize
=
nNumElements
;
pGuardArray
=
new
std
::
auto
_ptr
<
osl
::
SolarGuard
>
[
nSize
];
pGuardArray
=
new
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
[
nSize
];
}
}
AutoOGuardArray
::~
AutoOGuardArray
()
AutoOGuardArray
::~
AutoOGuardArray
()
...
@@ -130,7 +130,7 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope
...
@@ -130,7 +130,7 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope
throw
(
UnknownPropertyException
,
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
)
throw
(
UnknownPropertyException
,
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
)
{
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
if
(
mpMutex
)
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
...
@@ -150,7 +150,7 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope
...
@@ -150,7 +150,7 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const ::rtl::OUString& rPrope
ChainablePropertySet
*
pSlave
=
maSlaveMap
[
(
*
aIter
).
second
->
mnMapId
]
->
mpSlave
;
ChainablePropertySet
*
pSlave
=
maSlaveMap
[
(
*
aIter
).
second
->
mnMapId
]
->
mpSlave
;
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard2
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard2
;
if
(
pSlave
->
mpMutex
)
if
(
pSlave
->
mpMutex
)
pMutexGuard2
.
reset
(
new
osl
::
SolarGuard
(
pSlave
->
mpMutex
)
);
pMutexGuard2
.
reset
(
new
osl
::
SolarGuard
(
pSlave
->
mpMutex
)
);
...
@@ -164,7 +164,7 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper
...
@@ -164,7 +164,7 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper
throw
(
UnknownPropertyException
,
WrappedTargetException
,
RuntimeException
)
throw
(
UnknownPropertyException
,
WrappedTargetException
,
RuntimeException
)
{
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
if
(
mpMutex
)
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
...
@@ -185,7 +185,7 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper
...
@@ -185,7 +185,7 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const ::rtl::OUString& rProper
ChainablePropertySet
*
pSlave
=
maSlaveMap
[
(
*
aIter
).
second
->
mnMapId
]
->
mpSlave
;
ChainablePropertySet
*
pSlave
=
maSlaveMap
[
(
*
aIter
).
second
->
mnMapId
]
->
mpSlave
;
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard2
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard2
;
if
(
pSlave
->
mpMutex
)
if
(
pSlave
->
mpMutex
)
pMutexGuard2
.
reset
(
new
osl
::
SolarGuard
(
pSlave
->
mpMutex
)
);
pMutexGuard2
.
reset
(
new
osl
::
SolarGuard
(
pSlave
->
mpMutex
)
);
...
@@ -225,7 +225,7 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< ::rtl::OUStr
...
@@ -225,7 +225,7 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< ::rtl::OUStr
throw
(
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
)
throw
(
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
)
{
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
if
(
mpMutex
)
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
...
@@ -291,7 +291,7 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< :
...
@@ -291,7 +291,7 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< :
throw
(
RuntimeException
)
throw
(
RuntimeException
)
{
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
if
(
mpMutex
)
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
mpMutex
)
);
...
@@ -392,7 +392,7 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const ::rtl::OUStrin
...
@@ -392,7 +392,7 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const ::rtl::OUStrin
ChainablePropertySet
*
pSlave
=
maSlaveMap
[
(
*
aIter
).
second
->
mnMapId
]
->
mpSlave
;
ChainablePropertySet
*
pSlave
=
maSlaveMap
[
(
*
aIter
).
second
->
mnMapId
]
->
mpSlave
;
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
std
::
auto
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
boost
::
scoped
_ptr
<
osl
::
SolarGuard
>
pMutexGuard
;
if
(
pSlave
->
mpMutex
)
if
(
pSlave
->
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
pSlave
->
mpMutex
)
);
pMutexGuard
.
reset
(
new
osl
::
SolarGuard
(
pSlave
->
mpMutex
)
);
...
...
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