[Libreoffice-commits] core.git: sw/inc sw/source
Stephan Bergmann
sbergman at redhat.com
Thu Mar 23 15:08:46 UTC 2017
sw/inc/acmplwrd.hxx | 9 ++++++---
sw/source/core/doc/acmplwrd.cxx | 8 +++++---
2 files changed, 11 insertions(+), 6 deletions(-)
New commits:
commit 11b684d3f5148ec532987b00ce01843a3287444d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Mar 23 16:08:19 2017 +0100
loplugin:loopvartoosmall
Change-Id: I21e54bf70108991b7ca7f96232e6d9411af23ff9
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
index e49934869ee2..1ee336277495 100644
--- a/sw/inc/acmplwrd.hxx
+++ b/sw/inc/acmplwrd.hxx
@@ -44,12 +44,15 @@ class SwAutoCompleteWord
SwAutoCompleteStringPtrDeque aLRULst;
std::unique_ptr<SwAutoCompleteWord_Impl> pImpl;
- sal_uInt16 nMaxCount, nMinWrdLen;
+ editeng::SortedAutoCompleteStrings::size_type nMaxCount;
+ sal_uInt16 nMinWrdLen;
bool bLockWordLst;
void DocumentDying(const SwDoc& rDoc);
public:
- SwAutoCompleteWord( sal_uInt16 nWords, sal_uInt16 nMWrdLen = 10 );
+ SwAutoCompleteWord(
+ editeng::SortedAutoCompleteStrings::size_type nWords,
+ sal_uInt16 nMWrdLen = 10 );
~SwAutoCompleteWord();
bool InsertWord( const OUString& rWord, SwDoc& rDoc );
@@ -57,7 +60,7 @@ public:
bool IsLockWordLstLocked() const { return bLockWordLst; }
void SetLockWordLstLocked( bool bFlag ) { bLockWordLst = bFlag; }
- void SetMaxCount( sal_uInt16 n );
+ void SetMaxCount( editeng::SortedAutoCompleteStrings::size_type n );
sal_uInt16 GetMinWordLen() const { return nMinWrdLen; }
void SetMinWordLen( sal_uInt16 n );
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 43a7610e0d34..7ac1331cb888 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -218,7 +218,8 @@ bool SwAutoCompleteString::RemoveDocument(const SwDoc& rDoc)
return false;
}
-SwAutoCompleteWord::SwAutoCompleteWord( sal_uInt16 nWords, sal_uInt16 nMWrdLen ) :
+SwAutoCompleteWord::SwAutoCompleteWord(
+ editeng::SortedAutoCompleteStrings::size_type nWords, sal_uInt16 nMWrdLen ):
pImpl(new SwAutoCompleteWord_Impl(*this)),
nMaxCount( nWords ),
nMinWrdLen( nMWrdLen ),
@@ -302,12 +303,13 @@ bool SwAutoCompleteWord::InsertWord( const OUString& rWord, SwDoc& rDoc )
return bRet;
}
-void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
+void SwAutoCompleteWord::SetMaxCount(
+ editeng::SortedAutoCompleteStrings::size_type nNewMax )
{
if( nNewMax < nMaxCount && aLRULst.size() > nNewMax )
{
// remove the trailing ones
- sal_uInt16 nLRUIndex = nNewMax-1;
+ SwAutoCompleteStringPtrDeque::size_type nLRUIndex = nNewMax-1;
while (nNewMax < m_WordList.size() && nLRUIndex < aLRULst.size())
{
editeng::SortedAutoCompleteStrings::const_iterator it =
More information about the Libreoffice-commits
mailing list