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
9705fbc1
Kaydet (Commit)
9705fbc1
authored
Mar 02, 2014
tarafından
Norbert Thiebaud
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix editeng missing spellchecking redline on load
Change-Id: I16bfbff85978702c93932d723180a7f9166bd39e
üst
1f8bdeee
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
43 deletions
+39
-43
edtspell.cxx
editeng/source/editeng/edtspell.cxx
+14
-18
edtspell.hxx
editeng/source/editeng/edtspell.hxx
+14
-14
impedit3.cxx
editeng/source/editeng/impedit3.cxx
+7
-7
misspellrange.cxx
editeng/source/editeng/misspellrange.cxx
+1
-1
misspellrange.hxx
include/editeng/misspellrange.hxx
+3
-3
No files found.
editeng/source/editeng/edtspell.cxx
Dosyayı görüntüle @
9705fbc1
...
...
@@ -197,7 +197,7 @@ void EditSpellWrapper::CheckSpellTo()
}
}
s
al_Int32
WrongList
::
Valid
=
std
::
numeric_limits
<
sal_Int32
>::
max
();
s
ize_t
WrongList
::
Valid
=
std
::
numeric_limits
<
size_t
>::
max
();
WrongList
::
WrongList
()
:
mnInvalidStart
(
0
),
mnInvalidEnd
(
Valid
)
{}
...
...
@@ -229,7 +229,7 @@ void WrongList::SetValid()
mnInvalidEnd
=
0
;
}
void
WrongList
::
SetInvalidRange
(
s
al_Int32
nStart
,
sal_Int32
nEnd
)
void
WrongList
::
SetInvalidRange
(
s
ize_t
nStart
,
size_t
nEnd
)
{
if
(
mnInvalidStart
==
Valid
||
nStart
<
mnInvalidStart
)
mnInvalidStart
=
nStart
;
...
...
@@ -238,13 +238,13 @@ void WrongList::SetInvalidRange( sal_Int32 nStart, sal_Int32 nEnd )
mnInvalidEnd
=
nEnd
;
}
void
WrongList
::
ResetInvalidRange
(
s
al_Int32
nStart
,
sal_Int32
nEnd
)
void
WrongList
::
ResetInvalidRange
(
s
ize_t
nStart
,
size_t
nEnd
)
{
mnInvalidStart
=
nStart
;
mnInvalidEnd
=
nEnd
;
}
void
WrongList
::
TextInserted
(
s
al_Int32
nPos
,
sal_Int32
nLength
,
bool
bPosIsSep
)
void
WrongList
::
TextInserted
(
s
ize_t
nPos
,
size_t
nLength
,
bool
bPosIsSep
)
{
if
(
IsValid
())
{
...
...
@@ -261,7 +261,7 @@ void WrongList::TextInserted( sal_Int32 nPos, sal_Int32 nLength, bool bPosIsSep
mnInvalidEnd
=
nPos
+
nLength
;
}
for
(
s
al_Int32
i
=
0
,
n
=
(
sal_Int32
)
maRanges
.
size
();
i
<
n
;
++
i
)
for
(
s
ize_t
i
=
0
,
n
=
maRanges
.
size
();
i
<
n
;
++
i
)
{
editeng
::
MisspellRange
&
rWrong
=
maRanges
[
i
];
bool
bRefIsValid
=
true
;
...
...
@@ -313,9 +313,9 @@ void WrongList::TextInserted( sal_Int32 nPos, sal_Int32 nLength, bool bPosIsSep
SAL_WARN_IF
(
DbgIsBuggy
(),
"editeng"
,
"InsertWrong: WrongList broken!"
);
}
void
WrongList
::
TextDeleted
(
s
al_Int32
nPos
,
sal_Int32
nLength
)
void
WrongList
::
TextDeleted
(
s
ize_t
nPos
,
size_t
nLength
)
{
s
al_Int32
nEndPos
=
nPos
+
nLength
;
s
ize_t
nEndPos
=
nPos
+
nLength
;
if
(
IsValid
())
{
sal_uInt16
nNewInvalidStart
=
nPos
?
nPos
-
1
:
0
;
...
...
@@ -381,7 +381,7 @@ void WrongList::TextDeleted( sal_Int32 nPos, sal_Int32 nLength )
SAL_WARN_IF
(
DbgIsBuggy
(),
"editeng"
,
"TextDeleted: WrongList broken!"
);
}
bool
WrongList
::
NextWrong
(
s
al_Int32
&
rnStart
,
sal_Int32
&
rnEnd
)
const
bool
WrongList
::
NextWrong
(
s
ize_t
&
rnStart
,
size_t
&
rnEnd
)
const
{
/*
rnStart get the start position, is possibly adjusted wrt. Wrong start
...
...
@@ -399,7 +399,7 @@ bool WrongList::NextWrong( sal_Int32& rnStart, sal_Int32& rnEnd ) const
return
false
;
}
bool
WrongList
::
HasWrong
(
s
al_Int32
nStart
,
sal_Int32
nEnd
)
const
bool
WrongList
::
HasWrong
(
s
ize_t
nStart
,
size_t
nEnd
)
const
{
for
(
WrongList
::
const_iterator
i
=
begin
();
i
!=
end
();
++
i
)
{
...
...
@@ -411,7 +411,7 @@ bool WrongList::HasWrong( sal_Int32 nStart, sal_Int32 nEnd ) const
return
false
;
}
bool
WrongList
::
HasAnyWrong
(
s
al_Int32
nStart
,
sal_Int32
nEnd
)
const
bool
WrongList
::
HasAnyWrong
(
s
ize_t
nStart
,
size_t
nEnd
)
const
{
for
(
WrongList
::
const_iterator
i
=
begin
();
i
!=
end
();
++
i
)
{
...
...
@@ -423,22 +423,18 @@ bool WrongList::HasAnyWrong( sal_Int32 nStart, sal_Int32 nEnd ) const
return
false
;
}
void
WrongList
::
ClearWrongs
(
s
al_Int32
nStart
,
sal_Int32
nEnd
,
void
WrongList
::
ClearWrongs
(
s
ize_t
nStart
,
size_t
nEnd
,
const
ContentNode
*
pNode
)
{
if
(
nEnd
<
0
)
{
nEnd
=
SAL_MAX_INT32
;
}
for
(
WrongList
::
iterator
i
=
begin
();
i
!=
end
();
)
{
if
(
(
i
->
mnEnd
>
nStart
)
&&
(
i
->
mnStart
<
nEnd
)
)
if
(
i
->
mnEnd
>
nStart
&&
i
->
mnStart
<
nEnd
)
{
if
(
i
->
mnEnd
>
nEnd
)
// Runs out
{
i
->
mnStart
=
nEnd
;
// Blanks?
while
(
i
->
mnStart
<
pNode
->
Len
()
&&
while
(
i
->
mnStart
<
(
size_t
)
pNode
->
Len
()
&&
(
pNode
->
GetChar
(
i
->
mnStart
)
==
' '
||
pNode
->
IsFeature
(
i
->
mnStart
)))
{
...
...
@@ -461,7 +457,7 @@ void WrongList::ClearWrongs( sal_Int32 nStart, sal_Int32 nEnd,
SAL_WARN_IF
(
DbgIsBuggy
(),
"editeng"
,
"ClearWrongs: WrongList broken!"
);
}
void
WrongList
::
InsertWrong
(
s
al_Int32
nStart
,
sal_Int32
nEnd
)
void
WrongList
::
InsertWrong
(
s
ize_t
nStart
,
size_t
nEnd
)
{
WrongList
::
iterator
nPos
=
end
();
for
(
WrongList
::
iterator
i
=
begin
();
i
!=
end
();
++
i
)
...
...
editeng/source/editeng/edtspell.hxx
Dosyayı görüntüle @
9705fbc1
...
...
@@ -70,11 +70,11 @@ public:
*/
class
WrongList
{
static
s
al_Int32
Valid
;
static
s
ize_t
Valid
;
std
::
vector
<
editeng
::
MisspellRange
>
maRanges
;
s
al_Int32
mnInvalidStart
;
s
al_Int32
mnInvalidEnd
;
s
ize_t
mnInvalidStart
;
s
ize_t
mnInvalidEnd
;
bool
DbgIsBuggy
()
const
;
...
...
@@ -91,20 +91,20 @@ public:
bool
IsValid
()
const
;
void
SetValid
();
void
SetInvalidRange
(
s
al_Int32
nStart
,
sal_Int32
nEnd
);
void
ResetInvalidRange
(
s
al_Int32
nStart
,
sal_Int32
nEnd
);
void
SetInvalidRange
(
s
ize_t
nStart
,
size_t
nEnd
);
void
ResetInvalidRange
(
s
ize_t
nStart
,
size_t
nEnd
);
s
al_Int32
GetInvalidStart
()
const
{
return
mnInvalidStart
;
}
s
al_Int32
GetInvalidEnd
()
const
{
return
mnInvalidEnd
;
}
s
ize_t
GetInvalidStart
()
const
{
return
mnInvalidStart
;
}
s
ize_t
GetInvalidEnd
()
const
{
return
mnInvalidEnd
;
}
void
TextInserted
(
s
al_Int32
nPos
,
sal_Int32
nLength
,
bool
bPosIsSep
);
void
TextDeleted
(
s
al_Int32
nPos
,
sal_Int32
nLength
);
void
TextInserted
(
s
ize_t
nPos
,
size_t
nLength
,
bool
bPosIsSep
);
void
TextDeleted
(
s
ize_t
nPos
,
size_t
nLength
);
void
InsertWrong
(
s
al_Int32
nStart
,
sal_Int32
nEnd
);
bool
NextWrong
(
s
al_Int32
&
rnStart
,
sal_Int32
&
rnEnd
)
const
;
bool
HasWrong
(
s
al_Int32
nStart
,
sal_Int32
nEnd
)
const
;
bool
HasAnyWrong
(
s
al_Int32
nStart
,
sal_Int32
nEnd
)
const
;
void
ClearWrongs
(
s
al_Int32
nStart
,
sal_Int32
nEnd
,
const
ContentNode
*
pNode
);
void
InsertWrong
(
s
ize_t
nStart
,
size_t
nEnd
);
bool
NextWrong
(
s
ize_t
&
rnStart
,
size_t
&
rnEnd
)
const
;
bool
HasWrong
(
s
ize_t
nStart
,
size_t
nEnd
)
const
;
bool
HasAnyWrong
(
s
ize_t
nStart
,
size_t
nEnd
)
const
;
void
ClearWrongs
(
s
ize_t
nStart
,
size_t
nEnd
,
const
ContentNode
*
pNode
);
void
MarkWrongsInvalid
();
WrongList
*
Clone
()
const
;
...
...
editeng/source/editeng/impedit3.cxx
Dosyayı görüntüle @
9705fbc1
...
...
@@ -156,8 +156,8 @@ static void lcl_DrawRedLines(
OutputDevice
*
pOutDev
,
long
nFontHeight
,
const
Point
&
rPnt
,
s
al_Int32
nIndex
,
s
al_Int32
nMaxEnd
,
s
ize_t
nIndex
,
s
ize_t
nMaxEnd
,
const
sal_Int32
*
pDXArray
,
WrongList
*
pWrongs
,
short
nOrientation
,
...
...
@@ -177,7 +177,7 @@ static void lcl_DrawRedLines(
else
nStyle
=
WAVE_FLAT
;
s
al_Int32
nEnd
,
nStart
=
nIndex
;
s
ize_t
nEnd
,
nStart
=
nIndex
;
bool
bWrong
=
pWrongs
->
NextWrong
(
nStart
,
nEnd
);
while
(
bWrong
)
{
...
...
@@ -3241,9 +3241,9 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
if
(
pWrongs
&&
!
pWrongs
->
empty
())
{
s
al_Int32
nStart
=
nIndex
,
nEnd
=
0
;
s
ize_t
nStart
=
nIndex
,
nEnd
=
0
;
bool
bWrong
=
pWrongs
->
NextWrong
(
nStart
,
nEnd
);
const
s
al_Int32
nMaxEnd
(
nIndex
+
pTextPortion
->
GetLen
());
const
s
ize_t
nMaxEnd
(
nIndex
+
pTextPortion
->
GetLen
());
while
(
bWrong
)
{
...
...
@@ -3252,7 +3252,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
break
;
}
if
(
nStart
<
nIndex
)
if
(
nStart
<
(
size_t
)
nIndex
)
{
nStart
=
nIndex
;
}
...
...
@@ -3476,7 +3476,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
}
Color
aOldColor
(
pOutDev
->
GetLineColor
()
);
pOutDev
->
SetLineColor
(
Color
(
GetColorConfig
().
GetColorValue
(
svtools
::
SPELL
).
nColor
)
);
lcl_DrawRedLines
(
pOutDev
,
aTmpFont
.
GetSize
().
Height
(),
aRedLineTmpPos
,
nIndex
,
nIndex
+
pTextPortion
->
GetLen
(),
pDXArray
,
pPortion
->
GetNode
()
->
GetWrongList
(),
nOrientation
,
aOrigin
,
IsVertical
(),
pTextPortion
->
IsRightToLeft
()
);
lcl_DrawRedLines
(
pOutDev
,
aTmpFont
.
GetSize
().
Height
(),
aRedLineTmpPos
,
(
size_t
)
nIndex
,
(
size_t
)
nIndex
+
pTextPortion
->
GetLen
(),
pDXArray
,
pPortion
->
GetNode
()
->
GetWrongList
(),
nOrientation
,
aOrigin
,
IsVertical
(),
pTextPortion
->
IsRightToLeft
()
);
pOutDev
->
SetLineColor
(
aOldColor
);
}
}
...
...
editeng/source/editeng/misspellrange.cxx
Dosyayı görüntüle @
9705fbc1
...
...
@@ -12,7 +12,7 @@
namespace
editeng
{
MisspellRange
::
MisspellRange
()
:
mnStart
(
0
),
mnEnd
(
0
)
{}
MisspellRange
::
MisspellRange
(
s
al_Int32
nStart
,
sal_Int32
nEnd
)
:
mnStart
(
nStart
),
mnEnd
(
nEnd
)
{}
MisspellRange
::
MisspellRange
(
s
ize_t
nStart
,
size_t
nEnd
)
:
mnStart
(
nStart
),
mnEnd
(
nEnd
)
{}
MisspellRanges
::
MisspellRanges
(
sal_Int32
nParagraph
,
const
std
::
vector
<
MisspellRange
>&
rRanges
)
:
mnParagraph
(
nParagraph
),
maRanges
(
rRanges
)
{}
...
...
include/editeng/misspellrange.hxx
Dosyayı görüntüle @
9705fbc1
...
...
@@ -18,11 +18,11 @@ namespace editeng {
struct
EDITENG_DLLPUBLIC
MisspellRange
{
s
al_Int32
mnStart
;
s
al_Int32
mnEnd
;
s
ize_t
mnStart
;
s
ize_t
mnEnd
;
MisspellRange
();
MisspellRange
(
s
al_Int32
nStart
,
sal_Int32
nEnd
);
MisspellRange
(
s
ize_t
nStart
,
size_t
nEnd
);
};
struct
EDITENG_DLLPUBLIC
MisspellRanges
...
...
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