diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-09-09 23:35:25 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-13 11:30:48 +0000 |
commit | 3e55e00662b50b02c289ca4a1d94d4306bd8c86b (patch) | |
tree | 8d8f33abc07e0f78bfcd8e291e81fcc307918912 /fpicker | |
parent | 06bdd144eaf504b87cc918c4debf76bdeadea735 (diff) |
String to OUString
This removes nearly all ToLowerAscii() calls.
Conflicts:
linguistic/source/convdic.cxx
linguistic/source/convdiclist.cxx
linguistic/source/dlistimp.cxx
sc/source/filter/html/htmlexp.cxx
Change-Id: Iddcaacfb7383e1df3d2f13751a3c788eba953fdd
Reviewed-on: https://gerrit.libreoffice.org/5895
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 16 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.hxx | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index d2f18376f510..51ce476fa017 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -3275,12 +3275,12 @@ void SvtFileDialog::appendDefaultExtension(String& _rFileName, const String& _rFilterDefaultExtension, const String& _rFilterExtensions) { - String aTemp(_rFileName); - aTemp.ToLowerAscii(); - String aType(_rFilterExtensions); - aType.ToLowerAscii(); + OUString aTemp(_rFileName); + aTemp = aTemp.toAsciiLowerCase(); + OUString aType(_rFilterExtensions); + aType = aType.toAsciiLowerCase(); - if ( ! aType.EqualsAscii(FILEDIALOG_FILTER_ALL) ) + if ( ! aType.equals(FILEDIALOG_FILTER_ALL) ) { sal_uInt16 nWildCard = comphelper::string::getTokenCount(aType, FILEDIALOG_DEF_EXTSEP); sal_uInt16 nIndex; @@ -3288,14 +3288,14 @@ void SvtFileDialog::appendDefaultExtension(String& _rFileName, for ( nIndex = 0; nIndex < nWildCard; nIndex++ ) { - OUString aExt(aType.GetToken( 0, FILEDIALOG_DEF_EXTSEP, nPos )); + OUString aExt(aType.getToken( 0, FILEDIALOG_DEF_EXTSEP, nPos )); // take care of a leading * sal_Int32 nExtOffset = (aExt[0] == '*' ? 1 : 0); const sal_Unicode* pExt = aExt.getStr() + nExtOffset; sal_Int32 nExtLen = aExt.getLength() - nExtOffset; - sal_Int32 nOffset = aTemp.Len() - nExtLen; + sal_Int32 nOffset = aTemp.getLength() - nExtLen; // minimize search by starting at last possible index - if ( aTemp.Search(pExt, nOffset) == nOffset ) + if ( aTemp.indexOf(pExt, nOffset) == nOffset ) break; } diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index 2d8a195434a8..5456fcedc70b 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -98,7 +98,7 @@ SvtFileDialogFilter_Impl::SvtFileDialogFilter_Impl( const String& rName, const S { DBG_CTOR( SvtFileDialogFilter_Impl, NULL ); - m_aType.ToLowerAscii(); + m_aType = m_aType.toAsciiLowerCase(); } //***************************************************************************** diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx index 862160c18209..772624887248 100644 --- a/fpicker/source/office/iodlgimp.hxx +++ b/fpicker/source/office/iodlgimp.hxx @@ -50,17 +50,17 @@ class SvtFileDialogFilter_Impl { private: String m_aName; // name of the entry - String m_aType; // filter wildcard - if empty, the entry marks a group + OUString m_aType; // filter wildcard - if empty, the entry marks a group public: SvtFileDialogFilter_Impl( const String& rName, const String& rType ); ~SvtFileDialogFilter_Impl(); const String& GetName() const { return m_aName; } - const String& GetType() const { return m_aType; } - const String GetExtension() const { return m_aType.Copy( 2 ); } + const OUString& GetType() const { return m_aType; } + const String GetExtension() const { return m_aType.copy( 2 ); } - sal_Bool isGroupSeparator() const { return 0 == m_aType.Len(); } + sal_Bool isGroupSeparator() const { return m_aType.isEmpty(); } }; typedef boost::ptr_deque<SvtFileDialogFilter_Impl> SvtFileDialogFilterList_Impl; |