summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx2
-rw-r--r--connectivity/source/drivers/ado/AColumns.cxx2
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx2
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx5
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx2
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx2
-rw-r--r--dbaccess/source/ui/inc/WColumnSelect.hxx6
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx4
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx10
-rw-r--r--include/comphelper/stl_types.hxx19
11 files changed, 20 insertions, 36 deletions
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index 2706f08d5ca0..1e6ab619f426 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -214,7 +214,7 @@ void OAdoColumn::fillPropertyValues()
m_TypeName = pTypeInfo->aSimpleType.aTypeName;
else if ( eType == adVarBinary && ADOS::isJetEngine(m_pConnection->getEngineType()) )
{
- ::comphelper::TStringMixEqualFunctor aCase(sal_False);
+ ::comphelper::UStringMixEqual aCase(sal_False);
OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(),
pTypeInfoMap->end(),
::o3tl::compose1(
diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx
index 1dad74a6959a..c7db779aa8cf 100644
--- a/connectivity/source/drivers/ado/AColumns.cxx
+++ b/connectivity/source/drivers/ado/AColumns.cxx
@@ -86,7 +86,7 @@ sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPro
pColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)) >>= sTypeName;
const OTypeInfoMap* pTypeInfoMap = m_pConnection->getTypeInfo();
- ::comphelper::TStringMixEqualFunctor aCase(sal_False);
+ ::comphelper::UStringMixEqual aCase(sal_False);
// search for typeinfo where the typename is equal sTypeName
OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(),
pTypeInfoMap->end(),
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 3c39006d413b..a32ad7126f79 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -596,7 +596,7 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r
}
else if ( _sTypeName.getLength() )
{
- ::comphelper::TStringMixEqualFunctor aCase(sal_False);
+ ::comphelper::UStringMixEqual aCase(sal_False);
// search for typeinfo where the typename is equal _sTypeName
OTypeInfoMap::const_iterator aFind = ::std::find_if(_rTypeInfo.begin(),
_rTypeInfo.end(),
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index a658e2d80332..9142e2f062d1 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -871,7 +871,6 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
}
const ::comphelper::UStringMixEqual aCaseCompare( bCase );
- const ::comphelper::TStringMixEqualFunctor aCaseCompareFunctor( bCase );
typedef ::std::set< size_t > SizeTSet;
SizeTSet aUsedSelectColumns;
::connectivity::parse::OParseColumn::StringMap aColumnNames;
@@ -947,12 +946,12 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
if ( sColumnName.isEmpty() )
xProp->getPropertyValue(PROPERTY_NAME) >>= sColumnName;
- aFindName = ::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompareFunctor,sColumnName));
+ aFindName = ::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompare,sColumnName));
sal_Int32 j = 0;
while ( aFindName != aNames.end() )
{
sColumnName += OUString::number(++j);
- aFindName = ::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompareFunctor,sColumnName));
+ aFindName = ::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompare,sColumnName));
}
pColumn->setName(sColumnName);
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 8b1185240403..57aae8390b0d 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -193,7 +193,7 @@ namespace
struct OViewSetter : public ::std::unary_function< OTableTreeListBox::TNames::value_type, bool>
{
const Sequence< OUString> m_aViews;
- ::comphelper::TStringMixEqualFunctor m_aEqualFunctor;
+ ::comphelper::UStringMixEqual m_aEqualFunctor;
OViewSetter(const Sequence< OUString>& _rViews,sal_Bool _bCase) : m_aViews(_rViews),m_aEqualFunctor(_bCase){}
OTableTreeListBox::TNames::value_type operator() (const OUString& lhs)
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 23cecb5a6d05..90674e9ff148 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -189,7 +189,7 @@ void TableListFacade::updateTableObjectList( bool _bAllowViews )
const OUString* pViewBegin = sViews.getConstArray();
const OUString* pViewEnd = pViewBegin + sViews.getLength();
- ::comphelper::TStringMixEqualFunctor aEqualFunctor;
+ ::comphelper::UStringMixEqual aEqualFunctor;
for(;pViewBegin != pViewEnd;++pViewBegin)
aTables.erase(::std::remove_if(aTables.begin(),aTables.end(),::std::bind2nd(aEqualFunctor,*pViewBegin)),aTables.end());
OUString* pTables = aTables.empty() ? 0 : &aTables[0];
diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx
index 6944c190a117..1f560146144a 100644
--- a/dbaccess/source/ui/inc/WColumnSelect.hxx
+++ b/dbaccess/source/ui/inc/WColumnSelect.hxx
@@ -57,7 +57,7 @@ namespace dbaui
const OUString& _sColumnName,
const OUString& _sExtraChars,
sal_Int32 _nMaxNameLen,
- const ::comphelper::TStringMixEqualFunctor& _aCase);
+ const ::comphelper::UStringMixEqual& _aCase);
void moveColumn( ListBox* _pRight,
ListBox* _pLeft,
@@ -65,14 +65,14 @@ namespace dbaui
const OUString& _sColumnName,
const OUString& _sExtraChars,
sal_Int32 _nMaxNameLen,
- const ::comphelper::TStringMixEqualFunctor& _aCase);
+ const ::comphelper::UStringMixEqual& _aCase);
void enableButtons();
sal_uInt16 adjustColumnPosition(ListBox* _pLeft,
const OUString& _sColumnName,
ODatabaseExport::TColumnVector::size_type nCurrentPos,
- const ::comphelper::TStringMixEqualFunctor& _aCase);
+ const ::comphelper::UStringMixEqual& _aCase);
public:
virtual void Reset ( );
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index ec5a91855be7..5ae5b46a3801 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -73,11 +73,11 @@ namespace dbaui
class TMultiListBoxEntryFindFunctor : public TColumnFindFunctor
{
- ::comphelper::TStringMixEqualFunctor m_aCase;
+ ::comphelper::UStringMixEqual m_aCase;
::std::vector< OUString>* m_pVector;
public:
TMultiListBoxEntryFindFunctor(::std::vector< OUString>* _pVector,
- const ::comphelper::TStringMixEqualFunctor& _aCase)
+ const ::comphelper::UStringMixEqual& _aCase)
:m_aCase(_aCase)
,m_pVector(_pVector)
{
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 2a748958a074..9d67f8aaba00 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -407,7 +407,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
}
else
{
- ::comphelper::TStringMixEqualFunctor aCase(sal_False);
+ ::comphelper::UStringMixEqual aCase(sal_False);
// search for typeinfo where the typename is equal _sTypeName
OTypeInfoMap::const_iterator typeInfoLoop = _rTypeInfo.begin();
OTypeInfoMap::const_iterator typeInfoEnd = _rTypeInfo.end();
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index abd4cc07f578..ff4a6eb5aaaf 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -198,7 +198,7 @@ IMPL_LINK( OWizColumnSelect, ButtonClickHdl, Button *, pButton )
OUString sExtraChars = xMetaData->getExtraNameCharacters();
sal_Int32 nMaxNameLen = m_pParent->getMaxColumnNameLength();
- ::comphelper::TStringMixEqualFunctor aCase(xMetaData->supportsMixedCaseQuotedIdentifiers());
+ ::comphelper::UStringMixEqual aCase(xMetaData->supportsMixedCaseQuotedIdentifiers());
::std::vector< OUString> aRightColumns;
fillColumns(pRight,aRightColumns);
@@ -246,7 +246,7 @@ IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, MultiListBox *, pListBox )
OUString sExtraChars = xMetaData->getExtraNameCharacters();
sal_Int32 nMaxNameLen = m_pParent->getMaxColumnNameLength();
- ::comphelper::TStringMixEqualFunctor aCase(xMetaData->supportsMixedCaseQuotedIdentifiers());
+ ::comphelper::UStringMixEqual aCase(xMetaData->supportsMixedCaseQuotedIdentifiers());
::std::vector< OUString> aRightColumns;
fillColumns(pRight,aRightColumns);
@@ -280,7 +280,7 @@ void OWizColumnSelect::createNewColumn( ListBox* _pListbox,
const OUString& _sColumnName,
const OUString& _sExtraChars,
sal_Int32 _nMaxNameLen,
- const ::comphelper::TStringMixEqualFunctor& _aCase)
+ const ::comphelper::UStringMixEqual& _aCase)
{
OUString sConvertedName = m_pParent->convertColumnName(TMultiListBoxEntryFindFunctor(&_rRightColumns,_aCase),
_sColumnName,
@@ -306,7 +306,7 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
const OUString& _sColumnName,
const OUString& _sExtraChars,
sal_Int32 _nMaxNameLen,
- const ::comphelper::TStringMixEqualFunctor& _aCase)
+ const ::comphelper::UStringMixEqual& _aCase)
{
if(_pRight == &m_lbNewColumnNames)
{
@@ -350,7 +350,7 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
const OUString& _sColumnName,
ODatabaseExport::TColumnVector::size_type nCurrentPos,
- const ::comphelper::TStringMixEqualFunctor& _aCase)
+ const ::comphelper::UStringMixEqual& _aCase)
{
sal_uInt16 nAdjustedPos = 0;
diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx
index 10bcc2cb653e..52a558760a7b 100644
--- a/include/comphelper/stl_types.hxx
+++ b/include/comphelper/stl_types.hxx
@@ -58,30 +58,15 @@ public:
};
//------------------------------------------------------------------------
-class UStringMixEqual
+class UStringMixEqual: public std::binary_function<OUString, OUString, bool>
{
sal_Bool m_bCaseSensitive;
public:
UStringMixEqual(sal_Bool bCaseSensitive = sal_True):m_bCaseSensitive(bCaseSensitive){}
- sal_Bool operator() (const OUString& lhs, const OUString& rhs) const
- {
- return m_bCaseSensitive ? lhs.equals( rhs ) : lhs.equalsIgnoreAsciiCase( rhs );
- }
- sal_Bool isCaseSensitive() const {return m_bCaseSensitive;}
-};
-//------------------------------------------------------------------------
-class TStringMixEqualFunctor : public ::std::binary_function< OUString,OUString,bool>
-{
- sal_Bool m_bCaseSensitive;
-
-public:
- TStringMixEqualFunctor(sal_Bool bCaseSensitive = sal_True)
- :m_bCaseSensitive(bCaseSensitive)
- {}
bool operator() (const OUString& lhs, const OUString& rhs) const
{
- return !!(m_bCaseSensitive ? lhs.equals( rhs ) : lhs.equalsIgnoreAsciiCase( rhs ));
+ return m_bCaseSensitive ? lhs.equals( rhs ) : lhs.equalsIgnoreAsciiCase( rhs );
}
sal_Bool isCaseSensitive() const {return m_bCaseSensitive;}
};