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
e3c73fea
Kaydet (Commit)
e3c73fea
authored
Haz 02, 2017
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add parentheses only for functions and operators
Change-Id: Ifdd3b0644c54b93f32e93b9448a4364475027a00
üst
9c9109c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
parclass.cxx
sc/source/core/tool/parclass.cxx
+11
-2
No files found.
sc/source/core/tool/parclass.cxx
Dosyayı görüntüle @
e3c73fea
...
...
@@ -539,13 +539,14 @@ void ScParameterClassification::GenerateDocumentation()
if
(
!
xMap
->
getSymbol
(
eOp
).
isEmpty
()
)
{
OUStringBuffer
aStr
(
xMap
->
getSymbol
(
eOp
));
aStr
.
append
(
'('
);
formula
::
FormulaByteToken
aToken
(
eOp
);
sal_uInt8
nParams
=
GetMinimumParameters
(
eOp
);
// preset parameter count according to opcode value, with some
// special handling
bool
bAddParentheses
=
true
;
if
(
eOp
<
SC_OPCODE_STOP_DIV
)
{
bAddParentheses
=
false
;
// will be overridden below if parameters
switch
(
eOp
)
{
case
ocIf
:
...
...
@@ -563,7 +564,10 @@ void ScParameterClassification::GenerateDocumentation()
}
}
else
if
(
eOp
<
SC_OPCODE_STOP_ERRORS
)
{
bAddParentheses
=
false
;
aToken
.
SetByte
(
0
);
}
else
if
(
eOp
<
SC_OPCODE_STOP_BIN_OP
)
{
switch
(
eOp
)
...
...
@@ -592,6 +596,10 @@ void ScParameterClassification::GenerateDocumentation()
aToken
.
SetByte
(
nParams
);
if
(
nParams
!=
aToken
.
GetParamCount
()
)
SAL_WARN
(
"sc.core"
,
"(parameter count differs, token ParamCount: "
<<
(
int
)
aToken
.
GetParamCount
()
<<
" classification: "
<<
(
int
)
nParams
<<
") "
);
if
(
aToken
.
GetByte
())
bAddParentheses
=
true
;
if
(
bAddParentheses
)
aStr
.
append
(
'('
);
for
(
sal_uInt16
j
=
0
;
j
<
nParams
;
++
j
)
{
if
(
j
>
0
)
...
...
@@ -625,7 +633,8 @@ void ScParameterClassification::GenerateDocumentation()
aStr
.
append
(
", ..."
);
if
(
nParams
)
aStr
.
append
(
' '
);
aStr
.
append
(
')'
);
if
(
bAddParentheses
)
aStr
.
append
(
')'
);
switch
(
eOp
)
{
case
ocRRI
:
...
...
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