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
a96d082b
Kaydet (Commit)
a96d082b
authored
13 years ago
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert SbPropertyValueArr_Impl to boost::ptr_vector
Change-Id: Id3189a9abff5ee97b93bccefba8193ba36cb043a
üst
a7a6f775
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
+14
-16
propacc.cxx
basic/source/classes/propacc.cxx
+11
-14
propacc.hxx
basic/source/inc/propacc.hxx
+3
-2
No files found.
basic/source/classes/propacc.cxx
Dosyayı görüntüle @
a96d082b
...
...
@@ -62,13 +62,13 @@ int CDECL SbCompare_PropertyValues_Impl( const void *arg1, const void *arg2 )
struct
SbCompare_UString_PropertyValue_Impl
{
bool
operator
()
(
const
::
rtl
::
OUString
&
lhs
,
PropertyValue
*
const
&
rhs
)
bool
operator
()
(
const
::
rtl
::
OUString
&
lhs
,
PropertyValue
const
&
rhs
)
{
return
lhs
.
compareTo
(
rhs
->
Name
)
<
0
;
return
lhs
.
compareTo
(
rhs
.
Name
)
<
0
;
}
bool
operator
()
(
PropertyValue
*
const
&
lhs
,
const
::
rtl
::
OUString
&
rhs
)
bool
operator
()
(
PropertyValue
const
&
lhs
,
const
::
rtl
::
OUString
&
rhs
)
{
return
lhs
->
Name
.
compareTo
(
rhs
)
<
0
;
return
lhs
.
Name
.
compareTo
(
rhs
)
<
0
;
}
};
...
...
@@ -95,9 +95,6 @@ SbPropertyValues::SbPropertyValues()
SbPropertyValues
::~
SbPropertyValues
()
{
m_xInfo
=
Reference
<
XPropertySetInfo
>
();
for
(
sal_uInt16
n
=
0
;
n
<
m_aPropVals
.
size
();
++
n
)
delete
m_aPropVals
[
n
];
}
//----------------------------------------------------------------------------
...
...
@@ -141,8 +138,8 @@ void SbPropertyValues::setPropertyValue(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
size_t
const
nIndex
=
GetIndex_Impl
(
aPropertyName
);
PropertyValue
*
const
p
PropVal
=
m_aPropVals
[
nIndex
];
pPropVal
->
Value
=
aValue
;
PropertyValue
&
r
PropVal
=
m_aPropVals
[
nIndex
];
rPropVal
.
Value
=
aValue
;
}
//----------------------------------------------------------------------------
...
...
@@ -154,7 +151,7 @@ Any SbPropertyValues::getPropertyValue(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
size_t
const
nIndex
=
GetIndex_Impl
(
aPropertyName
);
return
m_aPropVals
[
nIndex
]
->
Value
;
return
m_aPropVals
[
nIndex
]
.
Value
;
}
//----------------------------------------------------------------------------
...
...
@@ -202,8 +199,8 @@ void SbPropertyValues::removeVetoableChangeListener(
Sequence
<
PropertyValue
>
SbPropertyValues
::
getPropertyValues
(
void
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
Sequence
<
PropertyValue
>
aRet
(
m_aPropVals
.
size
()
);
for
(
sal_uInt16
n
=
0
;
n
<
m_aPropVals
.
size
();
++
n
)
aRet
.
getArray
()[
n
]
=
*
m_aPropVals
[
n
];
for
(
size_t
n
=
0
;
n
<
m_aPropVals
.
size
();
++
n
)
aRet
.
getArray
()[
n
]
=
m_aPropVals
[
n
];
return
aRet
;
}
...
...
@@ -220,7 +217,7 @@ void SbPropertyValues::setPropertyValues(const Sequence< PropertyValue >& rPrope
throw
PropertyExistException
();
const
PropertyValue
*
pPropVals
=
rPropertyValues
.
getConstArray
();
for
(
sal_Int16
n
=
0
;
n
<
rPropertyValues
.
getLength
();
++
n
)
for
(
sal_Int32
n
=
0
;
n
<
rPropertyValues
.
getLength
();
++
n
)
{
PropertyValue
*
pPropVal
=
new
PropertyValue
(
pPropVals
[
n
]);
m_aPropVals
.
push_back
(
pPropVal
);
...
...
@@ -272,7 +269,7 @@ SbPropertySetInfo::SbPropertySetInfo( const SbPropertyValueArr_Impl &rPropVals )
for
(
sal_uInt16
n
=
0
;
n
<
rPropVals
.
size
();
++
n
)
{
Property
&
rProp
=
aImpl
.
_aProps
.
getArray
()[
n
];
const
PropertyValue
&
rPropVal
=
*
rPropVals
[
n
];
const
PropertyValue
&
rPropVal
=
rPropVals
[
n
];
rProp
.
Name
=
rPropVal
.
Name
;
rProp
.
Handle
=
rPropVal
.
Handle
;
rProp
.
Type
=
getCppuVoidType
();
...
...
This diff is collapsed.
Click to expand it.
basic/source/inc/propacc.hxx
Dosyayı görüntüle @
a96d082b
...
...
@@ -35,9 +35,10 @@
#include <com/sun/star/beans/XPropertyContainer.hpp>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx>
#include <
vector
>
#include <
boost/ptr_container/ptr_vector.hpp
>
typedef
std
::
vector
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
*
>
SbPropertyValueArr_Impl
;
typedef
::
boost
::
ptr_vector
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>
SbPropertyValueArr_Impl
;
typedef
::
cppu
::
WeakImplHelper2
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
,
::
com
::
sun
::
star
::
beans
::
XPropertyAccess
>
SbPropertyValuesHelper
;
...
...
This diff is collapsed.
Click to expand it.
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