summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-23 07:19:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-25 19:24:23 +0200
commit98de5b40c8a3fd4e57477b6d994e3b1472207f71 (patch)
tree567fdbbaecbddbfc19f28a08da5d1f6d5207748c /dbaccess
parent0552a91acde9dce28c0d92c552d21fbadfcb9184 (diff)
Related: fdo#38838 remove UniString::EqualsIgnoreCaseAscii
Change-Id: Ib5c3a2daa4a48bc286b14fa2cebb3306ea0012bc
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx10
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.hxx14
-rw-r--r--dbaccess/source/ui/inc/GeneralUndo.hxx1
-rw-r--r--dbaccess/source/ui/inc/TableWindowListBox.hxx2
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx8
-rw-r--r--dbaccess/source/ui/misc/charsets.cxx2
-rw-r--r--dbaccess/source/ui/misc/singledoccontroller.cxx1
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx20
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx4
10 files changed, 33 insertions, 31 deletions
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 38d513fcd07f..3037e5e01af2 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -94,12 +94,12 @@ sal_Bool ODbaseIndexDialog::GetTable(const String& _rName, TableInfoListIterator
{
if (m_bCaseSensitiv)
{
- if (_rPosition->aTableName.Equals(_rName))
+ if (_rPosition->aTableName.equals(_rName))
return sal_True;
}
else
{
- if (_rPosition->aTableName.EqualsIgnoreCaseAscii(_rName))
+ if (_rPosition->aTableName.equalsIgnoreAsciiCase(_rName))
return sal_True;
}
}
@@ -127,7 +127,7 @@ OTableIndex ODbaseIndexDialog::implRemoveIndex(const String& _rName, TableIndexL
++aSearch, ++nPos
)
{
- if ( m_bCaseSensitiv ? aSearch->GetIndexFileName().Equals(_rName) : aSearch->GetIndexFileName().EqualsIgnoreCaseAscii(_rName) )
+ if ( m_bCaseSensitiv ? aSearch->GetIndexFileName().equals(_rName) : aSearch->GetIndexFileName().equalsIgnoreAsciiCase(_rName) )
{
aReturn = *aSearch;
@@ -425,12 +425,12 @@ void ODbaseIndexDialog::SetCtrls()
checkButtons();
}
-void OTableInfo::WriteInfFile( const String& rDSN ) const
+void OTableInfo::WriteInfFile( const OUString& rDSN ) const
{
// open INF file
INetURLObject aURL;
aURL.SetSmartProtocol(INET_PROT_FILE);
- String aDsn = rDSN;
+ OUString aDsn = rDSN;
{
SvtPathOptions aPathOptions;
aDsn = aPathOptions.SubstituteVariable(aDsn);
diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx
index 2ee8a043485c..c9cf1f40854c 100644
--- a/dbaccess/source/ui/dlg/dbfindex.hxx
+++ b/dbaccess/source/ui/dlg/dbfindex.hxx
@@ -36,15 +36,15 @@ namespace dbaui
class OTableIndex
{
private:
- String aIndexFileName;
+ OUString aIndexFileName;
public:
OTableIndex() { }
OTableIndex( const OTableIndex& _rSource) : aIndexFileName(_rSource.aIndexFileName) { }
- OTableIndex( const String& rFileName ) : aIndexFileName( rFileName ) { }
+ OTableIndex( const OUString& rFileName ) : aIndexFileName( rFileName ) { }
- void SetIndexFileName( const String& rFileName ) { aIndexFileName = rFileName; }
- String GetIndexFileName() const { return aIndexFileName; }
+ void SetIndexFileName( const OUString& rFileName ) { aIndexFileName = rFileName; }
+ OUString GetIndexFileName() const { return aIndexFileName; }
};
typedef ::std::list< OTableIndex > TableIndexList;
@@ -58,14 +58,14 @@ class OTableInfo
{
friend class ODbaseIndexDialog;
private:
- String aTableName;
+ OUString aTableName;
TableIndexList aIndexList;
public:
OTableInfo() { }
- OTableInfo( const String& rName ) : aTableName(rName) { }
+ OTableInfo( const OUString& rName ) : aTableName(rName) { }
- void WriteInfFile( const String& rDSN ) const;
+ void WriteInfFile( const OUString& rDSN ) const;
};
typedef ::std::list< OTableInfo > TableInfoList;
diff --git a/dbaccess/source/ui/inc/GeneralUndo.hxx b/dbaccess/source/ui/inc/GeneralUndo.hxx
index 51d83a05d60e..6a833b29f7a0 100644
--- a/dbaccess/source/ui/inc/GeneralUndo.hxx
+++ b/dbaccess/source/ui/inc/GeneralUndo.hxx
@@ -20,6 +20,7 @@
#define DBAUI_GENERALUNDO_HXX
#include <svl/undo.hxx>
+#include <tools/string.hxx>
#include "moduledbu.hxx"
namespace dbaui
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx
index a33f4fd33981..16c415601baa 100644
--- a/dbaccess/source/ui/inc/TableWindowListBox.hxx
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -88,7 +88,7 @@ namespace dbaui
virtual void Command(const CommandEvent& rEvt);
OTableWindow* GetTabWin(){ return m_pTabWin; }
- SvTreeListEntry* GetEntryFromText( const String& rEntryText );
+ SvTreeListEntry* GetEntryFromText( const OUString& rEntryText );
private:
using SvTreeListBox::ExecuteDrop;
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 63a6fca44189..d3439342d398 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -329,12 +329,12 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
{
case HTML_O_ALIGN:
{
- const String& rOptVal = rOption.GetString();
- if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right ))
+ const OUString& rOptVal = rOption.GetString();
+ if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_right ))
eVal = SVX_HOR_JUSTIFY_RIGHT;
- else if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_center ))
+ else if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_center ))
eVal = SVX_HOR_JUSTIFY_CENTER;
- else if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_left ))
+ else if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_left ))
eVal = SVX_HOR_JUSTIFY_LEFT;
else
eVal = SVX_HOR_JUSTIFY_STANDARD;
diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx
index 4df0a3562b11..593c6fb0f5a5 100644
--- a/dbaccess/source/ui/misc/charsets.cxx
+++ b/dbaccess/source/ui/misc/charsets.cxx
@@ -35,7 +35,7 @@ namespace dbaui
{
{
LocalResourceAccess aCharsetStrings( RSC_CHARSETS, RSC_RESOURCE );
- m_aSystemDisplayName = String( ModuleRes( 1 ) );
+ m_aSystemDisplayName = ModuleRes( 1 ).toString();
}
}
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index 303efe032af1..d3058b90c4f8 100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -25,6 +25,7 @@
#include "moduledbu.hxx"
#include <svl/undo.hxx>
+#include <tools/string.hxx>
#include <osl/diagnose.h>
#include <boost/scoped_ptr.hpp>
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 652a4c3437d9..6f4d85402ca9 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -572,7 +572,7 @@ void OSelectionBrowseBox::clearEntryFunctionField(const String& _sFieldName,OTab
{
if ( isFieldNameAsterix( _sFieldName ) && (!_pEntry->isNoneFunction() || _pEntry->IsGroupBy()) )
{
- String sFunctionName;
+ OUString sFunctionName;
GetFunctionName(SQL_TOKEN_COUNT,sFunctionName);
String sOldLocalizedFunctionName = _pEntry->GetFunction();
if ( !sOldLocalizedFunctionName.Equals(sFunctionName) || _pEntry->IsGroupBy() )
@@ -800,7 +800,7 @@ sal_Bool OSelectionBrowseBox::saveField(String& _sFieldName ,OTableFieldDescRef&
// do we have a aggregate function and only a function?
else if ( SQL_ISRULE(pColumnRef,general_set_fct) )
{
- String sLocalizedFunctionName;
+ OUString sLocalizedFunctionName;
if ( GetFunctionName(pColumnRef->getChild(0)->getTokenID(),sLocalizedFunctionName) )
{
String sOldLocalizedFunctionName = aSelEntry->GetFunction();
@@ -1052,9 +1052,9 @@ sal_Bool OSelectionBrowseBox::SaveModified()
sal_uInt16 nPos = m_pFunctionCell->GetSelectEntryPos();
// these functions are only available in CORE
String sFunctionName = m_pFunctionCell->GetEntry(nPos);
- String sGroupFunctionName = m_aFunctionStrings.GetToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1);
+ OUString sGroupFunctionName = m_aFunctionStrings.GetToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1);
sal_Bool bGroupBy = sal_False;
- if ( sGroupFunctionName.Equals(sFunctionName) ) // check if the function name is GROUP
+ if ( sGroupFunctionName.equals(sFunctionName) ) // check if the function name is GROUP
{
bGroupBy = sal_True;
@@ -1555,7 +1555,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n
if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) )
{
- String sFunctionName = pEntry->GetFunction();
+ OUString sFunctionName = pEntry->GetFunction();
if ( GetFunctionName(sal_uInt32(-1),sFunctionName) )
pEntry->SetFunction(sFunctionName);
}
@@ -2211,7 +2211,7 @@ OUString OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
return aText;
}
-sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId,String& rFkt)
+sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
sal_Bool bErg=sal_True;
@@ -2268,7 +2268,7 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId,Strin
xub_StrLen i;
for ( i = 0; i < nCount-1; i++) // grouping is not counted
{
- if(rFkt.EqualsIgnoreCaseAscii(m_aFunctionStrings.GetToken(i)))
+ if(rFkt.equalsIgnoreAsciiCase(m_aFunctionStrings.GetToken(i)))
{
rFkt = m_aFunctionStrings.GetToken(i);
break;
@@ -2340,16 +2340,16 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con
break;
case BROW_FUNCTION_ROW:
{
- String sGroupFunctionName = m_aFunctionStrings.GetToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1);
+ OUString sGroupFunctionName = m_aFunctionStrings.GetToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1);
pEntry->SetFunction(strNewText);
// first reset this two member
sal_Int32 nFunctionType = pEntry->GetFunctionType();
nFunctionType &= ~FKT_AGGREGATE;
pEntry->SetFunctionType(nFunctionType);
- if ( pEntry->IsGroupBy() && !sGroupFunctionName.EqualsIgnoreCaseAscii(strNewText) )
+ if ( pEntry->IsGroupBy() && !sGroupFunctionName.equalsIgnoreAsciiCase(strNewText) )
pEntry->SetGroupBy(sal_False);
- if ( sGroupFunctionName.EqualsIgnoreCaseAscii(strNewText) )
+ if ( sGroupFunctionName.equalsIgnoreAsciiCase(strNewText) )
pEntry->SetGroupBy(sal_True);
else if ( strNewText.Len() )
{
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index bce9fce6f13a..6cb5ad3cd582 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -226,7 +226,7 @@ namespace dbaui
Rectangle GetInvalidRect( sal_uInt16 nColId );
long GetRealRow(long nRow) const;
long GetBrowseRow(long nRowId) const;
- sal_Bool GetFunctionName(sal_uInt32 _nFunctionTokenId,String& rFkt);
+ sal_Bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt);
void appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow,sal_Bool& _bListAction);
void appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow);
OTableFields& getFields() const;
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index 6e718abe5015..5da7356a41f8 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -80,7 +80,7 @@ OTableWindowListBox::~OTableWindowListBox()
m_pTabWin = NULL;
}
-SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText )
+SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const OUString& rEntryText )
{
// iterate through the list
SvTreeList* pTreeList = GetModel();
@@ -100,7 +100,7 @@ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText
}
while( pEntry )
{
- if((bCase ? rEntryText == GetEntryText(pEntry) : rEntryText.EqualsIgnoreCaseAscii(GetEntryText(pEntry))))
+ if((bCase ? rEntryText == GetEntryText(pEntry) : rEntryText.equalsIgnoreAsciiCase(GetEntryText(pEntry))))
{
return pEntry;
}