Tag: cws_src680_dba24a
User: fs      
Date: 2007-07-23 11:59:14+0000
Modified:
   dba/dbaccess/source/ui/app/AppController.cxx
   dba/dbaccess/source/ui/inc/DExport.hxx
   dba/dbaccess/source/ui/inc/TableCopyHelper.hxx
   dba/dbaccess/source/ui/inc/TokenWriter.hxx
   dba/dbaccess/source/ui/inc/WCPage.hxx
   dba/dbaccess/source/ui/inc/WCopyTable.hxx
   dba/dbaccess/source/ui/misc/DExport.cxx
   dba/dbaccess/source/ui/misc/TableCopyHelper.cxx
   dba/dbaccess/source/ui/misc/TokenWriter.cxx
   dba/dbaccess/source/ui/misc/WCPage.cxx
   dba/dbaccess/source/ui/misc/WCopyTable.cxx

Log:
 when pasting tables, use a meaningful default in the wizard, as indicated by 
the current selection
 Issue number:  #i18907#
 Submitted by:  [EMAIL PROTECTED]
 Reviewed by:   [EMAIL PROTECTED]

File Changes:

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

File [changed]: AppController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.42&r2=1.42.14.1
Delta lines:  +25 -4
--------------------
--- AppController.cxx   2007-07-06 07:57:53+0000        1.42
+++ AppController.cxx   2007-07-23 11:59:02+0000        1.42.14.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.42 $
+ *  $Revision: 1.42.14.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/06 07:57:53 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:02 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -979,11 +979,32 @@
                                {
                                        TransferableDataHelper 
aTransferData(TransferableDataHelper::CreateFromSystemClipboard(getView()));
                                        ElementType eType = 
getContainer()->getElementType();
+
                                        switch( eType )
                                        {
                                                case E_TABLE:
-                            m_aTableCopyHelper.pasteTable( aTransferData , 
getDatabaseName(), ensureConnection() );
+                                                       {
+                                                               //dyf add 
+                                                               //for get the 
selected tablename
+                                                               ::std::vector< 
::rtl::OUString> aList;
+                                                               
getSelectionElementNames(aList);
+                                                               ::rtl::OUString 
sTableNameToInsertInto;
+                                                               
+                                                               if ( 
!aList.empty() )
+                                                               {
+                                                                       
sTableNameToInsertInto = *aList.begin();
+                                                                       
m_aTableCopyHelper.SetDefaultTableName(sTableNameToInsertInto);
+                                                                       
m_aTableCopyHelper.SetIsSelectCopytable(true);
+                                                               }
+                                                               else
+                                                               {
+                                                                       
m_aTableCopyHelper.SetIsSelectCopytable(false);
+                                                               }
+                                                               //dyf add end  
+                                                               
m_aTableCopyHelper.pasteTable( aTransferData , getDatabaseName(), 
ensureConnection());
+                                                       }
                                                        break;
+                                                       
                                                case E_QUERY:
                             if ( 
getViewClipboard().HasFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY) )
                                                            paste( 
E_QUERY,ODataAccessObjectTransferable::extractObjectDescriptor(aTransferData) );

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

File [changed]: DExport.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/DExport.hxx?r1=1.17&r2=1.17.170.1
Delta lines:  +12 -4
--------------------
--- DExport.hxx 2006-06-20 03:11:09+0000        1.17
+++ DExport.hxx 2007-07-23 11:59:02+0000        1.17.170.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: DExport.hxx,v $
  *
- *  $Revision: 1.17 $
+ *  $Revision: 1.17.170.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 03:11:09 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:02 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -122,7 +122,10 @@
                ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory> m_xFactory;
 
         SvNumberFormatter*  m_pFormatter;
-               
+               //dyf add 2006/06/01
+               //for save the selected tablename
+               ::rtl::OUString     m_sDefaultTableName;                
+               //dyf add end
                String                          m_sTextToken;           // 
Zellen Inhalt
         String                         m_sNumToken;        /// SDNUM value
         String                         m_sValToken;        /// SDVAL value
@@ -184,6 +187,11 @@
                         sal_Bool _bAutoIncrementEnabled);
 
                void    SetColumnTypes(const TColumnVector* rList,const 
OTypeInfoMap* _pInfoMap);
+               
+               //dyf add 20070601
+               inline void                    SetTableName(const 
::rtl::OUString &_sTableName){ m_sDefaultTableName = _sTableName ; }
+               //dyf add end 
+
                virtual void release() = 0;
 
                void enableCheckOnly() { m_bCheckOnly = sal_True; }

