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
c88ce903
Kaydet (Commit)
c88ce903
authored
Eyl 13, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert aCorrectedFormula in formula::FormulaCompiler to OUString
Change-Id: I048ec33effc33e94943f5110d6a9a0937a1dfdfe
üst
8f23a3b0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
21 deletions
+21
-21
FormulaCompiler.cxx
formula/source/core/api/FormulaCompiler.cxx
+16
-16
FormulaCompiler.hxx
include/formula/FormulaCompiler.hxx
+1
-1
compiler.hxx
sc/inc/compiler.hxx
+1
-1
compiler.cxx
sc/source/core/tool/compiler.cxx
+3
-3
No files found.
formula/source/core/api/FormulaCompiler.cxx
Dosyayı görüntüle @
c88ce903
...
...
@@ -1382,9 +1382,9 @@ void FormulaCompiler::Factor()
{
if
(
eOp
==
ocStop
)
{
// trailing operator w/o operand
xub_StrLen
nLen
=
aCorrectedFormula
.
Len
();
sal_Int32
nLen
=
aCorrectedFormula
.
getLength
();
if
(
nLen
)
aCorrectedFormula
.
Erase
(
nLen
-
1
);
aCorrectedFormula
=
aCorrectedFormula
.
copy
(
0
,
nLen
-
1
);
aCorrectedSymbol
=
""
;
bCorrected
=
true
;
}
...
...
@@ -1592,7 +1592,7 @@ bool FormulaCompiler::CompileTokenArray()
{
if
(
bAutoCorrect
)
{
aCorrectedFormula
.
Erase
()
;
aCorrectedFormula
=
""
;
aCorrectedSymbol
=
""
;
}
pArr
->
nRefs
=
0
;
// count from start
...
...
@@ -1604,7 +1604,7 @@ bool FormulaCompiler::CompileTokenArray()
if
(
bWasForced
)
{
if
(
bAutoCorrect
)
aCorrectedFormula
=
'='
;
aCorrectedFormula
=
"="
;
}
pArr
->
ClearRecalcMode
();
pArr
->
Reset
();
...
...
@@ -1947,18 +1947,18 @@ OpCode FormulaCompiler::NextToken()
}
else
{
xub_StrLen
nPos
=
aCorrectedFormula
.
Len
();
sal_Int32
nPos
=
aCorrectedFormula
.
getLength
();
if
(
nPos
)
{
nPos
--
;
sal_Unicode
c
=
aCorrectedFormula
.
GetChar
(
nPos
)
;
sal_Unicode
c
=
aCorrectedFormula
[
nPos
]
;
switch
(
eOp
)
{
// swap operators
case
ocGreater
:
if
(
c
==
mxSymbols
->
getSymbolChar
(
ocEqual
)
)
{
// >= instead of =>
aCorrectedFormula
.
SetChar
(
nPos
,
mxSymbols
->
getSymbolChar
(
ocGreater
)
);
aCorrectedFormula
=
aCorrectedFormula
.
replaceAt
(
nPos
,
1
,
OUString
(
mxSymbols
->
getSymbolChar
(
ocGreater
)
)
);
aCorrectedSymbol
=
OUString
(
c
);
bCorrected
=
true
;
}
...
...
@@ -1966,15 +1966,15 @@ OpCode FormulaCompiler::NextToken()
case
ocLess
:
if
(
c
==
mxSymbols
->
getSymbolChar
(
ocEqual
)
)
{
// <= instead of =<
aCorrectedFormula
.
SetChar
(
nPos
,
mxSymbols
->
getSymbolChar
(
ocLess
)
);
aCorrectedFormula
=
aCorrectedFormula
.
replaceAt
(
nPos
,
1
,
OUString
(
mxSymbols
->
getSymbolChar
(
ocLess
)
)
);
aCorrectedSymbol
=
OUString
(
c
);
bCorrected
=
true
;
}
else
if
(
c
==
mxSymbols
->
getSymbolChar
(
ocGreater
)
)
{
// <> instead of ><
aCorrectedFormula
.
SetChar
(
nPos
,
mxSymbols
->
getSymbolChar
(
ocLess
)
);
aCorrectedFormula
=
aCorrectedFormula
.
replaceAt
(
nPos
,
1
,
OUString
(
mxSymbols
->
getSymbolChar
(
ocLess
)
)
);
aCorrectedSymbol
=
OUString
(
c
);
bCorrected
=
true
;
}
...
...
@@ -1982,8 +1982,8 @@ OpCode FormulaCompiler::NextToken()
case
ocMul
:
if
(
c
==
mxSymbols
->
getSymbolChar
(
ocSub
)
)
{
// *- instead of -*
aCorrectedFormula
.
SetChar
(
nPos
,
mxSymbols
->
getSymbolChar
(
ocMul
)
);
aCorrectedFormula
=
aCorrectedFormula
.
replaceAt
(
nPos
,
1
,
OUString
(
mxSymbols
->
getSymbolChar
(
ocMul
)
)
);
aCorrectedSymbol
=
OUString
(
c
);
bCorrected
=
true
;
}
...
...
@@ -1991,8 +1991,8 @@ OpCode FormulaCompiler::NextToken()
case
ocDiv
:
if
(
c
==
mxSymbols
->
getSymbolChar
(
ocSub
)
)
{
// /- instead of -/
aCorrectedFormula
.
SetChar
(
nPos
,
mxSymbols
->
getSymbolChar
(
ocDiv
)
);
aCorrectedFormula
=
aCorrectedFormula
.
replaceAt
(
nPos
,
1
,
OUString
(
mxSymbols
->
getSymbolChar
(
ocDiv
)
)
);
aCorrectedSymbol
=
OUString
(
c
);
bCorrected
=
true
;
}
...
...
include/formula/FormulaCompiler.hxx
Dosyayı görüntüle @
c88ce903
...
...
@@ -311,7 +311,7 @@ protected:
bool
MergeRangeReference
(
FormulaToken
*
*
const
pCode1
,
FormulaToken
*
const
*
const
pCode2
);
String
aCorrectedFormula
;
// autocorrected Formula
OUString
aCorrectedFormula
;
// autocorrected Formula
OUString
aCorrectedSymbol
;
// autocorrected Symbol
OpCodeMapPtr
mxSymbols
;
// which symbols are used
...
...
sc/inc/compiler.hxx
Dosyayı görüntüle @
c88ce903
...
...
@@ -425,7 +425,7 @@ public:
void
SetExtendedErrorDetection
(
ExtendedErrorDetection
eVal
)
{
meExtendedErrorDetection
=
eVal
;
}
bool
IsCorrected
()
{
return
bCorrected
;
}
const
String
&
GetCorrectedFormula
()
{
return
aCorrectedFormula
;
}
const
OUString
&
GetCorrectedFormula
()
{
return
aCorrectedFormula
;
}
// Use convention from this->aPos by default
ScTokenArray
*
CompileString
(
const
OUString
&
rFormula
);
...
...
sc/source/core/tool/compiler.cxx
Dosyayı görüntüle @
c88ce903
...
...
@@ -3664,7 +3664,7 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula )
bCorrected
=
false
;
if
(
bAutoCorrect
)
{
aCorrectedFormula
.
Erase
()
;
aCorrectedFormula
=
""
;
aCorrectedSymbol
=
""
;
}
sal_uInt8
nForced
=
0
;
// ==formula forces recalc even if cell is not visible
...
...
@@ -3673,14 +3673,14 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula )
nSrcPos
++
;
nForced
++
;
if
(
bAutoCorrect
)
aCorrectedFormula
+=
'='
;
aCorrectedFormula
+=
"="
;
}
if
(
aFormula
.
GetChar
(
nSrcPos
)
==
'='
)
{
nSrcPos
++
;
nForced
++
;
if
(
bAutoCorrect
)
aCorrectedFormula
+=
'='
;
aCorrectedFormula
+=
"="
;
}
struct
FunctionStack
{
...
...
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