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
fb468545
Kaydet (Commit)
fb468545
authored
Kas 25, 2012
tarafından
Norbert Thiebaud
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
more wrapper in zforlist to isolate String/OUString issues
Change-Id: I53e5e60f59739bdcedb6e7b13006850e0e5b22c0
üst
7796d003
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
19 deletions
+49
-19
zforlist.hxx
svl/inc/svl/zforlist.hxx
+13
-5
zforlist.cxx
svl/source/numbers/zforlist.cxx
+36
-14
No files found.
svl/inc/svl/zforlist.hxx
Dosyayı görüntüle @
fb468545
...
...
@@ -494,7 +494,7 @@ public:
/** Format a string according to a format index, return string and color.
Formats only if the format code is of type text or the 4th subcode
of a format code is specified, otherwise sOutString will be == "" */
void
GetOutputString
(
OUString
&
sString
,
sal_uInt32
nFIndex
,
void
GetOutputString
(
const
OUString
&
sString
,
sal_uInt32
nFIndex
,
OUString
&
sOutString
,
Color
**
ppColor
,
bool
bUseStarFormat
=
false
);
/** Format a number according to the standard default format matching
...
...
@@ -524,18 +524,26 @@ public:
/** Same as <method>GetPreviewString</method> but the format code string
may be either language/country eLnge or en_US english US */
bool
GetPreviewStringGuess
(
const
OUString
&
sFormatString
,
double
fPreviewNumber
,
OUString
&
sOutString
,
Color
**
ppColor
,
LanguageType
eLnge
=
LANGUAGE_DONTKNOW
);
bool
GetPreviewStringGuess
(
const
String
&
sFormatString
,
double
fPreviewNumber
,
String
&
sOutString
,
Color
**
ppColor
,
LanguageType
eLnge
=
LANGUAGE_DONTKNOW
);
String
&
sOutString
,
Color
**
ppColor
,
LanguageType
eLnge
=
LANGUAGE_DONTKNOW
);
/** Format a string according to a format code string to be scanned.
@return
<FALSE/> if format code contains an error
<TRUE/> else, in which case the string and color are returned.
*/
bool
GetPreviewString
(
const
OUString
&
sFormatString
,
const
OUString
&
sPreviewString
,
OUString
&
sOutString
,
Color
**
ppColor
,
LanguageType
eLnge
=
LANGUAGE_DONTKNOW
);
bool
GetPreviewString
(
const
String
&
sFormatString
,
const
String
&
sPreviewString
,
String
&
sOutString
,
Color
**
ppColor
,
LanguageType
eLnge
=
LANGUAGE_DONTKNOW
);
String
&
sOutString
,
Color
**
ppColor
,
LanguageType
eLnge
=
LANGUAGE_DONTKNOW
);
/** Test whether the format code string is already present in container
@return
...
...
svl/source/numbers/zforlist.cxx
Dosyayı görüntüle @
fb468545
...
...
@@ -1555,7 +1555,7 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
rOutString
=
aTmp
;
}
void
SvNumberFormatter
::
GetOutputString
(
OUString
&
sString
,
void
SvNumberFormatter
::
GetOutputString
(
const
OUString
&
sString
,
sal_uInt32
nFIndex
,
OUString
&
sOutString
,
Color
**
ppColor
,
...
...
@@ -1683,7 +1683,7 @@ bool SvNumberFormatter::GetPreviewString(const String& sFormatString,
{
bool
result
;
OUString
sTemp
(
sOutString
);
result
=
GetPreviewString
(
sFormatString
,
fPreviewNumber
,
sTemp
,
result
=
GetPreviewString
(
OUString
(
sFormatString
)
,
fPreviewNumber
,
sTemp
,
ppColor
,
eLnge
,
bUseStarFormat
);
sOutString
=
sTemp
;
return
result
;
...
...
@@ -1695,7 +1695,21 @@ bool SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
Color
**
ppColor
,
LanguageType
eLnge
)
{
if
(
sFormatString
.
Len
()
==
0
)
// no empty string
bool
result
;
OUString
sTemp
(
sOutString
);
result
=
GetPreviewStringGuess
(
OUString
(
sFormatString
),
fPreviewNumber
,
sTemp
,
ppColor
,
eLnge
);
sOutString
=
sTemp
;
return
result
;
}
bool
SvNumberFormatter
::
GetPreviewStringGuess
(
const
OUString
&
sFormatString
,
double
fPreviewNumber
,
OUString
&
sOutString
,
Color
**
ppColor
,
LanguageType
eLnge
)
{
if
(
sFormatString
.
isEmpty
())
// no empty string
{
return
false
;
}
...
...
@@ -1707,7 +1721,7 @@ bool SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
eLnge
=
ActLnge
;
bool
bEnglish
=
(
eLnge
==
LANGUAGE_ENGLISH_US
);
String
aFormatStringUpper
(
pCharClass
->
uppercase
(
sFormatString
)
);
OU
String
aFormatStringUpper
(
pCharClass
->
uppercase
(
sFormatString
)
);
sal_uInt32
nCLOffset
=
ImpGenerateCL
(
eLnge
);
sal_uInt32
nKey
=
ImpIsEntry
(
aFormatStringUpper
,
nCLOffset
,
eLnge
);
if
(
nKey
!=
NUMBERFORMAT_ENTRY_NOT_FOUND
)
...
...
@@ -1782,9 +1796,7 @@ bool SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
if
(
nCheckPos
==
0
)
// String ok
{
ImpGenerateCL
(
eLnge
);
// create new standard formats if necessary
OUString
sTemp
(
sOutString
);
pEntry
->
GetOutputString
(
fPreviewNumber
,
sTemp
,
ppColor
);
sOutString
=
sTemp
;
pEntry
->
GetOutputString
(
fPreviewNumber
,
sOutString
,
ppColor
);
delete
pEntry
;
return
true
;
}
...
...
@@ -1798,7 +1810,21 @@ bool SvNumberFormatter::GetPreviewString( const String& sFormatString,
Color
**
ppColor
,
LanguageType
eLnge
)
{
if
(
sFormatString
.
Len
()
==
0
)
// no empty string
bool
result
;
OUString
sTemp
(
sOutString
);
result
=
GetPreviewString
(
OUString
(
sFormatString
),
OUString
(
sPreviewString
),
sTemp
,
ppColor
,
eLnge
);
sOutString
=
sTemp
;
return
result
;
}
bool
SvNumberFormatter
::
GetPreviewString
(
const
OUString
&
sFormatString
,
const
OUString
&
sPreviewString
,
OUString
&
sOutString
,
Color
**
ppColor
,
LanguageType
eLnge
)
{
if
(
sFormatString
.
isEmpty
())
// no empty string
{
return
false
;
}
...
...
@@ -1818,15 +1844,12 @@ bool SvNumberFormatter::GetPreviewString( const String& sFormatString,
eLnge
);
if
(
nCheckPos
==
0
)
// String ok
{
OUString
aNonConstPreview
(
sPreviewString
);
OUString
sTemp
;
// May have to create standard formats for this locale.
sal_uInt32
CLOffset
=
ImpGenerateCL
(
eLnge
);
nKey
=
ImpIsEntry
(
p_Entry
->
GetFormatstring
(),
CLOffset
,
eLnge
);
if
(
nKey
!=
NUMBERFORMAT_ENTRY_NOT_FOUND
)
// already present
{
GetOutputString
(
aNonConstPreview
,
nKey
,
sTemp
,
ppColor
);
sOutString
=
sTemp
;
GetOutputString
(
sPreviewString
,
nKey
,
sOutString
,
ppColor
);
}
else
{
...
...
@@ -1835,8 +1858,7 @@ bool SvNumberFormatter::GetPreviewString( const String& sFormatString,
// in SvNumberFormatter::GetOutputString()
if
(
p_Entry
->
IsTextFormat
()
||
p_Entry
->
HasTextFormat
())
{
p_Entry
->
GetOutputString
(
aNonConstPreview
,
sTemp
,
ppColor
);
sOutString
=
sTemp
;
p_Entry
->
GetOutputString
(
sPreviewString
,
sOutString
,
ppColor
);
}
else
{
...
...
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