User: hr      
Date: 06/06/19 20:22:02

Modified:
 /dba/dbaccess/source/ui/misc/
  WCopyTable.cxx

Log:
 INTEGRATION: CWS warnings01 (1.42.4); FILE MERGED
 2006/05/29 11:19:13 sb 1.42.4.3: #i53898# Made code warning-free and/or 
compile at all after resync to SRC680m170.
 2006/05/23 23:58:51 sb 1.42.4.2: RESYNC: (1.42-1.44); FILE MERGED
 2006/03/24 15:36:22 fs 1.42.4.1: #i57457# warning-free code (unxlngi6/.pro + 
unxsoli4.pro)

File Changes:

Directory: /dba/dbaccess/source/ui/misc/
========================================

File [changed]: WCopyTable.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/WCopyTable.cxx?r1=1.44&r2=1.45
Delta lines:  +31 -29
---------------------
--- WCopyTable.cxx      4 May 2006 08:45:10 -0000       1.44
+++ WCopyTable.cxx      20 Jun 2006 03:22:00 -0000      1.45
@@ -127,7 +127,7 @@
 
 #define MAX_PAGES      4       // max. Pages die angezeigt werden
 
-DBG_NAME(OCopyTableWizard);
+DBG_NAME(OCopyTableWizard)
 namespace
 {
        void clearColumns(ODatabaseExport::TColumns& 
_rColumns,ODatabaseExport::TColumnVector& _rColumnsVec)
@@ -155,17 +155,18 @@
        ,m_pbPrev( this , ModuleRes(PB_PREV))
        ,m_pbNext( this , ModuleRes(PB_NEXT))
        ,m_pbFinish( this , ModuleRes(PB_OK))
-       ,m_nPageCount(0)
+       ,m_mNameMapping(_xConnection->getMetaData().is() && 
_xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
        ,m_xConnection(_xConnection)
        ,m_xSourceObject(_xSourceObject)
-       ,m_bCreatePrimaryColumn(sal_False)
-       ,m_eCreateStyle(WIZARD_DEF_DATA)
-       ,m_mNameMapping(_xConnection->getMetaData().is() && 
_xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
+       ,m_xSourceConnection(_xSourceConnection)
        ,m_xFormatter(_xFormatter)
-       ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES))
        ,m_xFactory(_rM)
-       ,m_xSourceConnection(_xSourceConnection)
+       ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES))
+       ,m_nPageCount(0)
        ,m_bDeleteSourceColumns(sal_True)
+       ,m_eCreateStyle(WIZARD_DEF_DATA)
+    ,m_ePressed( WIZARD_NONE )
+    ,m_bCreatePrimaryColumn(sal_False)
 {
        DBG_CTOR(OCopyTableWizard,NULL);
        construct();
@@ -204,24 +205,25 @@
                                                                   const 
Reference< XConnection >& _xConnection,
                                                                   const 
Reference< XNumberFormatter >& _xFormatter,
                                                                   const 
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory 
>& _rM)
-       : WizardDialog( pParent, ModuleRes(WIZ_RTFCOPYTABLE))
+       :WizardDialog( pParent, ModuleRes(WIZ_RTFCOPYTABLE))
+       ,m_vSourceColumns(_rSourceColumns)
     ,m_pbHelp( this , ModuleRes(PB_HELP))
        ,m_pbCancel( this , ModuleRes(PB_CANCEL))
        ,m_pbPrev( this , ModuleRes(PB_PREV))
        ,m_pbNext( this , ModuleRes(PB_NEXT))
        ,m_pbFinish( this , ModuleRes(PB_OK))
-       ,m_nPageCount(0)
-       ,m_xConnection(_xConnection)
-       ,m_bCreatePrimaryColumn(sal_False)
-       ,m_eCreateStyle(WIZARD_DEF_DATA)
        ,m_mNameMapping(_xConnection->getMetaData().is() && 
_xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
-       ,m_vSourceColumns(_rSourceColumns)
+    ,m_xConnection(_xConnection)
+       ,m_xSourceConnection(_xConnection) // in this case source connection 
and dest connection are the same
        ,m_xFormatter(_xFormatter)
-       ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES))
        ,m_xFactory(_rM)
-       ,m_sName(_rDefaultName)
-       ,m_xSourceConnection(_xConnection) // in this case source connection 
and dest connection are the same
+       ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES))
+       ,m_nPageCount(0)
        ,m_bDeleteSourceColumns(sal_False)
