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
14675eff
Kaydet (Commit)
14675eff
authored
Eki 07, 2010
tarafından
Andreas Mantke
Kaydeden (comit)
Michael Meeks
Eki 07, 2010
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
comment translation into English
üst
30155e22
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
45 deletions
+44
-45
sbxarray.cxx
basic/source/sbx/sbxarray.cxx
+28
-29
sbxbase.cxx
basic/source/sbx/sbxbase.cxx
+13
-13
sbxbyte.cxx
basic/source/sbx/sbxbyte.cxx
+1
-1
sbxchar.cxx
basic/source/sbx/sbxchar.cxx
+2
-2
No files found.
basic/source/sbx/sbxarray.cxx
Dosyayı görüntüle @
14675eff
...
...
@@ -33,10 +33,10 @@
#include <vector>
using
namespace
std
;
struct
SbxDim
{
//
eine Array-D
imension:
struct
SbxDim
{
//
an array-d
imension:
SbxDim
*
pNext
;
// Link
INT32
nLbound
,
nUbound
;
//
Begrenzungen
INT32
nSize
;
//
Anzahl Elemente
INT32
nLbound
,
nUbound
;
//
Limitations
INT32
nSize
;
//
Number of elements
};
class
SbxVarEntry
:
public
SbxVariableRef
{
...
...
@@ -99,7 +99,7 @@ SbxArray& SbxArray::operator=( const SbxArray& rArray )
if
(
pSrcRef
->
pAlias
)
pDstRef
->
pAlias
=
new
XubString
(
*
pSrcRef
->
pAlias
);
if
(
eType
!=
SbxVARIANT
)
//
Keine Objekte konvertieren
//
Convert no objects
if
(
eType
!=
SbxOBJECT
||
pSrc_
->
GetClass
()
!=
SbxCLASS_OBJECT
)
((
SbxVariable
*
)
pSrc_
)
->
Convert
(
eType
);
pData
->
push_back
(
pDstRef
);
...
...
@@ -149,7 +149,7 @@ USHORT SbxArray::Count() const
SbxVariableRef
&
SbxArray
::
GetRef32
(
UINT32
nIdx
)
{
//
Array ggf. vergroessern
//
If necessary extend the array
DBG_ASSERT
(
nIdx
<=
SBX_MAXINDEX32
,
"SBX: Array-Index > SBX_MAXINDEX32"
);
// Very Hot Fix
if
(
nIdx
>
SBX_MAXINDEX32
)
...
...
@@ -167,7 +167,7 @@ SbxVariableRef& SbxArray::GetRef32( UINT32 nIdx )
SbxVariableRef
&
SbxArray
::
GetRef
(
USHORT
nIdx
)
{
//
Array ggf. vergroessern
//
If necessary extend the array
DBG_ASSERT
(
nIdx
<=
SBX_MAXINDEX
,
"SBX: Array-Index > SBX_MAXINDEX"
);
// Very Hot Fix
if
(
nIdx
>
SBX_MAXINDEX
)
...
...
@@ -229,7 +229,7 @@ void SbxArray::Put32( SbxVariable* pVar, UINT32 nIdx )
{
if
(
pVar
)
if
(
eType
!=
SbxVARIANT
)
//
Keine Objekte konvertieren
//
Convert no objects
if
(
eType
!=
SbxOBJECT
||
pVar
->
GetClass
()
!=
SbxCLASS_OBJECT
)
pVar
->
Convert
(
eType
);
SbxVariableRef
&
rRef
=
GetRef32
(
nIdx
);
...
...
@@ -249,7 +249,7 @@ void SbxArray::Put( SbxVariable* pVar, USHORT nIdx )
{
if
(
pVar
)
if
(
eType
!=
SbxVARIANT
)
//
Keine Objekte konvertieren
//
Convert no objects
if
(
eType
!=
SbxOBJECT
||
pVar
->
GetClass
()
!=
SbxCLASS_OBJECT
)
pVar
->
Convert
(
eType
);
SbxVariableRef
&
rRef
=
GetRef
(
nIdx
);
...
...
@@ -363,8 +363,8 @@ void SbxArray::Remove( SbxVariable* pVar )
}
}
//
Uebernahme der Daten aus dem uebergebenen Array, wobei
//
gleichnamige Variable ueberschrieben werd
en.
//
Taking over of the data from the passed array, at which
//
the variable of the same name will be overwritt
en.
void
SbxArray
::
Merge
(
SbxArray
*
p
)
{
...
...
@@ -374,8 +374,8 @@ void SbxArray::Merge( SbxArray* p )
for
(
UINT32
i
=
0
;
i
<
nSize
;
i
++
)
{
SbxVarEntryPtr
pRef1
=
(
*
(
p
->
pData
))[
i
];
// Is
t das Element by name schon drin
?
//
Dann ueberschreiben
!
// Is
the element by name already inside
?
//
Then overwrite
!
SbxVariable
*
pVar
=
*
pRef1
;
if
(
pVar
)
{
...
...
@@ -405,8 +405,8 @@ void SbxArray::Merge( SbxArray* p )
}
}
// S
uchen eines Elements ueber die Userdaten. Falls ein Element
//
ein Objekt ist, wird dieses ebenfalls durchsucht
.
// S
earch of an element via the user data. If the element is
//
object, it will also be scanned
.
SbxVariable
*
SbxArray
::
FindUserData
(
UINT32
nData
)
{
...
...
@@ -421,16 +421,16 @@ SbxVariable* SbxArray::FindUserData( UINT32 nData )
{
p
=
pVar
;
p
->
ResetFlag
(
SBX_EXTFOUND
);
break
;
// JSM
06.10.95
break
;
// JSM
1995-10-06
}
//
Haben wir ein Array/Objekt mit Extended S
earch?
//
Did we have an array/object with extended s
earch?
else
if
(
pVar
->
IsSet
(
SBX_EXTSEARCH
)
)
{
switch
(
pVar
->
GetClass
()
)
{
case
SbxCLASS_OBJECT
:
{
// Obje
kte duerfen ihren Parent nicht durchsuchen
// Obje
cts are not allowed to scan their parent.
USHORT
nOld
=
pVar
->
GetFlags
();
pVar
->
ResetFlag
(
SBX_GBLSEARCH
);
p
=
((
SbxObject
*
)
pVar
)
->
FindUserData
(
nData
);
...
...
@@ -453,8 +453,8 @@ SbxVariable* SbxArray::FindUserData( UINT32 nData )
return
p
;
}
// S
uchen eines Elements ueber den Namen und den Typ. Falls ein Element
//
ein Objekt ist, wird dieses ebenfalls durchsucht
.
// S
earch of an element by his name and type. If an element is an object,
//
it will also be scanned.
.
SbxVariable
*
SbxArray
::
Find
(
const
XubString
&
rName
,
SbxClassType
t
)
{
...
...
@@ -470,8 +470,7 @@ SbxVariable* SbxArray::Find( const XubString& rName, SbxClassType t )
SbxVariable
*
pVar
=
*
pRef
;
if
(
pVar
&&
pVar
->
IsVisible
()
)
{
// Die ganz sichere Suche klappt auch, wenn es
// keinen Hascode gibt!
// The very secure search works as well, if there is no hashcode!
USHORT
nVarHash
=
pVar
->
GetHashCode
();
if
(
(
!
nVarHash
||
nVarHash
==
nHash
)
&&
(
t
==
SbxCLASS_DONTCARE
||
pVar
->
GetClass
()
==
t
)
...
...
@@ -481,14 +480,14 @@ SbxVariable* SbxArray::Find( const XubString& rName, SbxClassType t )
p
->
ResetFlag
(
SBX_EXTFOUND
);
break
;
}
//
Haben wir ein Array/Objekt mit Extended S
earch?
//
Did we have an array/object with extended s
earch?
else
if
(
bExtSearch
&&
pVar
->
IsSet
(
SBX_EXTSEARCH
)
)
{
switch
(
pVar
->
GetClass
()
)
{
case
SbxCLASS_OBJECT
:
{
// Obje
kte duerfen ihren Parent nicht durchsuchen
// Obje
cts are not allowed to scan their parent.
USHORT
nOld
=
pVar
->
GetFlags
();
pVar
->
ResetFlag
(
SBX_GBLSEARCH
);
p
=
((
SbxObject
*
)
pVar
)
->
Find
(
rName
,
t
);
...
...
@@ -545,7 +544,7 @@ BOOL SbxArray::StoreData( SvStream& rStrm ) const
{
UINT32
nElem
=
0
;
UINT32
n
;
// W
elche Elemente sind ueberhaupt definiert
?
// W
hich elements are even defined
?
for
(
n
=
0
;
n
<
pData
->
size
();
n
++
)
{
SbxVariableRef
*
pRef
=
(
*
pData
)[
n
];
...
...
@@ -630,7 +629,7 @@ void SbxDimArray::Clear()
nDim
=
0
;
}
//
Dimension hinzufuege
n
//
Add a dimensio
n
void
SbxDimArray
::
AddDimImpl32
(
INT32
lb
,
INT32
ub
,
BOOL
bAllowSize0
)
{
...
...
@@ -675,7 +674,7 @@ void SbxDimArray::unoAddDim32( INT32 lb, INT32 ub )
}
//
Dimensionsdaten auslesen
//
Readout dimension data
BOOL
SbxDimArray
::
GetDim32
(
INT32
n
,
INT32
&
rlb
,
INT32
&
rub
)
const
{
...
...
@@ -708,7 +707,7 @@ BOOL SbxDimArray::GetDim( short n, short& rlb, short& rub ) const
return
bRet
;
}
// Element-Ptr
anhand einer Index-Liste
// Element-Ptr
with the help of an index list
UINT32
SbxDimArray
::
Offset32
(
const
INT32
*
pIdx
)
{
...
...
@@ -779,7 +778,7 @@ void SbxDimArray::Put32( SbxVariable* p, const INT32* pIdx )
}
// Element-N
r anhand eines Parameter-Arrays
// Element-N
umber with the help of Parameter-Array
UINT32
SbxDimArray
::
Offset32
(
SbxArray
*
pPar
)
{
...
...
@@ -788,7 +787,7 @@ UINT32 SbxDimArray::Offset32( SbxArray* pPar )
SetError
(
SbxERR_BOUNDS
);
return
0
;
}
UINT32
nPos
=
0
;
USHORT
nOff
=
1
;
// N
icht E
lement 0!
USHORT
nOff
=
1
;
// N
on e
lement 0!
for
(
SbxDim
*
p
=
pFirst
;
p
&&
!
IsError
();
p
=
p
->
pNext
)
{
INT32
nIdx
=
pPar
->
Get
(
nOff
++
)
->
GetLong
();
...
...
basic/source/sbx/sbxbase.cxx
Dosyayı görüntüle @
14675eff
...
...
@@ -36,15 +36,15 @@
#include <basic/sbxfac.hxx>
#include <basic/sbxbase.hxx>
// AppData-Stru
ktur fue
r SBX:
// AppData-Stru
cture fo
r SBX:
SV_IMPL_PTRARR
(
SbxParams
,
SbxParamInfo
*
);
SV_IMPL_PTRARR
(
SbxFacs
,
SbxFactory
*
);
TYPEINIT0
(
SbxBase
)
//
SBX-Daten anfordern oder ggf. anlegen
// w
ir legen den Bereich einfach an und verzichten auf die Freigab
e!
//
Request SBX-Data or if necessary create them
// w
e just create the area and waive the releas
e!
SbxAppData
*
GetSbxData_Impl
()
{
...
...
@@ -159,11 +159,11 @@ void SbxBase::AddFactory( SbxFactory* pFac )
SbxAppData
*
p
=
GetSbxData_Impl
();
const
SbxFactory
*
pTemp
=
pFac
;
//
AB, 6.3.96: HandleLast-Flag beruecksichtigen
USHORT
nPos
=
p
->
aFacs
.
Count
();
//
Einfuege
-Position
if
(
!
pFac
->
IsHandleLast
()
)
//
Nur, wenn nicht selbst
HandleLast
//
From 1996-03-06: take the HandleLast-Flag into account
USHORT
nPos
=
p
->
aFacs
.
Count
();
//
Insert
-Position
if
(
!
pFac
->
IsHandleLast
()
)
//
Only if not self
HandleLast
{
//
Neue Factory vor Factories mit HandleLast einordnen
//
Rank new factory in front of factories with HandleLast
while
(
nPos
>
0
&&
(
static_cast
<
SbxFactory
*>
(
p
->
aFacs
.
GetObject
(
nPos
-
1
)))
->
IsHandleLast
()
)
nPos
--
;
...
...
@@ -207,7 +207,7 @@ SbxBase* SbxBase::Create( UINT16 nSbxId, UINT32 nCreator )
case
SBXID_METHOD
:
return
new
SbxMethod
(
aEmptyStr
,
SbxEMPTY
);
case
SBXID_PROPERTY
:
return
new
SbxProperty
(
aEmptyStr
,
SbxEMPTY
);
}
// Un
bekanter Typ: ber die Factories gehen
!
// Un
known type: go over the factories
!
SbxAppData
*
p
=
GetSbxData_Impl
();
SbxBase
*
pNew
=
NULL
;
for
(
USHORT
i
=
0
;
i
<
p
->
aFacs
.
Count
();
i
++
)
...
...
@@ -252,7 +252,7 @@ SbxObject* SbxBase::CreateObject( const XubString& rClass )
static
BOOL
bStaticEnableBroadcasting
=
TRUE
;
// Sbx-
Loesung als Ersatz fue
r SfxBroadcaster::Enable()
// Sbx-
Solution in exchange fo
r SfxBroadcaster::Enable()
void
SbxBase
::
StaticEnableBroadcasting
(
BOOL
bEnable
)
{
bStaticEnableBroadcasting
=
bEnable
;
...
...
@@ -270,7 +270,7 @@ SbxBase* SbxBase::Load( SvStream& rStrm )
UINT32
nCreator
,
nSize
;
rStrm
>>
nCreator
>>
nSbxId
>>
nFlags
>>
nVer
;
//
Eine Dummheit meinerseits korrigieren
:
//
Correcting a foolishness of mine
:
if
(
nFlags
&
SBX_RESERVED
)
nFlags
=
(
nFlags
&
~
SBX_RESERVED
)
|
SBX_GBLSEARCH
;
...
...
@@ -289,7 +289,7 @@ SbxBase* SbxBase::Load( SvStream& rStrm )
rStrm
.
Seek
(
nOldPos
);
if
(
!
p
->
LoadCompleted
()
)
{
//
Loeschen des Objekts
//
Deleting of the object
SbxBaseRef
aRef
(
p
);
p
=
NULL
;
}
...
...
@@ -297,7 +297,7 @@ SbxBase* SbxBase::Load( SvStream& rStrm )
else
{
rStrm
.
SetError
(
SVSTREAM_FILEFORMAT_ERROR
);
//
Loeschen des Objekts
//
Deleting of the object
SbxBaseRef
aRef
(
p
);
p
=
NULL
;
}
...
...
@@ -307,7 +307,7 @@ SbxBase* SbxBase::Load( SvStream& rStrm )
return
p
;
}
// S
bx-Objekt im Stream ueberspringen
// S
kip the Sbx-Object inside the stream
void
SbxBase
::
Skip
(
SvStream
&
rStrm
)
{
UINT16
nSbxId
,
nFlags
,
nVer
;
...
...
basic/source/sbx/sbxbyte.cxx
Dosyayı görüntüle @
14675eff
...
...
@@ -200,7 +200,7 @@ start:
case
SbxBYREF
|
SbxBYTE
:
nRes
=
p
->
nByte
;
break
;
//
ab hier wird getestet
//
from here on will be tested
case
SbxBYREF
|
SbxCHAR
:
aTmp
.
nChar
=
*
p
->
pChar
;
goto
ref
;
case
SbxBYREF
|
SbxINTEGER
:
...
...
basic/source/sbx/sbxchar.cxx
Dosyayı görüntüle @
14675eff
...
...
@@ -183,7 +183,7 @@ start:
case
SbxBYREF
|
SbxCHAR
:
nRes
=
*
p
->
pChar
;
break
;
//
ab hier wird getestet
//
from here on will be tested
case
SbxBYREF
|
SbxBYTE
:
aTmp
.
nByte
=
*
p
->
pByte
;
goto
ref
;
case
SbxBYREF
|
SbxINTEGER
:
...
...
@@ -252,7 +252,7 @@ start:
ImpCreateDecimal
(
p
)
->
setChar
(
n
);
break
;
//
ab hier wird getestet
//
from here on will be tested
case
SbxBYTE
:
aTmp
.
pByte
=
&
p
->
nByte
;
goto
direct
;
case
SbxULONG
:
...
...
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