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
f32da852
Kaydet (Commit)
f32da852
authored
Eyl 11, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert include/formula/formulahelper.hxx from String to OUString
Change-Id: I4ab7595cecede03b4ad2a4b9dbe373e67c2912f4
üst
805738b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
40 deletions
+41
-40
FormulaHelper.cxx
formula/source/ui/dlg/FormulaHelper.cxx
+34
-33
formulahelper.hxx
include/formula/formulahelper.hxx
+7
-7
No files found.
formula/source/ui/dlg/FormulaHelper.cxx
Dosyayı görüntüle @
f32da852
...
@@ -65,7 +65,8 @@ FormulaHelper::FormulaHelper(const IFunctionManager* _pFunctionManager)
...
@@ -65,7 +65,8 @@ FormulaHelper::FormulaHelper(const IFunctionManager* _pFunctionManager)
{
{
m_pCharClass
=
m_pSysLocale
->
GetCharClassPtr
();
m_pCharClass
=
m_pSysLocale
->
GetCharClassPtr
();
}
}
sal_Bool
FormulaHelper
::
GetNextFunc
(
const
String
&
rFormula
,
sal_Bool
FormulaHelper
::
GetNextFunc
(
const
OUString
&
rFormula
,
sal_Bool
bBack
,
sal_Bool
bBack
,
xub_StrLen
&
rFStart
,
// Input and output
xub_StrLen
&
rFStart
,
// Input and output
xub_StrLen
*
pFEnd
,
// = NULL
xub_StrLen
*
pFEnd
,
// = NULL
...
@@ -73,7 +74,7 @@ sal_Bool FormulaHelper::GetNextFunc( const String& rFormula,
...
@@ -73,7 +74,7 @@ sal_Bool FormulaHelper::GetNextFunc( const String& rFormula,
::
std
::
vector
<
OUString
>*
pArgs
)
const
// = NULL
::
std
::
vector
<
OUString
>*
pArgs
)
const
// = NULL
{
{
xub_StrLen
nOldStart
=
rFStart
;
xub_StrLen
nOldStart
=
rFStart
;
String
aFname
;
OU
String
aFname
;
rFStart
=
GetFunctionStart
(
rFormula
,
rFStart
,
bBack
,
ppFDesc
?
&
aFname
:
NULL
);
rFStart
=
GetFunctionStart
(
rFormula
,
rFStart
,
bBack
,
ppFDesc
?
&
aFname
:
NULL
);
sal_Bool
bFound
=
(
rFStart
!=
FUNC_NOTFOUND
);
sal_Bool
bFound
=
(
rFStart
!=
FUNC_NOTFOUND
);
...
@@ -121,7 +122,7 @@ sal_Bool FormulaHelper::GetNextFunc( const String& rFormula,
...
@@ -121,7 +122,7 @@ sal_Bool FormulaHelper::GetNextFunc( const String& rFormula,
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void
FormulaHelper
::
FillArgStrings
(
const
String
&
rFormula
,
void
FormulaHelper
::
FillArgStrings
(
const
OU
String
&
rFormula
,
xub_StrLen
nFuncPos
,
xub_StrLen
nFuncPos
,
sal_uInt16
nArgs
,
sal_uInt16
nArgs
,
::
std
::
vector
<
OUString
>&
_rArgs
)
const
::
std
::
vector
<
OUString
>&
_rArgs
)
const
...
@@ -140,31 +141,31 @@ void FormulaHelper::FillArgStrings( const String& rFormula,
...
@@ -140,31 +141,31 @@ void FormulaHelper::FillArgStrings( const String& rFormula,
nEnd
=
GetArgStart
(
rFormula
,
nFuncPos
,
i
+
1
);
nEnd
=
GetArgStart
(
rFormula
,
nFuncPos
,
i
+
1
);
if
(
nEnd
!=
nStart
)
if
(
nEnd
!=
nStart
)
_rArgs
.
push_back
(
rFormula
.
C
opy
(
nStart
,
nEnd
-
1
-
nStart
));
_rArgs
.
push_back
(
rFormula
.
c
opy
(
nStart
,
nEnd
-
1
-
nStart
));
else
else
_rArgs
.
push_back
(
String
()),
bLast
=
sal_True
;
_rArgs
.
push_back
(
OU
String
()),
bLast
=
sal_True
;
}
}
else
else
{
{
nEnd
=
GetFunctionEnd
(
rFormula
,
nFuncPos
)
-
1
;
nEnd
=
GetFunctionEnd
(
rFormula
,
nFuncPos
)
-
1
;
if
(
nStart
<
nEnd
)
if
(
nStart
<
nEnd
)
_rArgs
.
push_back
(
rFormula
.
C
opy
(
nStart
,
nEnd
-
nStart
)
);
_rArgs
.
push_back
(
rFormula
.
c
opy
(
nStart
,
nEnd
-
nStart
)
);
else
else
_rArgs
.
push_back
(
String
());
_rArgs
.
push_back
(
OU
String
());
}
}
}
}
if
(
bLast
)
if
(
bLast
)
for
(
;
i
<
nArgs
;
i
++
)
for
(
;
i
<
nArgs
;
i
++
)
_rArgs
.
push_back
(
String
());
_rArgs
.
push_back
(
OU
String
());
}
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void
FormulaHelper
::
GetArgStrings
(
::
std
::
vector
<
OUString
>&
_rArgs
void
FormulaHelper
::
GetArgStrings
(
::
std
::
vector
<
OUString
>&
_rArgs
,
,
const
String
&
rFormula
,
const
OU
String
&
rFormula
,
xub_StrLen
nFuncPos
,
xub_StrLen
nFuncPos
,
sal_uInt16
nArgs
)
const
sal_uInt16
nArgs
)
const
{
{
if
(
nArgs
)
if
(
nArgs
)
{
{
...
@@ -187,12 +188,12 @@ inline sal_Bool IsFormulaText( const CharClass* _pCharClass,const String& rStr,
...
@@ -187,12 +188,12 @@ inline sal_Bool IsFormulaText( const CharClass* _pCharClass,const String& rStr,
}
}
xub_StrLen
FormulaHelper
::
GetFunctionStart
(
const
String
&
rFormula
,
xub_StrLen
FormulaHelper
::
GetFunctionStart
(
const
OU
String
&
rFormula
,
xub_StrLen
nStart
,
xub_StrLen
nStart
,
sal_Bool
bBack
,
sal_Bool
bBack
,
String
*
pFuncName
)
const
OU
String
*
pFuncName
)
const
{
{
xub_StrLen
nStrLen
=
rFormula
.
Len
();
xub_StrLen
nStrLen
=
rFormula
.
getLength
();
if
(
nStrLen
<
nStart
)
if
(
nStrLen
<
nStart
)
return
nStart
;
return
nStart
;
...
@@ -210,15 +211,15 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
...
@@ -210,15 +211,15 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
{
{
while
(
!
bFound
&&
(
nParPos
>
0
)
)
while
(
!
bFound
&&
(
nParPos
>
0
)
)
{
{
if
(
rFormula
.
GetChar
(
nParPos
)
==
'"'
)
if
(
rFormula
[
nParPos
]
==
'"'
)
{
{
nParPos
--
;
nParPos
--
;
while
(
(
nParPos
>
0
)
&&
rFormula
.
GetChar
(
nParPos
)
!=
'"'
)
while
(
(
nParPos
>
0
)
&&
rFormula
[
nParPos
]
!=
'"'
)
nParPos
--
;
nParPos
--
;
if
(
nParPos
>
0
)
if
(
nParPos
>
0
)
nParPos
--
;
nParPos
--
;
}
}
else
if
(
(
bFound
=
(
rFormula
.
GetChar
(
nParPos
)
==
'('
)
)
==
sal_False
)
else
if
(
(
bFound
=
(
rFormula
[
nParPos
]
==
'('
)
)
==
sal_False
)
nParPos
--
;
nParPos
--
;
}
}
}
}
...
@@ -226,14 +227,14 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
...
@@ -226,14 +227,14 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
{
{
while
(
!
bFound
&&
(
nParPos
<
nStrLen
)
)
while
(
!
bFound
&&
(
nParPos
<
nStrLen
)
)
{
{
if
(
rFormula
.
GetChar
(
nParPos
)
==
'"'
)
if
(
rFormula
[
nParPos
]
==
'"'
)
{
{
nParPos
++
;
nParPos
++
;
while
(
(
nParPos
<
nStrLen
)
&&
rFormula
.
GetChar
(
nParPos
)
!=
'"'
)
while
(
(
nParPos
<
nStrLen
)
&&
rFormula
[
nParPos
]
!=
'"'
)
nParPos
++
;
nParPos
++
;
nParPos
++
;
nParPos
++
;
}
}
else
if
(
(
bFound
=
(
rFormula
.
GetChar
(
nParPos
)
==
'('
)
)
==
sal_False
)
else
if
(
(
bFound
=
(
rFormula
[
nParPos
]
==
'('
)
)
==
sal_False
)
nParPos
++
;
nParPos
++
;
}
}
}
}
...
@@ -254,7 +255,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
...
@@ -254,7 +255,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
{
{
// Function found
// Function found
if
(
pFuncName
)
if
(
pFuncName
)
*
pFuncName
=
rFormula
.
C
opy
(
nFStart
,
nParPos
-
nFStart
);
*
pFuncName
=
rFormula
.
c
opy
(
nFStart
,
nParPos
-
nFStart
);
}
}
else
// Brackets without function -> keep searching
else
// Brackets without function -> keep searching
{
{
...
@@ -271,7 +272,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
...
@@ -271,7 +272,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
{
{
nFStart
=
FUNC_NOTFOUND
;
nFStart
=
FUNC_NOTFOUND
;
if
(
pFuncName
)
if
(
pFuncName
)
pFuncName
->
Erase
()
;
(
*
pFuncName
)
=
""
;
}
}
}
}
while
(
bRepeat
);
while
(
bRepeat
);
...
@@ -281,9 +282,9 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
...
@@ -281,9 +282,9 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
//------------------------------------------------------------------------
//------------------------------------------------------------------------
xub_StrLen
FormulaHelper
::
GetFunctionEnd
(
const
String
&
rStr
,
xub_StrLen
nStart
)
const
xub_StrLen
FormulaHelper
::
GetFunctionEnd
(
const
OU
String
&
rStr
,
xub_StrLen
nStart
)
const
{
{
xub_StrLen
nStrLen
=
rStr
.
Len
();
xub_StrLen
nStrLen
=
rStr
.
getLength
();
if
(
nStrLen
<
nStart
)
if
(
nStrLen
<
nStart
)
return
nStart
;
return
nStart
;
...
@@ -294,12 +295,12 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart
...
@@ -294,12 +295,12 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart
while
(
!
bFound
&&
(
nStart
<
nStrLen
)
)
while
(
!
bFound
&&
(
nStart
<
nStrLen
)
)
{
{
sal_Unicode
c
=
rStr
.
GetChar
(
nStart
)
;
sal_Unicode
c
=
rStr
[
nStart
]
;
if
(
c
==
'"'
)
if
(
c
==
'"'
)
{
{
nStart
++
;
nStart
++
;
while
(
(
nStart
<
nStrLen
)
&&
rStr
.
GetChar
(
nStart
)
!=
'"'
)
while
(
(
nStart
<
nStrLen
)
&&
rStr
[
nStart
]
!=
'"'
)
nStart
++
;
nStart
++
;
}
}
else
if
(
c
==
open
)
else
if
(
c
==
open
)
...
@@ -339,9 +340,9 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart
...
@@ -339,9 +340,9 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart
//------------------------------------------------------------------
//------------------------------------------------------------------
xub_StrLen
FormulaHelper
::
GetArgStart
(
const
String
&
rStr
,
xub_StrLen
nStart
,
sal_uInt16
nArg
)
const
xub_StrLen
FormulaHelper
::
GetArgStart
(
const
OU
String
&
rStr
,
xub_StrLen
nStart
,
sal_uInt16
nArg
)
const
{
{
xub_StrLen
nStrLen
=
rStr
.
Len
();
xub_StrLen
nStrLen
=
rStr
.
getLength
();
if
(
nStrLen
<
nStart
)
if
(
nStrLen
<
nStart
)
return
nStart
;
return
nStart
;
...
@@ -352,12 +353,12 @@ xub_StrLen FormulaHelper::GetArgStart( const String& rStr, xub_StrLen nStart, sa
...
@@ -352,12 +353,12 @@ xub_StrLen FormulaHelper::GetArgStart( const String& rStr, xub_StrLen nStart, sa
while
(
!
bFound
&&
(
nStart
<
nStrLen
)
)
while
(
!
bFound
&&
(
nStart
<
nStrLen
)
)
{
{
sal_Unicode
c
=
rStr
.
GetChar
(
nStart
)
;
sal_Unicode
c
=
rStr
[
nStart
]
;
if
(
c
==
'"'
)
if
(
c
==
'"'
)
{
{
nStart
++
;
nStart
++
;
while
(
(
nStart
<
nStrLen
)
&&
rStr
.
GetChar
(
nStart
)
!=
'"'
)
while
(
(
nStart
<
nStrLen
)
&&
rStr
[
nStart
]
!=
'"'
)
nStart
++
;
nStart
++
;
}
}
else
if
(
c
==
open
)
else
if
(
c
==
open
)
...
...
include/formula/formulahelper.hxx
Dosyayı görüntüle @
f32da852
...
@@ -46,27 +46,27 @@ namespace formula
...
@@ -46,27 +46,27 @@ namespace formula
inline
const
CharClass
*
GetCharClass
()
const
{
return
m_pCharClass
;
}
inline
const
CharClass
*
GetCharClass
()
const
{
return
m_pCharClass
;
}
sal_Bool
GetNextFunc
(
const
String
&
rFormula
,
sal_Bool
GetNextFunc
(
const
OU
String
&
rFormula
,
sal_Bool
bBack
,
sal_Bool
bBack
,
xub_StrLen
&
rFStart
,
// Ein- und Ausgabe
xub_StrLen
&
rFStart
,
// Ein- und Ausgabe
xub_StrLen
*
pFEnd
=
NULL
,
xub_StrLen
*
pFEnd
=
NULL
,
const
IFunctionDescription
**
ppFDesc
=
NULL
,
const
IFunctionDescription
**
ppFDesc
=
NULL
,
::
std
::
vector
<
OUString
>*
pArgs
=
NULL
)
const
;
::
std
::
vector
<
OUString
>*
pArgs
=
NULL
)
const
;
xub_StrLen
GetFunctionStart
(
const
String
&
rFormula
,
xub_StrLen
nStart
,
xub_StrLen
GetFunctionStart
(
const
OU
String
&
rFormula
,
xub_StrLen
nStart
,
sal_Bool
bBack
,
String
*
pFuncName
=
NULL
)
const
;
sal_Bool
bBack
,
OU
String
*
pFuncName
=
NULL
)
const
;
xub_StrLen
GetFunctionEnd
(
const
String
&
rFormula
,
xub_StrLen
nStart
)
const
;
xub_StrLen
GetFunctionEnd
(
const
OU
String
&
rFormula
,
xub_StrLen
nStart
)
const
;
xub_StrLen
GetArgStart
(
const
String
&
rFormula
,
xub_StrLen
nStart
,
xub_StrLen
GetArgStart
(
const
OU
String
&
rFormula
,
xub_StrLen
nStart
,
sal_uInt16
nArg
)
const
;
sal_uInt16
nArg
)
const
;
void
GetArgStrings
(
::
std
::
vector
<
OUString
>&
_rArgs
,
void
GetArgStrings
(
::
std
::
vector
<
OUString
>&
_rArgs
,
const
String
&
rFormula
,
const
OU
String
&
rFormula
,
xub_StrLen
nFuncPos
,
xub_StrLen
nFuncPos
,
sal_uInt16
nArgs
)
const
;
sal_uInt16
nArgs
)
const
;
void
FillArgStrings
(
const
String
&
rFormula
,
void
FillArgStrings
(
const
OU
String
&
rFormula
,
xub_StrLen
nFuncPos
,
xub_StrLen
nFuncPos
,
sal_uInt16
nArgs
,
sal_uInt16
nArgs
,
::
std
::
vector
<
OUString
>&
_rArgs
)
const
;
::
std
::
vector
<
OUString
>&
_rArgs
)
const
;
...
...
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