+       ,m_sName(_rDefaultName)
+    ,m_eCreateStyle(WIZARD_DEF_DATA)
+    ,m_ePressed( WIZARD_NONE )
+       ,m_bCreatePrimaryColumn(sal_False)
 {
        DBG_CTOR(OCopyTableWizard,NULL);
        construct();
@@ -381,7 +383,7 @@
                                }
                                else
                                {
-                                       
m_vColumnPos.push_back(ODatabaseExport::TPositions::value_type(CONTAINER_ENTRY_NOTFOUND,CONTAINER_ENTRY_NOTFOUND));
+                                       m_vColumnPos.push_back( 
ODatabaseExport::TPositions::value_type( COLUMN_POSITION_NOT_FOUND, 
COLUMN_POSITION_NOT_FOUND ) );
                                        m_vColumnTypes.push_back(0);
                                }
                        }
@@ -476,8 +478,8 @@
                                     OCopyTable* pPage = 
reinterpret_cast<OCopyTable*>(GetPage(0));
                                     m_bCreatePrimaryColumn = sal_True;
                                     m_aKeyName = pPage->GetKeyName();
-                                    sal_Int32 nBreakPos = 0;
-                                                   CheckColumns(nBreakPos);
+                                    sal_Int32 nBreakPos2 = 0;
+                                                   CheckColumns(nBreakPos2);
                                     break;
                                 }
                                 case RET_CANCEL:
@@ -695,11 +697,11 @@
 
                                for(;pKeyBegin != pKeyEnd;++pKeyBegin)
                                {
-                                       ODatabaseExport::TColumns::iterator 
aIter = _rColumns.find(*pKeyBegin);
-                                       if ( aIter != _rColumns.end() )
+                                       ODatabaseExport::TColumns::iterator 
keyPos = _rColumns.find(*pKeyBegin);
+                                       if ( keyPos != _rColumns.end() )
                                        {
-                                               
aIter->second->SetPrimaryKey(sal_True);
-                                               
aIter->second->SetIsNullable(ColumnValue::NO_NULLS);
+                                               
keyPos->second->SetPrimaryKey(sal_True);
+                                               
keyPos->second->SetIsNullable(ColumnValue::NO_NULLS);
                                        }
                                }
                        }
@@ -883,10 +885,11 @@
                                
m_xDestObject->setPropertyValue(PROPERTY_TEXTCOLOR,m_xSourceObject->getPropertyValue(PROPERTY_TEXTCOLOR));
                        // can not be copied yet, because the filter or and 
order clause could the old table name
                }
+
+               Reference< XColumnsSupplier > xSuppDestinationColumns( 
m_xDestObject, UNO_QUERY );
                // now append the columns
                const ODatabaseExport::TColumnVector* pVec = getDestVector();
-               Reference<XColumnsSupplier> xColSup(m_xDestObject,UNO_QUERY);
-               appendColumns(xColSup,pVec);
+               appendColumns( xSuppDestinationColumns, pVec );
                // now append the primary key
                Reference<XKeysSupplier> xKeySup(m_xDestObject,UNO_QUERY);
                appendKey(xKeySup,pVec);
@@ -916,8 +919,7 @@
                        // insert new table name into table filter
                        
::dbaui::appendToFilter(m_xConnection,m_sName,GetFactory(),this);
                        // set column mappings
-                       Reference<XColumnsSupplier> 
xColSup(m_xDestObject,UNO_QUERY);
-                       Reference<XNameAccess> xNameAccess = 
xColSup->getColumns();
+                       Reference<XNameAccess> xNameAccess = 
xSuppDestinationColumns->getColumns();
                        Sequence< ::rtl::OUString> aSeq = 
xNameAccess->getElementNames();
                        const ::rtl::OUString* pBegin = aSeq.getConstArray();
                        const ::rtl::OUString* pEnd       = pBegin + 
aSeq.getLength();
@@ -955,7 +957,7 @@
                                                        
ODatabaseExport::TPositions::iterator aColPos = m_vColumnPos.begin();
                                                        for(; aColPos != 
m_vColumnPos.end() && nOldPos;++aColPos,++aFound)
                                                        {
-                                                               
if(aColPos->second != CONTAINER_ENTRY_NOTFOUND && !*aFound && nOldPos == 
aColPos->second)
+                                                               
if(aColPos->second != COLUMN_POSITION_NOT_FOUND && !*aFound && nOldPos == 
aColPos->second)
                                                                        break;
                                                        }
                                                        if(aColPos != 
m_vColumnPos.end())




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to