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
bd2bf6bd
Kaydet (Commit)
bd2bf6bd
authored
Mar 02, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:unuseddefaultparams in basic
Change-Id: I286efdac6af47a859693fccc71b445915f76945c
üst
2b7215e6
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
34 deletions
+20
-34
basmgr.cxx
basic/source/basmgr/basmgr.cxx
+3
-14
parser.cxx
basic/source/comp/parser.cxx
+2
-2
symtbl.cxx
basic/source/comp/symtbl.cxx
+2
-3
iosys.hxx
basic/source/inc/iosys.hxx
+2
-2
parser.hxx
basic/source/inc/parser.hxx
+1
-1
runtime.hxx
basic/source/inc/runtime.hxx
+1
-1
symtbl.hxx
basic/source/inc/symtbl.hxx
+1
-3
iosys.cxx
basic/source/runtime/iosys.cxx
+4
-4
runtime.cxx
basic/source/runtime/runtime.cxx
+2
-2
basmgr.hxx
include/basic/basmgr.hxx
+2
-2
No files found.
basic/source/basmgr/basmgr.cxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -713,7 +713,7 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib )
...
@@ -713,7 +713,7 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib )
pStdLib
->
SetFlag
(
SbxFlagBits
::
DontStore
|
SbxFlagBits
::
ExtSearch
);
pStdLib
->
SetFlag
(
SbxFlagBits
::
DontStore
|
SbxFlagBits
::
ExtSearch
);
}
}
void
BasicManager
::
LoadBasicManager
(
SotStorage
&
rStorage
,
const
OUString
&
rBaseURL
,
bool
bLoadLibs
)
void
BasicManager
::
LoadBasicManager
(
SotStorage
&
rStorage
,
const
OUString
&
rBaseURL
)
{
{
tools
::
SvRef
<
SotStorageStream
>
xManagerStream
=
rStorage
.
OpenSotStream
(
szManagerStream
,
eStreamReadMode
);
tools
::
SvRef
<
SotStorageStream
>
xManagerStream
=
rStorage
.
OpenSotStream
(
szManagerStream
,
eStreamReadMode
);
...
@@ -793,7 +793,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
...
@@ -793,7 +793,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
mpImpl
->
aLibs
.
push_back
(
std
::
unique_ptr
<
BasicLibInfo
>
(
pInfo
));
mpImpl
->
aLibs
.
push_back
(
std
::
unique_ptr
<
BasicLibInfo
>
(
pInfo
));
// Libs from external files should be loaded only when necessary.
// Libs from external files should be loaded only when necessary.
// But references are loaded at once, otherwise some big customers get into trouble
// But references are loaded at once, otherwise some big customers get into trouble
if
(
bLoadLibs
&&
pInfo
->
DoLoad
()
&&
if
(
pInfo
->
DoLoad
()
&&
(
!
pInfo
->
IsExtern
()
||
pInfo
->
IsReference
()))
(
!
pInfo
->
IsExtern
()
||
pInfo
->
IsReference
()))
{
{
ImpLoadLibrary
(
pInfo
,
&
rStorage
);
ImpLoadLibrary
(
pInfo
,
&
rStorage
);
...
@@ -928,7 +928,7 @@ BasicLibInfo* BasicManager::CreateLibInfo()
...
@@ -928,7 +928,7 @@ BasicLibInfo* BasicManager::CreateLibInfo()
return
pInf
;
return
pInf
;
}
}
bool
BasicManager
::
ImpLoadLibrary
(
BasicLibInfo
*
pLibInfo
,
SotStorage
*
pCurStorage
,
bool
bInfosOnly
)
bool
BasicManager
::
ImpLoadLibrary
(
BasicLibInfo
*
pLibInfo
,
SotStorage
*
pCurStorage
)
{
{
try
{
try
{
DBG_ASSERT
(
pLibInfo
,
"LibInfo!?"
);
DBG_ASSERT
(
pLibInfo
,
"LibInfo!?"
);
...
@@ -981,8 +981,6 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
...
@@ -981,8 +981,6 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
{
{
bool
bLoaded
=
false
;
bool
bLoaded
=
false
;
if
(
xBasicStream
->
Seek
(
STREAM_SEEK_TO_END
)
!=
0
)
if
(
xBasicStream
->
Seek
(
STREAM_SEEK_TO_END
)
!=
0
)
{
if
(
!
bInfosOnly
)
{
{
if
(
!
pLibInfo
->
GetLib
().
Is
()
)
if
(
!
pLibInfo
->
GetLib
().
Is
()
)
{
{
...
@@ -997,15 +995,6 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
...
@@ -997,15 +995,6 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
xStdLib
->
SetModified
(
false
);
xStdLib
->
SetModified
(
false
);
xStdLib
->
SetFlag
(
SbxFlagBits
::
DontStore
);
xStdLib
->
SetFlag
(
SbxFlagBits
::
DontStore
);
}
}
else
{
// Skip Basic...
xBasicStream
->
Seek
(
STREAM_SEEK_TO_BEGIN
);
ImplEncryptStream
(
*
xBasicStream
);
SbxBase
::
Skip
(
*
xBasicStream
);
bLoaded
=
true
;
}
}
if
(
!
bLoaded
)
if
(
!
bLoaded
)
{
{
StringErrorInfo
*
pErrInf
=
new
StringErrorInfo
(
ERRCODE_BASMGR_LIBLOAD
,
pLibInfo
->
GetLibName
(),
ERRCODE_BUTTON_OK
);
StringErrorInfo
*
pErrInf
=
new
StringErrorInfo
(
ERRCODE_BASMGR_LIBLOAD
,
pLibInfo
->
GetLibName
(),
ERRCODE_BUTTON_OK
);
...
...
basic/source/comp/parser.cxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -243,10 +243,10 @@ void SbiParser::Exit()
...
@@ -243,10 +243,10 @@ void SbiParser::Exit()
Error
(
ERRCODE_BASIC_BAD_EXIT
);
Error
(
ERRCODE_BASIC_BAD_EXIT
);
}
}
bool
SbiParser
::
TestSymbol
(
bool
bKwdOk
)
bool
SbiParser
::
TestSymbol
()
{
{
Peek
();
Peek
();
if
(
eCurTok
==
SYMBOL
||
(
bKwdOk
&&
IsKwd
(
eCurTok
)
)
)
if
(
eCurTok
==
SYMBOL
)
{
{
Next
();
return
true
;
Next
();
return
true
;
}
}
...
...
basic/source/comp/symtbl.cxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -52,14 +52,13 @@ const OUString& SbiStringPool::Find( sal_uInt32 n ) const
...
@@ -52,14 +52,13 @@ const OUString& SbiStringPool::Find( sal_uInt32 n ) const
return
aData
[
n
-
1
];
return
aData
[
n
-
1
];
}
}
short
SbiStringPool
::
Add
(
const
OUString
&
rVal
,
bool
bNoCase
)
short
SbiStringPool
::
Add
(
const
OUString
&
rVal
)
{
{
sal_uInt32
n
=
aData
.
size
();
sal_uInt32
n
=
aData
.
size
();
for
(
sal_uInt32
i
=
0
;
i
<
n
;
++
i
)
for
(
sal_uInt32
i
=
0
;
i
<
n
;
++
i
)
{
{
OUString
&
p
=
aData
[
i
];
OUString
&
p
=
aData
[
i
];
if
(
(
bNoCase
&&
p
==
rVal
)
if
(
p
==
rVal
)
||
(
!
bNoCase
&&
p
.
equalsIgnoreAsciiCase
(
rVal
)
)
)
return
i
+
1
;
return
i
+
1
;
}
}
...
...
basic/source/inc/iosys.hxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -100,9 +100,9 @@ public:
...
@@ -100,9 +100,9 @@ public:
void
ResetChannel
()
{
nChan
=
0
;
}
void
ResetChannel
()
{
nChan
=
0
;
}
void
Open
(
short
,
const
OString
&
,
StreamMode
,
SbiStreamFlags
,
short
);
void
Open
(
short
,
const
OString
&
,
StreamMode
,
SbiStreamFlags
,
short
);
void
Close
();
void
Close
();
void
Read
(
OString
&
,
short
=
0
);
void
Read
(
OString
&
);
char
Read
();
char
Read
();
void
Write
(
const
OUString
&
,
short
=
0
);
void
Write
(
const
OUString
&
);
// 0 == bad channel or no SvStream (nChannel=0..CHANNELS-1)
// 0 == bad channel or no SvStream (nChannel=0..CHANNELS-1)
SbiStream
*
GetStream
(
short
nChannel
)
const
;
SbiStream
*
GetStream
(
short
nChannel
)
const
;
void
CloseAll
();
// JSM
void
CloseAll
();
// JSM
...
...
basic/source/inc/parser.hxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -92,7 +92,7 @@ public:
...
@@ -92,7 +92,7 @@ public:
bool
HasGlobalCode
();
bool
HasGlobalCode
();
bool
TestToken
(
SbiToken
);
bool
TestToken
(
SbiToken
);
bool
TestSymbol
(
bool
bKwdOk
=
false
);
bool
TestSymbol
();
bool
TestComma
();
bool
TestComma
();
void
TestEoln
();
void
TestEoln
();
...
...
basic/source/inc/runtime.hxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -299,7 +299,7 @@ class SbiRuntime
...
@@ -299,7 +299,7 @@ class SbiRuntime
void
PushVar
(
SbxVariable
*
);
void
PushVar
(
SbxVariable
*
);
SbxVariableRef
PopVar
();
SbxVariableRef
PopVar
();
SbxVariable
*
GetTOS
(
short
=
0
);
SbxVariable
*
GetTOS
();
void
TOSMakeTemp
();
void
TOSMakeTemp
();
void
ClearExprStack
();
void
ClearExprStack
();
...
...
basic/source/inc/symtbl.hxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -41,9 +41,7 @@ public:
...
@@ -41,9 +41,7 @@ public:
SbiStringPool
();
SbiStringPool
();
~
SbiStringPool
();
~
SbiStringPool
();
sal_uInt32
GetSize
()
const
{
return
aData
.
size
();
}
sal_uInt32
GetSize
()
const
{
return
aData
.
size
();
}
// From 8.4.1999: default changed to true because of #64236 -
short
Add
(
const
OUString
&
);
// change it back to false when the bug is cleanly removed.
short
Add
(
const
OUString
&
,
bool
=
true
);
short
Add
(
double
,
SbxDataType
);
short
Add
(
double
,
SbxDataType
);
const
OUString
&
Find
(
sal_uInt32
)
const
;
const
OUString
&
Find
(
sal_uInt32
)
const
;
};
};
...
...
basic/source/runtime/iosys.cxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -852,7 +852,7 @@ void SbiIoSystem::Shutdown()
...
@@ -852,7 +852,7 @@ void SbiIoSystem::Shutdown()
}
}
void
SbiIoSystem
::
Read
(
OString
&
rBuf
,
short
n
)
void
SbiIoSystem
::
Read
(
OString
&
rBuf
)
{
{
if
(
!
nChan
)
if
(
!
nChan
)
{
{
...
@@ -864,7 +864,7 @@ void SbiIoSystem::Read(OString& rBuf, short n)
...
@@ -864,7 +864,7 @@ void SbiIoSystem::Read(OString& rBuf, short n)
}
}
else
else
{
{
nError
=
pChan
[
nChan
]
->
Read
(
rBuf
,
n
);
nError
=
pChan
[
nChan
]
->
Read
(
rBuf
);
}
}
}
}
...
@@ -892,7 +892,7 @@ char SbiIoSystem::Read()
...
@@ -892,7 +892,7 @@ char SbiIoSystem::Read()
return
ch
;
return
ch
;
}
}
void
SbiIoSystem
::
Write
(
const
OUString
&
rBuf
,
short
n
)
void
SbiIoSystem
::
Write
(
const
OUString
&
rBuf
)
{
{
if
(
!
nChan
)
if
(
!
nChan
)
{
{
...
@@ -904,7 +904,7 @@ void SbiIoSystem::Write(const OUString& rBuf, short n)
...
@@ -904,7 +904,7 @@ void SbiIoSystem::Write(const OUString& rBuf, short n)
}
}
else
else
{
{
nError
=
pChan
[
nChan
]
->
Write
(
OUStringToOString
(
rBuf
,
osl_getThreadTextEncoding
())
,
n
);
nError
=
pChan
[
nChan
]
->
Write
(
OUStringToOString
(
rBuf
,
osl_getThreadTextEncoding
())
);
}
}
}
}
...
...
basic/source/runtime/runtime.cxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -1014,9 +1014,9 @@ void SbiRuntime::ClearExprStack()
...
@@ -1014,9 +1014,9 @@ void SbiRuntime::ClearExprStack()
// Take variable from the expression-stack without removing it
// Take variable from the expression-stack without removing it
// n counts from 0
// n counts from 0
SbxVariable
*
SbiRuntime
::
GetTOS
(
short
n
)
SbxVariable
*
SbiRuntime
::
GetTOS
()
{
{
n
=
nExprLvl
-
n
-
1
;
short
n
=
nExprLvl
-
1
;
#ifdef DBG_UTIL
#ifdef DBG_UTIL
if
(
n
<
0
)
if
(
n
<
0
)
{
{
...
...
include/basic/basmgr.hxx
Dosyayı görüntüle @
bd2bf6bd
...
@@ -121,11 +121,11 @@ private:
...
@@ -121,11 +121,11 @@ private:
BASIC_DLLPRIVATE
void
Init
();
BASIC_DLLPRIVATE
void
Init
();
protected
:
protected
:
bool
ImpLoadLibrary
(
BasicLibInfo
*
pLibInfo
,
SotStorage
*
pCurStorage
,
bool
bInfosOnly
=
false
);
bool
ImpLoadLibrary
(
BasicLibInfo
*
pLibInfo
,
SotStorage
*
pCurStorage
);
void
ImpCreateStdLib
(
StarBASIC
*
pParentFromStdLib
);
void
ImpCreateStdLib
(
StarBASIC
*
pParentFromStdLib
);
void
ImpMgrNotLoaded
(
const
OUString
&
rStorageName
);
void
ImpMgrNotLoaded
(
const
OUString
&
rStorageName
);
BasicLibInfo
*
CreateLibInfo
();
BasicLibInfo
*
CreateLibInfo
();
void
LoadBasicManager
(
SotStorage
&
rStorage
,
const
OUString
&
rBaseURL
,
bool
bLoadBasics
=
true
);
void
LoadBasicManager
(
SotStorage
&
rStorage
,
const
OUString
&
rBaseURL
);
void
LoadOldBasicManager
(
SotStorage
&
rStorage
);
void
LoadOldBasicManager
(
SotStorage
&
rStorage
);
bool
ImplLoadBasic
(
SvStream
&
rStrm
,
StarBASICRef
&
rOldBasic
)
const
;
bool
ImplLoadBasic
(
SvStream
&
rStrm
,
StarBASICRef
&
rOldBasic
)
const
;
static
bool
ImplEncryptStream
(
SvStream
&
rStream
);
static
bool
ImplEncryptStream
(
SvStream
&
rStream
);
...
...
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