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
5358b9ba
Kaydet (Commit)
5358b9ba
authored
Nis 16, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
UniString->OUString
Change-Id: I217944d40ed7cd3a2fca4ad0d61729ff5d94ed96
üst
02917cb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
editsyntaxhighlighter.cxx
svtools/source/edit/editsyntaxhighlighter.cxx
+24
-24
No files found.
svtools/source/edit/editsyntaxhighlighter.cxx
Dosyayı görüntüle @
5358b9ba
...
@@ -48,68 +48,68 @@ void MultiLineEditSyntaxHighlight::SetText(const OUString& rNewText)
...
@@ -48,68 +48,68 @@ void MultiLineEditSyntaxHighlight::SetText(const OUString& rNewText)
UpdateData
();
UpdateData
();
}
}
void
MultiLineEditSyntaxHighlight
::
DoBracketHilight
(
sal_uInt16
a
Key
)
void
MultiLineEditSyntaxHighlight
::
DoBracketHilight
(
sal_uInt16
n
Key
)
{
{
TextSelection
aCurrentPos
=
GetTextView
()
->
GetSelection
();
TextSelection
aCurrentPos
=
GetTextView
()
->
GetSelection
();
xub_StrLen
aStartPos
=
aCurrentPos
.
GetStart
().
GetIndex
();
xub_StrLen
nStartPos
=
aCurrentPos
.
GetStart
().
GetIndex
();
sal_uLong
nStartPara
=
aCurrentPos
.
GetStart
().
GetPara
();
sal_uLong
nStartPara
=
aCurrentPos
.
GetStart
().
GetPara
();
sal_uInt16
a
Count
=
0
;
sal_uInt16
n
Count
=
0
;
int
a
Char
=
-
1
;
int
n
Char
=
-
1
;
switch
(
a
Key
)
switch
(
n
Key
)
{
{
case
'\''
:
// no break
case
'\''
:
// no break
case
'"'
:
case
'"'
:
{
{
aChar
=
a
Key
;
nChar
=
n
Key
;
break
;
break
;
}
}
case
'}'
:
case
'}'
:
{
{
a
Char
=
'{'
;
n
Char
=
'{'
;
break
;
break
;
}
}
case
')'
:
case
')'
:
{
{
a
Char
=
'('
;
n
Char
=
'('
;
break
;
break
;
}
}
case
']'
:
case
']'
:
{
{
a
Char
=
'['
;
n
Char
=
'['
;
break
;
break
;
}
}
}
}
if
(
a
Char
!=
-
1
)
if
(
n
Char
!=
-
1
)
{
{
for
(
long
aPara
=
nStartPara
;
aPara
>=
0
;
--
a
Para
)
for
(
long
nPara
=
nStartPara
;
nPara
>=
0
;
--
n
Para
)
{
{
if
(
aStartPos
==
0
)
if
(
nStartPos
==
0
)
continue
;
continue
;
String
aLine
(
GetTextEngine
()
->
GetText
(
a
Para
)
);
OUString
aLine
(
GetTextEngine
()
->
GetText
(
n
Para
)
);
if
(
aLine
.
Len
()
==
0
)
if
(
aLine
.
isEmpty
()
)
continue
;
continue
;
for
(
sal_
uInt16
i
=
((
unsigned
long
)
aPara
==
nStartPara
)
?
aStartPos
-
1
:
(
sal_uInt16
)(
aLine
.
Len
()
-
1
)
;
i
>
0
;
--
i
)
for
(
sal_
Int32
i
=
((
sal_uLong
)
nPara
==
nStartPara
)
?
nStartPos
-
1
:
aLine
.
getLength
()
-
1
;
i
>
0
;
--
i
)
{
{
if
(
aLine
.
GetChar
(
i
)
==
a
Char
)
if
(
aLine
[
i
]
==
n
Char
)
{
{
if
(
!
a
Count
)
if
(
!
n
Count
)
{
{
GetTextEngine
()
->
SetAttrib
(
TextAttribFontWeight
(
WEIGHT_ULTRABOLD
),
a
Para
,
i
,
i
+
1
,
sal_True
);
GetTextEngine
()
->
SetAttrib
(
TextAttribFontWeight
(
WEIGHT_ULTRABOLD
),
n
Para
,
i
,
i
+
1
,
sal_True
);
GetTextEngine
()
->
SetAttrib
(
TextAttribFontColor
(
Color
(
0
,
0
,
0
)
),
a
Para
,
i
,
i
+
1
,
sal_True
);
GetTextEngine
()
->
SetAttrib
(
TextAttribFontColor
(
Color
(
0
,
0
,
0
)
),
n
Para
,
i
,
i
+
1
,
sal_True
);
GetTextEngine
()
->
SetAttrib
(
TextAttribFontWeight
(
WEIGHT_ULTRABOLD
),
nStartPara
,
aStartPos
,
a
StartPos
,
sal_True
);
GetTextEngine
()
->
SetAttrib
(
TextAttribFontWeight
(
WEIGHT_ULTRABOLD
),
nStartPara
,
nStartPos
,
n
StartPos
,
sal_True
);
GetTextEngine
()
->
SetAttrib
(
TextAttribFontColor
(
Color
(
0
,
0
,
0
)
),
nStartPara
,
aStartPos
,
a
StartPos
,
sal_True
);
GetTextEngine
()
->
SetAttrib
(
TextAttribFontColor
(
Color
(
0
,
0
,
0
)
),
nStartPara
,
nStartPos
,
n
StartPos
,
sal_True
);
return
;
return
;
}
}
else
else
aCount
--
;
--
nCount
;
}
}
if
(
aLine
.
GetChar
(
i
)
==
a
Key
)
if
(
aLine
[
i
]
==
n
Key
)
aCount
++
;
++
nCount
;
}
}
}
}
}
}
...
...
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