diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-23 16:08:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-23 16:08:19 +0100 |
commit | 11b684d3f5148ec532987b00ce01843a3287444d (patch) | |
tree | 679fd747b8376f17956703667a8425461c903cba /sw | |
parent | 502dde2118cf840e691595614b15f26c3b5b509b (diff) |
loplugin:loopvartoosmall
Change-Id: I21e54bf70108991b7ca7f96232e6d9411af23ff9
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/acmplwrd.hxx | 9 | ||||
-rw-r--r-- | sw/source/core/doc/acmplwrd.cxx | 8 |
2 files changed, 11 insertions, 6 deletions
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 = |