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
bb6d9b01
Kaydet (Commit)
bb6d9b01
authored
Haz 25, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove this class that only derives from std::vector and not much else.
Change-Id: Ibc584f4148cec49a9ac34a240cc2fa3e87daf443
üst
54c6f08c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
26 deletions
+16
-26
sbxarray.cxx
basic/source/sbx/sbxarray.cxx
+12
-24
sbx.hxx
include/basic/sbx.hxx
+4
-2
No files found.
basic/source/sbx/sbxarray.cxx
Dosyayı görüntüle @
bb6d9b01
...
@@ -36,15 +36,6 @@ public:
...
@@ -36,15 +36,6 @@ public:
~
SbxVarEntry
()
{
delete
pAlias
;
}
~
SbxVarEntry
()
{
delete
pAlias
;
}
};
};
typedef
SbxVarEntry
*
SbxVarEntryPtr
;
typedef
vector
<
SbxVarEntryPtr
>
SbxVarEntryPtrVector
;
class
SbxVarRefs
:
public
SbxVarEntryPtrVector
{
public
:
SbxVarRefs
(
void
)
{}
};
TYPEINIT1
(
SbxArray
,
SbxBase
)
TYPEINIT1
(
SbxArray
,
SbxBase
)
TYPEINIT1
(
SbxDimArray
,
SbxArray
)
TYPEINIT1
(
SbxDimArray
,
SbxArray
)
...
@@ -52,7 +43,7 @@ TYPEINIT1(SbxDimArray,SbxArray)
...
@@ -52,7 +43,7 @@ TYPEINIT1(SbxDimArray,SbxArray)
SbxArray
::
SbxArray
(
SbxDataType
t
)
:
SbxBase
()
SbxArray
::
SbxArray
(
SbxDataType
t
)
:
SbxBase
()
{
{
pData
=
new
SbxVarRefs
;
pData
=
new
VarEntriesType
;
eType
=
t
;
eType
=
t
;
if
(
t
!=
SbxVARIANT
)
if
(
t
!=
SbxVARIANT
)
SetFlag
(
SBX_FIXED
);
SetFlag
(
SBX_FIXED
);
...
@@ -61,7 +52,7 @@ SbxArray::SbxArray( SbxDataType t ) : SbxBase()
...
@@ -61,7 +52,7 @@ SbxArray::SbxArray( SbxDataType t ) : SbxBase()
SbxArray
::
SbxArray
(
const
SbxArray
&
rArray
)
:
SbxArray
::
SbxArray
(
const
SbxArray
&
rArray
)
:
SvRefBase
(
rArray
),
SbxBase
()
SvRefBase
(
rArray
),
SbxBase
()
{
{
pData
=
new
SbxVarRefs
;
pData
=
new
VarEntriesType
;
if
(
rArray
.
eType
!=
SbxVARIANT
)
if
(
rArray
.
eType
!=
SbxVARIANT
)
SetFlag
(
SBX_FIXED
);
SetFlag
(
SBX_FIXED
);
*
this
=
rArray
;
*
this
=
rArray
;
...
@@ -73,14 +64,14 @@ SbxArray& SbxArray::operator=( const SbxArray& rArray )
...
@@ -73,14 +64,14 @@ SbxArray& SbxArray::operator=( const SbxArray& rArray )
{
{
eType
=
rArray
.
eType
;
eType
=
rArray
.
eType
;
Clear
();
Clear
();
SbxVarRefs
*
pSrc
=
rArray
.
pData
;
VarEntriesType
*
pSrc
=
rArray
.
pData
;
for
(
sal_uInt32
i
=
0
;
i
<
pSrc
->
size
();
i
++
)
for
(
sal_uInt32
i
=
0
;
i
<
pSrc
->
size
();
i
++
)
{
{
SbxVarEntry
Ptr
pSrcRef
=
(
*
pSrc
)[
i
];
SbxVarEntry
*
pSrcRef
=
(
*
pSrc
)[
i
];
const
SbxVariable
*
pSrc_
=
*
pSrcRef
;
const
SbxVariable
*
pSrc_
=
*
pSrcRef
;
if
(
!
pSrc_
)
if
(
!
pSrc_
)
continue
;
continue
;
SbxVarEntry
Ptr
pDstRef
=
new
SbxVarEntry
;
SbxVarEntry
*
pDstRef
=
new
SbxVarEntry
;
*
((
SbxVariableRef
*
)
pDstRef
)
=
*
((
SbxVariableRef
*
)
pSrcRef
);
*
((
SbxVariableRef
*
)
pDstRef
)
=
*
((
SbxVariableRef
*
)
pSrcRef
);
if
(
pSrcRef
->
pAlias
)
if
(
pSrcRef
->
pAlias
)
{
{
...
@@ -151,8 +142,7 @@ SbxVariableRef& SbxArray::GetRef32( sal_uInt32 nIdx )
...
@@ -151,8 +142,7 @@ SbxVariableRef& SbxArray::GetRef32( sal_uInt32 nIdx )
}
}
while
(
pData
->
size
()
<=
nIdx
)
while
(
pData
->
size
()
<=
nIdx
)
{
{
const
SbxVarEntryPtr
p
=
new
SbxVarEntry
;
pData
->
push_back
(
new
SbxVarEntry
);
pData
->
push_back
(
p
);
}
}
return
*
((
*
pData
)[
nIdx
]);
return
*
((
*
pData
)[
nIdx
]);
}
}
...
@@ -169,8 +159,7 @@ SbxVariableRef& SbxArray::GetRef( sal_uInt16 nIdx )
...
@@ -169,8 +159,7 @@ SbxVariableRef& SbxArray::GetRef( sal_uInt16 nIdx )
}
}
while
(
pData
->
size
()
<=
nIdx
)
while
(
pData
->
size
()
<=
nIdx
)
{
{
const
SbxVarEntryPtr
p
=
new
SbxVarEntry
;
pData
->
push_back
(
new
SbxVarEntry
);
pData
->
push_back
(
p
);
}
}
return
*
((
*
pData
)[
nIdx
]);
return
*
((
*
pData
)[
nIdx
]);
}
}
...
@@ -291,9 +280,9 @@ void SbxArray::Insert32( SbxVariable* pVar, sal_uInt32 nIdx )
...
@@ -291,9 +280,9 @@ void SbxArray::Insert32( SbxVariable* pVar, sal_uInt32 nIdx )
{
{
return
;
return
;
}
}
SbxVarEntry
Ptr
p
=
new
SbxVarEntry
;
SbxVarEntry
*
p
=
new
SbxVarEntry
;
*
((
SbxVariableRef
*
)
p
)
=
pVar
;
*
((
SbxVariableRef
*
)
p
)
=
pVar
;
SbxVarEntryPtrVector
::
size_type
nSize
=
pData
->
size
();
size_t
nSize
=
pData
->
size
();
if
(
nIdx
>
nSize
)
if
(
nIdx
>
nSize
)
{
{
nIdx
=
nSize
;
nIdx
=
nSize
;
...
@@ -370,7 +359,7 @@ void SbxArray::Merge( SbxArray* p )
...
@@ -370,7 +359,7 @@ void SbxArray::Merge( SbxArray* p )
sal_uInt32
nSize
=
p
->
Count
();
sal_uInt32
nSize
=
p
->
Count
();
for
(
sal_uInt32
i
=
0
;
i
<
nSize
;
i
++
)
for
(
sal_uInt32
i
=
0
;
i
<
nSize
;
i
++
)
{
{
SbxVarEntry
Ptr
pRef1
=
(
*
(
p
->
pData
))[
i
];
SbxVarEntry
*
pRef1
=
(
*
(
p
->
pData
))[
i
];
// Is the element by name already inside?
// Is the element by name already inside?
// Then overwrite!
// Then overwrite!
SbxVariable
*
pVar
=
*
pRef1
;
SbxVariable
*
pVar
=
*
pRef1
;
...
@@ -390,9 +379,8 @@ void SbxArray::Merge( SbxArray* p )
...
@@ -390,9 +379,8 @@ void SbxArray::Merge( SbxArray* p )
}
}
if
(
pRef1
)
if
(
pRef1
)
{
{
SbxVarEntryPtr
pRef
=
new
SbxVarEntry
;
SbxVarEntry
*
pRef
=
new
SbxVarEntry
;
const
SbxVarEntryPtr
pTemp
=
pRef
;
pData
->
push_back
(
pRef
);
pData
->
push_back
(
pTemp
);
*
((
SbxVariableRef
*
)
pRef
)
=
*
((
SbxVariableRef
*
)
pRef1
);
*
((
SbxVariableRef
*
)
pRef
)
=
*
((
SbxVariableRef
*
)
pRef1
);
if
(
pRef1
->
pAlias
)
if
(
pRef1
->
pAlias
)
{
{
...
...
include/basic/sbx.hxx
Dosyayı görüntüle @
bb6d9b01
...
@@ -115,17 +115,19 @@ public:
...
@@ -115,17 +115,19 @@ public:
// The variables convert from SbxVariablen. Put()/Insert() into the
// The variables convert from SbxVariablen. Put()/Insert() into the
// declared datatype, if they are not SbxVARIANT.
// declared datatype, if they are not SbxVARIANT.
class
SbxVar
Refs
;
class
SbxVar
Entry
;
class
BASIC_DLLPUBLIC
SbxArray
:
public
SbxBase
class
BASIC_DLLPUBLIC
SbxArray
:
public
SbxBase
{
{
typedef
std
::
vector
<
SbxVarEntry
*>
VarEntriesType
;
// #100883 Method to set method directly to parameter array
// #100883 Method to set method directly to parameter array
friend
class
SbMethod
;
friend
class
SbMethod
;
friend
class
SbClassModuleObject
;
friend
class
SbClassModuleObject
;
friend
SbxObject
*
cloneTypeObjectImpl
(
const
SbxObject
&
rTypeObj
);
friend
SbxObject
*
cloneTypeObjectImpl
(
const
SbxObject
&
rTypeObj
);
BASIC_DLLPRIVATE
void
PutDirect
(
SbxVariable
*
pVar
,
sal_uInt32
nIdx
);
BASIC_DLLPRIVATE
void
PutDirect
(
SbxVariable
*
pVar
,
sal_uInt32
nIdx
);
SbxVarRefs
*
pData
;
// The variables
VarEntriesType
*
pData
;
// The variables
protected
:
protected
:
SbxDataType
eType
;
// Data type of the array
SbxDataType
eType
;
// Data type of the array
...
...
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