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
d9a914fe
Kaydet (Commit)
d9a914fe
authored
Kas 14, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Identify methods that don't modify internal state and mark them const.
Change-Id: Ie63d93d51640bfb80dc02bb226d742c2f9be96d8
üst
6a4b377c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
36 deletions
+36
-36
FormulaCompiler.cxx
formula/source/core/api/FormulaCompiler.cxx
+10
-10
FormulaCompiler.hxx
include/formula/FormulaCompiler.hxx
+10
-10
compiler.hxx
sc/inc/compiler.hxx
+6
-6
compiler.cxx
sc/source/core/tool/compiler.cxx
+10
-10
No files found.
formula/source/core/api/FormulaCompiler.cxx
Dosyayı görüntüle @
d9a914fe
...
...
@@ -963,7 +963,7 @@ sal_uInt16 FormulaCompiler::GetErrorConstant( const OUString& rName ) const
}
void
FormulaCompiler
::
AppendErrorConstant
(
OUStringBuffer
&
rBuffer
,
sal_uInt16
nError
)
void
FormulaCompiler
::
AppendErrorConstant
(
OUStringBuffer
&
rBuffer
,
sal_uInt16
nError
)
const
{
OpCode
eOp
;
switch
(
nError
)
...
...
@@ -1875,7 +1875,7 @@ FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuffer, F
}
void
FormulaCompiler
::
AppendDouble
(
OUStringBuffer
&
rBuffer
,
double
fVal
)
void
FormulaCompiler
::
AppendDouble
(
OUStringBuffer
&
rBuffer
,
double
fVal
)
const
{
if
(
mxSymbols
->
isEnglish
()
)
{
...
...
@@ -1894,12 +1894,12 @@ void FormulaCompiler::AppendDouble( OUStringBuffer& rBuffer, double fVal )
}
}
void
FormulaCompiler
::
AppendBoolean
(
OUStringBuffer
&
rBuffer
,
bool
bVal
)
void
FormulaCompiler
::
AppendBoolean
(
OUStringBuffer
&
rBuffer
,
bool
bVal
)
const
{
rBuffer
.
append
(
mxSymbols
->
getSymbol
(
static_cast
<
OpCode
>
(
bVal
?
ocTrue
:
ocFalse
))
);
}
void
FormulaCompiler
::
AppendString
(
OUStringBuffer
&
rBuffer
,
const
OUString
&
rStr
)
void
FormulaCompiler
::
AppendString
(
OUStringBuffer
&
rBuffer
,
const
OUString
&
rStr
)
const
{
rBuffer
.
append
(
'"'
);
if
(
lcl_UnicodeStrChr
(
rStr
.
getStr
(),
'"'
)
==
NULL
)
...
...
@@ -2074,27 +2074,27 @@ bool FormulaCompiler::HandleDbData()
return
true
;
}
void
FormulaCompiler
::
CreateStringFromSingleRef
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
void
FormulaCompiler
::
CreateStringFromSingleRef
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
const
{
}
void
FormulaCompiler
::
CreateStringFromDoubleRef
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
void
FormulaCompiler
::
CreateStringFromDoubleRef
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
const
{
}
void
FormulaCompiler
::
CreateStringFromIndex
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
void
FormulaCompiler
::
CreateStringFromIndex
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
const
{
}
void
FormulaCompiler
::
CreateStringFromMatrix
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
void
FormulaCompiler
::
CreateStringFromMatrix
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
const
{
}
void
FormulaCompiler
::
CreateStringFromExternal
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
void
FormulaCompiler
::
CreateStringFromExternal
(
OUStringBuffer
&
/*rBuffer*/
,
FormulaToken
*
/*pTokenP*/
)
const
{
}
void
FormulaCompiler
::
LocalizeString
(
OUString
&
/*rName*/
)
void
FormulaCompiler
::
LocalizeString
(
OUString
&
/*rName*/
)
const
{
}
...
...
include/formula/FormulaCompiler.hxx
Dosyayı görüntüle @
d9a914fe
...
...
@@ -245,9 +245,9 @@ public:
FormulaToken
*
CreateStringFromToken
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pToken
,
bool
bAllowArrAdvance
=
false
);
void
AppendBoolean
(
OUStringBuffer
&
rBuffer
,
bool
bVal
);
void
AppendDouble
(
OUStringBuffer
&
rBuffer
,
double
fVal
);
void
AppendString
(
OUStringBuffer
&
rBuffer
,
const
OUString
&
rStr
);
void
AppendBoolean
(
OUStringBuffer
&
rBuffer
,
bool
bVal
)
const
;
void
AppendDouble
(
OUStringBuffer
&
rBuffer
,
double
fVal
)
const
;
void
AppendString
(
OUStringBuffer
&
rBuffer
,
const
OUString
&
rStr
)
const
;
/** Set symbol map corresponding to one of predefined formula::FormulaGrammar::Grammar,
including an address reference convention. */
...
...
@@ -282,14 +282,14 @@ protected:
virtual
bool
HandleSingleRef
();
virtual
bool
HandleDbData
();
virtual
void
CreateStringFromExternal
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
);
virtual
void
CreateStringFromSingleRef
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
);
virtual
void
CreateStringFromDoubleRef
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
);
virtual
void
CreateStringFromMatrix
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
);
virtual
void
CreateStringFromIndex
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
);
virtual
void
LocalizeString
(
OUString
&
rName
)
;
// modify rName - input: exact name
virtual
void
CreateStringFromExternal
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
)
const
;
virtual
void
CreateStringFromSingleRef
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
)
const
;
virtual
void
CreateStringFromDoubleRef
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
)
const
;
virtual
void
CreateStringFromMatrix
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
)
const
;
virtual
void
CreateStringFromIndex
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
)
const
;
virtual
void
LocalizeString
(
OUString
&
rName
)
const
;
// modify rName - input: exact name
void
AppendErrorConstant
(
OUStringBuffer
&
rBuffer
,
sal_uInt16
nError
);
void
AppendErrorConstant
(
OUStringBuffer
&
rBuffer
,
sal_uInt16
nError
)
const
;
bool
GetToken
();
OpCode
NextToken
();
...
...
sc/inc/compiler.hxx
Dosyayı görüntüle @
d9a914fe
...
...
@@ -472,12 +472,12 @@ private:
virtual
bool
HandleDbData
();
virtual
formula
::
FormulaTokenRef
ExtendRangeReference
(
formula
::
FormulaToken
&
rTok1
,
formula
::
FormulaToken
&
rTok2
,
bool
bReuseDoubleRef
);
virtual
void
CreateStringFromExternal
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
pTokenP
);
virtual
void
CreateStringFromSingleRef
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
_pTokenP
);
virtual
void
CreateStringFromDoubleRef
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
_pTokenP
);
virtual
void
CreateStringFromMatrix
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
_pTokenP
);
virtual
void
CreateStringFromIndex
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
_pTokenP
);
virtual
void
LocalizeString
(
OUString
&
rName
);
// modify rName - input: exact name
virtual
void
CreateStringFromExternal
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
pTokenP
)
const
;
virtual
void
CreateStringFromSingleRef
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
_pTokenP
)
const
;
virtual
void
CreateStringFromDoubleRef
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
_pTokenP
)
const
;
virtual
void
CreateStringFromMatrix
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
_pTokenP
)
const
;
virtual
void
CreateStringFromIndex
(
OUStringBuffer
&
rBuffer
,
formula
::
FormulaToken
*
_pTokenP
)
const
;
virtual
void
LocalizeString
(
OUString
&
rName
)
const
;
// modify rName - input: exact name
/// Access the CharTable flags
inline
sal_uLong
GetCharTableFlags
(
sal_Unicode
c
,
sal_Unicode
cLast
)
...
...
sc/source/core/tool/compiler.cxx
Dosyayı görüntüle @
d9a914fe
...
...
@@ -4122,7 +4122,7 @@ bool ScCompiler::IsCharFlagAllConventions(
return
false
;
}
void
ScCompiler
::
CreateStringFromExternal
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
)
void
ScCompiler
::
CreateStringFromExternal
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
)
const
{
FormulaToken
*
t
=
pTokenP
;
ScExternalRefManager
*
pRefMgr
=
pDoc
->
GetExternalRefManager
();
...
...
@@ -4150,8 +4150,8 @@ void ScCompiler::CreateStringFromExternal(OUStringBuffer& rBuffer, FormulaToken*
}
}
void
ScCompiler
::
CreateStringFromMatrix
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
)
void
ScCompiler
::
CreateStringFromMatrix
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
pTokenP
)
const
{
const
ScMatrix
*
pMatrix
=
static_cast
<
ScToken
*>
(
pTokenP
)
->
GetMatrix
();
SCSIZE
nC
,
nMaxC
,
nR
,
nMaxR
;
...
...
@@ -4195,10 +4195,10 @@ void ScCompiler::CreateStringFromMatrix( OUStringBuffer& rBuffer,
rBuffer
.
append
(
mxSymbols
->
getSymbol
(
ocArrayClose
)
);
}
void
ScCompiler
::
CreateStringFromSingleRef
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
_pTokenP
)
void
ScCompiler
::
CreateStringFromSingleRef
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
_pTokenP
)
const
{
const
OpCode
eOp
=
_pTokenP
->
GetOpCode
();
ScSingleRefData
&
rRef
=
static_cast
<
ScToken
*>
(
_pTokenP
)
->
GetSingleRef
();
const
ScSingleRefData
&
rRef
=
static_cast
<
const
ScToken
*>
(
_pTokenP
)
->
GetSingleRef
();
ScComplexRefData
aRef
;
aRef
.
Ref1
=
aRef
.
Ref2
=
rRef
;
if
(
eOp
==
ocColRowName
)
...
...
@@ -4220,12 +4220,12 @@ void ScCompiler::CreateStringFromSingleRef(OUStringBuffer& rBuffer,FormulaToken*
pConv
->
MakeRefStr
(
rBuffer
,
*
this
,
aRef
,
true
);
}
void
ScCompiler
::
CreateStringFromDoubleRef
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
_pTokenP
)
void
ScCompiler
::
CreateStringFromDoubleRef
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
_pTokenP
)
const
{
pConv
->
MakeRefStr
(
rBuffer
,
*
this
,
static_cast
<
ScToken
*>
(
_pTokenP
)
->
GetDoubleRef
(),
false
);
}
void
ScCompiler
::
CreateStringFromIndex
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
_pTokenP
)
void
ScCompiler
::
CreateStringFromIndex
(
OUStringBuffer
&
rBuffer
,
FormulaToken
*
_pTokenP
)
const
{
const
OpCode
eOp
=
_pTokenP
->
GetOpCode
();
OUStringBuffer
aBuffer
;
...
...
@@ -4233,14 +4233,14 @@ void ScCompiler::CreateStringFromIndex(OUStringBuffer& rBuffer,FormulaToken* _pT
{
case
ocName
:
{
ScRangeData
*
pData
=
GetRangeData
(
*
_pTokenP
);
const
ScRangeData
*
pData
=
GetRangeData
(
*
_pTokenP
);
if
(
pData
)
aBuffer
.
append
(
pData
->
GetName
());
}
break
;
case
ocDBArea
:
{
ScDBData
*
pDBData
=
pDoc
->
GetDBCollection
()
->
getNamedDBs
().
findByIndex
(
_pTokenP
->
GetIndex
());
const
ScDBData
*
pDBData
=
pDoc
->
GetDBCollection
()
->
getNamedDBs
().
findByIndex
(
_pTokenP
->
GetIndex
());
if
(
pDBData
)
aBuffer
.
append
(
pDBData
->
GetName
());
}
...
...
@@ -4254,7 +4254,7 @@ void ScCompiler::CreateStringFromIndex(OUStringBuffer& rBuffer,FormulaToken* _pT
rBuffer
.
append
(
ScGlobal
::
GetRscString
(
STR_NO_NAME_REF
));
}
void
ScCompiler
::
LocalizeString
(
OUString
&
rName
)
void
ScCompiler
::
LocalizeString
(
OUString
&
rName
)
const
{
ScGlobal
::
GetAddInCollection
()
->
LocalizeString
(
rName
);
}
...
...
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