summaryrefslogtreecommitdiffstats
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-22 16:58:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-22 20:32:02 +0100
commit81202ae7487b139cb473ff85634003b36d67e8c4 (patch)
tree5f204d5078b696b2f99aa360d3042a24b34a213b /sw/source/ui
parentgbuild: fix gb_LinkTarget_set_precompiled_header (diff)
downloadcore-81202ae7487b139cb473ff85634003b36d67e8c4.tar.gz
core-81202ae7487b139cb473ff85634003b36d67e8c4.zip
Related: fdo#38838 remove UniString::CompareIgnoreCaseToAscii
Change-Id: I4a9b34d63d2534a35aa9a878b8c2bec15262c2be
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/docvw/edtwin.cxx12
-rw-r--r--sw/source/ui/inc/gloslst.hxx2
-rw-r--r--sw/source/ui/uno/unoatxt.cxx8
-rw-r--r--sw/source/ui/utlui/gloslst.cxx4
4 files changed, 13 insertions, 13 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index a49e789ff35b..85f4c727d7c3 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -237,7 +237,7 @@ public:
struct QuickHelpData
{
/// Strings that at least partially match an input word.
- std::vector<String> m_aHelpStrings;
+ std::vector<OUString> m_aHelpStrings;
/// Index of the current help string.
sal_uInt16 nCurArrPos;
/// Length of the input word associated with the help data.
@@ -5796,17 +5796,17 @@ namespace {
struct CompareIgnoreCaseAscii
{
- bool operator()(const String& s1, const String& s2) const
+ bool operator()(const OUString& s1, const OUString& s2) const
{
- return s1.CompareIgnoreCaseToAscii(s2) == COMPARE_LESS;
+ return s1.compareToIgnoreAsciiCase(s2) < 0;
}
};
struct EqualIgnoreCaseAscii
{
- bool operator()(const String& s1, const String& s2) const
+ bool operator()(const OUString& s1, const OUString& s2) const
{
- return s1.CompareIgnoreCaseToAscii(s2) == COMPARE_EQUAL;
+ return s1.equalsIgnoreAsciiCase(s2);
}
};
@@ -5819,7 +5819,7 @@ void QuickHelpData::SortAndFilter()
m_aHelpStrings.end(),
CompareIgnoreCaseAscii() );
- std::vector<String>::iterator it = std::unique( m_aHelpStrings.begin(),
+ std::vector<OUString>::iterator it = std::unique( m_aHelpStrings.begin(),
m_aHelpStrings.end(),
EqualIgnoreCaseAscii() );
m_aHelpStrings.erase( it, m_aHelpStrings.end() );
diff --git a/sw/source/ui/inc/gloslst.hxx b/sw/source/ui/inc/gloslst.hxx
index aa9f6d4b585c..1c83e7d43fd1 100644
--- a/sw/source/ui/inc/gloslst.hxx
+++ b/sw/source/ui/inc/gloslst.hxx
@@ -56,7 +56,7 @@ public:
SwGlossaryList();
~SwGlossaryList();
- bool HasLongName(const String& rBegin, std::vector<String> *pLongNames);
+ bool HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames);
sal_Bool GetShortName(const String& rLongName,
String& rShortName, String& rGroupName );
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index 6ffb98318925..6210faf43c18 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -600,12 +600,12 @@ sal_Bool SwXAutoTextGroup::hasByName(const OUString& rName)
else
throw uno::RuntimeException();
- for( sal_uInt16 i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; ++i )
{
- String sCompare(pGlosGroup->GetShortName(i));
- if(COMPARE_EQUAL == sCompare.CompareIgnoreCaseToAscii(String(rName)))
+ OUString sCompare(pGlosGroup->GetShortName(i));
+ if(sCompare.equalsIgnoreAsciiCase(rName))
{
- bRet = sal_True;
+ bRet = true;
break;
}
}
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx
index 5308845ae2d2..37ef6eb9b87f 100644
--- a/sw/source/ui/utlui/gloslst.cxx
+++ b/sw/source/ui/utlui/gloslst.cxx
@@ -378,13 +378,13 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
// Give back all (not exceeding FIND_MAX_GLOS) found modules
// with matching beginning.
-bool SwGlossaryList::HasLongName(const String& rBegin, std::vector<String> *pLongNames)
+bool SwGlossaryList::HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames)
{
if(!bFilled)
Update();
sal_uInt16 nFound = 0;
sal_uInt16 nCount = aGroupArr.size();
- sal_uInt16 nBeginLen = rBegin.Len();
+ sal_Int32 nBeginLen = rBegin.getLength();
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
for(sal_uInt16 i = 0; i < nCount; i++ )