File [changed]: TableCopyHelper.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/TableCopyHelper.hxx?r1=1.5&r2=1.5.170.1
Delta lines:  +18 -3
--------------------
--- TableCopyHelper.hxx 2006-06-20 03:13:36+0000        1.5
+++ TableCopyHelper.hxx 2007-07-23 11:59:02+0000        1.5.170.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TableCopyHelper.hxx,v $
  *
- *  $Revision: 1.5 $
+ *  $Revision: 1.5.170.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 03:13:36 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:02 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -95,11 +95,18 @@
     class OTableCopyHelper
     {
         OGenericUnoController* m_pController;
+       private:
+               ::rtl::OUString         m_sDefaultTableName;
+               sal_Bool                        m_bSelectCopyTable;
     public:
         // is needed to describe the drop target
                struct DropDescriptor
                {
                        ::svx::ODataAccessDescriptor    aDroppedData;
+                       //dyf add 20070601
+                       //for transfor the tablename
+                       ::rtl::OUString                 sDefaultTableName;
+                       //dyf add end
                        String                                                  
aUrl;
                        SotStorageStreamRef                             
aHtmlRtfStorage;
                        ElementType                                             
nType;
@@ -213,6 +220,14 @@
         /// returns <TRUE/> if the clipboard supports a table format, 
otherwise <FALSE/>.
                sal_Bool isTableFormat(const TransferableDataHelper& 
_rClipboard) const;
         
+               //dyf add 20070601
+               inline void           SetDefaultTableName(const ::rtl::OUString 
&_sDefaultTableName){ m_sDefaultTableName = _sDefaultTableName ; }
+               inline ::rtl::OUString  GetDefaultTableName() const { return 
m_sDefaultTableName ;}
+
+               inline sal_Bool                 SetIsSelectCopytable(sal_Bool 
isSelect){ m_bSelectCopyTable = isSelect;}
+               sal_Bool                        GetIsSelectCopytable(){ return 
m_bSelectCopyTable; }
+               //dyf add end 
+        
     };
 //........................................................................
 }      // namespace dbaui

File [changed]: TokenWriter.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/TokenWriter.hxx?r1=1.19&r2=1.19.16.1
Delta lines:  +12 -3
--------------------
--- TokenWriter.hxx     2007-07-06 08:25:44+0000        1.19
+++ TokenWriter.hxx     2007-07-23 11:59:03+0000        1.19.16.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TokenWriter.hxx,v $
  *
- *  $Revision: 1.19 $
+ *  $Revision: 1.19.16.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/06 08:25:44 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -119,6 +119,10 @@
         SharedModel                                                            
         m_aKeepModelAlive;
 
                ::rtl::OUString m_sName;
+               //dyf add 20070601 
+               //for transfor the tablename
+               ::rtl::OUString m_sDefaultTableName;
+               //dyf add end
                ::rtl::OUString m_sDataSourceName;
                sal_Int32               m_nCommandType;
 
@@ -150,6 +154,11 @@
        public:
                void setStream(SvStream* _pStream){  m_pStream = _pStream; }
 
+               //dyf add 20070601
+               //for set the tablename
+               void setSTableName(const ::rtl::OUString &_sTableName){ 
m_sDefaultTableName = _sTableName; }
+               //dyf add end
+
                virtual BOOL Write()    = 0; // Export
                virtual BOOL Read()             = 0; // Import
 

