summaryrefslogtreecommitdiffstats
path: root/sw/inc/acmplwrd.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-07-25 12:07:33 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-25 14:13:46 +0200
commit0031210b26bfae38be4243f9c92d90fa213b9eb0 (patch)
tree13fd775310b614741146d0ad9673044ac947f8d1 /sw/inc/acmplwrd.hxx
parenttblrwcl.cxx: convert 2 sorted_vectors to 1 map (diff)
downloadcore-0031210b26bfae38be4243f9c92d90fa213b9eb0.tar.gz
core-0031210b26bfae38be4243f9c92d90fa213b9eb0.zip
autocomplete: replace horrible use of SvStringsISortDtor...
... to store not Strings but derived SwAutoCompleteStrings with something far saner: an abstract base class with virtual dtor. Change-Id: I7d966f385dd41154ee1c4cdb43b56ff1aace9b5e
Diffstat (limited to 'sw/inc/acmplwrd.hxx')
-rw-r--r--sw/inc/acmplwrd.hxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
index 34d9abca1f46..46281699f697 100644
--- a/sw/inc/acmplwrd.hxx
+++ b/sw/inc/acmplwrd.hxx
@@ -25,10 +25,13 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _ACMPLWRD_HXX
-#define _ACMPLWRD_HXX
-#include <svl/svstdarr.hxx>
+#ifndef SW_ACMPLWRD_HXX
+#define SW_ACMPLWRD_HXX
+
+#include <deque>
+
+#include <editeng/swafopt.hxx>
class SwDoc;
class SwAutoCompleteWord_Impl;
@@ -41,7 +44,8 @@ class SwAutoCompleteWord
{
friend class SwAutoCompleteClient;
- SvStringsISortDtor aWordLst; // contains extended strings carrying source information
+ /// contains extended strings carrying source information
+ editeng::SortedAutoCompleteStrings m_WordList;
SwAutoCompleteStringPtrDeque aLRULst;
SwAutoCompleteWord_Impl* pImpl;
@@ -57,7 +61,8 @@ public:
sal_Bool GetRange( const String& rWord, sal_uInt16& rStt, sal_uInt16& rEnd ) const;
- const String& operator[]( sal_uInt16 n ) const { return *aWordLst[ n ]; }
+ const String& operator[](size_t n) const
+ { return m_WordList[n]->GetAutoCompleteString(); }
bool IsLockWordLstLocked() const { return bLockWordLst; }
void SetLockWordLstLocked( bool bFlag ) { bLockWordLst = bFlag; }
@@ -67,8 +72,9 @@ public:
sal_uInt16 GetMinWordLen() const { return nMinWrdLen; }
void SetMinWordLen( sal_uInt16 n );
- const SvStringsISortDtor& GetWordList() const { return aWordLst; }
- void CheckChangedList( const SvStringsISortDtor& rNewLst );
+ const editeng::SortedAutoCompleteStrings& GetWordList() const
+ { return m_WordList; }
+ void CheckChangedList(const editeng::SortedAutoCompleteStrings& rNewLst);
};