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
63312dbb
Kaydet (Commit)
63312dbb
authored
Haz 13, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#706280 Uncaught exception
Change-Id: I41d841718da2eab8a6f424df694ba8ea4e450bac
üst
c8b78a1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
ChainablePropertySet.cxx
comphelper/source/property/ChainablePropertySet.cxx
+13
-12
No files found.
comphelper/source/property/ChainablePropertySet.cxx
Dosyayı görüntüle @
63312dbb
...
...
@@ -113,32 +113,33 @@ void SAL_CALL ChainablePropertySet::removeVetoableChangeListener( const OUString
}
// XMultiPropertySet
void
SAL_CALL
ChainablePropertySet
::
setPropertyValues
(
const
Sequence
<
OUString
>&
aPropertyNames
,
const
Sequence
<
Any
>&
aValues
)
throw
(
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
,
std
::
exception
)
void
SAL_CALL
ChainablePropertySet
::
setPropertyValues
(
const
Sequence
<
OUString
>&
rPropertyNames
,
const
Sequence
<
Any
>&
rValues
)
throw
(
PropertyVetoException
,
IllegalArgumentException
,
WrappedTargetException
,
RuntimeException
,
std
::
exception
)
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost
::
scoped_ptr
<
osl
::
Guard
<
comphelper
::
SolarMutex
>
>
pMutexGuard
;
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
Guard
<
comphelper
::
SolarMutex
>
(
mpMutex
)
);
const
sal_Int32
nCount
=
a
PropertyNames
.
getLength
();
const
sal_Int32
nCount
=
r
PropertyNames
.
getLength
();
if
(
nCount
!=
a
Values
.
getLength
()
)
if
(
nCount
!=
r
Values
.
getLength
()
)
throw
IllegalArgumentException
();
if
(
nCount
)
{
_preSetValues
();
const
Any
*
pAny
=
a
Values
.
getConstArray
();
const
OUString
*
pString
=
a
PropertyNames
.
getConstArray
();
const
Any
*
pAny
=
r
Values
.
getConstArray
();
const
OUString
*
pString
=
r
PropertyNames
.
getConstArray
();
PropertyInfoHash
::
const_iterator
aEnd
=
mpInfo
->
maMap
.
end
(),
aIter
;
for
(
sal_Int32
i
=
0
;
i
<
nCount
;
++
i
,
++
pString
,
++
pAny
)
{
aIter
=
mpInfo
->
maMap
.
find
(
*
pString
);
if
(
aIter
==
aEnd
)
throw
UnknownProperty
Exception
(
*
pString
,
static_cast
<
XPropertySet
*
>
(
this
)
);
throw
Runtime
Exception
(
*
pString
,
static_cast
<
XPropertySet
*
>
(
this
)
);
_setSingleValue
(
*
((
*
aIter
).
second
),
*
pAny
);
}
...
...
@@ -147,15 +148,15 @@ void SAL_CALL ChainablePropertySet::setPropertyValues( const Sequence< OUString
}
}
Sequence
<
Any
>
SAL_CALL
ChainablePropertySet
::
getPropertyValues
(
const
Sequence
<
OUString
>&
aPropertyNames
)
throw
(
RuntimeException
,
std
::
exception
)
Sequence
<
Any
>
SAL_CALL
ChainablePropertySet
::
getPropertyValues
(
const
Sequence
<
OUString
>&
rPropertyNames
)
throw
(
RuntimeException
,
std
::
exception
)
{
// acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost
::
scoped_ptr
<
osl
::
Guard
<
comphelper
::
SolarMutex
>
>
pMutexGuard
;
if
(
mpMutex
)
pMutexGuard
.
reset
(
new
osl
::
Guard
<
comphelper
::
SolarMutex
>
(
mpMutex
)
);
const
sal_Int32
nCount
=
a
PropertyNames
.
getLength
();
const
sal_Int32
nCount
=
r
PropertyNames
.
getLength
();
Sequence
<
Any
>
aValues
(
nCount
);
...
...
@@ -164,14 +165,14 @@ Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues( const Sequence
_preGetValues
();
Any
*
pAny
=
aValues
.
getArray
();
const
OUString
*
pString
=
a
PropertyNames
.
getConstArray
();
const
OUString
*
pString
=
r
PropertyNames
.
getConstArray
();
PropertyInfoHash
::
const_iterator
aEnd
=
mpInfo
->
maMap
.
end
(),
aIter
;
for
(
sal_Int32
i
=
0
;
i
<
nCount
;
++
i
,
++
pString
,
++
pAny
)
{
aIter
=
mpInfo
->
maMap
.
find
(
*
pString
);
if
(
aIter
==
aEnd
)
throw
UnknownProperty
Exception
(
*
pString
,
static_cast
<
XPropertySet
*
>
(
this
)
);
throw
Runtime
Exception
(
*
pString
,
static_cast
<
XPropertySet
*
>
(
this
)
);
_getSingleValue
(
*
((
*
aIter
).
second
),
*
pAny
);
}
...
...
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