Get rid of DECLARE_STL_ITERATORS
Change-Id: I22148aa5336907939b37945e513c25a05b2b3776
This commit is contained in:
@@ -85,7 +85,7 @@ ODbaseIndexDialog::~ODbaseIndexDialog()
|
|||||||
DBG_DTOR(ODbaseIndexDialog,NULL);
|
DBG_DTOR(ODbaseIndexDialog,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool ODbaseIndexDialog::GetTable(const OUString& _rName, TableInfoListIterator& _rPosition)
|
sal_Bool ODbaseIndexDialog::GetTable(const OUString& _rName, TableInfoList::iterator& _rPosition)
|
||||||
{
|
{
|
||||||
for ( _rPosition = m_aTableInfoList.begin();
|
for ( _rPosition = m_aTableInfoList.begin();
|
||||||
_rPosition != m_aTableInfoList.end();
|
_rPosition != m_aTableInfoList.end();
|
||||||
@@ -121,7 +121,7 @@ OTableIndex ODbaseIndexDialog::implRemoveIndex(const OUString& _rName, TableInde
|
|||||||
|
|
||||||
sal_Int32 nPos = 0;
|
sal_Int32 nPos = 0;
|
||||||
|
|
||||||
TableIndexListIterator aSearch;
|
TableIndexList::iterator aSearch;
|
||||||
for ( aSearch = _rList.begin();
|
for ( aSearch = _rList.begin();
|
||||||
aSearch != _rList.end();
|
aSearch != _rList.end();
|
||||||
++aSearch, ++nPos
|
++aSearch, ++nPos
|
||||||
@@ -161,7 +161,7 @@ OTableIndex ODbaseIndexDialog::RemoveTableIndex( const OUString& _rTableName, co
|
|||||||
OTableIndex aReturn;
|
OTableIndex aReturn;
|
||||||
|
|
||||||
// does the table exist ?
|
// does the table exist ?
|
||||||
TableInfoListIterator aTablePos;
|
TableInfoList::iterator aTablePos;
|
||||||
if (!GetTable(_rTableName, aTablePos))
|
if (!GetTable(_rTableName, aTablePos))
|
||||||
return aReturn;
|
return aReturn;
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ OTableIndex ODbaseIndexDialog::RemoveTableIndex( const OUString& _rTableName, co
|
|||||||
|
|
||||||
void ODbaseIndexDialog::InsertTableIndex( const OUString& _rTableName, const OTableIndex& _rIndex)
|
void ODbaseIndexDialog::InsertTableIndex( const OUString& _rTableName, const OTableIndex& _rIndex)
|
||||||
{
|
{
|
||||||
TableInfoListIterator aTablePos;
|
TableInfoList::iterator aTablePos;
|
||||||
if (!GetTable(_rTableName, aTablePos))
|
if (!GetTable(_rTableName, aTablePos))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ IMPL_LINK( ODbaseIndexDialog, OKClickHdl, PushButton*, /*pButton*/ )
|
|||||||
{
|
{
|
||||||
// let all tables write their INF file
|
// let all tables write their INF file
|
||||||
|
|
||||||
for ( ConstTableInfoListIterator aLoop = m_aTableInfoList.begin();
|
for ( TableInfoList::const_iterator aLoop = m_aTableInfoList.begin();
|
||||||
aLoop != m_aTableInfoList.end();
|
aLoop != m_aTableInfoList.end();
|
||||||
++aLoop
|
++aLoop
|
||||||
)
|
)
|
||||||
@@ -246,13 +246,13 @@ IMPL_LINK( ODbaseIndexDialog, OnListEntrySelected, ListBox*, /*NOTINTERESTEDIN*/
|
|||||||
IMPL_LINK( ODbaseIndexDialog, TableSelectHdl, ComboBox*, pComboBox )
|
IMPL_LINK( ODbaseIndexDialog, TableSelectHdl, ComboBox*, pComboBox )
|
||||||
{
|
{
|
||||||
// search the table
|
// search the table
|
||||||
TableInfoListIterator aTablePos;
|
TableInfoList::iterator aTablePos;
|
||||||
if (!GetTable(pComboBox->GetText(), aTablePos))
|
if (!GetTable(pComboBox->GetText(), aTablePos))
|
||||||
return 0L;
|
return 0L;
|
||||||
|
|
||||||
// fill the listbox for the indexes
|
// fill the listbox for the indexes
|
||||||
aLB_TableIndexes.Clear();
|
aLB_TableIndexes.Clear();
|
||||||
for ( ConstTableIndexListIterator aLoop = aTablePos->aIndexList.begin();
|
for ( TableIndexList::const_iterator aLoop = aTablePos->aIndexList.begin();
|
||||||
aLoop != aTablePos->aIndexList.end();
|
aLoop != aTablePos->aIndexList.end();
|
||||||
++aLoop
|
++aLoop
|
||||||
)
|
)
|
||||||
@@ -388,7 +388,7 @@ void ODbaseIndexDialog::Init()
|
|||||||
void ODbaseIndexDialog::SetCtrls()
|
void ODbaseIndexDialog::SetCtrls()
|
||||||
{
|
{
|
||||||
// ComboBox tables
|
// ComboBox tables
|
||||||
for ( ConstTableInfoListIterator aLoop = m_aTableInfoList.begin();
|
for ( TableInfoList::const_iterator aLoop = m_aTableInfoList.begin();
|
||||||
aLoop != m_aTableInfoList.end();
|
aLoop != m_aTableInfoList.end();
|
||||||
++aLoop
|
++aLoop
|
||||||
)
|
)
|
||||||
@@ -401,7 +401,7 @@ void ODbaseIndexDialog::SetCtrls()
|
|||||||
aCB_Tables.SetText( rTabInfo.aTableName );
|
aCB_Tables.SetText( rTabInfo.aTableName );
|
||||||
|
|
||||||
// build ListBox of the table indices
|
// build ListBox of the table indices
|
||||||
for ( ConstTableIndexListIterator aIndex = rTabInfo.aIndexList.begin();
|
for ( TableIndexList::const_iterator aIndex = rTabInfo.aIndexList.begin();
|
||||||
aIndex != rTabInfo.aIndexList.end();
|
aIndex != rTabInfo.aIndexList.end();
|
||||||
++aIndex
|
++aIndex
|
||||||
)
|
)
|
||||||
@@ -412,7 +412,7 @@ void ODbaseIndexDialog::SetCtrls()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ListBox of the free indices
|
// ListBox of the free indices
|
||||||
for ( ConstTableIndexListIterator aFree = m_aFreeIndexList.begin();
|
for ( TableIndexList::const_iterator aFree = m_aFreeIndexList.begin();
|
||||||
aFree != m_aFreeIndexList.end();
|
aFree != m_aFreeIndexList.end();
|
||||||
++aFree
|
++aFree
|
||||||
)
|
)
|
||||||
@@ -467,7 +467,7 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const
|
|||||||
|
|
||||||
// now add all saved indices
|
// now add all saved indices
|
||||||
sal_uInt16 nPos = 0;
|
sal_uInt16 nPos = 0;
|
||||||
for ( ConstTableIndexListIterator aIndex = aIndexList.begin();
|
for ( TableIndexList::const_iterator aIndex = aIndexList.begin();
|
||||||
aIndex != aIndexList.end();
|
aIndex != aIndexList.end();
|
||||||
++aIndex, ++nPos
|
++aIndex, ++nPos
|
||||||
)
|
)
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#include <vcl/lstbox.hxx>
|
#include <vcl/lstbox.hxx>
|
||||||
#include <vcl/fixed.hxx>
|
#include <vcl/fixed.hxx>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <comphelper/stl_types.hxx>
|
|
||||||
|
|
||||||
namespace dbaui
|
namespace dbaui
|
||||||
{
|
{
|
||||||
@@ -48,7 +47,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef ::std::list< OTableIndex > TableIndexList;
|
typedef ::std::list< OTableIndex > TableIndexList;
|
||||||
DECLARE_STL_ITERATORS(TableIndexList);
|
|
||||||
|
|
||||||
// OTableInfo
|
// OTableInfo
|
||||||
class ODbaseIndexDialog;
|
class ODbaseIndexDialog;
|
||||||
@@ -69,7 +67,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef ::std::list< OTableInfo > TableInfoList;
|
typedef ::std::list< OTableInfo > TableInfoList;
|
||||||
DECLARE_STL_ITERATORS(TableInfoList);
|
|
||||||
|
|
||||||
// IndexDialog
|
// IndexDialog
|
||||||
class ODbaseIndexDialog : public ModalDialog
|
class ODbaseIndexDialog : public ModalDialog
|
||||||
@@ -110,7 +107,7 @@ protected:
|
|||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void SetCtrls();
|
void SetCtrls();
|
||||||
sal_Bool GetTable(const OUString& rName, TableInfoListIterator& _rPosition);
|
sal_Bool GetTable(const OUString& rName, TableInfoList::iterator& _rPosition);
|
||||||
|
|
||||||
OTableIndex implRemoveIndex(const OUString& _rName, TableIndexList& _rList, ListBox& _rDisplay, sal_Bool _bMustExist);
|
OTableIndex implRemoveIndex(const OUString& _rName, TableIndexList& _rList, ListBox& _rDisplay, sal_Bool _bMustExist);
|
||||||
void implInsertIndex(const OTableIndex& _rIndex, TableIndexList& _rList, ListBox& _rDisplay);
|
void implInsertIndex(const OTableIndex& _rIndex, TableIndexList& _rList, ListBox& _rDisplay);
|
||||||
|
@@ -228,14 +228,6 @@ OutputIter intersperse(
|
|||||||
}
|
}
|
||||||
//... namespace comphelper ................................................
|
//... namespace comphelper ................................................
|
||||||
|
|
||||||
//==================================================================
|
|
||||||
// consistently defining stl-types
|
|
||||||
//==================================================================
|
|
||||||
|
|
||||||
#define DECLARE_STL_ITERATORS(classname) \
|
|
||||||
typedef classname::iterator classname##Iterator; \
|
|
||||||
typedef classname::const_iterator Const##classname##Iterator \
|
|
||||||
|
|
||||||
#endif // INCLUDED_COMPHELPER_STL_TYPES_HXX
|
#endif // INCLUDED_COMPHELPER_STL_TYPES_HXX
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
Reference in New Issue
Block a user