summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-05 11:51:31 +0200
committerNoel Grandin <noel@peralex.com>2013-09-11 09:45:28 +0200
commit74bea5b0ab6bcf0eaaa50c8f529f1ea2e96167cf (patch)
tree01783f0c71b633933ca7fe7cc1886af4e7cceace
parentremove dead forward declaration (diff)
downloadcore-74bea5b0ab6bcf0eaaa50c8f529f1ea2e96167cf.tar.gz
core-74bea5b0ab6bcf0eaaa50c8f529f1ea2e96167cf.zip
convert include/editeng/swafopt.hxx from String to OUString
Change-Id: Ic3686fb44cd1e448b9998f2ddc73f9bfd1b3aaa8
-rw-r--r--cui/source/tabpages/autocdlg.cxx4
-rw-r--r--include/editeng/swafopt.hxx10
-rw-r--r--sw/inc/acmplwrd.hxx2
-rw-r--r--sw/source/core/doc/acmplwrd.cxx2
4 files changed, 9 insertions, 9 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 014b88974f4b..24f3682194a0 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2202,7 +2202,7 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& )
nAutoCmpltListCnt = m_pAutoCompleteList->size();
for (size_t n = 0; n < nAutoCmpltListCnt; ++n)
{
- const String* pStr =
+ const OUString* pStr =
&(*m_pAutoCompleteList)[n]->GetAutoCompleteString();
sal_uInt16 nPos = aLBEntries.InsertEntry( *pStr );
aLBEntries.SetEntryData( nPos, (void*)pStr );
@@ -2230,7 +2230,7 @@ IMPL_LINK_NOARG(OfaAutoCompleteTabPage, DeleteHdl)
while( nSelCnt )
{
sal_uInt16 nPos = aLBEntries.GetSelectEntryPos( --nSelCnt );
- String* pStr = static_cast<String*>(aLBEntries.GetEntryData(nPos));
+ OUString* pStr = static_cast<OUString*>(aLBEntries.GetEntryData(nPos));
aLBEntries.RemoveEntry( nPos );
editeng::IAutoCompleteString hack(*pStr); // UGLY
m_pAutoCompleteList->erase(&hack);
diff --git a/include/editeng/swafopt.hxx b/include/editeng/swafopt.hxx
index 684a1838c731..74e2163ac544 100644
--- a/include/editeng/swafopt.hxx
+++ b/include/editeng/swafopt.hxx
@@ -34,11 +34,11 @@ namespace editeng {
class EDITENG_DLLPUBLIC IAutoCompleteString
{
private:
- String m_String;
+ OUString m_String;
public:
- explicit IAutoCompleteString(String const& rString) : m_String(rString) {}
+ explicit IAutoCompleteString(OUString const& rString) : m_String(rString) {}
virtual ~IAutoCompleteString() {}
- String const& GetAutoCompleteString() const { return m_String; }
+ OUString const& GetAutoCompleteString() const { return m_String; }
};
struct CompareAutoCompleteString
@@ -46,8 +46,8 @@ struct CompareAutoCompleteString
bool operator()(IAutoCompleteString *const& lhs,
IAutoCompleteString *const& rhs) const
{
- return lhs->GetAutoCompleteString().CompareIgnoreCaseToAscii(
- rhs->GetAutoCompleteString()) == COMPARE_LESS;
+ return lhs->GetAutoCompleteString().compareToIgnoreAsciiCase(
+ rhs->GetAutoCompleteString()) < 0;
}
};
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
index 7be3b3ffea33..c857727adfdd 100644
--- a/sw/inc/acmplwrd.hxx
+++ b/sw/inc/acmplwrd.hxx
@@ -52,7 +52,7 @@ public:
bool InsertWord( const String& rWord, SwDoc& rDoc );
- const String& operator[](size_t n) const
+ const OUString& operator[](size_t n) const
{ return m_WordList[n]->GetAutoCompleteString(); }
bool IsLockWordLstLocked() const { return bLockWordLst; }
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 9ec7606a1559..050b9f5116df 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -327,7 +327,7 @@ void SwAutoCompleteWord::SetMinWordLen( sal_uInt16 n )
if( n < nMinWrdLen )
{
for (size_t nPos = 0; nPos < m_WordList.size(); ++nPos)
- if (m_WordList[ nPos ]->GetAutoCompleteString().Len() < n)
+ if (m_WordList[ nPos ]->GetAutoCompleteString().getLength() < n)
{
SwAutoCompleteString *const pDel =
dynamic_cast<SwAutoCompleteString*>(m_WordList[nPos]);