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
f163745c
Kaydet (Commit)
f163745c
authored
Şub 24, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert HighlighterLanguage to scoped enum
Change-Id: Ibf0871601e52ea4fa49e9622176431943c55abdd
üst
a5e53f9f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
17 deletions
+17
-17
baside2b.cxx
basctl/source/basicide/baside2b.cxx
+1
-1
syntaxhighlighttest.cxx
comphelper/qa/unit/syntaxhighlighttest.cxx
+6
-6
syntaxhighlight.cxx
comphelper/source/misc/syntaxhighlight.cxx
+3
-3
BasCodeTagger.cxx
helpcompiler/source/BasCodeTagger.cxx
+1
-1
syntaxhighlight.hxx
include/comphelper/syntaxhighlight.hxx
+3
-3
editsyntaxhighlighter.hxx
include/svtools/editsyntaxhighlighter.hxx
+1
-1
editsyntaxhighlighter.cxx
svtools/source/edit/editsyntaxhighlighter.cxx
+2
-2
No files found.
basctl/source/basicide/baside2b.cxx
Dosyayı görüntüle @
f163745c
...
...
@@ -221,7 +221,7 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) :
Window
(
pParent
,
WB_BORDER
),
rModulWindow
(
*
pModulWindow
),
nCurTextWidth
(
0
),
aHighlighter
(
H
IGHLIGHT_BASIC
),
aHighlighter
(
H
ighlighterLanguage
::
Basic
),
bHighlightning
(
false
),
bDoSyntaxHighlight
(
true
),
bDelayHighlight
(
true
),
...
...
comphelper/qa/unit/syntaxhighlighttest.cxx
Dosyayı görüntüle @
f163745c
...
...
@@ -45,7 +45,7 @@ std::ostream& operator<<(std::ostream& rStrm, const TokenType& tt)
void
SyntaxHighlightTest
::
testBasicString
()
{
OUString
s
(
"
\"
foo
\"
"
);
std
::
vector
<
HighlightPortion
>
ps
;
SyntaxHighlighter
(
H
IGHLIGHT_BASIC
).
getHighlightPortions
(
s
,
ps
);
SyntaxHighlighter
(
H
ighlighterLanguage
::
Basic
).
getHighlightPortions
(
s
,
ps
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
std
::
vector
<
HighlightPortion
>::
size_type
>
(
1
),
ps
.
size
());
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
ps
[
0
].
nBegin
);
...
...
@@ -56,7 +56,7 @@ void SyntaxHighlightTest::testBasicString() {
void
SyntaxHighlightTest
::
testBasicComment
()
{
OUString
s
(
"' foo"
);
std
::
vector
<
HighlightPortion
>
ps
;
SyntaxHighlighter
(
H
IGHLIGHT_BASIC
).
getHighlightPortions
(
s
,
ps
);
SyntaxHighlighter
(
H
ighlighterLanguage
::
Basic
).
getHighlightPortions
(
s
,
ps
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
std
::
vector
<
HighlightPortion
>::
size_type
>
(
1
),
ps
.
size
());
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
ps
[
0
].
nBegin
);
...
...
@@ -67,7 +67,7 @@ void SyntaxHighlightTest::testBasicComment() {
void
SyntaxHighlightTest
::
testBasicCommentNewline
()
{
OUString
s
(
"' foo
\n
"
);
std
::
vector
<
HighlightPortion
>
ps
;
SyntaxHighlighter
(
H
IGHLIGHT_BASIC
).
getHighlightPortions
(
s
,
ps
);
SyntaxHighlighter
(
H
ighlighterLanguage
::
Basic
).
getHighlightPortions
(
s
,
ps
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
std
::
vector
<
HighlightPortion
>::
size_type
>
(
2
),
ps
.
size
());
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
ps
[
0
].
nBegin
);
...
...
@@ -81,7 +81,7 @@ void SyntaxHighlightTest::testBasicCommentNewline() {
void
SyntaxHighlightTest
::
testBasicEmptyComment
()
{
OUString
s
(
"'"
);
std
::
vector
<
HighlightPortion
>
ps
;
SyntaxHighlighter
(
H
IGHLIGHT_BASIC
).
getHighlightPortions
(
s
,
ps
);
SyntaxHighlighter
(
H
ighlighterLanguage
::
Basic
).
getHighlightPortions
(
s
,
ps
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
std
::
vector
<
HighlightPortion
>::
size_type
>
(
1
),
ps
.
size
());
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
ps
[
0
].
nBegin
);
...
...
@@ -92,7 +92,7 @@ void SyntaxHighlightTest::testBasicEmptyComment() {
void
SyntaxHighlightTest
::
testBasicEmptyCommentNewline
()
{
OUString
s
(
"'
\n
"
);
std
::
vector
<
HighlightPortion
>
ps
;
SyntaxHighlighter
(
H
IGHLIGHT_BASIC
).
getHighlightPortions
(
s
,
ps
);
SyntaxHighlighter
(
H
ighlighterLanguage
::
Basic
).
getHighlightPortions
(
s
,
ps
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
std
::
vector
<
HighlightPortion
>::
size_type
>
(
2
),
ps
.
size
());
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
ps
[
0
].
nBegin
);
...
...
@@ -108,7 +108,7 @@ void SyntaxHighlightTest::testBasic()
OUString
aBasicString
(
" if Mid(sText,iRun,1 )<>
\"
\"
then Mid( sText ,iRun, 1, Chr( 1 + Asc( Mid(sText,iRun,1 )) ) '"
);
std
::
vector
<
HighlightPortion
>
aPortions
;
SyntaxHighlighter
(
H
IGHLIGHT_BASIC
).
getHighlightPortions
(
SyntaxHighlighter
(
H
ighlighterLanguage
::
Basic
).
getHighlightPortions
(
aBasicString
,
aPortions
);
sal_Int32
prevEnd
=
0
;
...
...
comphelper/source/misc/syntaxhighlight.cxx
Dosyayı görüntüle @
f163745c
...
...
@@ -387,7 +387,7 @@ bool SyntaxHighlighter::Tokenizer::getNextToken(const sal_Unicode*& pos, /*out*/
// Operator?
// only for BASIC '\'' should be a comment, otherwise it is a normal string and handled there
else
if
(
testCharFlags
(
c
,
CHAR_OPERATOR
)
||
(
(
c
==
'\''
)
&&
(
aLanguage
==
H
IGHLIGHT_BASIC
))
)
else
if
(
testCharFlags
(
c
,
CHAR_OPERATOR
)
||
(
(
c
==
'\''
)
&&
(
aLanguage
==
H
ighlighterLanguage
::
Basic
))
)
{
// parameters for SQL view
if
(
(
c
==
':'
)
||
(
c
==
'?'
))
...
...
@@ -691,11 +691,11 @@ SyntaxHighlighter::SyntaxHighlighter(HighlighterLanguage language):
{
switch
(
eLanguage
)
{
case
H
IGHLIGHT_BASIC
:
case
H
ighlighterLanguage
:
:
Basic
:
m_tokenizer
->
setKeyWords
(
strListBasicKeyWords
,
sizeof
(
strListBasicKeyWords
)
/
sizeof
(
char
*
));
break
;
case
H
IGHLIGHT_
SQL
:
case
H
ighlighterLanguage
:
:
SQL
:
m_tokenizer
->
setKeyWords
(
strListSqlKeyWords
,
sizeof
(
strListSqlKeyWords
)
/
sizeof
(
char
*
));
break
;
...
...
helpcompiler/source/BasCodeTagger.cxx
Dosyayı görüntüle @
f163745c
...
...
@@ -50,7 +50,7 @@ bool LibXmlTreeWalker::end()
BasicCodeTagger
::
BasicCodeTagger
(
xmlDocPtr
rootDoc
)
:
m_Highlighter
(
H
IGHLIGHT_BASIC
)
m_Highlighter
(
H
ighlighterLanguage
::
Basic
)
{
if
(
rootDoc
==
nullptr
)
throw
NULL_DOCUMENT
;
...
...
include/comphelper/syntaxhighlight.hxx
Dosyayı görüntüle @
f163745c
...
...
@@ -59,10 +59,10 @@ struct HighlightPortion {
// Language mode of the Highlighter (possibly to be refined later with keyword
// lists, C comment flags)
enum
HighlighterLanguage
enum
class
HighlighterLanguage
{
HIGHLIGHT_BASIC
,
HIGHLIGHT_
SQL
Basic
,
SQL
};
class
COMPHELPER_DLLPUBLIC
SyntaxHighlighter
...
...
include/svtools/editsyntaxhighlighter.hxx
Dosyayı görüntüle @
f163745c
...
...
@@ -39,7 +39,7 @@ class SVT_DLLPUBLIC MultiLineEditSyntaxHighlight : public MultiLineEdit
virtual
bool
PreNotify
(
NotifyEvent
&
rNEvt
)
override
;
public
:
MultiLineEditSyntaxHighlight
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
=
WB_LEFT
|
WB_BORDER
,
HighlighterLanguage
aLanguage
=
H
IGHLIGHT_
SQL
);
MultiLineEditSyntaxHighlight
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
=
WB_LEFT
|
WB_BORDER
,
HighlighterLanguage
aLanguage
=
H
ighlighterLanguage
::
SQL
);
virtual
void
UpdateData
()
override
;
virtual
void
SetText
(
const
OUString
&
rNewText
)
override
;
...
...
svtools/source/edit/editsyntaxhighlighter.cxx
Dosyayı görüntüle @
f163745c
...
...
@@ -120,7 +120,7 @@ Color MultiLineEditSyntaxHighlight::GetColorValue(TokenType aToken)
Color
aColor
;
switch
(
aHighlighter
.
GetLanguage
())
{
case
H
IGHLIGHT_
SQL
:
case
H
ighlighterLanguage
:
:
SQL
:
{
switch
(
aToken
)
{
...
...
@@ -135,7 +135,7 @@ Color MultiLineEditSyntaxHighlight::GetColorValue(TokenType aToken)
}
break
;
}
case
H
IGHLIGHT_BASIC
:
case
H
ighlighterLanguage
:
:
Basic
:
{
switch
(
aToken
)
{
...
...
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