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
621cdc7a
Kaydet (Commit)
621cdc7a
authored
Kas 25, 2012
tarafından
Norbert Thiebaud
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
migrate user of InsertBlanks to OUString
Change-Id: Idc7379daf25a226622e5599124df2ab68b98902a
üst
a8fe23a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
23 deletions
+18
-23
zformat.hxx
svl/inc/svl/zformat.hxx
+10
-1
zformat.cxx
svl/source/numbers/zformat.cxx
+2
-19
xmlnumfe.cxx
xmloff/source/style/xmlnumfe.cxx
+6
-3
No files found.
svl/inc/svl/zformat.hxx
Dosyayı görüntüle @
621cdc7a
...
@@ -386,7 +386,16 @@ public:
...
@@ -386,7 +386,16 @@ public:
/** Insert the number of blanks into the string that is needed to simulate
/** Insert the number of blanks into the string that is needed to simulate
the width of character c for underscore formats */
the width of character c for underscore formats */
static
xub_StrLen
InsertBlanks
(
String
&
r
,
xub_StrLen
nPos
,
sal_Unicode
c
);
static
sal_Int32
InsertBlanks
(
OUString
&
r
,
sal_Int32
nPos
,
sal_Unicode
c
)
{
sal_Int32
result
;
OUStringBuffer
sBuff
(
r
);
result
=
InsertBlanks
(
sBuff
,
nPos
,
c
);
r
=
sBuff
.
makeStringAndClear
();
return
result
;
}
/** Insert the number of blanks into the string that is needed to simulate
/** Insert the number of blanks into the string that is needed to simulate
the width of character c for underscore formats */
the width of character c for underscore formats */
...
...
svl/source/numbers/zformat.cxx
Dosyayı görüntüle @
621cdc7a
...
@@ -84,23 +84,6 @@ static sal_uInt8 cCharWidths[ 128-32 ] = {
...
@@ -84,23 +84,6 @@ static sal_uInt8 cCharWidths[ 128-32 ] = {
};
};
// static
// static
xub_StrLen
SvNumberformat
::
InsertBlanks
(
String
&
r
,
xub_StrLen
nPos
,
sal_Unicode
c
)
{
if
(
c
>=
32
)
{
sal_uInt16
n
=
2
;
// Default fuer Zeichen > 128 (HACK!)
if
(
c
<=
127
)
{
n
=
cCharWidths
[
c
-
32
];
}
while
(
n
--
)
{
r
.
Insert
(
' '
,
nPos
++
);
}
}
return
nPos
;
}
sal_Int32
SvNumberformat
::
InsertBlanks
(
OUStringBuffer
&
r
,
sal_Int32
nPos
,
sal_Unicode
c
)
sal_Int32
SvNumberformat
::
InsertBlanks
(
OUStringBuffer
&
r
,
sal_Int32
nPos
,
sal_Unicode
c
)
{
{
if
(
c
>=
32
)
if
(
c
>=
32
)
...
@@ -3294,7 +3277,7 @@ sal_Int32 SvNumberformat::ImpUseMonthCase( int & io_nState, const ImpSvNumFor& r
...
@@ -3294,7 +3277,7 @@ sal_Int32 SvNumberformat::ImpUseMonthCase( int & io_nState, const ImpSvNumFor& r
const
sal_uInt16
nCount
=
rNumFor
.
GetCount
();
const
sal_uInt16
nCount
=
rNumFor
.
GetCount
();
for
(
sal_uInt16
i
=
0
;
i
<
nCount
&&
io_nState
==
0
;
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<
nCount
&&
io_nState
==
0
;
++
i
)
{
{
xub_StrLen
nLen
;
sal_Int32
nLen
;
switch
(
rInfo
.
nTypeArray
[
i
])
switch
(
rInfo
.
nTypeArray
[
i
])
{
{
case
NF_KEY_D
:
case
NF_KEY_D
:
...
@@ -3858,7 +3841,7 @@ bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
...
@@ -3858,7 +3841,7 @@ bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
else
else
{
{
bInputLine
=
false
;
bInputLine
=
false
;
nCntPost
=
xub_StrLen
(
rInfo
.
nCntPost
)
;
nCntPost
=
rInfo
.
nCntPost
;
}
}
double
fTime
=
(
fNumber
-
floor
(
fNumber
))
*
86400.0
;
double
fTime
=
(
fNumber
-
floor
(
fNumber
))
*
86400.0
;
fTime
=
::
rtl
::
math
::
round
(
fTime
,
int
(
nCntPost
)
);
fTime
=
::
rtl
::
math
::
round
(
fTime
,
int
(
nCntPost
)
);
...
...
xmloff/source/style/xmlnumfe.cxx
Dosyayı görüntüle @
621cdc7a
...
@@ -1261,12 +1261,15 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
...
@@ -1261,12 +1261,15 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
{
{
// text (literal or underscore) within the integer part of a number:number element
// text (literal or underscore) within the integer part of a number:number element
String
aEmbeddedStr
;
OU
String
aEmbeddedStr
;
if
(
nElemType
==
NF_SYMBOLTYPE_STRING
||
nElemType
==
NF_SYMBOLTYPE_PERCENT
)
if
(
nElemType
==
NF_SYMBOLTYPE_STRING
||
nElemType
==
NF_SYMBOLTYPE_PERCENT
)
{
aEmbeddedStr
=
*
pElemStr
;
aEmbeddedStr
=
*
pElemStr
;
}
else
else
{
SvNumberformat
::
InsertBlanks
(
aEmbeddedStr
,
0
,
(
*
pElemStr
)[
1
]
);
SvNumberformat
::
InsertBlanks
(
aEmbeddedStr
,
0
,
(
*
pElemStr
)[
1
]
);
}
sal_Int32
nEmbedPos
=
nIntegerSymbols
-
nDigitsPassed
;
sal_Int32
nEmbedPos
=
nIntegerSymbols
-
nDigitsPassed
;
SvXMLEmbeddedTextEntry
*
pObj
=
new
SvXMLEmbeddedTextEntry
(
nPos
,
nEmbedPos
,
aEmbeddedStr
);
SvXMLEmbeddedTextEntry
*
pObj
=
new
SvXMLEmbeddedTextEntry
(
nPos
,
nEmbedPos
,
aEmbeddedStr
);
...
@@ -1334,7 +1337,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
...
@@ -1334,7 +1337,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// turn "_x" into the number of spaces used for x in InsertBlanks in the NumberFormat
// turn "_x" into the number of spaces used for x in InsertBlanks in the NumberFormat
// (#i20396# the spaces may also be in embedded-text elements)
// (#i20396# the spaces may also be in embedded-text elements)
String
aBlanks
;
OU
String
aBlanks
;
SvNumberformat
::
InsertBlanks
(
aBlanks
,
0
,
(
*
pElemStr
)[
1
]
);
SvNumberformat
::
InsertBlanks
(
aBlanks
,
0
,
(
*
pElemStr
)[
1
]
);
AddToTextElement_Impl
(
aBlanks
);
AddToTextElement_Impl
(
aBlanks
);
}
}
...
...
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