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
9a0e6204
Kaydet (Commit)
9a0e6204
authored
Nis 01, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#735505 Logically dead code
Change-Id: I7e7abf9192ee34c9f1c2080268751503aae90e55
üst
bbaa84d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
38 deletions
+30
-38
parhtml.cxx
svtools/source/svhtml/parhtml.cxx
+30
-38
No files found.
svtools/source/svhtml/parhtml.cxx
Dosyayı görüntüle @
9a0e6204
...
...
@@ -562,59 +562,51 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
break
;
}
assert
(
cChar
!=
0
);
// 1 == Non Breaking Space
// 2 == SoftHyphen
if
(
cChar
<
3U
)
if
(
cChar
==
1
||
cChar
==
2
)
{
if
(
'>'
==
cBreak
)
{
// When reading the content of a tag we have
// to change it to ' ' or '-'
switch
(
cChar
)
{
case
1U
:
cChar
=
' '
;
break
;
case
2U
:
cChar
=
'-'
;
break
;
default
:
DBG_ASSERT
(
cChar
==
1U
,
"
\0
x00 should be handled already!"
);
break
;
}
if
(
1U
==
cChar
)
cChar
=
' '
;
else
//2U
cChar
=
'-'
;
}
else
{
// If not scanning a tag return token
aToken
+=
sTmpBuffer
.
makeStringAndClear
();
if
(
cChar
)
if
(
!
aToken
.
isEmpty
()
)
{
if
(
!
aToken
.
isEmpty
()
)
{
// restart with character
nNextCh
=
'&'
;
DBG_ASSERT
(
rInput
.
Tell
()
-
nStreamPos
==
(
sal_uLong
)(
nPos
+
1
)
*
GetCharSize
(),
"Wrong stream position"
);
DBG_ASSERT
(
nlLinePos
-
nLinePos
==
(
sal_uLong
)(
nPos
+
1
),
"Wrong line position"
);
rInput
.
Seek
(
nStreamPos
);
nlLinePos
=
nLinePos
;
ClearTxtConvContext
();
return
HTML_TEXTTOKEN
;
}
// Hack: _GetNextChar shall not read the
// next character
if
(
';'
!=
nNextCh
)
aToken
+=
" "
;
if
(
1U
==
cChar
)
return
HTML_NONBREAKSPACE
;
if
(
2U
==
cChar
)
return
HTML_SOFTHYPH
;
// restart with character
nNextCh
=
'&'
;
DBG_ASSERT
(
rInput
.
Tell
()
-
nStreamPos
==
(
sal_uLong
)(
nPos
+
1
)
*
GetCharSize
(),
"Wrong stream position"
);
DBG_ASSERT
(
nlLinePos
-
nLinePos
==
(
sal_uLong
)(
nPos
+
1
),
"Wrong line position"
);
rInput
.
Seek
(
nStreamPos
);
nlLinePos
=
nLinePos
;
ClearTxtConvContext
();
return
HTML_TEXTTOKEN
;
}
aToken
+=
"&"
;
aToken
+=
sEntityBuffer
.
makeStringAndClear
();
break
;
// Hack: _GetNextChar shall not read the
// next character
if
(
';'
!=
nNextCh
)
aToken
+=
" "
;
if
(
1U
==
cChar
)
return
HTML_NONBREAKSPACE
;
else
//2U
return
HTML_SOFTHYPH
;
}
}
}
...
...
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