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
15f32b5a
Kaydet (Commit)
15f32b5a
authored
Tem 17, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
basic: replace boost::ptr_vector with std::vector<std::unique_ptr>>
Change-Id: I96ea97c1df7903a28387d8e1171075be55a80ca7
üst
ce6466f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
15 deletions
+17
-15
sbxbase.cxx
basic/source/sbx/sbxbase.cxx
+7
-7
sbxvar.cxx
basic/source/sbx/sbxvar.cxx
+7
-5
sbx.hxx
include/basic/sbx.hxx
+3
-3
No files found.
basic/source/sbx/sbxbase.cxx
Dosyayı görüntüle @
15f32b5a
...
...
@@ -328,20 +328,20 @@ SbxInfo::~SbxInfo()
void
SbxInfo
::
AddParam
(
const
OUString
&
rName
,
SbxDataType
eType
,
SbxFlagBits
nFlags
)
{
aParams
.
push_back
(
new
SbxParamInfo
(
rName
,
eType
,
nFlags
));
m_Params
.
push_back
(
std
::
unique_ptr
<
SbxParamInfo
>
(
new
SbxParamInfo
(
rName
,
eType
,
nFlags
)
));
}
const
SbxParamInfo
*
SbxInfo
::
GetParam
(
sal_uInt16
n
)
const
{
if
(
n
<
1
||
n
>
aParams
.
size
()
)
if
(
n
<
1
||
n
>
m_Params
.
size
()
)
return
NULL
;
else
return
&
(
aParams
[
n
-
1
]
);
return
m_Params
[
n
-
1
].
get
(
);
}
bool
SbxInfo
::
LoadData
(
SvStream
&
rStrm
,
sal_uInt16
nVer
)
{
a
Params
.
clear
();
m_
Params
.
clear
();
sal_uInt16
nParam
;
aComment
=
read_uInt16_lenPrefixed_uInt8s_ToOUString
(
rStrm
,
RTL_TEXTENCODING_ASCII_US
);
...
...
@@ -359,7 +359,7 @@ bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
if
(
nVer
>
1
)
rStrm
.
ReadUInt32
(
nUserData
);
AddParam
(
aName
,
(
SbxDataType
)
nType
,
nFlags
);
SbxParamInfo
&
p
(
a
Params
.
back
());
SbxParamInfo
&
p
(
*
m_
Params
.
back
());
p
.
nUserData
=
nUserData
;
}
return
true
;
...
...
@@ -371,8 +371,8 @@ bool SbxInfo::StoreData( SvStream& rStrm ) const
RTL_TEXTENCODING_ASCII_US
);
write_uInt16_lenPrefixed_uInt8s_FromOUString
(
rStrm
,
aHelpFile
,
RTL_TEXTENCODING_ASCII_US
);
rStrm
.
WriteUInt32
(
nHelpId
).
WriteUInt16
(
a
Params
.
size
()
);
for
(
SbxParams
::
const_iterator
i
=
aParams
.
begin
();
i
!=
aParams
.
end
();
++
i
)
rStrm
.
WriteUInt32
(
nHelpId
).
WriteUInt16
(
m_
Params
.
size
()
);
for
(
auto
const
&
i
:
m_Params
)
{
write_uInt16_lenPrefixed_uInt8s_FromOUString
(
rStrm
,
i
->
aName
,
RTL_TEXTENCODING_ASCII_US
);
...
...
basic/source/sbx/sbxvar.cxx
Dosyayı görüntüle @
15f32b5a
...
...
@@ -228,7 +228,7 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
// Request parameter-information (not for objects)
const_cast
<
SbxVariable
*>
(
this
)
->
GetInfo
();
// Append nothing, if it is a simple property (no empty brackets)
if
(
!
pInfo
||
(
pInfo
->
aParams
.
empty
()
&&
GetClass
()
==
SbxCLASS_PROPERTY
))
if
(
!
pInfo
||
(
pInfo
->
m_Params
.
empty
()
&&
GetClass
()
==
SbxCLASS_PROPERTY
))
{
return
maName
;
}
...
...
@@ -249,10 +249,11 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
}
aTmp
+=
"("
;
for
(
SbxParams
::
const_iterator
i
=
pInfo
->
aParams
.
begin
();
i
!=
pInfo
->
aParams
.
end
();
++
i
)
for
(
SbxParams
::
const_iterator
iter
=
pInfo
->
m_Params
.
begin
();
iter
!=
pInfo
->
m_Params
.
end
();
++
iter
)
{
auto
const
&
i
=
*
iter
;
int
nt
=
i
->
eType
&
0x0FFF
;
if
(
i
!=
pInfo
->
aParams
.
begin
()
)
if
(
iter
!=
pInfo
->
m_Params
.
begin
()
)
{
aTmp
+=
","
;
}
...
...
@@ -639,11 +640,12 @@ bool SbxVariable::StoreData( SvStream& rStrm ) const
////////////////////////////// SbxInfo
SbxInfo
::
SbxInfo
()
:
aHelpFile
(),
nHelpId
(
0
),
aParams
()
SbxInfo
::
SbxInfo
()
:
aHelpFile
(),
nHelpId
(
0
)
{}
SbxInfo
::
SbxInfo
(
const
OUString
&
r
,
sal_uInt32
n
)
:
aHelpFile
(
r
),
nHelpId
(
n
)
,
aParams
()
:
aHelpFile
(
r
),
nHelpId
(
n
)
{}
////////////////////////////// SbxAlias
...
...
include/basic/sbx.hxx
Dosyayı görüntüle @
15f32b5a
...
...
@@ -31,8 +31,8 @@
#include <basic/sbxmeth.hxx>
#include <basic/basicdllapi.h>
#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>
#include <memory>
class
SvStream
;
class
SbxBase
;
...
...
@@ -59,7 +59,7 @@ struct SbxParamInfo
~
SbxParamInfo
()
{}
};
typedef
boost
::
ptr_vector
<
SbxParamInfo
>
SbxParams
;
typedef
std
::
vector
<
std
::
unique_ptr
<
SbxParamInfo
>
>
SbxParams
;
class
BASIC_DLLPUBLIC
SbxInfo
:
public
SvRefBase
{
...
...
@@ -69,7 +69,7 @@ class BASIC_DLLPUBLIC SbxInfo : public SvRefBase
OUString
aComment
;
OUString
aHelpFile
;
sal_uInt32
nHelpId
;
SbxParams
a
Params
;
SbxParams
m_
Params
;
protected
:
bool
LoadData
(
SvStream
&
,
sal_uInt16
);
...
...
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