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
b7f20ef3
Kaydet (Commit)
b7f20ef3
authored
Eki 22, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Unwind HighlightPortions typedef
Change-Id: I0ecc15f9bfd557d0a70a05536906a4984a46463c
üst
c9bca105
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
17 deletions
+14
-17
baside2b.cxx
basctl/source/basicide/baside2b.cxx
+8
-8
syntaxhighlight.cxx
comphelper/source/misc/syntaxhighlight.cxx
+2
-2
BasCodeTagger.cxx
helpcompiler/source/BasCodeTagger.cxx
+1
-1
syntaxhighlight.hxx
include/comphelper/syntaxhighlight.hxx
+2
-5
editsyntaxhighlighter.cxx
svtools/source/edit/editsyntaxhighlighter.cxx
+1
-1
No files found.
basctl/source/basicide/baside2b.cxx
Dosyayı görüntüle @
b7f20ef3
...
...
@@ -594,7 +594,7 @@ void EditorWindow::HandleAutoCorrect()
OUString
aLine
(
pEditEngine
->
GetText
(
nLine
)
);
// the line being modified
const
OUString
&
sActSubName
=
GetActualSubName
(
nLine
);
// the actual procedure
HighlightPortions
aPortions
;
std
::
vector
<
HighlightPortion
>
aPortions
;
aHighlighter
.
getHighlightPortions
(
nLine
,
aLine
,
aPortions
);
if
(
aPortions
.
size
()
==
0
)
...
...
@@ -668,7 +668,7 @@ TextSelection EditorWindow::GetLastHighlightPortionTextSelection()
sal_uLong
nLine
=
GetEditView
()
->
GetSelection
().
GetStart
().
GetPara
();
sal_uLong
nIndex
=
GetEditView
()
->
GetSelection
().
GetStart
().
GetIndex
();
OUString
aLine
(
pEditEngine
->
GetText
(
nLine
)
);
// the line being modified
HighlightPortions
aPortions
;
std
::
vector
<
HighlightPortion
>
aPortions
;
aHighlighter
.
getHighlightPortions
(
nLine
,
aLine
,
aPortions
);
HighlightPortion
&
r
=
aPortions
[
aPortions
.
size
()
-
1
];
...
...
@@ -714,7 +714,7 @@ void EditorWindow::HandleAutoCloseDoubleQuotes()
sal_uLong
nLine
=
aSel
.
GetStart
().
GetPara
();
OUString
aLine
(
pEditEngine
->
GetText
(
nLine
)
);
// the line being modified
HighlightPortions
aPortions
;
std
::
vector
<
HighlightPortion
>
aPortions
;
aHighlighter
.
getHighlightPortions
(
nLine
,
aLine
,
aPortions
);
if
(
aPortions
.
size
()
==
0
)
...
...
@@ -735,7 +735,7 @@ void EditorWindow::HandleProcedureCompletion()
sal_uLong
nLine
=
aSel
.
GetStart
().
GetPara
();
OUString
aLine
(
pEditEngine
->
GetText
(
nLine
)
);
HighlightPortions
aPortions
;
std
::
vector
<
HighlightPortion
>
aPortions
;
aHighlighter
.
getHighlightPortions
(
nLine
,
aLine
,
aPortions
);
if
(
aPortions
.
size
()
==
0
)
...
...
@@ -785,7 +785,7 @@ void EditorWindow::HandleProcedureCompletion()
for
(
sal_uLong
i
=
nLine
+
1
;
i
<
pEditEngine
->
GetParagraphCount
();
++
i
)
{
//searching forward for end token, or another sub/function definition
OUString
aCurrLine
=
pEditEngine
->
GetText
(
i
);
HighlightPortions
aCurrPortions
;
std
::
vector
<
HighlightPortion
>
aCurrPortions
;
aHighlighter
.
getHighlightPortions
(
i
,
aCurrLine
,
aCurrPortions
);
if
(
aCurrPortions
.
size
()
>=
3
)
...
...
@@ -818,12 +818,12 @@ void EditorWindow::HandleCodeCompletion()
OUString
aLine
(
pEditEngine
->
GetText
(
nLine
)
);
// the line being modified
std
::
vector
<
OUString
>
aVect
;
//vector to hold the base variable+methods for the nested reflection
HighlightPortions
aPortions
;
std
::
vector
<
HighlightPortion
>
aPortions
;
aLine
=
aLine
.
copy
(
0
,
aSel
.
GetEnd
().
GetIndex
());
aHighlighter
.
getHighlightPortions
(
nLine
,
aLine
,
aPortions
);
if
(
aPortions
.
size
()
>
0
)
{
//use the syntax highlighter to grab out nested reflection calls, eg. aVar.aMethod("aa").aOtherMethod ..
for
(
HighlightPortions
::
reverse_iterator
aIt
=
aPortions
.
rbegin
();
aIt
!=
aPortions
.
rend
();
++
aIt
)
for
(
std
::
vector
<
HighlightPortion
>
::
reverse_iterator
aIt
=
aPortions
.
rbegin
();
aIt
!=
aPortions
.
rend
();
++
aIt
)
{
HighlightPortion
r
=
*
aIt
;
if
(
r
.
tokenType
==
TT_WHITESPACE
)
// a whitespace: stop; if there is no ws, it goes to the beginning of the line
...
...
@@ -1186,7 +1186,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine )
bool
const
bWasModified
=
pEditEngine
->
IsModified
();
pEditEngine
->
RemoveAttribs
(
nLine
,
true
);
HighlightPortions
aPortions
;
std
::
vector
<
HighlightPortion
>
aPortions
;
aHighlighter
.
getHighlightPortions
(
nLine
,
aLine
,
aPortions
);
for
(
size_t
i
=
0
;
i
<
aPortions
.
size
();
i
++
)
...
...
comphelper/source/misc/syntaxhighlight.cxx
Dosyayı görüntüle @
b7f20ef3
...
...
@@ -659,7 +659,7 @@ sal_uInt16 SimpleTokenizer_Impl::parseLine( sal_uInt32 nParseLine, const OUStrin
}
void
SimpleTokenizer_Impl
::
getHighlightPortions
(
sal_uInt32
nParseLine
,
const
OUString
&
rLine
,
/*out*/
HighlightPortions
&
portions
)
/*out*/
std
::
vector
<
HighlightPortion
>
&
portions
)
{
// Set the position to the beginning of the source string
mpStringBegin
=
mpActualPos
=
rLine
.
getStr
();
...
...
@@ -731,7 +731,7 @@ void SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDiff
}
void
SyntaxHighlighter
::
getHighlightPortions
(
sal_uInt32
nLine
,
const
OUString
&
rLine
,
/*out*/
HighlightPortions
&
portions
)
/*out*/
std
::
vector
<
HighlightPortion
>
&
portions
)
{
m_pSimpleTokenizer
->
getHighlightPortions
(
nLine
,
rLine
,
portions
);
}
...
...
helpcompiler/source/BasCodeTagger.cxx
Dosyayı görüntüle @
b7f20ef3
...
...
@@ -150,7 +150,7 @@ void BasicCodeTagger::tagParagraph( xmlNodePtr paragraph )
strlen
(
reinterpret_cast
<
const
char
*>
(
codeSnippet
)),
RTL_TEXTENCODING_UTF8
);
m_Highlighter
.
notifyChange
(
0
,
0
,
&
strLine
,
1
);
HighlightPortions
portions
;
std
::
vector
<
HighlightPortion
>
portions
;
m_Highlighter
.
getHighlightPortions
(
0
,
strLine
,
portions
);
for
(
size_t
i
=
0
;
i
<
portions
.
size
();
i
++
)
{
...
...
include/comphelper/syntaxhighlight.hxx
Dosyayı görüntüle @
b7f20ef3
...
...
@@ -46,9 +46,6 @@ enum TokenTypes
struct
HighlightPortion
{
sal_uInt16
nBegin
;
sal_uInt16
nEnd
;
TokenTypes
tokenType
;
};
typedef
std
::
vector
<
HighlightPortion
>
HighlightPortions
;
/////////////////////////////////////////////////////////////////////////
// Auxiliary class to support JavaScript modules, next to find functions which
// will later will be used for syntax highlighting
...
...
@@ -108,7 +105,7 @@ public:
sal_uInt16
parseLine
(
sal_uInt32
nLine
,
const
OUString
*
aSource
);
void
getHighlightPortions
(
sal_uInt32
nParseLine
,
const
OUString
&
rLine
,
/*out*/
HighlightPortions
&
portions
);
/*out*/
std
::
vector
<
HighlightPortion
>
&
portions
);
void
setKeyWords
(
const
char
**
ppKeyWords
,
sal_uInt16
nCount
);
};
...
...
@@ -140,7 +137,7 @@ public:
const
OUString
*
pChangedLines
,
sal_uInt32
nArrayLength
);
void
getHighlightPortions
(
sal_uInt32
nLine
,
const
OUString
&
rLine
,
HighlightPortions
&
pPortions
);
std
::
vector
<
HighlightPortion
>
&
pPortions
);
HighlighterLanguage
GetLanguage
()
{
return
eLanguage
;}
};
...
...
svtools/source/edit/editsyntaxhighlighter.cxx
Dosyayı görüntüle @
b7f20ef3
...
...
@@ -174,7 +174,7 @@ void MultiLineEditSyntaxHighlight::UpdateData()
aHighlighter
.
notifyChange
(
nLine
,
0
,
&
aLine
,
1
);
GetTextEngine
()
->
RemoveAttribs
(
nLine
,
sal_True
);
HighlightPortions
aPortions
;
std
::
vector
<
HighlightPortion
>
aPortions
;
aHighlighter
.
getHighlightPortions
(
nLine
,
aLine
,
aPortions
);
for
(
size_t
i
=
0
;
i
<
aPortions
.
size
();
i
++
)
{
...
...
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