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
67e2acb0
Kaydet (Commit)
67e2acb0
authored
Eyl 08, 2018
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid getTokenCount()
Change-Id: I2fa4e9d36fa2707ba7fb6faa59fc8f4be906c04c
üst
daf83245
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
24 deletions
+12
-24
htmlexp.cxx
sc/source/filter/html/htmlexp.cxx
+12
-24
No files found.
sc/source/filter/html/htmlexp.cxx
Dosyayı görüntüle @
67e2acb0
...
...
@@ -18,7 +18,6 @@
*/
#include <scitems.hxx>
#include <comphelper/string.hxx>
#include <editeng/eeitem.hxx>
#include <rtl/tencinfo.h>
...
...
@@ -350,24 +349,17 @@ void ScHTMLExport::WriteHeader()
.
WriteCharPtr
(
OOO_STRING_SVTOOLS_HTML_tablerow
).
WriteCharPtr
(
","
).
WriteCharPtr
(
OOO_STRING_SVTOOLS_HTML_tableheader
).
WriteCharPtr
(
","
)
.
WriteCharPtr
(
OOO_STRING_SVTOOLS_HTML_tabledata
).
WriteCharPtr
(
","
).
WriteCharPtr
(
OOO_STRING_SVTOOLS_HTML_parabreak
)
.
WriteCharPtr
(
" { "
).
WriteCharPtr
(
"font-family:"
);
sal_Int32
nFonts
=
comphelper
::
string
::
getTokenCount
(
aHTMLStyle
.
aFontFamilyName
,
';'
);
if
(
nFonts
==
1
)
if
(
!
aHTMLStyle
.
aFontFamilyName
.
isEmpty
())
{
rStrm
.
WriteChar
(
'\"'
);
OUT_STR
(
aHTMLStyle
.
aFontFamilyName
);
rStrm
.
WriteChar
(
'\"'
);
}
else
{
// Fontlist, VCL: Semicolon as separator
// CSS1: Comma as separator and every single font name quoted
const
OUString
&
rList
=
aHTMLStyle
.
aFontFamilyName
;
for
(
sal_Int32
j
=
0
,
nPos
=
0
;
j
<
nFonts
;
j
++
)
for
(
sal_Int32
nPos
{
0
};;
)
{
rStrm
.
WriteChar
(
'\"'
);
OUT_STR
(
rList
.
getToken
(
0
,
';'
,
nPos
)
);
rStrm
.
WriteChar
(
'\"'
);
if
(
j
<
nFonts
-
1
)
rStrm
.
WriteCharPtr
(
", "
);
if
(
nPos
<
0
)
break
;
rStrm
.
WriteCharPtr
(
", "
);
}
}
rStrm
.
WriteCharPtr
(
"; "
).
WriteCharPtr
(
"font-size:"
)
...
...
@@ -1104,26 +1096,22 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
aStr
.
append
(
' '
).
append
(
OOO_STRING_SVTOOLS_HTML_O_face
).
append
(
"=
\"
"
);
sal_Int32
nFonts
=
comphelper
::
string
::
getTokenCount
(
rFontItem
.
GetFamilyName
(),
';'
);
if
(
nFonts
==
1
)
if
(
!
rFontItem
.
GetFamilyName
().
isEmpty
()
)
{
OString
aTmpStr
=
HTMLOutFuncs
::
ConvertStringToHTML
(
rFontItem
.
GetFamilyName
(),
eDestEnc
,
&
aNonConvertibleChars
);
aStr
.
append
(
aTmpStr
);
}
else
{
// Font list, VCL: Semicolon as separator, HTML: Comma
const
OUString
&
rList
=
rFontItem
.
GetFamilyName
();
for
(
sal_Int32
j
=
0
,
nPos
=
0
;
j
<
nFonts
;
j
++
)
for
(
sal_Int32
nPos
{
0
};;
)
{
OString
aTmpStr
=
HTMLOutFuncs
::
ConvertStringToHTML
(
rList
.
getToken
(
0
,
';'
,
nPos
),
eDestEnc
,
&
aNonConvertibleChars
);
aStr
.
append
(
aTmpStr
);
if
(
j
<
nFonts
-
1
)
aStr
.
append
(
','
);
if
(
nPos
<
0
)
break
;
aStr
.
append
(
','
);
}
}
aStr
.
append
(
'\"'
);
}
if
(
nSetFontSizeNumber
)
...
...
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