Tag: cws_dev300_dba30c
User: fs      
Date: 2008-04-02 13:40:40+0000
Modified:
   dba/dbaccess/source/ui/misc/WCopyTable.cxx

Log:
 #i86957# better handling for empty/colliding PK names

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.56&r2=1.56.16.1
Delta lines:  +8 -4
-------------------
--- WCopyTable.cxx      2008-03-05 17:03:57+0000        1.56
+++ WCopyTable.cxx      2008-04-02 13:40:36+0000        1.56.16.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WCopyTable.cxx,v $
  *
- *  $Revision: 1.56 $
+ *  $Revision: 1.56.16.1 $
  *
- *  last change: $Author: kz $ $Date: 2008/03/05 17:03:57 $
+ *  last change: $Author: fs $ $Date: 2008/04/02 13:40:36 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -925,6 +925,9 @@
                                     OCopyTable* pPage = 
static_cast<OCopyTable*>(GetPage(0));
                                     m_bCreatePrimaryKeyColumn = sal_True;
                                     m_aKeyName = pPage->GetKeyName();
+                                    if ( !m_aKeyName.getLength() )
+                                        m_aKeyName = ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "ID" ) );
+                                    m_aKeyName = createUniqueName( m_aKeyName 
);
                                     sal_Int32 nBreakPos2 = 0;
                                                    CheckColumns(nBreakPos2);
                                     break;
@@ -963,6 +966,7 @@
 void OCopyTableWizard::setCreatePrimaryKey( bool _bDoCreate, const 
::rtl::OUString& _rSuggestedName )
 {
     m_bCreatePrimaryKeyColumn = _bDoCreate;
+    if ( _rSuggestedName.getLength() )
     m_aKeyName = _rSuggestedName;
 
     OCopyTable* pSettingsPage = dynamic_cast< OCopyTable* >( GetPage( 0 ) );




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

Reply via email to