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
440a7c9b
Kaydet (Commit)
440a7c9b
authored
Ock 14, 2012
tarafından
August Sodora
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SV_DECL_PTRARR_DEL->boost::ptr_vector
üst
1c0912ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
30 deletions
+24
-30
sbx.hxx
basic/inc/basic/sbx.hxx
+3
-3
sbxbase.cxx
basic/source/sbx/sbxbase.cxx
+12
-17
sbxvar.cxx
basic/source/sbx/sbxvar.cxx
+9
-10
No files found.
basic/inc/basic/sbx.hxx
Dosyayı görüntüle @
440a7c9b
...
@@ -41,6 +41,8 @@
...
@@ -41,6 +41,8 @@
#include <basic/sbxmeth.hxx>
#include <basic/sbxmeth.hxx>
#include "basicdllapi.h"
#include "basicdllapi.h"
#include <boost/ptr_container/ptr_vector.hpp>
class
String
;
class
String
;
class
UniString
;
class
UniString
;
class
SvStream
;
class
SvStream
;
...
@@ -56,8 +58,6 @@ class SbxFactory;
...
@@ -56,8 +58,6 @@ class SbxFactory;
class
SfxBroadcaster
;
class
SfxBroadcaster
;
class
SvDispatch
;
class
SvDispatch
;
#ifndef __SBX_SBXPARAMINFO
#ifndef __SBX_SBXPARAMINFO
#define __SBX_SBXPARAMINFO
#define __SBX_SBXPARAMINFO
...
@@ -74,7 +74,7 @@ struct SbxParamInfo
...
@@ -74,7 +74,7 @@ struct SbxParamInfo
~
SbxParamInfo
()
{}
~
SbxParamInfo
()
{}
};
};
SV_DECL_PTRARR_DEL
(
SbxParams
,
SbxParamInfo
*
,
4
,
4
)
typedef
boost
::
ptr_vector
<
SbxParamInfo
>
SbxParams
;
#endif
#endif
...
...
basic/source/sbx/sbxbase.cxx
Dosyayı görüntüle @
440a7c9b
...
@@ -26,8 +26,6 @@
...
@@ -26,8 +26,6 @@
*
*
************************************************************************/
************************************************************************/
#include <tools/shl.hxx>
#include <tools/shl.hxx>
#include <tools/stream.hxx>
#include <tools/stream.hxx>
...
@@ -41,7 +39,6 @@
...
@@ -41,7 +39,6 @@
// AppData-Structure for SBX:
// AppData-Structure for SBX:
SV_IMPL_PTRARR
(
SbxParams
,
SbxParamInfo
*
);
SV_IMPL_PTRARR
(
SbxFacs
,
SbxFactory
*
);
SV_IMPL_PTRARR
(
SbxFacs
,
SbxFactory
*
);
TYPEINIT0
(
SbxBase
)
TYPEINIT0
(
SbxBase
)
...
@@ -367,21 +364,20 @@ SbxInfo::~SbxInfo()
...
@@ -367,21 +364,20 @@ SbxInfo::~SbxInfo()
void
SbxInfo
::
AddParam
void
SbxInfo
::
AddParam
(
const
XubString
&
rName
,
SbxDataType
eType
,
sal_uInt16
nFlags
)
(
const
XubString
&
rName
,
SbxDataType
eType
,
sal_uInt16
nFlags
)
{
{
const
SbxParamInfo
*
p
=
new
SbxParamInfo
(
rName
,
eType
,
nFlags
);
aParams
.
push_back
(
new
SbxParamInfo
(
rName
,
eType
,
nFlags
));
aParams
.
Insert
(
p
,
aParams
.
Count
()
);
}
}
const
SbxParamInfo
*
SbxInfo
::
GetParam
(
sal_uInt16
n
)
const
const
SbxParamInfo
*
SbxInfo
::
GetParam
(
sal_uInt16
n
)
const
{
{
if
(
n
<
1
||
n
>
aParams
.
Count
()
)
if
(
n
<
1
||
n
>
aParams
.
size
()
)
return
NULL
;
return
NULL
;
else
else
return
aParams
.
GetObject
(
n
-
1
);
return
&
(
aParams
[
n
-
1
]
);
}
}
sal_Bool
SbxInfo
::
LoadData
(
SvStream
&
rStrm
,
sal_uInt16
nVer
)
sal_Bool
SbxInfo
::
LoadData
(
SvStream
&
rStrm
,
sal_uInt16
nVer
)
{
{
aParams
.
Remove
(
0
,
aParams
.
Count
()
);
aParams
.
clear
(
);
sal_uInt16
nParam
;
sal_uInt16
nParam
;
aComment
=
read_lenPrefixed_uInt8s_ToOUString
<
sal_uInt16
>
(
rStrm
,
aComment
=
read_lenPrefixed_uInt8s_ToOUString
<
sal_uInt16
>
(
rStrm
,
RTL_TEXTENCODING_ASCII_US
);
RTL_TEXTENCODING_ASCII_US
);
...
@@ -399,8 +395,8 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
...
@@ -399,8 +395,8 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
if
(
nVer
>
1
)
if
(
nVer
>
1
)
rStrm
>>
nUserData
;
rStrm
>>
nUserData
;
AddParam
(
aName
,
(
SbxDataType
)
nType
,
nFlags
);
AddParam
(
aName
,
(
SbxDataType
)
nType
,
nFlags
);
SbxParamInfo
*
p
=
aParams
.
GetObject
(
aParams
.
Count
()
-
1
);
SbxParamInfo
&
p
(
aParams
.
back
()
);
p
->
nUserData
=
nUserData
;
p
.
nUserData
=
nUserData
;
}
}
return
sal_True
;
return
sal_True
;
}
}
...
@@ -411,15 +407,14 @@ sal_Bool SbxInfo::StoreData( SvStream& rStrm ) const
...
@@ -411,15 +407,14 @@ sal_Bool SbxInfo::StoreData( SvStream& rStrm ) const
RTL_TEXTENCODING_ASCII_US
);
RTL_TEXTENCODING_ASCII_US
);
write_lenPrefixed_uInt8s_FromOUString
<
sal_uInt16
>
(
rStrm
,
aHelpFile
,
write_lenPrefixed_uInt8s_FromOUString
<
sal_uInt16
>
(
rStrm
,
aHelpFile
,
RTL_TEXTENCODING_ASCII_US
);
RTL_TEXTENCODING_ASCII_US
);
rStrm
<<
nHelpId
<<
aParams
.
Count
(
);
rStrm
<<
nHelpId
<<
static_cast
<
sal_uInt16
>
(
aParams
.
size
()
);
for
(
sal_uInt16
i
=
0
;
i
<
aParams
.
Count
();
i
++
)
for
(
SbxParams
::
const_iterator
i
=
aParams
.
begin
();
i
!=
aParams
.
end
();
++
i
)
{
{
SbxParamInfo
*
p
=
aParams
.
GetObject
(
i
);
write_lenPrefixed_uInt8s_FromOUString
<
sal_uInt16
>
(
rStrm
,
i
->
aName
,
write_lenPrefixed_uInt8s_FromOUString
<
sal_uInt16
>
(
rStrm
,
p
->
aName
,
RTL_TEXTENCODING_ASCII_US
);
RTL_TEXTENCODING_ASCII_US
);
rStrm
<<
(
sal_uInt16
)
p
->
eType
rStrm
<<
(
sal_uInt16
)
i
->
eType
<<
(
sal_uInt16
)
p
->
nFlags
<<
(
sal_uInt16
)
i
->
nFlags
<<
(
sal_uInt32
)
p
->
nUserData
;
<<
(
sal_uInt32
)
i
->
nUserData
;
}
}
return
sal_True
;
return
sal_True
;
}
}
...
...
basic/source/sbx/sbxvar.cxx
Dosyayı görüntüle @
440a7c9b
...
@@ -236,7 +236,7 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const
...
@@ -236,7 +236,7 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const
((
SbxVariable
*
)
this
)
->
GetInfo
();
((
SbxVariable
*
)
this
)
->
GetInfo
();
// Append nothing, if it is a simple property (no empty brackets)
// Append nothing, if it is a simple property (no empty brackets)
if
(
!
pInfo
if
(
!
pInfo
||
(
!
pInfo
->
aParams
.
Count
()
&&
GetClass
()
==
SbxCLASS_PROPERTY
)
)
||
(
pInfo
->
aParams
.
empty
()
&&
GetClass
()
==
SbxCLASS_PROPERTY
)
)
return
maName
;
return
maName
;
xub_Unicode
cType
=
' '
;
xub_Unicode
cType
=
' '
;
XubString
aTmp
(
maName
);
XubString
aTmp
(
maName
);
...
@@ -250,17 +250,16 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const
...
@@ -250,17 +250,16 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const
aTmp
+=
cType
;
aTmp
+=
cType
;
}
}
aTmp
+=
'('
;
aTmp
+=
'('
;
for
(
sal_uInt16
i
=
0
;
i
<
pInfo
->
aParams
.
Count
();
i
++
)
for
(
SbxParams
::
const_iterator
i
=
pInfo
->
aParams
.
begin
();
i
!=
pInfo
->
aParams
.
end
();
++
i
)
{
{
const
SbxParamInfo
*
q
=
pInfo
->
aParams
.
GetObject
(
i
);
int
nt
=
i
->
eType
&
0x0FFF
;
int
nt
=
q
->
eType
&
0x0FFF
;
if
(
i
!=
pInfo
->
aParams
.
begin
()
)
if
(
i
)
aTmp
+=
','
;
aTmp
+=
','
;
if
(
q
->
nFlags
&
SBX_OPTIONAL
)
if
(
i
->
nFlags
&
SBX_OPTIONAL
)
aTmp
+=
String
(
SbxRes
(
STRING_OPTIONAL
)
);
aTmp
+=
String
(
SbxRes
(
STRING_OPTIONAL
)
);
if
(
q
->
eType
&
SbxBYREF
)
if
(
i
->
eType
&
SbxBYREF
)
aTmp
+=
String
(
SbxRes
(
STRING_BYREF
)
);
aTmp
+=
String
(
SbxRes
(
STRING_BYREF
)
);
aTmp
+=
q
->
aName
;
aTmp
+=
i
->
aName
;
cType
=
' '
;
cType
=
' '
;
// short type? Then fetch it, posible this is 0.
// short type? Then fetch it, posible this is 0.
if
(
t
==
SbxNAME_SHORT_TYPES
)
if
(
t
==
SbxNAME_SHORT_TYPES
)
...
@@ -271,12 +270,12 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const
...
@@ -271,12 +270,12 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const
if
(
cType
!=
' '
)
if
(
cType
!=
' '
)
{
{
aTmp
+=
cType
;
aTmp
+=
cType
;
if
(
q
->
eType
&
SbxARRAY
)
if
(
i
->
eType
&
SbxARRAY
)
aTmp
.
AppendAscii
(
"()"
);
aTmp
.
AppendAscii
(
"()"
);
}
}
else
else
{
{
if
(
q
->
eType
&
SbxARRAY
)
if
(
i
->
eType
&
SbxARRAY
)
aTmp
.
AppendAscii
(
"()"
);
aTmp
.
AppendAscii
(
"()"
);
// long type?
// long type?
if
(
t
!=
SbxNAME_SHORT
)
if
(
t
!=
SbxNAME_SHORT
)
...
...
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