File [changed]: WCPage.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/WCPage.hxx?r1=1.6&r2=1.6.196.1
Delta lines:  +11 -4
--------------------
--- WCPage.hxx  2006-04-19 13:21:25+0000        1.6
+++ WCPage.hxx  2007-07-23 11:59:03+0000        1.6.196.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WCPage.hxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.196.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/04/19 13:21:25 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -92,6 +92,9 @@
                DECL_LINK( KeyClickHdl, Button* );
 
                sal_Bool checkAppendData();
+               //--------dyf add
+               void SetAppendDataRadio();
+               //--------add end
 
        public:
                virtual void                    Reset();
@@ -99,7 +102,7 @@
                virtual BOOL                    LeavePage();
                virtual String                  GetTitle() const ;
 
-               OCopyTable( Window * pParent, EImportMode atWhat, BOOL bIsView, 
OCopyTableWizard::Wizard_Create_Style nLastAction );
+               OCopyTable( Window * pParent, EImportMode atWhat, BOOL bIsView 
);//, OCopyTableWizard::Wizard_Create_Style nLastAction );
                virtual ~OCopyTable();
 
                inline BOOL IsOptionDefData()           const { return 
m_aRB_DefData.IsChecked(); }
@@ -107,6 +110,10 @@
                inline BOOL IsOptionAppendData()        const { return 
m_aRB_AppendData.IsChecked(); }
                inline BOOL IsOptionView()                      const { return 
m_aRB_View.IsChecked(); }
         String      GetKeyName()            const { return 
m_edKeyName.GetText(); }
+
+               //--------dyf add 2007/7/10
+               void setCreateStyleAction();//const 
OCopyTableWizard::Wizard_Create_Style& _eStyle
+               //--------add end
        };
 }
 #endif // DBAUI_WIZARD_CPAGE_HXX

File [changed]: WCopyTable.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/WCopyTable.hxx?r1=1.21&r2=1.21.170.1
Delta lines:  +7 -3
-------------------
--- WCopyTable.hxx      2006-06-20 03:15:28+0000        1.21
+++ WCopyTable.hxx      2007-07-23 11:59:03+0000        1.21.170.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WCopyTable.hxx,v $
  *
- *  $Revision: 1.21 $
+ *  $Revision: 1.21.170.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 03:15:28 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -327,6 +327,10 @@
                void showColumnTypeNotSupported(const ::rtl::OUString& 
_rColumnName);
 
         void removeColumnNameFromNameMap(const ::rtl::OUString& _sName);
+
+               //dyf add
+               void ResetsName(const ::rtl::OUString & _sName);
+               //dyf add end 
        };
 }
 

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

File [changed]: DExport.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/DExport.cxx?r1=1.37&r2=1.37.54.1
Delta lines:  +16 -5
--------------------
--- DExport.cxx 2007-01-15 14:35:51+0000        1.37
+++ DExport.cxx 2007-07-23 11:59:03+0000        1.37.54.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: DExport.cxx,v $
  *
- *  $Revision: 1.37 $
+ *  $Revision: 1.37.54.1 $
  *
