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
7f83faa7
Kaydet (Commit)
7f83faa7
authored
Eyl 13, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert the rest of the formula module from String to OUString
Change-Id: I27ee0cf3e9f97e94234c5e32080bf102b4cf0dc9
üst
41df3400
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
94 deletions
+93
-94
FormulaCompiler.cxx
formula/source/core/api/FormulaCompiler.cxx
+4
-4
FormulaHelper.cxx
formula/source/ui/dlg/FormulaHelper.cxx
+2
-2
formula.cxx
formula/source/ui/dlg/formula.cxx
+73
-74
funcutl.cxx
formula/source/ui/dlg/funcutl.cxx
+1
-1
parawin.cxx
formula/source/ui/dlg/parawin.cxx
+13
-13
No files found.
formula/source/core/api/FormulaCompiler.cxx
Dosyayı görüntüle @
7f83faa7
...
@@ -147,7 +147,7 @@ public:
...
@@ -147,7 +147,7 @@ public:
OpCodeList
(
sal_uInt16
,
FormulaCompiler
::
NonConstOpCodeMapPtr
);
OpCodeList
(
sal_uInt16
,
FormulaCompiler
::
NonConstOpCodeMapPtr
);
private
:
private
:
bool
getOpCodeString
(
String
&
rStr
,
sal_uInt16
nOp
);
bool
getOpCodeString
(
OU
String
&
rStr
,
sal_uInt16
nOp
);
void
putDefaultOpCode
(
FormulaCompiler
::
NonConstOpCodeMapPtr
xMap
,
sal_uInt16
nOp
);
void
putDefaultOpCode
(
FormulaCompiler
::
NonConstOpCodeMapPtr
xMap
,
sal_uInt16
nOp
);
private
:
private
:
...
@@ -165,7 +165,7 @@ OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr x
...
@@ -165,7 +165,7 @@ OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr x
{
{
for
(
sal_uInt16
i
=
0
;
i
<=
SC_OPCODE_LAST_OPCODE_ID
;
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<=
SC_OPCODE_LAST_OPCODE_ID
;
++
i
)
{
{
String
aOpStr
;
OU
String
aOpStr
;
if
(
getOpCodeString
(
aOpStr
,
i
)
)
if
(
getOpCodeString
(
aOpStr
,
i
)
)
xMap
->
putOpCode
(
aOpStr
,
OpCode
(
i
));
xMap
->
putOpCode
(
aOpStr
,
OpCode
(
i
));
else
else
...
@@ -175,7 +175,7 @@ OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr x
...
@@ -175,7 +175,7 @@ OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr x
FreeResource
();
FreeResource
();
}
}
bool
OpCodeList
::
getOpCodeString
(
String
&
rStr
,
sal_uInt16
nOp
)
bool
OpCodeList
::
getOpCodeString
(
OU
String
&
rStr
,
sal_uInt16
nOp
)
{
{
switch
(
nOp
)
switch
(
nOp
)
{
{
...
@@ -878,7 +878,7 @@ void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r, bool bOverrideKno
...
@@ -878,7 +878,7 @@ void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r, bool bOverrideKno
for
(
sal_uInt16
i
=
1
;
i
<
n
;
++
i
)
for
(
sal_uInt16
i
=
1
;
i
<
n
;
++
i
)
{
{
OpCode
eOp
=
OpCode
(
i
);
OpCode
eOp
=
OpCode
(
i
);
const
String
&
rSymbol
=
r
.
mpTable
[
i
];
const
OU
String
&
rSymbol
=
r
.
mpTable
[
i
];
putCopyOpCode
(
rSymbol
,
eOp
);
putCopyOpCode
(
rSymbol
,
eOp
);
}
}
}
}
...
...
formula/source/ui/dlg/FormulaHelper.cxx
Dosyayı görüntüle @
7f83faa7
...
@@ -175,14 +175,14 @@ void FormulaHelper::GetArgStrings( ::std::vector< OUString >& _rArgs,
...
@@ -175,14 +175,14 @@ void FormulaHelper::GetArgStrings( ::std::vector< OUString >& _rArgs,
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline
sal_Bool
IsFormulaText
(
const
CharClass
*
_pCharClass
,
const
String
&
rStr
,
xub_StrLen
nPos
)
inline
sal_Bool
IsFormulaText
(
const
CharClass
*
_pCharClass
,
const
OU
String
&
rStr
,
xub_StrLen
nPos
)
{
{
if
(
_pCharClass
->
isLetterNumeric
(
rStr
,
nPos
)
)
if
(
_pCharClass
->
isLetterNumeric
(
rStr
,
nPos
)
)
return
sal_True
;
return
sal_True
;
else
else
{
// In internationalized versions function names may contain a dot
{
// In internationalized versions function names may contain a dot
// and in every version also an underscore... ;-)
// and in every version also an underscore... ;-)
sal_Unicode
c
=
rStr
.
GetChar
(
nPos
)
;
sal_Unicode
c
=
rStr
[
nPos
]
;
return
c
==
'.'
||
c
==
'_'
;
return
c
==
'.'
||
c
==
'_'
;
}
}
...
...
formula/source/ui/dlg/formula.cxx
Dosyayı görüntüle @
7f83faa7
...
@@ -92,7 +92,7 @@ namespace formula
...
@@ -92,7 +92,7 @@ namespace formula
void
RefInputStartAfter
(
RefEdit
*
pEdit
,
RefButton
*
pButton
);
void
RefInputStartAfter
(
RefEdit
*
pEdit
,
RefButton
*
pButton
);
void
RefInputDoneAfter
(
sal_Bool
bForced
);
void
RefInputDoneAfter
(
sal_Bool
bForced
);
sal_Bool
CalcValue
(
const
OUString
&
rStrExp
,
OUString
&
rStrResult
);
sal_Bool
CalcValue
(
const
OUString
&
rStrExp
,
OUString
&
rStrResult
);
sal_Bool
CalcStruct
(
const
String
&
rStrExp
);
sal_Bool
CalcStruct
(
const
OU
String
&
rStrExp
);
void
UpdateValues
();
void
UpdateValues
();
void
DeleteArgs
();
void
DeleteArgs
();
xub_StrLen
GetFunctionPos
(
xub_StrLen
nPos
);
xub_StrLen
GetFunctionPos
(
xub_StrLen
nPos
);
...
@@ -100,8 +100,8 @@ namespace formula
...
@@ -100,8 +100,8 @@ namespace formula
void
MakeTree
(
IStructHelper
*
_pTree
,
SvTreeListEntry
*
pParent
,
FormulaToken
*
_pToken
,
long
Count
);
void
MakeTree
(
IStructHelper
*
_pTree
,
SvTreeListEntry
*
pParent
,
FormulaToken
*
_pToken
,
long
Count
);
void
fillTree
(
IStructHelper
*
_pTree
);
void
fillTree
(
IStructHelper
*
_pTree
);
void
UpdateTokenArray
(
const
String
&
rStrExp
);
void
UpdateTokenArray
(
const
OU
String
&
rStrExp
);
String
RepairFormula
(
const
String
&
aFormula
);
OUString
RepairFormula
(
const
OU
String
&
aFormula
);
void
FillDialog
(
sal_Bool
nFlag
=
sal_True
);
void
FillDialog
(
sal_Bool
nFlag
=
sal_True
);
void
EditNextFunc
(
sal_Bool
bForward
,
xub_StrLen
nFStart
=
NOT_FOUND
);
void
EditNextFunc
(
sal_Bool
bForward
,
xub_StrLen
nFStart
=
NOT_FOUND
);
void
EditThisFunc
(
xub_StrLen
nFStart
);
void
EditThisFunc
(
xub_StrLen
nFStart
);
...
@@ -110,7 +110,7 @@ namespace formula
...
@@ -110,7 +110,7 @@ namespace formula
void
UpdateArgInput
(
sal_uInt16
nOffset
,
sal_uInt16
nInput
);
void
UpdateArgInput
(
sal_uInt16
nOffset
,
sal_uInt16
nInput
);
void
Update
();
void
Update
();
void
Update
(
const
String
&
_sExp
);
void
Update
(
const
OU
String
&
_sExp
);
void
SaveArg
(
sal_uInt16
nEd
);
void
SaveArg
(
sal_uInt16
nEd
);
void
UpdateSelection
();
void
UpdateSelection
();
...
@@ -118,14 +118,14 @@ namespace formula
...
@@ -118,14 +118,14 @@ namespace formula
void
FillListboxes
();
void
FillListboxes
();
void
FillControls
(
sal_Bool
&
rbNext
,
sal_Bool
&
rbPrev
);
void
FillControls
(
sal_Bool
&
rbNext
,
sal_Bool
&
rbPrev
);
FormulaDlgMode
SetMeText
(
const
String
&
_sText
,
xub_StrLen
PrivStart
,
xub_StrLen
PrivEnd
,
sal_Bool
bMatrix
,
sal_Bool
_bSelect
,
sal_Bool
_bUpdate
);
FormulaDlgMode
SetMeText
(
const
OU
String
&
_sText
,
xub_StrLen
PrivStart
,
xub_StrLen
PrivEnd
,
sal_Bool
bMatrix
,
sal_Bool
_bSelect
,
sal_Bool
_bUpdate
);
void
SetMeText
(
const
String
&
_sText
);
void
SetMeText
(
const
OU
String
&
_sText
);
sal_Bool
CheckMatrix
(
OUString
&
aFormula
/*IN/OUT*/
);
sal_Bool
CheckMatrix
(
OUString
&
aFormula
/*IN/OUT*/
);
void
SetEdSelection
();
void
SetEdSelection
();
sal_Bool
UpdateParaWin
(
Selection
&
_rSelection
);
sal_Bool
UpdateParaWin
(
Selection
&
_rSelection
);
void
UpdateParaWin
(
const
Selection
&
_rSelection
,
const
String
&
_sRefStr
);
void
UpdateParaWin
(
const
Selection
&
_rSelection
,
const
OU
String
&
_sRefStr
);
void
SetData
(
xub_StrLen
nFStart
,
xub_StrLen
nNextFStart
,
xub_StrLen
nNextFEnd
,
xub_StrLen
&
PrivStart
,
xub_StrLen
&
PrivEnd
);
void
SetData
(
xub_StrLen
nFStart
,
xub_StrLen
nNextFStart
,
xub_StrLen
nNextFEnd
,
xub_StrLen
&
PrivStart
,
xub_StrLen
&
PrivEnd
);
void
PreNotify
(
NotifyEvent
&
rNEvt
);
void
PreNotify
(
NotifyEvent
&
rNEvt
);
...
@@ -198,18 +198,17 @@ namespace formula
...
@@ -198,18 +198,17 @@ namespace formula
RefButton
*
pTheRefButton
;
RefButton
*
pTheRefButton
;
FuncPage
*
pFuncPage
;
FuncPage
*
pFuncPage
;
StructPage
*
pStructPage
;
StructPage
*
pStructPage
;
String
aOldFormula
;
OUString
aOldFormula
;
sal_Bool
bStructUpdate
;
sal_Bool
bStructUpdate
;
MultiLineEdit
*
pMEdit
;
MultiLineEdit
*
pMEdit
;
sal_Bool
bUserMatrixFlag
;
sal_Bool
bUserMatrixFlag
;
Timer
aTimer
;
Timer
aTimer
;
const
String
aTitle1
;
const
OUString
aTitle1
;
const
String
aTitle2
;
const
OUString
aTitle2
;
const
String
aTxtEnd
;
const
OUString
aTxtEnd
;
const
String
aTxtOk
;
// behind aBtnEnd
const
OUString
aTxtOk
;
// behind aBtnEnd
FormulaHelper
FormulaHelper
m_aFormulaHelper
;
m_aFormulaHelper
;
OString
m_aEditHelpId
;
OString
m_aEditHelpId
;
...
@@ -468,7 +467,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
...
@@ -468,7 +467,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
xub_StrLen
nFuncPos
=
STRING_NOTFOUND
;
xub_StrLen
nFuncPos
=
STRING_NOTFOUND
;
sal_Bool
bFlag
=
sal_False
;
sal_Bool
bFlag
=
sal_False
;
String
aFormString
=
m_aFormulaHelper
.
GetCharClass
()
->
uppercase
(
pMEdit
->
GetText
());
OU
String
aFormString
=
m_aFormulaHelper
.
GetCharClass
()
->
uppercase
(
pMEdit
->
GetText
());
if
(
m_aTokenList
.
getLength
()
)
if
(
m_aTokenList
.
getLength
()
)
{
{
...
@@ -488,7 +487,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
...
@@ -488,7 +487,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
const
sal_Int32
eOp
=
pIter
->
OpCode
;
const
sal_Int32
eOp
=
pIter
->
OpCode
;
uno
::
Sequence
<
sheet
::
FormulaToken
>
aArgs
(
1
);
uno
::
Sequence
<
sheet
::
FormulaToken
>
aArgs
(
1
);
aArgs
[
0
]
=
*
pIter
;
aArgs
[
0
]
=
*
pIter
;
const
String
aString
=
xParser
->
printFormula
(
aArgs
,
aRefPos
);
const
OU
String
aString
=
xParser
->
printFormula
(
aArgs
,
aRefPos
);
const
sheet
::
FormulaToken
*
pNextToken
=
pIter
+
1
;
const
sheet
::
FormulaToken
*
pNextToken
=
pIter
+
1
;
if
(
!
bUserMatrixFlag
&&
FormulaCompiler
::
IsMatrixFunction
((
OpCode
)
eOp
)
)
if
(
!
bUserMatrixFlag
&&
FormulaCompiler
::
IsMatrixFunction
((
OpCode
)
eOp
)
)
...
@@ -499,9 +498,9 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
...
@@ -499,9 +498,9 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
if
(
eOp
==
m_aSpecialOpCodes
[
sheet
::
FormulaMapGroupSpecialOffset
::
PUSH
].
Token
.
OpCode
||
if
(
eOp
==
m_aSpecialOpCodes
[
sheet
::
FormulaMapGroupSpecialOffset
::
PUSH
].
Token
.
OpCode
||
eOp
==
m_aSpecialOpCodes
[
sheet
::
FormulaMapGroupSpecialOffset
::
SPACES
].
Token
.
OpCode
)
eOp
==
m_aSpecialOpCodes
[
sheet
::
FormulaMapGroupSpecialOffset
::
SPACES
].
Token
.
OpCode
)
{
{
const
xub_StrLen
n1
=
aFormString
.
Search
(
sep
,
nTokPos
);
const
sal_Int32
n1
=
aFormString
.
indexOf
(
sep
,
nTokPos
);
const
xub_StrLen
n2
=
aFormString
.
Search
(
')'
,
nTokPos
);
const
sal_Int32
n2
=
aFormString
.
indexOf
(
')'
,
nTokPos
);
xub_StrLen
nXXX
=
nTokPos
;
xub_StrLen
nXXX
=
nTokPos
;
if
(
n1
<
n2
)
if
(
n1
<
n2
)
{
{
nTokPos
=
n1
;
nTokPos
=
n1
;
...
@@ -513,15 +512,15 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
...
@@ -513,15 +512,15 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
if
(
pNextToken
!=
pEnd
)
if
(
pNextToken
!=
pEnd
)
{
{
aArgs
[
0
]
=
*
pNextToken
;
aArgs
[
0
]
=
*
pNextToken
;
const
String
a2String
=
xParser
->
printFormula
(
aArgs
,
aRefPos
);
const
OU
String
a2String
=
xParser
->
printFormula
(
aArgs
,
aRefPos
);
const
xub_StrLen
n3
=
aFormString
.
Search
(
a2String
,
nXXX
);
const
sal_Int32
n3
=
aFormString
.
indexOf
(
a2String
,
nXXX
);
if
(
n3
<
nTokPos
)
if
(
n3
<
nTokPos
)
nTokPos
=
n3
;
nTokPos
=
n3
;
}
}
}
}
else
else
{
{
nTokPos
=
sal
::
static_int_cast
<
xub_StrLen
>
(
nTokPos
+
aString
.
Len
()
);
nTokPos
=
sal
::
static_int_cast
<
xub_StrLen
>
(
nTokPos
+
aString
.
getLength
()
);
}
}
if
(
eOp
==
m_aSeparatorsOpCodes
[
TOKEN_OPEN
].
OpCode
)
if
(
eOp
==
m_aSeparatorsOpCodes
[
TOKEN_OPEN
].
OpCode
)
...
@@ -609,12 +608,12 @@ void FormulaDlg_Impl::UpdateValues()
...
@@ -609,12 +608,12 @@ void FormulaDlg_Impl::UpdateValues()
CalcStruct
(
pMEdit
->
GetText
());
CalcStruct
(
pMEdit
->
GetText
());
}
}
sal_Bool
FormulaDlg_Impl
::
CalcStruct
(
const
String
&
rStrExp
)
sal_Bool
FormulaDlg_Impl
::
CalcStruct
(
const
OU
String
&
rStrExp
)
{
{
sal_Bool
bResult
=
sal_True
;
sal_Bool
bResult
=
sal_True
;
xub_StrLen
nLength
=
rStrExp
.
Len
();
sal_Int32
nLength
=
rStrExp
.
getLength
();
if
(
rStrExp
.
Len
()
>
0
&&
aOldFormula
!=
rStrExp
&&
bStructUpdate
)
if
(
!
rStrExp
.
isEmpty
()
&&
aOldFormula
!=
rStrExp
&&
bStructUpdate
)
{
{
// Only calculate the value when there isn't any more keyboard input:
// Only calculate the value when there isn't any more keyboard input:
...
@@ -622,10 +621,10 @@ sal_Bool FormulaDlg_Impl::CalcStruct( const String& rStrExp)
...
@@ -622,10 +621,10 @@ sal_Bool FormulaDlg_Impl::CalcStruct( const String& rStrExp)
{
{
pStructPage
->
ClearStruct
();
pStructPage
->
ClearStruct
();
String
aString
=
rStrExp
;
OU
String
aString
=
rStrExp
;
if
(
rStrExp
.
GetChar
(
nLength
-
1
)
==
'('
)
if
(
rStrExp
[
nLength
-
1
]
==
'('
)
{
{
aString
.
Erase
((
xub_StrLen
)(
nLength
-
1
)
);
aString
=
aString
.
copy
(
0
,
nLength
-
1
);
}
}
aString
=
comphelper
::
string
::
remove
(
aString
,
'\n'
);
aString
=
comphelper
::
string
::
remove
(
aString
,
'\n'
);
...
@@ -637,8 +636,8 @@ sal_Bool FormulaDlg_Impl::CalcStruct( const String& rStrExp)
...
@@ -637,8 +636,8 @@ sal_Bool FormulaDlg_Impl::CalcStruct( const String& rStrExp)
UpdateTokenArray
(
aString
);
UpdateTokenArray
(
aString
);
fillTree
(
pStructPage
);
fillTree
(
pStructPage
);
aOldFormula
=
rStrExp
;
aOldFormula
=
rStrExp
;
if
(
rStrExp
.
GetChar
(
nLength
-
1
)
==
'('
)
if
(
rStrExp
[
nLength
-
1
]
==
'('
)
UpdateTokenArray
(
rStrExp
);
UpdateTokenArray
(
rStrExp
);
}
}
else
else
...
@@ -666,13 +665,13 @@ void FormulaDlg_Impl::MakeTree(IStructHelper* _pTree,SvTreeListEntry* pParent,Fo
...
@@ -666,13 +665,13 @@ void FormulaDlg_Impl::MakeTree(IStructHelper* _pTree,SvTreeListEntry* pParent,Fo
try
try
{
{
const
table
::
CellAddress
aRefPos
(
m_pHelper
->
getReferencePosition
());
const
table
::
CellAddress
aRefPos
(
m_pHelper
->
getReferencePosition
());
const
String
aResult
=
m_pHelper
->
getFormulaParser
()
->
printFormula
(
aArgs
,
aRefPos
);
const
OU
String
aResult
=
m_pHelper
->
getFormulaParser
()
->
printFormula
(
aArgs
,
aRefPos
);
if
(
nParas
>
0
)
if
(
nParas
>
0
)
{
{
SvTreeListEntry
*
pEntry
;
SvTreeListEntry
*
pEntry
;
String
aTest
=
_pTree
->
GetEntryText
(
pParent
);
OU
String
aTest
=
_pTree
->
GetEntryText
(
pParent
);
if
(
aTest
==
aResult
&&
if
(
aTest
==
aResult
&&
(
eOp
==
ocAdd
||
eOp
==
ocMul
||
(
eOp
==
ocAdd
||
eOp
==
ocMul
||
...
@@ -728,7 +727,7 @@ void FormulaDlg_Impl::fillTree(IStructHelper* _pTree)
...
@@ -728,7 +727,7 @@ void FormulaDlg_Impl::fillTree(IStructHelper* _pTree)
MakeTree
(
_pTree
,
NULL
,
pToken
,
1
);
MakeTree
(
_pTree
,
NULL
,
pToken
,
1
);
}
}
}
}
void
FormulaDlg_Impl
::
UpdateTokenArray
(
const
String
&
rStrExp
)
void
FormulaDlg_Impl
::
UpdateTokenArray
(
const
OU
String
&
rStrExp
)
{
{
m_aTokenMap
.
clear
();
m_aTokenMap
.
clear
();
m_aTokenList
.
realloc
(
0
);
m_aTokenList
.
realloc
(
0
);
...
@@ -786,7 +785,7 @@ void FormulaDlg_Impl::FillListboxes()
...
@@ -786,7 +785,7 @@ void FormulaDlg_Impl::FillListboxes()
{
{
// Switch between the "Pages"
// Switch between the "Pages"
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
String
aNewTitle
;
OU
String
aNewTitle
;
// 1. Page: select function
// 1. Page: select function
if
(
pFuncDesc
&&
pFuncDesc
->
getCategory
()
)
if
(
pFuncDesc
&&
pFuncDesc
->
getCategory
()
)
{
{
...
@@ -933,7 +932,7 @@ void FormulaDlg_Impl::ClearAllParas()
...
@@ -933,7 +932,7 @@ void FormulaDlg_Impl::ClearAllParas()
aFtFuncDesc
.
Show
();
aFtFuncDesc
.
Show
();
}
}
}
}
String
FormulaDlg_Impl
::
RepairFormula
(
const
String
&
aFormula
)
OUString
FormulaDlg_Impl
::
RepairFormula
(
const
OU
String
&
aFormula
)
{
{
OUString
aResult
(
'='
);
OUString
aResult
(
'='
);
try
try
...
@@ -943,8 +942,8 @@ String FormulaDlg_Impl::RepairFormula(const String& aFormula)
...
@@ -943,8 +942,8 @@ String FormulaDlg_Impl::RepairFormula(const String& aFormula)
if
(
m_aTokenList
.
getLength
()
)
if
(
m_aTokenList
.
getLength
()
)
{
{
const
table
::
CellAddress
aRefPos
(
m_pHelper
->
getReferencePosition
());
const
table
::
CellAddress
aRefPos
(
m_pHelper
->
getReferencePosition
());
const
String
sFormula
(
m_pHelper
->
getFormulaParser
()
->
printFormula
(
m_aTokenList
,
aRefPos
));
const
OU
String
sFormula
(
m_pHelper
->
getFormulaParser
()
->
printFormula
(
m_aTokenList
,
aRefPos
));
if
(
!
sFormula
.
Len
()
||
sFormula
.
GetChar
(
0
)
!=
'='
)
if
(
sFormula
.
isEmpty
()
||
sFormula
[
0
]
!=
'='
)
aResult
+=
sFormula
;
aResult
+=
sFormula
;
else
else
aResult
=
sFormula
;
aResult
=
sFormula
;
...
@@ -964,9 +963,9 @@ void FormulaDlg_Impl::DoEnter(sal_Bool bOk)
...
@@ -964,9 +963,9 @@ void FormulaDlg_Impl::DoEnter(sal_Bool bOk)
if
(
bOk
)
if
(
bOk
)
{
{
// remove dummy arguments
// remove dummy arguments
String
aInputFormula
=
m_pHelper
->
getCurrentFormula
();
OU
String
aInputFormula
=
m_pHelper
->
getCurrentFormula
();
String
aString
=
RepairFormula
(
pMEdit
->
GetText
());
OU
String
aString
=
RepairFormula
(
pMEdit
->
GetText
());
m_pHelper
->
setSelection
(
0
,
aInputFormula
.
Len
());
m_pHelper
->
setSelection
(
0
,
aInputFormula
.
getLength
());
m_pHelper
->
setCurrentFormula
(
aString
);
m_pHelper
->
setCurrentFormula
(
aString
);
}
}
...
@@ -1093,7 +1092,7 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart)
...
@@ -1093,7 +1092,7 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart)
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
if
(
!
pData
)
return
;
if
(
!
pData
)
return
;
String
aFormula
=
m_pHelper
->
getCurrentFormula
();
OU
String
aFormula
=
m_pHelper
->
getCurrentFormula
();
if
(
nFStart
==
NOT_FOUND
)
if
(
nFStart
==
NOT_FOUND
)
{
{
...
@@ -1114,7 +1113,7 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart)
...
@@ -1114,7 +1113,7 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart)
{
{
xub_StrLen
PrivStart
,
PrivEnd
;
xub_StrLen
PrivStart
,
PrivEnd
;
SetData
(
nFStart
,
nNextFStart
,
nNextFEnd
,
PrivStart
,
PrivEnd
);
SetData
(
nFStart
,
nNextFStart
,
nNextFEnd
,
PrivStart
,
PrivEnd
);
m_pHelper
->
showReference
(
aFormula
.
C
opy
(
PrivStart
,
PrivEnd
-
PrivStart
));
m_pHelper
->
showReference
(
aFormula
.
c
opy
(
PrivStart
,
PrivEnd
-
PrivStart
));
}
}
else
else
{
{
...
@@ -1128,7 +1127,7 @@ void FormulaDlg_Impl::EditNextFunc( sal_Bool bForward, xub_StrLen nFStart )
...
@@ -1128,7 +1127,7 @@ void FormulaDlg_Impl::EditNextFunc( sal_Bool bForward, xub_StrLen nFStart )
if
(
!
pData
)
if
(
!
pData
)
return
;
return
;
String
aFormula
=
m_pHelper
->
getCurrentFormula
();
OU
String
aFormula
=
m_pHelper
->
getCurrentFormula
();
if
(
nFStart
==
NOT_FOUND
)
if
(
nFStart
==
NOT_FOUND
)
{
{
...
@@ -1196,7 +1195,7 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
...
@@ -1196,7 +1195,7 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
aBtnForward
.
Enable
(
sal_True
);
//@ In order to be able to input another function.
aBtnForward
.
Enable
(
sal_True
);
//@ In order to be able to input another function.
aTabCtrl
.
SetCurPageId
(
TP_FUNCTION
);
aTabCtrl
.
SetCurPageId
(
TP_FUNCTION
);
String
aUndoStr
=
m_pHelper
->
getCurrentFormula
();
// it will be added before a ";"
OU
String
aUndoStr
=
m_pHelper
->
getCurrentFormula
();
// it will be added before a ";"
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
if
(
!
pData
)
return
0
;
if
(
!
pData
)
return
0
;
...
@@ -1208,7 +1207,7 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
...
@@ -1208,7 +1207,7 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
xub_StrLen
nFormulaStrPos
=
pData
->
GetFStart
();
xub_StrLen
nFormulaStrPos
=
pData
->
GetFStart
();
String
aFormula
=
m_pHelper
->
getCurrentFormula
();
OU
String
aFormula
=
m_pHelper
->
getCurrentFormula
();
xub_StrLen
n1
=
m_aFormulaHelper
.
GetArgStart
(
aFormula
,
nFormulaStrPos
,
nEdFocus
+
pData
->
GetOffset
()
);
xub_StrLen
n1
=
m_aFormulaHelper
.
GetArgStart
(
aFormula
,
nFormulaStrPos
,
nEdFocus
+
pData
->
GetOffset
()
);
pData
->
SetEdFocus
(
nEdFocus
);
pData
->
SetEdFocus
(
nEdFocus
);
...
@@ -1244,31 +1243,31 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl)
...
@@ -1244,31 +1243,31 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl)
if
(
!
pData
)
return
0
;
if
(
!
pData
)
return
0
;
bEditFlag
=
sal_True
;
bEditFlag
=
sal_True
;
String
aInputFormula
=
m_pHelper
->
getCurrentFormula
();
OUString
aInputFormula
=
m_pHelper
->
getCurrentFormula
();
String
aString
=
pMEdit
->
GetText
();
OUString
aString
=
pMEdit
->
GetText
();
Selection
aSel
=
pMEdit
->
GetSelection
();
Selection
aSel
=
pMEdit
->
GetSelection
();
xub_StrLen
nTest
=
0
;
xub_StrLen
nTest
=
0
;
if
(
aString
.
Len
()
==
0
)
//in case everything was cleared
if
(
aString
.
isEmpty
()
)
//in case everything was cleared
{
{
aString
+=
'='
;
aString
+=
"="
;
pMEdit
->
SetText
(
aString
);
pMEdit
->
SetText
(
aString
);
aSel
.
Min
()
=
1
;
aSel
.
Min
()
=
1
;
aSel
.
Max
()
=
1
;
aSel
.
Max
()
=
1
;
pMEdit
->
SetSelection
(
aSel
);
pMEdit
->
SetSelection
(
aSel
);
}
}
else
if
(
aString
.
GetChar
(
nTest
)
!=
'='
)
//in case it's replaced;
else
if
(
aString
[
nTest
]
!=
'='
)
//in case it's replaced;
{
{
aString
.
Insert
(
(
sal_Unicode
)
'='
,
0
)
;
aString
=
"="
+
aString
;
pMEdit
->
SetText
(
aString
);
pMEdit
->
SetText
(
aString
);
aSel
.
Min
()
+=
1
;
aSel
.
Min
()
+=
1
;
aSel
.
Max
()
+=
1
;
aSel
.
Max
()
+=
1
;
pMEdit
->
SetSelection
(
aSel
);
pMEdit
->
SetSelection
(
aSel
);
}
}
m_pHelper
->
setSelection
(
0
,
aInputFormula
.
Len
());
m_pHelper
->
setSelection
(
0
,
aInputFormula
.
getLength
());
m_pHelper
->
setCurrentFormula
(
aString
);
m_pHelper
->
setCurrentFormula
(
aString
);
m_pHelper
->
setSelection
((
xub_StrLen
)
aSel
.
Min
(),(
xub_StrLen
)
aSel
.
Max
());
m_pHelper
->
setSelection
((
xub_StrLen
)
aSel
.
Min
(),(
xub_StrLen
)
aSel
.
Max
());
...
@@ -1289,7 +1288,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl)
...
@@ -1289,7 +1288,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl)
if
(
nPos
<
aSel
.
Min
()
-
1
)
if
(
nPos
<
aSel
.
Min
()
-
1
)
{
{
xub_StrLen
nPos1
=
aString
.
Search
(
'('
,
nPos
);
sal_Int32
nPos1
=
aString
.
indexOf
(
'('
,
nPos
);
EditNextFunc
(
sal_False
,
nPos1
);
EditNextFunc
(
sal_False
,
nPos1
);
}
}
else
else
...
@@ -1310,7 +1309,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
...
@@ -1310,7 +1309,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
bEditFlag
=
sal_True
;
bEditFlag
=
sal_True
;
String
aString
=
pMEdit
->
GetText
();
OUString
aString
=
pMEdit
->
GetText
();
Selection
aSel
=
pMEdit
->
GetSelection
();
Selection
aSel
=
pMEdit
->
GetSelection
();
m_pHelper
->
setSelection
((
xub_StrLen
)
aSel
.
Min
(),(
xub_StrLen
)
aSel
.
Max
());
m_pHelper
->
setSelection
((
xub_StrLen
)
aSel
.
Min
(),(
xub_StrLen
)
aSel
.
Max
());
...
@@ -1321,7 +1320,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
...
@@ -1321,7 +1320,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
pMEdit
->
SetSelection
(
aSel
);
pMEdit
->
SetSelection
(
aSel
);
}
}
if
(
aSel
.
Min
()
!=
aString
.
Len
())
if
(
aSel
.
Min
()
!=
aString
.
getLength
())
{
{
xub_StrLen
nPos
=
(
xub_StrLen
)
aSel
.
Min
();
xub_StrLen
nPos
=
(
xub_StrLen
)
aSel
.
Min
();
...
@@ -1341,9 +1340,9 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
...
@@ -1341,9 +1340,9 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
short
nCount
=
1
;
short
nCount
=
1
;
while
(
n
>
0
)
while
(
n
>
0
)
{
{
if
(
aString
.
GetChar
(
n
)
==
')'
)
if
(
aString
[
n
]
==
')'
)
nCount
++
;
nCount
++
;
else
if
(
aString
.
GetChar
(
n
)
==
'('
)
else
if
(
aString
[
n
]
==
'('
)
nCount
--
;
nCount
--
;
if
(
nCount
==
0
)
break
;
if
(
nCount
==
0
)
break
;
n
--
;
n
--
;
...
@@ -1382,7 +1381,7 @@ void FormulaDlg_Impl::UpdateSelection()
...
@@ -1382,7 +1381,7 @@ void FormulaDlg_Impl::UpdateSelection()
nArgs
=
pFuncDesc
->
getSuppressedArgumentCount
();
nArgs
=
pFuncDesc
->
getSuppressedArgumentCount
();
String
aFormula
=
pMEdit
->
GetText
();
OU
String
aFormula
=
pMEdit
->
GetText
();
sal_Int32
nArgPos
=
m_aFormulaHelper
.
GetArgStart
(
aFormula
,
PrivStart
,
0
);
sal_Int32
nArgPos
=
m_aFormulaHelper
.
GetArgStart
(
aFormula
,
PrivStart
,
0
);
sal_uInt16
nPos
=
pParaWin
->
GetActiveLine
();
sal_uInt16
nPos
=
pParaWin
->
GetActiveLine
();
...
@@ -1467,8 +1466,8 @@ RefEdit* FormulaDlg_Impl::GetCurrRefEdit()
...
@@ -1467,8 +1466,8 @@ RefEdit* FormulaDlg_Impl::GetCurrRefEdit()
void
FormulaDlg_Impl
::
Update
()
void
FormulaDlg_Impl
::
Update
()
{
{
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
const
String
sExpression
=
pMEdit
->
GetText
();
const
OU
String
sExpression
=
pMEdit
->
GetText
();
aOldFormula
=
String
();
aOldFormula
=
OU
String
();
UpdateTokenArray
(
sExpression
);
UpdateTokenArray
(
sExpression
);
FormulaCursorHdl
(
&
aMEFormula
);
FormulaCursorHdl
(
&
aMEFormula
);
CalcStruct
(
sExpression
);
CalcStruct
(
sExpression
);
...
@@ -1478,20 +1477,20 @@ void FormulaDlg_Impl::Update()
...
@@ -1478,20 +1477,20 @@ void FormulaDlg_Impl::Update()
aTabCtrl
.
SetCurPageId
(
TP_STRUCT
);
aTabCtrl
.
SetCurPageId
(
TP_STRUCT
);
aBtnMatrix
.
Check
(
pData
->
GetMatrixFlag
());
aBtnMatrix
.
Check
(
pData
->
GetMatrixFlag
());
}
}
void
FormulaDlg_Impl
::
Update
(
const
String
&
_sExp
)
void
FormulaDlg_Impl
::
Update
(
const
OU
String
&
_sExp
)
{
{
CalcStruct
(
_sExp
);
CalcStruct
(
_sExp
);
FillDialog
();
FillDialog
();
FuncSelHdl
(
NULL
);
FuncSelHdl
(
NULL
);
}
}
void
FormulaDlg_Impl
::
SetMeText
(
const
String
&
_sText
)
void
FormulaDlg_Impl
::
SetMeText
(
const
OU
String
&
_sText
)
{
{
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
FormEditData
*
pData
=
m_pHelper
->
getFormEditData
();
pMEdit
->
SetText
(
_sText
);
pMEdit
->
SetText
(
_sText
);
pMEdit
->
SetSelection
(
pData
->
GetSelection
());
pMEdit
->
SetSelection
(
pData
->
GetSelection
());
aMEFormula
.
UpdateOldSel
();
aMEFormula
.
UpdateOldSel
();
}
}
FormulaDlgMode
FormulaDlg_Impl
::
SetMeText
(
const
String
&
_sText
,
xub_StrLen
PrivStart
,
xub_StrLen
PrivEnd
,
sal_Bool
bMatrix
,
sal_Bool
_bSelect
,
sal_Bool
_bUpdate
)
FormulaDlgMode
FormulaDlg_Impl
::
SetMeText
(
const
OUString
&
_sText
,
xub_StrLen
PrivStart
,
xub_StrLen
PrivEnd
,
sal_Bool
bMatrix
,
sal_Bool
_bSelect
,
sal_Bool
_bUpdate
)
{
{
FormulaDlgMode
eMode
=
FORMULA_FORMDLG_FORMULA
;
FormulaDlgMode
eMode
=
FORMULA_FORMDLG_FORMULA
;
if
(
!
bEditFlag
)
if
(
!
bEditFlag
)
...
@@ -1560,7 +1559,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FuncSelHdl)
...
@@ -1560,7 +1559,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FuncSelHdl)
{
{
pDesc
->
initArgumentInfo
();
// full argument info is needed
pDesc
->
initArgumentInfo
();
// full argument info is needed
String
aSig
=
pDesc
->
getSignature
();
OU
String
aSig
=
pDesc
->
getSignature
();
aFtHeadLine
.
SetText
(
pDesc
->
getFunctionName
()
);
aFtHeadLine
.
SetText
(
pDesc
->
getFunctionName
()
);
aFtFuncName
.
SetText
(
aSig
);
aFtFuncName
.
SetText
(
aSig
);
aFtFuncDesc
.
SetText
(
pDesc
->
getDescription
()
);
aFtFuncDesc
.
SetText
(
pDesc
->
getDescription
()
);
...
@@ -1568,18 +1567,18 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FuncSelHdl)
...
@@ -1568,18 +1567,18 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FuncSelHdl)
}
}
else
else
{
{
aFtHeadLine
.
SetText
(
String
()
);
aFtHeadLine
.
SetText
(
OU
String
()
);
aFtFuncName
.
SetText
(
String
()
);
aFtFuncName
.
SetText
(
OU
String
()
);
aFtFuncDesc
.
SetText
(
String
()
);
aFtFuncDesc
.
SetText
(
OU
String
()
);
}
}
return
0
;
return
0
;
}
}
void
FormulaDlg_Impl
::
UpdateParaWin
(
const
Selection
&
_rSelection
,
const
String
&
_sRefStr
)
void
FormulaDlg_Impl
::
UpdateParaWin
(
const
Selection
&
_rSelection
,
const
OU
String
&
_sRefStr
)
{
{
Selection
theSel
=
_rSelection
;
Selection
theSel
=
_rSelection
;
aEdRef
.
ReplaceSelected
(
_sRefStr
);
aEdRef
.
ReplaceSelected
(
_sRefStr
);
theSel
.
Max
()
=
theSel
.
Min
()
+
_sRefStr
.
Len
();
theSel
.
Max
()
=
theSel
.
Min
()
+
_sRefStr
.
getLength
();
aEdRef
.
SetSelection
(
theSel
);
aEdRef
.
SetSelection
(
theSel
);
//-------------------------------------
//-------------------------------------
...
@@ -1599,7 +1598,7 @@ sal_Bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
...
@@ -1599,7 +1598,7 @@ sal_Bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
{
{
pParaWin
->
SetRefMode
(
sal_True
);
pParaWin
->
SetRefMode
(
sal_True
);
String
aStrEd
;
OU
String
aStrEd
;
Edit
*
pEd
=
GetCurrRefEdit
();
Edit
*
pEd
=
GetCurrRefEdit
();
if
(
pEd
!=
NULL
&&
pTheRefEdit
==
NULL
)
if
(
pEd
!=
NULL
&&
pTheRefEdit
==
NULL
)
{
{
...
...
formula/source/ui/dlg/funcutl.cxx
Dosyayı görüntüle @
7f83faa7
...
@@ -285,7 +285,7 @@ void ArgInput::SetArgName(const OUString &aArg)
...
@@ -285,7 +285,7 @@ void ArgInput::SetArgName(const OUString &aArg)
#************************************************************************/
#************************************************************************/
OUString
ArgInput
::
GetArgName
()
OUString
ArgInput
::
GetArgName
()
{
{
String
aPrivArgName
;
OU
String
aPrivArgName
;
if
(
pFtArg
!=
NULL
)
if
(
pFtArg
!=
NULL
)
aPrivArgName
=
pFtArg
->
GetText
();
aPrivArgName
=
pFtArg
->
GetText
();
...
...
formula/source/ui/dlg/parawin.cxx
Dosyayı görüntüle @
7f83faa7
...
@@ -96,18 +96,18 @@ void ParaWin::UpdateArgDesc( sal_uInt16 nArg )
...
@@ -96,18 +96,18 @@ void ParaWin::UpdateArgDesc( sal_uInt16 nArg )
if
(
(
nArgs
>
0
)
&&
(
nArg
<
nArgs
)
)
if
(
(
nArgs
>
0
)
&&
(
nArg
<
nArgs
)
)
{
{
String
aArgDesc
;
OU
String
aArgDesc
;
String
aArgName
;
OU
String
aArgName
;
SetArgumentDesc
(
String
()
);
SetArgumentDesc
(
OU
String
()
);
SetArgumentText
(
String
()
);
SetArgumentText
(
OU
String
()
);
if
(
nArgs
<
VAR_ARGS
)
if
(
nArgs
<
VAR_ARGS
)
{
{
sal_uInt16
nRealArg
=
(
aVisibleArgMapping
.
size
()
<
nArg
)
?
aVisibleArgMapping
[
nArg
]
:
nArg
;
sal_uInt16
nRealArg
=
(
aVisibleArgMapping
.
size
()
<
nArg
)
?
aVisibleArgMapping
[
nArg
]
:
nArg
;
aArgDesc
=
pFuncDesc
->
getParameterDescription
(
nRealArg
);
aArgDesc
=
pFuncDesc
->
getParameterDescription
(
nRealArg
);
aArgName
=
pFuncDesc
->
getParameterName
(
nRealArg
);
aArgName
=
pFuncDesc
->
getParameterName
(
nRealArg
);
aArgName
+=
' '
;
aArgName
+=
" "
;
aArgName
+=
(
pFuncDesc
->
isParameterOptional
(
nRealArg
))
?
m_sOptional
:
m_sRequired
;
aArgName
+=
(
pFuncDesc
->
isParameterOptional
(
nRealArg
))
?
m_sOptional
:
m_sRequired
;
}
}
else
if
(
nArgs
<
PAIRED_VAR_ARGS
)
else
if
(
nArgs
<
PAIRED_VAR_ARGS
)
...
@@ -120,7 +120,7 @@ void ParaWin::UpdateArgDesc( sal_uInt16 nArg )
...
@@ -120,7 +120,7 @@ void ParaWin::UpdateArgDesc( sal_uInt16 nArg )
aArgName
=
pFuncDesc
->
getParameterName
(
nRealArg
);
aArgName
=
pFuncDesc
->
getParameterName
(
nRealArg
);
if
(
nArg
>=
nFix
)
if
(
nArg
>=
nFix
)
aArgName
+=
OUString
::
number
(
nArg
-
nFix
+
1
);
aArgName
+=
OUString
::
number
(
nArg
-
nFix
+
1
);
aArgName
+=
' '
;
aArgName
+=
" "
;
aArgName
+=
(
nArg
>
nFix
||
pFuncDesc
->
isParameterOptional
(
nRealArg
))
?
m_sOptional
:
m_sRequired
;
aArgName
+=
(
nArg
>
nFix
||
pFuncDesc
->
isParameterOptional
(
nRealArg
))
?
m_sOptional
:
m_sRequired
;
}
}
...
@@ -138,7 +138,7 @@ void ParaWin::UpdateArgDesc( sal_uInt16 nArg )
...
@@ -138,7 +138,7 @@ void ParaWin::UpdateArgDesc( sal_uInt16 nArg )
aArgName
=
pFuncDesc
->
getParameterName
(
nRealArg
);
aArgName
=
pFuncDesc
->
getParameterName
(
nRealArg
);
if
(
nArg
>=
nFix
)
if
(
nArg
>=
nFix
)
aArgName
+=
OUString
::
number
(
(
nArg
-
nFix
)
/
2
+
1
);
aArgName
+=
OUString
::
number
(
(
nArg
-
nFix
)
/
2
+
1
);
aArgName
+=
' '
;
aArgName
+=
" "
;
aArgName
+=
(
nArg
>
(
nFix
+
1
)
||
pFuncDesc
->
isParameterOptional
(
nRealArg
))
?
m_sOptional
:
m_sRequired
;
aArgName
+=
(
nArg
>
(
nFix
+
1
)
||
pFuncDesc
->
isParameterOptional
(
nRealArg
))
?
m_sOptional
:
m_sRequired
;
}
}
...
@@ -172,7 +172,7 @@ void ParaWin::UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i )
...
@@ -172,7 +172,7 @@ void ParaWin::UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i )
aFntLight
:
aFntBold
);
aFntLight
:
aFntBold
);
if
(
nArg
>=
nFix
)
if
(
nArg
>=
nFix
)
{
{
String
aArgName
(
pFuncDesc
->
getParameterName
(
nRealArg
)
);
OU
String
aArgName
(
pFuncDesc
->
getParameterName
(
nRealArg
)
);
aArgName
+=
OUString
::
number
(
nArg
-
nFix
+
1
);
aArgName
+=
OUString
::
number
(
nArg
-
nFix
+
1
);
SetArgName
(
i
,
aArgName
);
SetArgName
(
i
,
aArgName
);
}
}
...
@@ -194,7 +194,7 @@ void ParaWin::UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i )
...
@@ -194,7 +194,7 @@ void ParaWin::UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i )
aFntLight
:
aFntBold
);
aFntLight
:
aFntBold
);
if
(
nArg
>=
nFix
)
if
(
nArg
>=
nFix
)
{
{
String
aArgName
(
pFuncDesc
->
getParameterName
(
nRealArg
)
);
OU
String
aArgName
(
pFuncDesc
->
getParameterName
(
nRealArg
)
);
aArgName
+=
OUString
::
number
(
(
nArg
-
nFix
)
/
2
+
1
);
aArgName
+=
OUString
::
number
(
(
nArg
-
nFix
)
/
2
+
1
);
SetArgName
(
i
,
aArgName
);
SetArgName
(
i
,
aArgName
);
}
}
...
@@ -296,9 +296,9 @@ void ParaWin::SetFunctionDesc(const IFunctionDescription* pFDesc)
...
@@ -296,9 +296,9 @@ void ParaWin::SetFunctionDesc(const IFunctionDescription* pFDesc)
{
{
pFuncDesc
=
pFDesc
;
pFuncDesc
=
pFDesc
;
SetArgumentDesc
(
String
()
);
SetArgumentDesc
(
OU
String
()
);
SetArgumentText
(
String
()
);
SetArgumentText
(
OU
String
()
);
SetEditDesc
(
String
()
);
SetEditDesc
(
OU
String
()
);
nArgs
=
0
;
nArgs
=
0
;
if
(
pFuncDesc
!=
NULL
)
if
(
pFuncDesc
!=
NULL
)
{
{
...
@@ -417,7 +417,7 @@ void ParaWin::SetArgumentOffset(sal_uInt16 nOffset)
...
@@ -417,7 +417,7 @@ void ParaWin::SetArgumentOffset(sal_uInt16 nOffset)
{
{
for
(
int
i
=
0
;
i
<
4
&&
i
<
nArgs
;
i
++
)
for
(
int
i
=
0
;
i
<
4
&&
i
<
nArgs
;
i
++
)
{
{
String
aString
;
OU
String
aString
;
aArgInput
[
i
].
SetArgVal
(
aString
);
aArgInput
[
i
].
SetArgVal
(
aString
);
aArgInput
[
i
].
GetArgEdPtr
()
->
Init
(
aArgInput
[
i
].
GetArgEdPtr
()
->
Init
(
(
i
==
0
)
?
(
ArgEdit
*
)
NULL
:
aArgInput
[
i
-
1
].
GetArgEdPtr
(),
(
i
==
0
)
?
(
ArgEdit
*
)
NULL
:
aArgInput
[
i
-
1
].
GetArgEdPtr
(),
...
...
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