[Libreoffice-commits] .: sw/source
Norbert Thiebaud
nthiebaud at kemper.freedesktop.org
Thu Oct 27 18:18:47 PDT 2011
sw/source/core/doc/acmplwrd.cxx | 32 ++++++++++++++------------------
1 file changed, 14 insertions(+), 18 deletions(-)
New commits:
commit d1932bfb76fc6bafa94fd56ddf5ac74a28f62fb2
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date: Fri Oct 28 02:23:02 2011 +0200
Translate German comments
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 4dc51b1..3e9bc8d 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -288,8 +288,8 @@ sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
aLRULst.Insert( pNew, 0 );
else
{
- // der letzte muss entfernt werden
- // damit der neue vorne Platz hat
+ // the last one needs to be removed
+ // so that there is space for the first one
String* pDel = (String*)aLRULst[ nMaxCount - 1 ];
void** ppData = (void**)aLRULst.GetData();
@@ -303,15 +303,15 @@ sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
else
{
delete (SwAutoCompleteString*)pNew;
- // dann aber auf jedenfall nach "oben" moven
+ // then move "up"
pNew = aWordLst[ nInsPos ];
- //add the document to the already inserted string
+ // add the document to the already inserted string
SwAutoCompleteString* pCurrent = (SwAutoCompleteString*)pNew;
pCurrent->AddDocument(rDoc);
nInsPos = aLRULst.GetPos( (void*)pNew );
- OSL_ENSURE( USHRT_MAX != nInsPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nInsPos, "String not found" );
if( nInsPos )
{
void** ppData = (void**)aLRULst.GetData();
@@ -327,12 +327,12 @@ void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
{
if( nNewMax < nMaxCount && aLRULst.Count() > nNewMax )
{
- // dann die unten ueberhaengenden entfernen
+ // remove the trailing ones
sal_uInt16 nLRUIndex = nNewMax-1;
while( nNewMax < aWordLst.Count() && nLRUIndex < aLRULst.Count())
{
sal_uInt16 nPos = aWordLst.GetPos( (String*)aLRULst[ nLRUIndex++ ] );
- OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nPos, "String not found" );
void * pDel = aWordLst[nPos];
aWordLst.Remove(nPos);
delete (SwAutoCompleteString*)pDel;
@@ -344,11 +344,7 @@ void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
void SwAutoCompleteWord::SetMinWordLen( sal_uInt16 n )
{
- // will man wirklich alle Worte, die kleiner als die neue Min Laenge
- // sind entfernen?
- // JP 02.02.99 - erstmal nicht.
-
- // JP 11.03.99 - mal testhalber eingebaut
+ // Do you really want to remove all words that are less than the minWrdLen?
if( n < nMinWrdLen )
{
for( sal_uInt16 nPos = 0; nPos < aWordLst.Count(); ++nPos )
@@ -358,7 +354,7 @@ void SwAutoCompleteWord::SetMinWordLen( sal_uInt16 n )
aWordLst.Remove(nPos);
sal_uInt16 nDelPos = aLRULst.GetPos( pDel );
- OSL_ENSURE( USHRT_MAX != nDelPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nDelPos, "String not found" );
aLRULst.Remove( nDelPos );
--nPos;
delete (SwAutoCompleteString*)pDel;
@@ -396,26 +392,26 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
aWordLst.Remove(nMyPos);
sal_uInt16 nPos = aLRULst.GetPos( pDel );
- OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nPos, "String not found" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
if( nMyPos >= --nMyLen )
break;
}
}
- //remove the elements at the end of the array
+ // remove the elements at the end of the array
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 )
{
void* pDel = aWordLst[ nNewPos ];
sal_uInt16 nPos = aLRULst.GetPos( pDel );
- OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
+ OSL_ENSURE( USHRT_MAX != nPos, "String not found" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
}
- //remove from array
+ // remove from array
aWordLst.Remove( nMyPos, nMyLen - nMyPos );
}
}
More information about the Libreoffice-commits
mailing list