- *  last change: $Author: vg $ $Date: 2007/01/15 14:35:51 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -765,14 +765,25 @@
 sal_Bool ODatabaseExport::executeWizard(const ::rtl::OUString& 
_sTableName,const Any& _aTextColor,const FontDescriptor& _rFont)
 {
        DBG_CHKTHIS(ODatabaseExport,NULL);
-       OCopyTableWizard 
aWizard(NULL,_sTableName,m_aDestColumns,m_vDestVector,m_xConnection,m_xFormatter,m_xFactory);
        
+       //--------dyf add 20070601
+       //if there is a table was selected,then create with 
m_sDefaultTableName,otherwise,with _sTableName
+       OCopyTableWizard 
aWizard(NULL,_sTableName,m_aDestColumns,m_vDestVector,m_xConnection,m_xFormatter,m_xFactory);
+       if (m_sDefaultTableName.getLength() != 0 )
+       {
+               aWizard.ResetsName(m_sDefaultTableName);
+               aWizard.setCreateStyle(OCopyTableWizard::WIZARD_APPEND_DATA);
+       }
        sal_Bool bError = sal_False;
        try
        {
                aWizard.fillTypeInfo();
 
-               OCopyTable*                     pPage1 = new 
OCopyTable(&aWizard,COPY, sal_False,OCopyTableWizard::WIZARD_DEF_DATA);
+               OCopyTable*                     pPage1;
+               pPage1 = new OCopyTable(&aWizard,COPY, sal_False);
+               pPage1->setCreateStyleAction();
+       //---------dyf add end
+
                OWizNameMatching*       pPage2 = new OWizNameMatching(&aWizard);
                OWizColumnSelect*       pPage3 = new 
OWizColumnSelect(&aWizard);                
                OWizTypeSelect*         pPage4 = createPage(&aWizard);

File [changed]: TableCopyHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/TableCopyHelper.cxx?r1=1.9&r2=1.9.120.1
Delta lines:  +27 -5
--------------------
--- TableCopyHelper.cxx 2006-09-17 07:13:19+0000        1.9
+++ TableCopyHelper.cxx 2007-07-23 11:59:03+0000        1.9.120.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TableCopyHelper.cxx,v $
  *
- *  $Revision: 1.9 $
+ *  $Revision: 1.9.120.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/09/17 07:13:19 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -439,7 +439,9 @@
 }
 }
 // 
-----------------------------------------------------------------------------
-OTableCopyHelper::OTableCopyHelper(OGenericUnoController* _pControler) : 
m_pController(_pControler)
+OTableCopyHelper::OTableCopyHelper(OGenericUnoController* _pControler)
+    :m_pController(_pControler)
+    ,m_bSelectCopyTable(sal_False)
 {
 }
 // 
-----------------------------------------------------------------------------
@@ -468,6 +470,10 @@
 
                        aTrans.nType                    = E_TABLE;
                        aTrans.bHtml                    = SOT_FORMATSTR_ID_HTML 
== _nFormatId || SOT_FORMATSTR_ID_HTML_SIMPLE == _nFormatId;
+                       ///dyf add 20070601
+                       //add for transfor the selected tablename
+                       aTrans.sDefaultTableName       = GetDefaultTableName();
+                       //dyf add end
                        if ( !copyTagTable(aTrans,sal_False,_xConnection) )
                                
m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000")
 ,0,Any()));
                }
@@ -610,9 +616,21 @@
                                                                                
        _xDestConnection,
                                                                                
        getNumberFormatter(_xDestConnection,m_pController->getORB()),
                                                                                
        m_pController->getORB());
+
+                               //--------dyf modify 2006/6/27
                                aWizard.fillTypeInfo();
                                aWizard.loadData();
-                               OCopyTable*                     pPage1 = new 
OCopyTable(&aWizard,COPY, bIsView,OCopyTableWizard::WIZARD_DEF_DATA);
+                               if(GetIsSelectCopytable())
+                               {
+                                       aWizard.ResetsName( 
GetDefaultTableName());
+                                       
aWizard.setCreateStyle(OCopyTableWizard::WIZARD_APPEND_DATA);
+                               }
+
+                               OCopyTable*                     pPage1;
+                               pPage1 = new OCopyTable(&aWizard,COPY, bIsView);
+                               pPage1->setCreateStyleAction();
+
+                               //--------dyf modify end
                                OWizNameMatching*       pPage2 = new 
OWizNameMatching(&aWizard);
                                OWizColumnSelect*       pPage3 = new 
OWizColumnSelect(&aWizard);
                                OWizNormalExtend*       pPage4 = new 
