Kaydet (Commit) d1932bfb authored tarafından Philipp Weissenbacher's avatar Philipp Weissenbacher Kaydeden (comit) Norbert Thiebaud

Translate German comments

üst 9764427b
...@@ -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 nicht gefunden" ); OSL_ENSURE( USHRT_MAX != nInsPos, "String not 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 nicht gefunden" ); OSL_ENSURE( USHRT_MAX != nPos, "String not 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 nicht gefunden" ); OSL_ENSURE( USHRT_MAX != nDelPos, "String not 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 nicht gefunden" ); OSL_ENSURE( USHRT_MAX != nPos, "String not 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 nicht gefunden" ); OSL_ENSURE( USHRT_MAX != nPos, "String not 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 );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment