summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/tabledesign
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-07-03 12:24:35 +0000
committerRelease Engineers <releng@openoffice.org>2009-07-03 12:24:35 +0000
commit2350668a435dbd1efab656d14d4b7b1ee7469d2d (patch)
tree6b4464243d85aeba2d690669049cb2ac8309aea9 /dbaccess/source/ui/tabledesign
parent3f2dac51787b61b71296c801d89909a741181fdf (diff)
CWS-TOOLING: integrate CWS dbaperf2
2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
Diffstat (limited to 'dbaccess/source/ui/tabledesign')
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx17
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx25
-rw-r--r--dbaccess/source/ui/tabledesign/TableRowExchange.cxx3
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx9
4 files changed, 32 insertions, 22 deletions
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index cfdf827af..0b0b46dc6 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -512,7 +512,8 @@ void OTableEditorCtrl::InitController(CellControllerRef&, long nRow, sal_uInt16
const OTypeInfoMap* pTypeInfo = GetView()->getController().getTypeInfo();
OTypeInfoMap::const_iterator aIter = pTypeInfo->begin();
- for(;aIter != pTypeInfo->end();++aIter)
+ OTypeInfoMap::const_iterator aEnd = pTypeInfo->end();
+ for(;aIter != aEnd;++aIter)
pTypeCell->InsertEntry( aIter->second->aUIName );
pTypeCell->SelectEntry( aInitString );
}
@@ -620,9 +621,10 @@ sal_Int32 OTableEditorCtrl::HasFieldName( const String& rFieldName )
::comphelper::UStringMixEqual bCase(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : sal_True);
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_pRowList->begin();
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_pRowList->end();
OFieldDescription* pFieldDescr;
sal_Int32 nCount(0);
- for(;aIter != m_pRowList->end();++aIter)
+ for(;aIter != aEnd;++aIter)
{
pFieldDescr = (*aIter)->GetActFieldDescr();
if( pFieldDescr && bCase(rFieldName,pFieldDescr->GetName()))
@@ -1806,7 +1808,8 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet )
long nIndex = 0;
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = m_pRowList->begin();
- for(sal_Int32 nRow = 0;aIter != m_pRowList->end();++aIter,++nRow)
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = m_pRowList->end();
+ for(sal_Int32 nRow = 0;aIter != aEnd;++aIter,++nRow)
{
OFieldDescription* pFieldDescr = (*aIter)->GetActFieldDescr();
if( pFieldDescr && (*aIter)->IsPrimaryKey() && (!bSet || !IsRowSelected(nRow)) )
@@ -1856,7 +1859,8 @@ sal_Bool OTableEditorCtrl::IsPrimaryKey()
// Gehoeren alle markierten Felder zu einem Primary Key ?
long nPrimaryKeys = 0;
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = m_pRowList->begin();
- for(sal_Int32 nRow=0;aIter != m_pRowList->end();++aIter,++nRow)
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = m_pRowList->end();
+ for(sal_Int32 nRow=0;aIter != aEnd;++aIter,++nRow)
{
if( IsRowSelected(nRow) && !(*aIter)->IsPrimaryKey() )
return sal_False;
@@ -1890,7 +1894,7 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
pRow->SetFieldType( _pType, sal_True );
if ( _pType.get() )
{
- sal_uInt16 nCurrentlySelected = pTypeCell->GetSelectEntryPos();
+ const sal_uInt16 nCurrentlySelected = pTypeCell->GetSelectEntryPos();
if ( ( LISTBOX_ENTRY_NOTFOUND == nCurrentlySelected )
|| ( GetView()->getController().getTypeInfo( nCurrentlySelected ) != _pType )
@@ -1899,7 +1903,8 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
USHORT nEntryPos = 0;
const OTypeInfoMap* pTypeInfo = GetView()->getController().getTypeInfo();
OTypeInfoMap::const_iterator aIter = pTypeInfo->begin();
- for(;aIter != pTypeInfo->end();++aIter,++nEntryPos)
+ OTypeInfoMap::const_iterator aEnd = pTypeInfo->end();
+ for(;aIter != aEnd;++aIter,++nEntryPos)
{
if(aIter->second == _pType)
break;
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 71172b6c4..ac53e1900 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -166,6 +166,9 @@
#include <cppuhelper/exc_hlp.hxx>
#endif
#include "dsmeta.hxx"
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
extern "C" void SAL_CALL createRegistryInfo_OTableControl()
{
@@ -255,7 +258,6 @@ OTableController::OTableController(const Reference< XMultiServiceFactory >& _rM)
InvalidateAll();
m_pTypeInfo = TOTypeInfoSP(new OTypeInfo());
m_pTypeInfo->aUIName = m_sTypeNames.GetToken(TYPE_OTHER);
- m_aTypeCollection.initUserDriverTypes(_rM);
}
// -----------------------------------------------------------------------------
OTableController::~OTableController()
@@ -1015,7 +1017,8 @@ void OTableController::loadData()
for(;pKeyBegin != pKeyEnd;++pKeyBegin)
{
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator rowIter = m_vRowList.begin();
- for(;rowIter != m_vRowList.end();++rowIter)
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator rowEnd = m_vRowList.end();
+ for(;rowIter != rowEnd;++rowIter)
{
if((*rowIter)->GetActFieldDescr()->GetName() == *pKeyBegin)
{
@@ -1399,7 +1402,7 @@ void OTableController::alterColumns()
// third append the new columns
aIter = m_vRowList.begin();
- for(;aIter != m_vRowList.end();++aIter)
+ for(;aIter != aEnd;++aIter)
{
OSL_ENSURE(*aIter,"OTableRow is null!");
OFieldDescription* pField = (*aIter)->GetActFieldDescr();
@@ -1437,7 +1440,7 @@ void OTableController::alterColumns()
if ( xKeyColumns.is() )
{
aIter = m_vRowList.begin();
- for(;aIter != m_vRowList.end();++aIter)
+ for(;aIter != aEnd;++aIter)
{
OSL_ENSURE(*aIter,"OTableRow is null!");
OFieldDescription* pField = (*aIter)->GetActFieldDescr();
@@ -1551,9 +1554,7 @@ void OTableController::assignTable()
setEditable( xMeta.is() && !xMeta->isReadOnly() && (isAlterAllowed() || isDropAllowed() || isAddAllowed()) );
if(!isEditable())
{
- ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_vRowList.begin();
- for(; aIter != m_vRowList.end(); ++aIter)
- (*aIter)->SetReadOnly(sal_True);
+ ::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( &OTableRow::SetReadOnly, _1, boost::cref( sal_True )));
}
m_bNew = sal_False;
// be notified when the table is in disposing
@@ -1612,7 +1613,8 @@ void OTableController::reSyncRows()
sal_Bool bAlterAllowed = isAlterAllowed();
sal_Bool bAddAllowed = isAddAllowed();
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_vRowList.begin();
- for(;aIter != m_vRowList.end();++aIter)
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_vRowList.end();
+ for(;aIter != aEnd;++aIter)
{
OSL_ENSURE(*aIter,"OTableRow is null!");
OFieldDescription* pField = (*aIter)->GetActFieldDescr();
@@ -1636,7 +1638,8 @@ void OTableController::reSyncRows()
::comphelper::UStringMixEqual bCase(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : sal_True);
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = m_vRowList.begin();
- for(sal_Int32 i=0;aIter != m_vRowList.end();++aIter)
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = m_vRowList.end();
+ for(sal_Int32 i=0;aIter != aEnd;++aIter)
{
OFieldDescription* pFieldDesc = (*aIter)->GetActFieldDescr();
if (pFieldDesc && pFieldDesc->GetName().getLength() && bCase(sName,pFieldDesc->GetName()))
@@ -1702,8 +1705,6 @@ sal_Int32 OTableController::getFirstEmptyRowPosition() const
// -----------------------------------------------------------------------------
bool OTableController::isAutoIncrementPrimaryKey() const
{
- ::dbaccess::DATASOURCE_TYPE eType = m_aTypeCollection.getType(::comphelper::getString(getDataSource()->getPropertyValue(PROPERTY_URL)));
- DataSourceMetaData aMeta(eType);
- return aMeta.getAdvancedSettingsSupport().bAutoIncrementIsPrimaryKey;
+ return getSdbMetaData().isAutoIncrementPrimaryKey();
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
index 1d8c59b76..86f710c66 100644
--- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
@@ -61,7 +61,8 @@ namespace dbaui
{
(*rxOStm) << (sal_Int32)pRows->size(); // first stream the size
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = pRows->begin();
- for(;aIter != pRows->end();++aIter)
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = pRows->end();
+ for(;aIter != aEnd;++aIter)
(*rxOStm) << *(*aIter);
return sal_True;
}
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 57aee4321..3ac4825b6 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -271,11 +271,12 @@ void OTableEditorDelUndoAct::Undo()
// Geloeschte Zeilen wieder einfuegen
ULONG nPos;
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_aDeletedRows.begin();
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_aDeletedRows.end();
::boost::shared_ptr<OTableRow> pNewOrigRow;
::std::vector< ::boost::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList();
- for(;aIter != m_aDeletedRows.end();++aIter)
+ for(;aIter != aEnd;++aIter)
{
pNewOrigRow.reset(new OTableRow( **aIter ));
nPos = (*aIter)->GetPos();
@@ -294,9 +295,10 @@ void OTableEditorDelUndoAct::Redo()
// Zeilen wieder loeschen
ULONG nPos;
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_aDeletedRows.begin();
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_aDeletedRows.end();
::std::vector< ::boost::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList();
- for(;aIter != m_aDeletedRows.end();++aIter)
+ for(;aIter != aEnd;++aIter)
{
nPos = (*aIter)->GetPos();
pOriginalRows->erase( pOriginalRows->begin()+nPos );
@@ -354,8 +356,9 @@ void OTableEditorInsUndoAct::Redo()
long nInsertRow = m_nInsPos;
::boost::shared_ptr<OTableRow> pRow;
::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_vInsertedRows.begin();
+ ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_vInsertedRows.end();
::std::vector< ::boost::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList();
- for(;aIter != m_vInsertedRows.end();++aIter)
+ for(;aIter != aEnd;++aIter)
{
pRow.reset(new OTableRow( **aIter ));
pRowList->insert( pRowList->begin()+nInsertRow ,pRow );