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
911e412b
Kaydet (Commit)
911e412b
authored
Agu 24, 2012
tarafından
Takeshi Abe
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_Bool to bool
Change-Id: I96fe31c80f952b1ac6d25c65431597d81e0fdda3
üst
515b260c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
80 additions
and
80 deletions
+80
-80
methods.cxx
basic/source/runtime/methods.cxx
+19
-19
methods1.cxx
basic/source/runtime/methods1.cxx
+7
-7
stdobj.cxx
basic/source/runtime/stdobj.cxx
+3
-3
step0.cxx
basic/source/runtime/step0.cxx
+6
-6
step2.cxx
basic/source/runtime/step2.cxx
+15
-15
sbxcoll.cxx
basic/source/sbx/sbxcoll.cxx
+2
-2
sbxexec.cxx
basic/source/sbx/sbxexec.cxx
+10
-10
sbxobj.cxx
basic/source/sbx/sbxobj.cxx
+2
-2
sbxscan.cxx
basic/source/sbx/sbxscan.cxx
+16
-16
No files found.
basic/source/runtime/methods.cxx
Dosyayı görüntüle @
911e412b
...
...
@@ -112,7 +112,7 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
#ifndef DISABLE_SCRIPTING
// forward decl.
sal_B
ool
implDateSerial
(
sal_Int16
nYear
,
sal_Int16
nMonth
,
sal_Int16
nDay
,
double
&
rdRet
);
b
ool
implDateSerial
(
sal_Int16
nYear
,
sal_Int16
nMonth
,
sal_Int16
nDay
,
double
&
rdRet
);
// from source/classes/sbxmod.cxx
Reference
<
XModel
>
getDocumentModel
(
StarBASIC
*
);
...
...
@@ -152,7 +152,7 @@ static const CharClass& GetCharClass( void )
return
aCharClass
;
}
static
inline
sal_B
ool
isFolder
(
FileStatus
::
Type
aType
)
static
inline
b
ool
isFolder
(
FileStatus
::
Type
aType
)
{
return
(
aType
==
FileStatus
::
Directory
||
aType
==
FileStatus
::
Volume
);
}
...
...
@@ -685,12 +685,12 @@ void implRemoveDirRecursive( const String& aDirPath )
{
DirectoryItem
aItem
;
FileBase
::
RC
nRet
=
DirectoryItem
::
get
(
aDirPath
,
aItem
);
sal_B
ool
bExists
=
(
nRet
==
FileBase
::
E_None
);
b
ool
bExists
=
(
nRet
==
FileBase
::
E_None
);
FileStatus
aFileStatus
(
osl_FileStatus_Mask_Type
);
nRet
=
aItem
.
getFileStatus
(
aFileStatus
);
FileStatus
::
Type
aType
=
aFileStatus
.
getFileType
();
sal_B
ool
bFolder
=
isFolder
(
aType
);
b
ool
bFolder
=
isFolder
(
aType
);
if
(
!
bExists
||
!
bFolder
)
{
...
...
@@ -720,7 +720,7 @@ void implRemoveDirRecursive( const String& aDirPath )
// Directory?
FileStatus
::
Type
aType2
=
aFileStatus2
.
getFileType
();
sal_B
ool
bFolder2
=
isFolder
(
aType2
);
b
ool
bFolder2
=
isFolder
(
aType2
);
if
(
bFolder2
)
{
implRemoveDirRecursive
(
aPath
);
...
...
@@ -2378,7 +2378,7 @@ String implSetupWildcard( const String& rFileParam, SbiRTLData* pRTLData )
xub_StrLen
nLastWild
=
aFileParam
.
SearchBackward
(
cWild1
);
if
(
nLastWild
==
STRING_NOTFOUND
)
nLastWild
=
aFileParam
.
SearchBackward
(
cWild2
);
sal_B
ool
bHasWildcards
=
(
nLastWild
!=
STRING_NOTFOUND
);
b
ool
bHasWildcards
=
(
nLastWild
!=
STRING_NOTFOUND
);
xub_StrLen
nLastDelim
=
aFileParam
.
SearchBackward
(
cDelim1
);
...
...
@@ -2436,7 +2436,7 @@ inline sal_Bool implCheckWildcard( const String& rName, SbiRTLData* pRTLData )
bool
isRootDir
(
String
aDirURLStr
)
{
INetURLObject
aDirURLObj
(
aDirURLStr
);
sal_Bool
bRoot
=
sal_F
alse
;
bool
bRoot
=
f
alse
;
// Check if it's a root directory
sal_Int32
nCount
=
aDirURLObj
.
getSegmentCount
();
...
...
@@ -2444,7 +2444,7 @@ bool isRootDir( String aDirURLStr )
// No segment means Unix root directory "file:///"
if
(
nCount
==
0
)
{
bRoot
=
sal_T
rue
;
bRoot
=
t
rue
;
}
// Exactly one segment needs further checking, because it
// can be Unix "file:///foo/" -> no root
...
...
@@ -2455,11 +2455,11 @@ bool isRootDir( String aDirURLStr )
INetURLObject
::
DECODE_WITH_CHARSET
);
if
(
aSeg1
.
getStr
()[
1
]
==
(
sal_Unicode
)
':'
)
{
bRoot
=
sal_T
rue
;
bRoot
=
t
rue
;
}
}
// More than one segments can never be root
// so bRoot remains
sal_F
alse
// so bRoot remains
f
alse
return
bRoot
;
}
...
...
@@ -2539,7 +2539,7 @@ RTLFUNC(Dir)
// #78651 Add "." and ".." directories for VB compatibility
if
(
bIncludeFolders
)
{
sal_B
ool
bRoot
=
isRootDir
(
aDirURLStr
);
b
ool
bRoot
=
isRootDir
(
aDirURLStr
);
// If it's no root directory we flag the need for
// the "." and ".." directories by the value -2
...
...
@@ -2638,7 +2638,7 @@ RTLFUNC(Dir)
pRTLData
->
nDirFlags
=
0
;
// Read directory
sal_B
ool
bIncludeFolders
=
((
nFlags
&
Sb_ATTR_DIRECTORY
)
!=
0
);
b
ool
bIncludeFolders
=
((
nFlags
&
Sb_ATTR_DIRECTORY
)
!=
0
);
pRTLData
->
pDir
=
new
Directory
(
aDirURL
);
FileBase
::
RC
nRet
=
pRTLData
->
pDir
->
open
();
if
(
nRet
!=
FileBase
::
E_None
)
...
...
@@ -2653,7 +2653,7 @@ RTLFUNC(Dir)
pRTLData
->
nCurDirPos
=
0
;
if
(
bIncludeFolders
)
{
sal_B
ool
bRoot
=
isRootDir
(
aDirURL
);
b
ool
bRoot
=
isRootDir
(
aDirURL
);
// If it's no root directory we flag the need for
// the "." and ".." directories by the value -2
...
...
@@ -2704,7 +2704,7 @@ RTLFUNC(Dir)
if
(
bFolderFlag
)
{
FileStatus
::
Type
aType
=
aFileStatus
.
getFileType
();
sal_B
ool
bFolder
=
isFolder
(
aType
);
b
ool
bFolder
=
isFolder
(
aType
);
if
(
!
bFolder
)
continue
;
}
...
...
@@ -2804,7 +2804,7 @@ RTLFUNC(GetAttr)
bool
bReadOnly
=
(
nAttributes
&
osl_File_Attribute_ReadOnly
)
!=
0
;
FileStatus
::
Type
aType
=
aFileStatus
.
getFileType
();
sal_B
ool
bDirectory
=
isFolder
(
aType
);
b
ool
bDirectory
=
isFolder
(
aType
);
if
(
bReadOnly
)
nFlags
|=
Sb_ATTR_READONLY
;
if
(
bDirectory
)
...
...
@@ -4359,7 +4359,7 @@ sal_Int16 implGetDateYear( double aDate )
return
nRet
;
}
sal_B
ool
implDateSerial
(
sal_Int16
nYear
,
sal_Int16
nMonth
,
sal_Int16
nDay
,
double
&
rdRet
)
b
ool
implDateSerial
(
sal_Int16
nYear
,
sal_Int16
nMonth
,
sal_Int16
nDay
,
double
&
rdRet
)
{
#ifndef DISABLE_SCRIPTING
if
(
nYear
<
30
&&
SbiRuntime
::
isVBAEnabled
()
)
...
...
@@ -4374,7 +4374,7 @@ sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, doub
#ifndef DISABLE_SCRIPTING
StarBASIC
::
Error
(
SbERR_BAD_ARGUMENT
);
#endif
return
sal_F
alse
;
return
f
alse
;
}
#ifndef DISABLE_SCRIPTING
...
...
@@ -4387,7 +4387,7 @@ sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, doub
#ifndef DISABLE_SCRIPTING
StarBASIC
::
Error
(
SbERR_BAD_ARGUMENT
);
#endif
return
sal_F
alse
;
return
f
alse
;
}
}
#ifndef DISABLE_SCRIPTING
...
...
@@ -4421,7 +4421,7 @@ sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, doub
long
nDiffDays
=
GetDayDiff
(
aCurDate
);
rdRet
=
(
double
)
nDiffDays
;
return
sal_T
rue
;
return
t
rue
;
}
sal_Int16
implGetMinute
(
double
dDate
)
...
...
basic/source/runtime/methods1.cxx
Dosyayı görüntüle @
911e412b
...
...
@@ -1148,7 +1148,7 @@ void PutGet( SbxArray& rPar, sal_Bool bPut )
sal_Int16
nFileNo
=
rPar
.
Get
(
1
)
->
GetInteger
();
SbxVariable
*
pVar2
=
rPar
.
Get
(
2
);
SbxDataType
eType2
=
pVar2
->
GetType
();
sal_Bool
bHasRecordNo
=
(
sal_Bool
)
(
eType2
!=
SbxEMPTY
&&
eType2
!=
SbxERROR
);
bool
bHasRecordNo
=
(
eType2
!=
SbxEMPTY
&&
eType2
!=
SbxERROR
);
long
nRecordNo
=
pVar2
->
GetLong
();
if
(
nFileNo
<
1
||
(
bHasRecordNo
&&
nRecordNo
<
1
)
)
{
...
...
@@ -1166,7 +1166,7 @@ void PutGet( SbxArray& rPar, sal_Bool bPut )
}
SvStream
*
pStrm
=
pSbStrm
->
GetStrm
();
sal_B
ool
bRandom
=
pSbStrm
->
IsRandom
();
b
ool
bRandom
=
pSbStrm
->
IsRandom
();
short
nBlockLen
=
bRandom
?
pSbStrm
->
GetBlockLen
()
:
0
;
if
(
bPut
)
...
...
@@ -1247,7 +1247,7 @@ RTLFUNC(Environ)
rPar
.
Get
(
0
)
->
PutString
(
aResult
);
}
static
double
GetDialogZoomFactor
(
sal_B
ool
bX
,
long
nValue
)
static
double
GetDialogZoomFactor
(
b
ool
bX
,
long
nValue
)
{
OutputDevice
*
pDevice
=
Application
::
GetDefaultDevice
();
double
nResult
=
0
;
...
...
@@ -1287,7 +1287,7 @@ RTLFUNC(GetDialogZoomFactorX)
StarBASIC
::
Error
(
SbERR_BAD_ARGUMENT
);
return
;
}
rPar
.
Get
(
0
)
->
PutDouble
(
GetDialogZoomFactor
(
sal_T
rue
,
rPar
.
Get
(
1
)
->
GetLong
()
));
rPar
.
Get
(
0
)
->
PutDouble
(
GetDialogZoomFactor
(
t
rue
,
rPar
.
Get
(
1
)
->
GetLong
()
));
}
RTLFUNC
(
GetDialogZoomFactorY
)
...
...
@@ -1300,7 +1300,7 @@ RTLFUNC(GetDialogZoomFactorY)
StarBASIC
::
Error
(
SbERR_BAD_ARGUMENT
);
return
;
}
rPar
.
Get
(
0
)
->
PutDouble
(
GetDialogZoomFactor
(
sal_F
alse
,
rPar
.
Get
(
1
)
->
GetLong
()));
rPar
.
Get
(
0
)
->
PutDouble
(
GetDialogZoomFactor
(
f
alse
,
rPar
.
Get
(
1
)
->
GetLong
()));
}
...
...
@@ -1907,7 +1907,7 @@ IntervalInfo* getIntervalInfo( const String& rStringCode )
}
// From methods.cxx
sal_B
ool
implDateSerial
(
sal_Int16
nYear
,
sal_Int16
nMonth
,
sal_Int16
nDay
,
double
&
rdRet
);
b
ool
implDateSerial
(
sal_Int16
nYear
,
sal_Int16
nMonth
,
sal_Int16
nDay
,
double
&
rdRet
);
sal_Int16
implGetDateDay
(
double
aDate
);
sal_Int16
implGetDateMonth
(
double
aDate
);
sal_Int16
implGetDateYear
(
double
aDate
);
...
...
@@ -1966,7 +1966,7 @@ RTLFUNC(DateAdd)
// Keep hours, minutes, seconds
double
dHoursMinutesSeconds
=
dDate
-
floor
(
dDate
);
sal_Bool
bOk
=
sal_T
rue
;
bool
bOk
=
t
rue
;
sal_Int16
nYear
,
nMonth
,
nDay
;
sal_Int16
nTargetYear16
=
0
,
nTargetMonth
=
0
;
implGetDayMonthYear
(
nYear
,
nMonth
,
nDay
,
dDate
);
...
...
basic/source/runtime/stdobj.cxx
Dosyayı görüntüle @
911e412b
...
...
@@ -762,7 +762,7 @@ SbxVariable* SbiStdObject::Find( const rtl::OUString& rName, SbxClassType t )
// else search one
sal_uInt16
nHash_
=
SbxVariable
::
MakeHashCode
(
rName
);
Methods
*
p
=
aMethods
;
sal_Bool
bFound
=
sal_F
alse
;
bool
bFound
=
f
alse
;
short
nIndex
=
0
;
sal_uInt16
nSrchMask
=
_TYPEMASK
;
switch
(
t
)
...
...
@@ -779,11 +779,11 @@ SbxVariable* SbiStdObject::Find( const rtl::OUString& rName, SbxClassType t )
&&
(
rName
.
equalsIgnoreAsciiCaseAscii
(
p
->
pName
)
)
)
{
SbiInstance
*
pInst
=
GetSbData
()
->
pInst
;
bFound
=
sal_T
rue
;
bFound
=
t
rue
;
if
(
p
->
nArgs
&
_COMPTMASK
)
{
if
(
!
pInst
||
(
pInst
->
IsCompatibility
()
&&
(
_NORMONLY
&
p
->
nArgs
)
)
||
(
!
pInst
->
IsCompatibility
()
&&
(
_COMPATONLY
&
p
->
nArgs
)
)
)
bFound
=
sal_F
alse
;
bFound
=
f
alse
;
}
break
;
}
...
...
basic/source/runtime/step0.cxx
Dosyayı görüntüle @
911e412b
...
...
@@ -389,11 +389,11 @@ void SbiRuntime::StepPUT()
SbxVariableRef
refVal
=
PopVar
();
SbxVariableRef
refVar
=
PopVar
();
// store on its own method (inside a function)?
sal_Bool
bFlagsChanged
=
sal_F
alse
;
bool
bFlagsChanged
=
f
alse
;
sal_uInt16
n
=
0
;
if
(
(
SbxVariable
*
)
refVar
==
(
SbxVariable
*
)
pMeth
)
{
bFlagsChanged
=
sal_T
rue
;
bFlagsChanged
=
t
rue
;
n
=
refVar
->
GetFlags
();
refVar
->
SetFlag
(
SBX_WRITE
);
}
...
...
@@ -522,11 +522,11 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b
}
else
{
sal_Bool
bFlagsChanged
=
sal_F
alse
;
bool
bFlagsChanged
=
f
alse
;
sal_uInt16
n
=
0
;
if
(
(
SbxVariable
*
)
refVar
==
(
SbxVariable
*
)
pMeth
)
{
bFlagsChanged
=
sal_T
rue
;
bFlagsChanged
=
t
rue
;
n
=
refVar
->
GetFlags
();
refVar
->
SetFlag
(
SBX_WRITE
);
}
...
...
@@ -889,7 +889,7 @@ void SbiRuntime::StepREDIMP()
short
nDimsNew
=
pNewArray
->
GetDims
();
short
nDimsOld
=
pOldArray
->
GetDims
();
short
nDims
=
nDimsNew
;
sal_Bool
bRangeError
=
sal_F
alse
;
bool
bRangeError
=
f
alse
;
// Store dims to use them for copying later
sal_Int32
*
pLowerBounds
=
new
sal_Int32
[
nDims
];
...
...
@@ -898,7 +898,7 @@ void SbiRuntime::StepREDIMP()
if
(
nDimsOld
!=
nDimsNew
)
{
bRangeError
=
sal_T
rue
;
bRangeError
=
t
rue
;
}
else
{
...
...
basic/source/runtime/step2.cxx
Dosyayı görüntüle @
911e412b
...
...
@@ -64,7 +64,7 @@ SbxVariable* SbiRuntime::FindElement
}
else
{
sal_Bool
bFatalError
=
sal_F
alse
;
bool
bFatalError
=
f
alse
;
SbxDataType
t
=
(
SbxDataType
)
nOp2
;
String
aName
(
pImg
->
GetString
(
static_cast
<
short
>
(
nOp1
&
0x7FFF
)
)
);
// Hacky capture of Evaluate [] syntax
...
...
@@ -167,13 +167,13 @@ SbxVariable* SbiRuntime::FindElement
// not there and not in the object?
// don't establish if that thing has parameters!
if
(
nOp1
&
0x8000
)
bFatalError
=
sal_T
rue
;
bFatalError
=
t
rue
;
// else, if there are parameters, use different error code
if
(
!
bLocal
||
pImg
->
GetFlag
(
SBIMG_EXPLICIT
)
)
{
// #39108 if explicit and as ELEM always a fatal error
bFatalError
=
sal_T
rue
;
bFatalError
=
t
rue
;
if
(
!
(
nOp1
&
0x8000
)
&&
nNotFound
==
SbERR_PROC_UNDEFINED
)
...
...
@@ -214,12 +214,12 @@ SbxVariable* SbiRuntime::FindElement
{
// shall the type be converted?
SbxDataType
t2
=
pElem
->
GetType
();
sal_Bool
bSet
=
sal_F
alse
;
bool
bSet
=
f
alse
;
if
(
!
(
pElem
->
GetFlags
()
&
SBX_FIXED
)
)
{
if
(
t
!=
SbxVARIANT
&&
t
!=
t2
&&
t
>=
SbxINTEGER
&&
t
<=
SbxSTRING
)
pElem
->
SetType
(
t
),
bSet
=
sal_T
rue
;
pElem
->
SetType
(
t
),
bSet
=
t
rue
;
}
// assign pElem to a Ref, to delete a temp-var if applicable
SbxVariableRef
refTemp
=
pElem
;
...
...
@@ -333,14 +333,14 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
{
if
(
!
refArgv
)
StarBASIC
::
FatalError
(
SbERR_INTERNAL_ERROR
);
sal_Bool
bHasNamed
=
sal_F
alse
;
bool
bHasNamed
=
f
alse
;
sal_uInt16
i
;
sal_uInt16
nArgCount
=
refArgv
->
Count
();
for
(
i
=
1
;
i
<
nArgCount
;
i
++
)
{
if
(
refArgv
->
GetAlias
(
i
).
Len
()
)
{
bHasNamed
=
sal_T
rue
;
break
;
bHasNamed
=
t
rue
;
break
;
}
}
if
(
bHasNamed
)
...
...
@@ -704,7 +704,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
if
(
p
->
GetType
()
==
SbxERROR
&&
(
i
)
)
{
// if there's a parameter missing, it can be OPTIONAL
sal_Bool
bOpt
=
sal_F
alse
;
bool
bOpt
=
f
alse
;
if
(
pMeth
)
{
SbxInfo
*
pInfo
=
pMeth
->
GetInfo
();
...
...
@@ -723,11 +723,11 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
p
->
PutString
(
aDefaultStr
);
refParams
->
Put
(
p
,
i
);
}
bOpt
=
sal_T
rue
;
bOpt
=
t
rue
;
}
}
}
if
(
bOpt
==
sal_False
)
if
(
!
bOpt
)
Error
(
SbERR_NOT_OPTIONAL
);
}
else
if
(
t
!=
SbxVARIANT
&&
(
SbxDataType
)(
p
->
GetType
()
&
0x0FFF
)
!=
t
)
...
...
@@ -794,10 +794,10 @@ void SbiRuntime::StepSTMNT( sal_uInt32 nOp1, sal_uInt32 nOp2 )
{
// If the Expr-Stack at the beginning of a statement constains a variable,
// some fool has called X as a function, although it's a variable!
sal_Bool
bFatalExpr
=
sal_F
alse
;
bool
bFatalExpr
=
f
alse
;
String
sUnknownMethodName
;
if
(
nExprLvl
>
1
)
bFatalExpr
=
sal_T
rue
;
bFatalExpr
=
t
rue
;
else
if
(
nExprLvl
)
{
SbxVariable
*
p
=
refExprStk
->
Get
(
0
);
...
...
@@ -805,7 +805,7 @@ void SbiRuntime::StepSTMNT( sal_uInt32 nOp1, sal_uInt32 nOp2 )
&&
refLocals
.
Is
()
&&
refLocals
->
Find
(
p
->
GetName
(),
p
->
GetClass
()
)
)
{
sUnknownMethodName
=
p
->
GetName
();
bFatalExpr
=
sal_T
rue
;
bFatalExpr
=
t
rue
;
}
}
...
...
@@ -1011,7 +1011,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
short
nDimsNew
=
pArray
->
GetDims
();
short
nDimsOld
=
pOldArray
->
GetDims
();
short
nDims
=
nDimsNew
;
sal_Bool
bRangeError
=
sal_F
alse
;
bool
bRangeError
=
f
alse
;
// Store dims to use them for copying later
sal_Int32
*
pLowerBounds
=
new
sal_Int32
[
nDims
];
...
...
@@ -1019,7 +1019,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
sal_Int32
*
pActualIndices
=
new
sal_Int32
[
nDims
];
if
(
nDimsOld
!=
nDimsNew
)
{
bRangeError
=
sal_T
rue
;
bRangeError
=
t
rue
;
}
else
{
...
...
basic/source/sbx/sbxcoll.cxx
Dosyayı görüntüle @
911e412b
...
...
@@ -117,8 +117,8 @@ void SbxCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1,
if
(
p
)
{
sal_uIntPtr
nId
=
p
->
GetId
();
sal_Bool
bRead
=
sal_Bool
(
nId
==
SBX_HINT_DATAWANTED
);
sal_Bool
bWrite
=
sal_Bool
(
nId
==
SBX_HINT_DATACHANGED
);
bool
bRead
=
(
nId
==
SBX_HINT_DATAWANTED
);
bool
bWrite
=
(
nId
==
SBX_HINT_DATACHANGED
);
SbxVariable
*
pVar
=
p
->
GetVar
();
SbxArray
*
pArg
=
pVar
->
GetParameters
();
if
(
bRead
||
bWrite
)
...
...
basic/source/sbx/sbxexec.cxx
Dosyayı görüntüle @
911e412b
...
...
@@ -25,21 +25,21 @@
class
SbxSimpleCharClass
{
public
:
sal_B
ool
isAlpha
(
sal_Unicode
c
)
const
b
ool
isAlpha
(
sal_Unicode
c
)
const
{
sal_B
ool
bRet
=
(
c
>=
'a'
&&
c
<=
'z'
)
||
(
c
>=
'A'
&&
c
<=
'Z'
);
b
ool
bRet
=
(
c
>=
'a'
&&
c
<=
'z'
)
||
(
c
>=
'A'
&&
c
<=
'Z'
);
return
bRet
;
}
sal_B
ool
isDigit
(
sal_Unicode
c
)
const
b
ool
isDigit
(
sal_Unicode
c
)
const
{
sal_B
ool
bRet
=
(
c
>=
'0'
&&
c
<=
'9'
);
b
ool
bRet
=
(
c
>=
'0'
&&
c
<=
'9'
);
return
bRet
;
}
sal_B
ool
isAlphaNumeric
(
sal_Unicode
c
)
const
b
ool
isAlphaNumeric
(
sal_Unicode
c
)
const
{
sal_B
ool
bRet
=
isDigit
(
c
)
||
isAlpha
(
c
);
b
ool
bRet
=
isDigit
(
c
)
||
isAlpha
(
c
);
return
bRet
;
}
};
...
...
@@ -131,7 +131,7 @@ static SbxVariable* QualifiedName
// a function (with optional parameters).
static
SbxVariable
*
Operand
(
SbxObject
*
pObj
,
SbxObject
*
pGbl
,
const
xub_Unicode
**
ppBuf
,
sal_B
ool
bVar
)
(
SbxObject
*
pObj
,
SbxObject
*
pGbl
,
const
xub_Unicode
**
ppBuf
,
b
ool
bVar
)
{
static
SbxSimpleCharClass
aCharClass
;
...
...
@@ -181,12 +181,12 @@ static SbxVariable* Operand
static
SbxVariable
*
MulDiv
(
SbxObject
*
pObj
,
SbxObject
*
pGbl
,
const
xub_Unicode
**
ppBuf
)
{
const
xub_Unicode
*
p
=
*
ppBuf
;
SbxVariableRef
refVar
(
Operand
(
pObj
,
pGbl
,
&
p
,
sal_F
alse
)
);
SbxVariableRef
refVar
(
Operand
(
pObj
,
pGbl
,
&
p
,
f
alse
)
);
p
=
SkipWhitespace
(
p
);
while
(
refVar
.
Is
()
&&
(
*
p
==
'*'
||
*
p
==
'/'
)
)
{
xub_Unicode
cOp
=
*
p
++
;
SbxVariableRef
refVar2
(
Operand
(
pObj
,
pGbl
,
&
p
,
sal_F
alse
)
);
SbxVariableRef
refVar2
(
Operand
(
pObj
,
pGbl
,
&
p
,
f
alse
)
);
if
(
refVar2
.
Is
()
)
{
// temporary variable!
...
...
@@ -245,7 +245,7 @@ static SbxVariable* PlusMinus( SbxObject* pObj, SbxObject* pGbl, const xub_Unico
static
SbxVariable
*
Assign
(
SbxObject
*
pObj
,
SbxObject
*
pGbl
,
const
xub_Unicode
**
ppBuf
)
{
const
xub_Unicode
*
p
=
*
ppBuf
;
SbxVariableRef
refVar
(
Operand
(
pObj
,
pGbl
,
&
p
,
sal_T
rue
)
);
SbxVariableRef
refVar
(
Operand
(
pObj
,
pGbl
,
&
p
,
t
rue
)
);
p
=
SkipWhitespace
(
p
);
if
(
refVar
.
Is
()
)
{
...
...
basic/source/sbx/sbxobj.cxx
Dosyayı görüntüle @
911e412b
...
...
@@ -135,8 +135,8 @@ void SbxObject::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
if
(
p
)
{
sal_uIntPtr
nId
=
p
->
GetId
();
sal_Bool
bRead
=
sal_Bool
(
nId
==
SBX_HINT_DATAWANTED
);
sal_Bool
bWrite
=
sal_Bool
(
nId
==
SBX_HINT_DATACHANGED
);
bool
bRead
=
(
nId
==
SBX_HINT_DATAWANTED
);
bool
bWrite
=
(
nId
==
SBX_HINT_DATACHANGED
);
SbxVariable
*
pVar
=
p
->
GetVar
();
if
(
bRead
||
bWrite
)
{
...
...
basic/source/sbx/sbxscan.cxx
Dosyayı görüntüle @
911e412b
...
...
@@ -89,13 +89,13 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType
const
char
*
pStart
=
aBStr
.
getStr
();
const
char
*
p
=
pStart
;
char
buf
[
80
],
*
q
=
buf
;
sal_Bool
bRes
=
sal_T
rue
;
sal_Bool
bMinus
=
sal_F
alse
;
bool
bRes
=
t
rue
;
bool
bMinus
=
f
alse
;
nVal
=
0
;
SbxDataType
eScanType
=
SbxSINGLE
;
while
(
*
p
&&
(
*
p
==
' '
||
*
p
==
'\t'
)
)
p
++
;
if
(
*
p
==
'-'
)
p
++
,
bMinus
=
sal_T
rue
;
p
++
,
bMinus
=
t
rue
;
if
(
isdigit
(
*
p
)
||
(
(
*
p
==
cNonIntntlComma
||
*
p
==
cIntntlComma
||
*
p
==
cIntntl1000
)
&&
isdigit
(
*
(
p
+
1
)
)
)
)
{
...
...
@@ -153,7 +153,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType
*
q
=
0
;
if
(
comma
>
1
||
exp
>
1
)
bRes
=
sal_F
alse
;
bRes
=
f
alse
;
if
(
!
comma
&&
!
exp
)
{
...
...
@@ -185,7 +185,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType
{
case
'O'
:
cmp
=
"01234567"
;
base
=
8
;
ndig
=
11
;
break
;
case
'H'
:
break
;
default
:
bRes
=
sal_F
alse
;
default
:
bRes
=
f
alse
;
}
long
l
=
0
;
int
i
;
...
...
@@ -194,7 +194,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType
char
ch
=
sal
::
static_int_cast
<
char
>
(
toupper
(
*
p
)
);
p
++
;
if
(
strchr
(
cmp
,
ch
)
)
*
q
++
=
ch
;
else
bRes
=
sal_F
alse
;
else
bRes
=
f
alse
;
}
*
q
=
0
;
for
(
q
=
buf
;
*
q
;
q
++
)
...
...
@@ -203,7 +203,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType
if
(
i
>
9
)
i
-=
7
;
l
=
(
l
*
base
)
+
i
;
if
(
!
ndig
--
)
bRes
=
sal_F
alse
;
bRes
=
f
alse
;
}
if
(
*
p
==
'&'
)
p
++
;
nVal
=
(
double
)
l
;
...
...
@@ -253,20 +253,20 @@ static double roundArray[] = {
/***************************************************************************
|*
|* void myftoa( double, char *, short, short,
sal_Bool, sal_B
ool )
|* void myftoa( double, char *, short, short,
bool, b
ool )
|*
|* description: conversion double --> ASCII
|* parameters: double the number
|* char * target buffer
|* short number of positions after decimal point
|* short range of the exponent ( 0=no E )
|*
sal_Bool sal_T
rue: with 1000-separators
|*
sal_Bool sal_T
rue: output without formatting
|*
bool t
rue: with 1000-separators
|*
bool t
rue: output without formatting
|*
***************************************************************************/
static
void
myftoa
(
double
nNum
,
char
*
pBuf
,
short
nPrec
,
short
nExpWidth
,
sal_Bool
bPt
,
sal_B
ool
bFix
,
sal_Unicode
cForceThousandSep
=
0
)
bool
bPt
,
b
ool
bFix
,
sal_Unicode
cForceThousandSep
=
0
)
{
short
nExp
=
0
;
...
...
@@ -389,7 +389,7 @@ void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, sal_Bool bCoreS
}
double
dMaxNumWithoutExp
=
(
nPrec
==
6
)
?
1E6
:
1E14
;
myftoa
(
nNum
,
p
,
nPrec
,(
nNum
&&
(
nNum
<
1E-1
||
nNum
>=
dMaxNumWithoutExp
)
)
?
4
:
0
,
sal_False
,
sal_T
rue
,
cDecimalSep
);
false
,
t
rue
,
cDecimalSep
);
// remove trailing zeros
for
(
p
=
cBuf
;
*
p
&&
(
*
p
!=
'E'
);
p
++
)
{}
q
=
p
;
p
--
;
...
...
@@ -477,7 +477,7 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW
short
nPrec
=
0
;
// number of positions after decimal point
short
nWidth
=
0
;
// number range completely
short
nLen
;
// length of converted number
sal_Bool
bPoint
=
sal_False
;
// sal_T
rue: with 1000 seperators
bool
bPoint
=
false
;
// t
rue: with 1000 seperators
sal_Bool
bTrail
=
sal_False
;
// sal_True, if following minus
sal_Bool
bSign
=
sal_False
;
// sal_True: always with leading sign
sal_Bool
bNeg
=
sal_False
;
// sal_True: number is negative
...
...
@@ -515,7 +515,7 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW
// 1000 separators?
if
(
*
pFmt
==
','
)
{
nWidth
++
;
pFmt
++
;
bPoint
=
sal_T
rue
;
nWidth
++
;
pFmt
++
;
bPoint
=
t
rue
;
}
else
break
;
}
// after point
...
...
@@ -536,7 +536,7 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW
if
(
nNum
<
0.0
)
nNum
=
-
nNum
,
bNeg
=
sal_True
;
p
=
cBuf
;
if
(
bSign
)
*
p
++
=
bNeg
?
'-'
:
'+'
;
myftoa
(
nNum
,
p
,
nPrec
,
nExpDig
,
bPoint
,
sal_F
alse
);
myftoa
(
nNum
,
p
,
nPrec
,
nExpDig
,
bPoint
,
f
alse
);
nLen
=
strlen
(
cBuf
);
// overflow?
...
...
@@ -694,7 +694,7 @@ sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 n
// from methods.cxx
sal_Int16
implGetMinute
(
double
dDate
);
sal_Int16
implGetDateYear
(
double
aDate
);
sal_B
ool
implDateSerial
(
sal_Int16
nYear
,
sal_Int16
nMonth
,
sal_Int16
nDay
,
double
&
rdRet
);
b
ool
implDateSerial
(
sal_Int16
nYear
,
sal_Int16
nMonth
,
sal_Int16
nDay
,
double
&
rdRet
);
void
SbxValue
::
Format
(
XubString
&
rRes
,
const
XubString
*
pFmt
)
const
{
...
...
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