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
520a67cc
Kaydet (Commit)
520a67cc
authored
Eki 22, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make violation of "trailing OUString NUL is impl. detail" more obvious
Change-Id: I4e91b73dc276f984a4fe324c3a80cb94e8df6ee3
üst
8e48edad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
syntaxhighlight.cxx
comphelper/source/misc/syntaxhighlight.cxx
+7
-7
syntaxhighlight.hxx
include/comphelper/syntaxhighlight.hxx
+0
-3
No files found.
comphelper/source/misc/syntaxhighlight.cxx
Dosyayı görüntüle @
520a67cc
...
@@ -270,7 +270,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
...
@@ -270,7 +270,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
rpStartPos
=
mpActualPos
;
rpStartPos
=
mpActualPos
;
sal_Unicode
c
=
peekChar
();
sal_Unicode
c
=
peekChar
();
if
(
c
==
CHAR_EOF
)
if
(
c
==
0
)
return
sal_False
;
return
sal_False
;
getChar
();
getChar
();
...
@@ -331,7 +331,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
...
@@ -331,7 +331,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
{
{
// Remove all characters until end of line or EOF
// Remove all characters until end of line or EOF
sal_Unicode
cPeek
=
peekChar
();
sal_Unicode
cPeek
=
peekChar
();
while
(
cPeek
!=
CHAR_EOF
&&
testCharFlags
(
cPeek
,
CHAR_EOL
)
==
sal_False
)
while
(
cPeek
!=
0
&&
testCharFlags
(
cPeek
,
CHAR_EOL
)
==
sal_False
)
{
{
c
=
getChar
();
c
=
getChar
();
cPeek
=
peekChar
();
cPeek
=
peekChar
();
...
@@ -372,7 +372,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
...
@@ -372,7 +372,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
if
(
cPeekNext
==
'-'
)
if
(
cPeekNext
==
'-'
)
{
{
// Remove all characters until end of line or EOF
// Remove all characters until end of line or EOF
while
(
cPeekNext
!=
CHAR_EOF
&&
testCharFlags
(
cPeekNext
,
CHAR_EOL
)
==
sal_False
)
while
(
cPeekNext
!=
0
&&
testCharFlags
(
cPeekNext
,
CHAR_EOL
)
==
sal_False
)
{
{
getChar
();
getChar
();
cPeekNext
=
peekChar
();
cPeekNext
=
peekChar
();
...
@@ -386,7 +386,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
...
@@ -386,7 +386,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
if
(
cPeekNext
==
'/'
)
if
(
cPeekNext
==
'/'
)
{
{
// Remove all characters until end of line or EOF
// Remove all characters until end of line or EOF
while
(
cPeekNext
!=
CHAR_EOF
&&
testCharFlags
(
cPeekNext
,
CHAR_EOL
)
==
sal_False
)
while
(
cPeekNext
!=
0
&&
testCharFlags
(
cPeekNext
,
CHAR_EOL
)
==
sal_False
)
{
{
getChar
();
getChar
();
cPeekNext
=
peekChar
();
cPeekNext
=
peekChar
();
...
@@ -403,7 +403,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
...
@@ -403,7 +403,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// Remove all characters until end of line or EOF
// Remove all characters until end of line or EOF
sal_Unicode
cPeek
=
c
;
sal_Unicode
cPeek
=
c
;
while
(
cPeek
!=
CHAR_EOF
&&
testCharFlags
(
cPeek
,
CHAR_EOL
)
==
sal_False
)
while
(
cPeek
!=
0
&&
testCharFlags
(
cPeek
,
CHAR_EOL
)
==
sal_False
)
{
{
getChar
();
getChar
();
cPeek
=
peekChar
();
cPeek
=
peekChar
();
...
@@ -497,7 +497,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
...
@@ -497,7 +497,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
while
(
peekChar
()
!=
cEndString
)
while
(
peekChar
()
!=
cEndString
)
{
{
// Detect EOF before getChar(), so we do not loose EOF
// Detect EOF before getChar(), so we do not loose EOF
if
(
peekChar
()
==
CHAR_EOF
)
if
(
peekChar
()
==
0
)
{
{
// ERROR: unterminated string literal
// ERROR: unterminated string literal
reType
=
TT_ERROR
;
reType
=
TT_ERROR
;
...
@@ -540,7 +540,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
...
@@ -540,7 +540,7 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// All other will remain TT_UNKNOWN
// All other will remain TT_UNKNOWN
// Save end position
// Save end position
rpEndPos
=
*
mpActualPos
==
CHAR_EOF
?
mpActualPos
-
1
:
mpActualPos
;
rpEndPos
=
*
mpActualPos
==
0
?
mpActualPos
-
1
:
mpActualPos
;
return
sal_True
;
return
sal_True
;
}
}
...
...
include/comphelper/syntaxhighlight.hxx
Dosyayı görüntüle @
520a67cc
...
@@ -71,9 +71,6 @@ struct HighlightPortion {
...
@@ -71,9 +71,6 @@ struct HighlightPortion {
#define CHAR_SPACE 0x0100
#define CHAR_SPACE 0x0100
#define CHAR_EOL 0x0200
#define CHAR_EOL 0x0200
#define CHAR_EOF 0x00
// Language mode of the Highlighter (possibly to be refined later with keyword
// Language mode of the Highlighter (possibly to be refined later with keyword
// lists, C comment flags)
// lists, C comment flags)
enum
HighlighterLanguage
enum
HighlighterLanguage
...
...
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