OWizNormalExtend(&aWizard);
@@ -747,6 +765,10 @@
        if ( _bCheck )
                pImport->enableCheckOnly();
 
+       //dyf add 20070601
+       //set the selected tablename
+       pImport->setSTableName(_rDesc.sDefaultTableName);
+       //dyf add end 
        pImport->setStream(pStream);
        return pImport->Read();
 }

File [changed]: TokenWriter.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/TokenWriter.cxx?r1=1.32&r2=1.32.16.1
Delta lines:  +6 -3
-------------------
--- TokenWriter.cxx     2007-07-06 08:33:42+0000        1.32
+++ TokenWriter.cxx     2007-07-23 11:59:03+0000        1.32.16.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TokenWriter.cxx,v $
  *
- *  $Revision: 1.32 $
+ *  $Revision: 1.32.16.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/06 08:33:42 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -737,6 +737,9 @@
                ((OHTMLReader*)m_pReader)->AddRef();
                if ( isCheckEnabled() )
                        m_pReader->enableCheckOnly();
+               //dyf add 20070601
+               m_pReader->SetTableName(m_sDefaultTableName);
+               //dyf add end
                eState = ((OHTMLReader*)m_pReader)->CallParser();
                m_pReader->release();
                m_pReader = NULL;

File [changed]: WCPage.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/WCPage.cxx?r1=1.30&r2=1.30.18.1
Delta lines:  +47 -28
---------------------
--- WCPage.cxx  2007-07-06 08:34:33+0000        1.30
+++ WCPage.cxx  2007-07-23 11:59:03+0000        1.30.18.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WCPage.cxx,v $
  *
- *  $Revision: 1.30 $
+ *  $Revision: 1.30.18.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/06 08:34:33 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -102,7 +102,9 @@
 //========================================================================
 DBG_NAME(OCopyTable)
 //------------------------------------------------------------------------
-OCopyTable::OCopyTable( Window * pParent, EImportMode atWhat, sal_Bool 
bIsView, OCopyTableWizard::Wizard_Create_Style nLastAction )
+//--------dyf modify 2007/7/10
+OCopyTable::OCopyTable( Window * pParent, EImportMode atWhat, sal_Bool bIsView 
)//, OCopyTableWizard::Wizard_Create_Style nLastAction )
+//--------modify end
        : OWizardPage( pParent, ModuleRes(TAB_WIZ_COPYTABLE) ),
        m_ftTableName(                  this, ModuleRes( FT_TABLENAME           
) ),
        m_edTableName(                  this, ModuleRes( ET_TABLENAME           
) ),
@@ -170,28 +172,6 @@
 
                m_aCB_PrimaryColumn.Enable(m_bPKeyAllowed);
 
-               // reselect the last action before
-               switch(nLastAction)
-               {
-                       case OCopyTableWizard::WIZARD_DEF_DATA:
-                               m_aRB_DefData.Check(sal_True);
-                               break;
-                       case OCopyTableWizard::WIZARD_DEF:
-                               m_aRB_Def.Check(sal_True);
-                               break;
-                       case OCopyTableWizard::WIZARD_APPEND_DATA:
-                               m_aRB_AppendData.Check(sal_True);
-                               
m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_False);
-                               break;
-                       case OCopyTableWizard::WIZARD_DEF_VIEW:
-                               if(m_bIsViewAllowed)
-                               {
-                                       m_aRB_View.Check(sal_True);
-                                       
m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_False);
-                               }
-                               else
-                                       m_aRB_DefData.Check(sal_True);
-               }
                m_aRB_AppendData.SetClickHdl(   LINK( this, OCopyTable, 
AppendDataClickHdl      ) );
 
                m_aRB_DefData.SetClickHdl(              LINK( this, OCopyTable, 
RadioChangeHdl          ) );
@@ -232,14 +212,21 @@
 IMPL_LINK( OCopyTable, AppendDataClickHdl, Button*, /*pButton*/ )
 {
        DBG_CHKTHIS(OCopyTable,NULL);
+
+       SetAppendDataRadio();
+       return 0;
+}
+//--------dyf ADD
+void OCopyTable::SetAppendDataRadio()
+{
        m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_True);
        m_aFT_KeyName.Enable(sal_False);
        m_aCB_PrimaryColumn.Enable(sal_False);
        m_edKeyName.Enable(sal_False);
        m_pParent->setCreateStyle(OCopyTableWizard::WIZARD_APPEND_DATA);
