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
d1932bfb
Kaydet (Commit)
d1932bfb
authored
Eki 28, 2011
tarafından
Philipp Weissenbacher
Kaydeden (comit)
Norbert Thiebaud
Eki 28, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Translate German comments
üst
9764427b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
acmplwrd.cxx
sw/source/core/doc/acmplwrd.cxx
+14
-18
No files found.
sw/source/core/doc/acmplwrd.cxx
Dosyayı görüntüle @
d1932bfb
...
@@ -288,8 +288,8 @@ sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
...
@@ -288,8 +288,8 @@ sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
aLRULst
.
Insert
(
pNew
,
0
);
aLRULst
.
Insert
(
pNew
,
0
);
else
else
{
{
//
der letzte muss entfernt werden
//
the last one needs to be removed
//
damit der neue vorne Platz hat
//
so that there is space for the first one
String
*
pDel
=
(
String
*
)
aLRULst
[
nMaxCount
-
1
];
String
*
pDel
=
(
String
*
)
aLRULst
[
nMaxCount
-
1
];
void
**
ppData
=
(
void
**
)
aLRULst
.
GetData
();
void
**
ppData
=
(
void
**
)
aLRULst
.
GetData
();
...
@@ -303,15 +303,15 @@ sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
...
@@ -303,15 +303,15 @@ sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
else
else
{
{
delete
(
SwAutoCompleteString
*
)
pNew
;
delete
(
SwAutoCompleteString
*
)
pNew
;
//
dann aber auf jedenfall nach "oben" moven
//
then move "up"
pNew
=
aWordLst
[
nInsPos
];
pNew
=
aWordLst
[
nInsPos
];
//add the document to the already inserted string
//
add the document to the already inserted string
SwAutoCompleteString
*
pCurrent
=
(
SwAutoCompleteString
*
)
pNew
;
SwAutoCompleteString
*
pCurrent
=
(
SwAutoCompleteString
*
)
pNew
;
pCurrent
->
AddDocument
(
rDoc
);
pCurrent
->
AddDocument
(
rDoc
);
nInsPos
=
aLRULst
.
GetPos
(
(
void
*
)
pNew
);
nInsPos
=
aLRULst
.
GetPos
(
(
void
*
)
pNew
);
OSL_ENSURE
(
USHRT_MAX
!=
nInsPos
,
"String n
icht gefunden
"
);
OSL_ENSURE
(
USHRT_MAX
!=
nInsPos
,
"String n
ot found
"
);
if
(
nInsPos
)
if
(
nInsPos
)
{
{
void
**
ppData
=
(
void
**
)
aLRULst
.
GetData
();
void
**
ppData
=
(
void
**
)
aLRULst
.
GetData
();
...
@@ -327,12 +327,12 @@ void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
...
@@ -327,12 +327,12 @@ void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
{
{
if
(
nNewMax
<
nMaxCount
&&
aLRULst
.
Count
()
>
nNewMax
)
if
(
nNewMax
<
nMaxCount
&&
aLRULst
.
Count
()
>
nNewMax
)
{
{
//
dann die unten ueberhaengenden entfernen
//
remove the trailing ones
sal_uInt16
nLRUIndex
=
nNewMax
-
1
;
sal_uInt16
nLRUIndex
=
nNewMax
-
1
;
while
(
nNewMax
<
aWordLst
.
Count
()
&&
nLRUIndex
<
aLRULst
.
Count
())
while
(
nNewMax
<
aWordLst
.
Count
()
&&
nLRUIndex
<
aLRULst
.
Count
())
{
{
sal_uInt16
nPos
=
aWordLst
.
GetPos
(
(
String
*
)
aLRULst
[
nLRUIndex
++
]
);
sal_uInt16
nPos
=
aWordLst
.
GetPos
(
(
String
*
)
aLRULst
[
nLRUIndex
++
]
);
OSL_ENSURE
(
USHRT_MAX
!=
nPos
,
"String n
icht gefunden
"
);
OSL_ENSURE
(
USHRT_MAX
!=
nPos
,
"String n
ot found
"
);
void
*
pDel
=
aWordLst
[
nPos
];
void
*
pDel
=
aWordLst
[
nPos
];
aWordLst
.
Remove
(
nPos
);
aWordLst
.
Remove
(
nPos
);
delete
(
SwAutoCompleteString
*
)
pDel
;
delete
(
SwAutoCompleteString
*
)
pDel
;
...
@@ -344,11 +344,7 @@ void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
...
@@ -344,11 +344,7 @@ void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
void
SwAutoCompleteWord
::
SetMinWordLen
(
sal_uInt16
n
)
void
SwAutoCompleteWord
::
SetMinWordLen
(
sal_uInt16
n
)
{
{
// will man wirklich alle Worte, die kleiner als die neue Min Laenge
// Do you really want to remove all words that are less than the minWrdLen?
// sind entfernen?
// JP 02.02.99 - erstmal nicht.
// JP 11.03.99 - mal testhalber eingebaut
if
(
n
<
nMinWrdLen
)
if
(
n
<
nMinWrdLen
)
{
{
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aWordLst
.
Count
();
++
nPos
)
for
(
sal_uInt16
nPos
=
0
;
nPos
<
aWordLst
.
Count
();
++
nPos
)
...
@@ -358,7 +354,7 @@ void SwAutoCompleteWord::SetMinWordLen( sal_uInt16 n )
...
@@ -358,7 +354,7 @@ void SwAutoCompleteWord::SetMinWordLen( sal_uInt16 n )
aWordLst
.
Remove
(
nPos
);
aWordLst
.
Remove
(
nPos
);
sal_uInt16
nDelPos
=
aLRULst
.
GetPos
(
pDel
);
sal_uInt16
nDelPos
=
aLRULst
.
GetPos
(
pDel
);
OSL_ENSURE
(
USHRT_MAX
!=
nDelPos
,
"String n
icht gefunden
"
);
OSL_ENSURE
(
USHRT_MAX
!=
nDelPos
,
"String n
ot found
"
);
aLRULst
.
Remove
(
nDelPos
);
aLRULst
.
Remove
(
nDelPos
);
--
nPos
;
--
nPos
;
delete
(
SwAutoCompleteString
*
)
pDel
;
delete
(
SwAutoCompleteString
*
)
pDel
;
...
@@ -396,26 +392,26 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
...
@@ -396,26 +392,26 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
aWordLst
.
Remove
(
nMyPos
);
aWordLst
.
Remove
(
nMyPos
);
sal_uInt16
nPos
=
aLRULst
.
GetPos
(
pDel
);
sal_uInt16
nPos
=
aLRULst
.
GetPos
(
pDel
);
OSL_ENSURE
(
USHRT_MAX
!=
nPos
,
"String n
icht gefunden
"
);
OSL_ENSURE
(
USHRT_MAX
!=
nPos
,
"String n
ot found
"
);
aLRULst
.
Remove
(
nPos
);
aLRULst
.
Remove
(
nPos
);
delete
(
SwAutoCompleteString
*
)
pDel
;
delete
(
SwAutoCompleteString
*
)
pDel
;
if
(
nMyPos
>=
--
nMyLen
)
if
(
nMyPos
>=
--
nMyLen
)
break
;
break
;
}
}
}
}
//remove the elements at the end of the array
//
remove the elements at the end of the array
if
(
nMyPos
<
nMyLen
)
if
(
nMyPos
<
nMyLen
)
{
{
//clear LRU array first then delete the string object
//
clear LRU array first then delete the string object
for
(
;
nNewPos
<
nMyLen
;
++
nNewPos
)
for
(
;
nNewPos
<
nMyLen
;
++
nNewPos
)
{
{
void
*
pDel
=
aWordLst
[
nNewPos
];
void
*
pDel
=
aWordLst
[
nNewPos
];
sal_uInt16
nPos
=
aLRULst
.
GetPos
(
pDel
);
sal_uInt16
nPos
=
aLRULst
.
GetPos
(
pDel
);
OSL_ENSURE
(
USHRT_MAX
!=
nPos
,
"String n
icht gefunden
"
);
OSL_ENSURE
(
USHRT_MAX
!=
nPos
,
"String n
ot found
"
);
aLRULst
.
Remove
(
nPos
);
aLRULst
.
Remove
(
nPos
);
delete
(
SwAutoCompleteString
*
)
pDel
;
delete
(
SwAutoCompleteString
*
)
pDel
;
}
}
//remove from array
//
remove from array
aWordLst
.
Remove
(
nMyPos
,
nMyLen
-
nMyPos
);
aWordLst
.
Remove
(
nMyPos
,
nMyLen
-
nMyPos
);
}
}
}
}
...
...
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