-
-       return 0;
 }
+
+//--------add end
 //------------------------------------------------------------------------
 IMPL_LINK( OCopyTable, RadioChangeHdl, Button*, pButton )
 {
@@ -420,3 +407,35 @@
        return sal_True;
 }
 // 
-----------------------------------------------------------------------------
+//---dyf add 2006/7/10
+void OCopyTable::setCreateStyleAction()
+{
+       // reselect the last action before
+       switch(m_pParent->getCreateStyle())
+       {
+               case OCopyTableWizard::WIZARD_DEF_DATA:
+                       m_aRB_DefData.Check(sal_True);
+            RadioChangeHdl(&m_aRB_DefData);
+                       break;
+               case OCopyTableWizard::WIZARD_DEF:
+                       m_aRB_Def.Check(sal_True);
+            RadioChangeHdl(&m_aRB_Def);
+                       break;
+               case OCopyTableWizard::WIZARD_APPEND_DATA:
+                       m_aRB_AppendData.Check(sal_True);
+                       SetAppendDataRadio();
+                       break;
+               case OCopyTableWizard::WIZARD_DEF_VIEW:
+                       if(m_bIsViewAllowed)
+                       {
+                               m_aRB_View.Check(sal_True);
+                RadioChangeHdl(&m_aRB_View);
+                       }
+                       else
+            {
+                               m_aRB_DefData.Check(sal_True);
+                RadioChangeHdl(&m_aRB_DefData);
+            }
+       }
+}
+//---add end

File [changed]: WCopyTable.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/WCopyTable.cxx?r1=1.52&r2=1.52.18.1
Delta lines:  +20 -10
---------------------
--- WCopyTable.cxx      2007-07-06 08:35:06+0000        1.52
+++ WCopyTable.cxx      2007-07-23 11:59:03+0000        1.52.18.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WCopyTable.cxx,v $
  *
- *  $Revision: 1.52 $
+ *  $Revision: 1.52.18.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/06 08:35:06 $
+ *  last change: $Author: fs $ $Date: 2007/07/23 11:59:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -186,6 +186,8 @@
                                m_sSourceName = ::dbtools::composeTableName( 
m_xConnection->getMetaData(), m_xSourceObject, ::dbtools::eInDataManipulation, 
false, false, false );
                        else
                                _xSourceObject->getPropertyValue(PROPERTY_NAME) 
>>= m_sSourceName;
+               }
+
             if ( m_xSourceConnection == m_xConnection )
             {
                 Reference<XTablesSupplier> xSup(m_xConnection,UNO_QUERY_THROW);
@@ -194,11 +196,11 @@
             else
                            m_sName = m_sSourceName;
                }
-       }
        catch(const Exception&)
        {
         m_sName = m_sSourceName;
        }
+
 }
 // 
-----------------------------------------------------------------------------
 OCopyTableWizard::OCopyTableWizard(Window * pParent,
@@ -1203,4 +1205,12 @@
        aMsg.Execute();
 }
 // 
-----------------------------------------------------------------------------
+//------dyf add
+void OCopyTableWizard::ResetsName(const ::rtl::OUString & _sName)
+{
+       if ( _sName.getLength() != 0 )
+               m_sName = _sName;
 
+}
+//------dyf add end
+//-------------------------------------------------------------------------------




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

Reply via email to