Tag: cws_src680_dba24d
User: fs      
Date: 2007-11-08 14:21:07+0000
Modified:
   dba/dbaccess/source/ui/inc/DExport.hxx
   dba/dbaccess/source/ui/inc/HtmlReader.hxx
   dba/dbaccess/source/ui/inc/RtfReader.hxx
   dba/dbaccess/source/ui/inc/TableCopyHelper.hxx
   dba/dbaccess/source/ui/inc/WCPage.hxx
   dba/dbaccess/source/ui/inc/WColumnSelect.hxx
   dba/dbaccess/source/ui/inc/WCopyTable.hxx
   dba/dbaccess/source/ui/inc/WExtendPages.hxx
   dba/dbaccess/source/ui/inc/WTabPage.hxx
   dba/dbaccess/source/ui/inc/WTypeSelect.hxx

Log:
 #i81658# re-factoring of the Copy Table wizard

File Changes:

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.18&r2=1.18.28.1
Delta lines:  +31 -19
---------------------
--- DExport.hxx 2007-09-26 14:49:39+0000        1.18
+++ DExport.hxx 2007-11-08 14:21:04+0000        1.18.28.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: DExport.hxx,v $
  *
- *  $Revision: 1.18 $
+ *  $Revision: 1.18.28.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:49:39 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -69,12 +69,16 @@
 #ifndef DBAUI_TYPEINFO_HXX
 #include "TypeInfo.hxx"
 #endif
+#ifndef DBAUI_WIZ_TYPESELECT_HXX
+#include "WTypeSelect.hxx"
+#endif
 #ifndef _DBAUI_COMMON_TYPES_HXX_
 #include "commontypes.hxx"
 #endif
 #ifndef DBAUI_IUPDATEHELPER_HXX
 #include "IUpdateHelper.hxx"
 #endif
+#include "WTypeSelect.hxx"
 
 namespace com { namespace sun { namespace star { 
     namespace awt{
@@ -101,6 +105,7 @@
                
DECLARE_STL_MAP(::rtl::OUString,OFieldDescription*,::comphelper::UStringMixLess,TColumns);
                typedef ::std::vector<TColumns::const_iterator>                 
        TColumnVector;
                typedef ::std::vector< ::std::pair<sal_Int32,sal_Int32> >       
TPositions;
+
        protected:
                TPositions                                              
m_vColumns;             // Welche Spalten "ubernommen werden sollen
                ::std::vector<sal_Int32>                m_vColumnTypes; // 
FeldTypen f"ur schnelleren Zugriff
@@ -122,6 +127,7 @@
                ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory> m_xFactory;
 
         SvNumberFormatter*  m_pFormatter;
+        SvStream&           m_rInputStream;
                //dyf add 2006/06/01
                //for save the selected tablename
                ::rtl::OUString     m_sDefaultTableName;                
@@ -146,10 +152,9 @@
 
 
                virtual sal_Bool                CreateTable(int nToken)         
        = 0;
+        virtual TypeSelectionPageFactory
+                                getTypeSelectionPageFactory()   = 0;
 
-               /** createPage is called when the wizards needs an additional 
page to show
-               */
-               virtual OWizTypeSelect* createPage(Window* _pParent)    = 0;
                void                                    
CreateDefaultColumn(const ::rtl::OUString& _rColumnName);
                sal_Int32                               CheckString(const 
String& aToken, sal_Int32 _nOldFormat);
         void                    adjustFormat();
@@ -172,19 +177,26 @@
 
                virtual ~ODatabaseExport();
        public:
-               ODatabaseExport(const SharedConnection& _rxConnection,
+               ODatabaseExport(
+            const SharedConnection& _rxConnection,
                                                const 
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& 
_rxNumberF,
                                                const 
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory 
>& _rM,
-                                               const TColumnVector* rList = 0,
-                                               const OTypeInfoMap* _pInfoMap = 
0);
+                       const TColumnVector* rList,
+                       const OTypeInfoMap* _pInfoMap,
+            SvStream& _rInputStream
+        );
+
                // wird f"ur auto. Typ-Erkennung gebraucht
-               ODatabaseExport(sal_Int32 nRows,
+               ODatabaseExport(
+            sal_Int32 nRows,
                                                const TPositions& 
_rColumnPositions,
                                                const 
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& 
_rxNumberF,
                                                const 
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory 
>& _rM,
                                                const TColumnVector* rList,
                                                const OTypeInfoMap* _pInfoMap,
-                        sal_Bool _bAutoIncrementEnabled);
+            sal_Bool _bAutoIncrementEnabled,
+            SvStream& _rInputStream
+        );
 
                void    SetColumnTypes(const TColumnVector* rList,const 
OTypeInfoMap* _pInfoMap);
                

File [changed]: HtmlReader.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/HtmlReader.hxx?r1=1.13&r2=1.13.158.1
Delta lines:  +5 -8
-------------------
--- HtmlReader.hxx      2006-10-18 13:31:27+0000        1.13
+++ HtmlReader.hxx      2007-11-08 14:21:04+0000        1.13.158.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: HtmlReader.hxx,v $
  *
- *  $Revision: 1.13 $
+ *  $Revision: 1.13.158.1 $
  *
- *  last change: $Author: ihi $ $Date: 2006/10/18 13:31:27 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -67,11 +67,8 @@
        protected:
                virtual void            NextToken( int nToken ); // Basisklasse
                virtual sal_Bool        CreateTable(int nToken);
-
-               /** createPage creates the tabpage for this type
-                       @param  _pParent        teh parent window
-               */
-               virtual OWizTypeSelect* createPage(Window* _pParent);
+        virtual TypeSelectionPageFactory
+                             getTypeSelectionPageFactory();
 
                void                            TableDataOn(SvxCellHorJustify& 
eVal,int nToken);
                void                            
TableFontOn(::com::sun::star::awt::FontDescriptor& _rFont,sal_Int32 
&_rTextColor);

File [changed]: RtfReader.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/RtfReader.hxx?r1=1.9&r2=1.9.240.1
Delta lines:  +5 -8
-------------------
--- RtfReader.hxx       2006-05-04 08:43:05+0000        1.9
+++ RtfReader.hxx       2007-11-08 14:21:04+0000        1.9.240.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RtfReader.hxx,v $
  *
- *  $Revision: 1.9 $
+ *  $Revision: 1.9.240.1 $
  *
- *  last change: $Author: rt $ $Date: 2006/05/04 08:43:05 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -58,11 +58,8 @@
        protected:
                virtual sal_Bool                CreateTable(int nToken);
                virtual void                    NextToken( int nToken ); // 
Basisklasse
-
-               /** createPage creates the tabpage for this type
-                       @param  _pParent        teh parent window
-               */
-               virtual OWizTypeSelect* createPage(Window* _pParent);
+        virtual TypeSelectionPageFactory
+                                getTypeSelectionPageFactory();
 
                ~ORTFReader();
        public:

File [changed]: TableCopyHelper.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/TableCopyHelper.hxx?r1=1.6&r2=1.6.28.1
Delta lines:  +50 -52
---------------------
--- TableCopyHelper.hxx 2007-09-26 14:50:04+0000        1.6
+++ TableCopyHelper.hxx 2007-11-08 14:21:04+0000        1.6.28.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TableCopyHelper.hxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.28.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:50:04 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -94,10 +94,10 @@
 
     class OTableCopyHelper
     {
-        OGenericUnoController* m_pController;
        private:
-               ::rtl::OUString         m_sDefaultTableName;
-               sal_Bool                        m_bSelectCopyTable;
+        OGenericUnoController*  m_pController;
+               ::rtl::OUString             m_sTableNameForAppend;
+
     public:
         // is needed to describe the drop target
                struct DropDescriptor
@@ -143,44 +143,6 @@
                         ,const ::rtl::OUString& _sDestDataSourceName
                         ,const SharedConnection& _xConnection);
 
-               /** pastes a table into the data source
-                       @param  _rPasteData
-                               The data descriptor.
-            @param     _sDestDataSourceName
-                               The name of the dest data source.
-               */
-               void pasteTable( ::svx::ODataAccessDescriptor& _rPasteData 
-                        ,const ::rtl::OUString& _sDestDataSourceName
-                        ,const SharedConnection& _xDestConnection);
-
-               /** insert a table into the data source. The source can eihter 
be a table or a query
-                       @param  _nCommandType
-                               The command type.
-                       @param  _xSrcConnection
-                               The connection of the source.
-                       @param  _xSrcRs
-                               The ResultSet of the source.
-                       @param  _aSelection
-                               The selection of the rows to copy.
-                       @param  _bBookmarkSelection
-                               If <TRUE/> the selection is bookmark selection.
-                       @param  _sCommand
-                               The name of the query or table.
-                       @param  _sSrcDataSourceName
-                               The name of the source data source.
-            @param     _sDestDataSourceName
-                               The name of the dest data source.
-               */
-               void insertTable( sal_Int32 _nCommandType
-                                               ,const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& 
_xSrcConnection
-                                               ,const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>&   
_xSrcRs                 // the source resultset may be empty
-                                               ,const 
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& _aSelection
-                                               ,sal_Bool _bBookmarkSelection
-                                               ,const ::rtl::OUString& 
_sCommand
-                                               ,const ::rtl::OUString& 
_sSrcDataSourceName
-                        ,const ::rtl::OUString& _sDestDataSourceName
-                        ,const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection>& _xDestConnection);
-
                /** copies a table which was constructed by tags like HTML or 
RTF
                        @param  _rDesc
                                The Drop descriptor
@@ -220,13 +182,49 @@
         /// 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 void                     SetTableNameForAppend( const 
::rtl::OUString& _rDefaultTableName ) { m_sTableNameForAppend = 
_rDefaultTableName; }
+        inline void                     ResetTableNameForAppend() { 
SetTableNameForAppend( ::rtl::OUString() ); }
+               inline const ::rtl::OUString&   GetTableNameForAppend() const { 
return m_sTableNameForAppend ;}
 
-               inline void                     SetIsSelectCopytable(sal_Bool 
isSelect){ m_bSelectCopyTable = isSelect;}
-               sal_Bool                        GetIsSelectCopytable(){ return 
m_bSelectCopyTable; }
-               //dyf add end 
+    private:
+               /** pastes a table into the data source
+                       @param  _rPasteData
+                               The data descriptor.
+            @param     _sDestDataSourceName
+                               The name of the dest data source.
+               */
+               void pasteTable(
+            const ::svx::ODataAccessDescriptor& _rPasteData,
+            const ::rtl::OUString& _sDestDataSourceName,
+            const SharedConnection& _xDestConnection
+        );
+
+               /** insert a table into the data source. The source can eihter 
be a table or a query
+                       @param  _nCommandType
+                               The command type.
+                       @param  _xSrcConnection
+                               The connection of the source.
+                       @param  _aSelection
+                               The selection of the rows to copy.
+                       @param  _bBookmarkSelection
+                               If <TRUE/> the selection is bookmark selection.
+                       @param  _sCommand
+                               The name of the query or table.
+                       @param  _sSrcDataSourceName
+                               The name of the source data source.
+            @param     _sDestDataSourceName
+                               The name of the dest data source.
+               */
+               void insertTable(
+            sal_Int32 _nCommandType,
+                       const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection>& _xSrcConnection,
+                       const ::com::sun::star::uno::Sequence< 
::com::sun::star::uno::Any >& _aSelection,
+                       sal_Bool _bBookmarkSelection,
+                       const ::rtl::OUString& _sCommand,
+                       const ::rtl::OUString& _sSrcDataSourceName,
+            const ::rtl::OUString& _sDestDataSourceName,
+            const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection>& _xDestConnection
+        );
         
     };
 //........................................................................

File [changed]: WCPage.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/WCPage.hxx?r1=1.7&r2=1.7.28.1
Delta lines:  +11 -14
---------------------
--- WCPage.hxx  2007-09-26 14:50:29+0000        1.7
+++ WCPage.hxx  2007-11-08 14:21:04+0000        1.7.28.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WCPage.hxx,v $
  *
- *  $Revision: 1.7 $
+ *  $Revision: 1.7.28.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:50:29 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -35,12 +35,8 @@
 #ifndef DBAUI_WIZARD_CPAGE_HXX
 #define DBAUI_WIZARD_CPAGE_HXX
 
-#ifndef DBAUI_WIZ_TABBPAGE_HXX
 #include "WTabPage.hxx"
-#endif
-#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
-#include "WCopyTable.hxx"
-#endif
+
 #ifndef DBAUI_ENUMTYPES_HXX
 #include "QEnumTypes.hxx"
 #endif
@@ -78,12 +74,11 @@
                CheckBox                                                        
        m_aCB_PrimaryColumn;
                FixedText                                                       
        m_aFT_KeyName;
                Edit                                                            
        m_edKeyName;
-               OCopyTableWizard::Wizard_Create_Style   m_eOldStyle;
+               sal_Int16                               m_nOldOperation;
 
                OWizColumnSelect*                                               
m_pPage2;
                OWizNormalExtend*                                               
m_pPage3;
 
-               BOOL                                                            
        m_bIsViewAllowed;
                BOOL                                                            
        m_bPKeyAllowed;
 
 
@@ -102,7 +97,7 @@
                virtual BOOL                    LeavePage();
                virtual String                  GetTitle() const ;
 
-               OCopyTable( Window * pParent, EImportMode atWhat, BOOL bIsView 
);//, OCopyTableWizard::Wizard_Create_Style nLastAction );
+               OCopyTable( Window * pParent );
                virtual ~OCopyTable();
 
                inline BOOL IsOptionDefData()           const { return 
m_aRB_DefData.IsChecked(); }
@@ -111,9 +106,11 @@
                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
+               void setCreateStyleAction();
+        void disallowViews()
+        {
+            m_aRB_View.Disable();
+        }
        };
 }
 #endif // DBAUI_WIZARD_CPAGE_HXX

File [changed]: WColumnSelect.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/WColumnSelect.hxx?r1=1.8&r2=1.8.158.1
Delta lines:  +8 -5
-------------------
--- WColumnSelect.hxx   2006-10-12 13:38:47+0000        1.8
+++ WColumnSelect.hxx   2007-11-08 14:21:04+0000        1.8.158.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WColumnSelect.hxx,v $
  *
- *  $Revision: 1.8 $
+ *  $Revision: 1.8.158.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/10/12 13:38:47 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -35,9 +35,9 @@
 #ifndef DBAUI_WIZ_COLUMNSELECT_HXX
 #define DBAUI_WIZ_COLUMNSELECT_HXX
 
-#ifndef DBAUI_WIZ_TABBPAGE_HXX
 #include "WTabPage.hxx"
-#endif
+#include "WCopyTable.hxx"
+
 #ifndef _SV_FIXED_HXX
 #include <vcl/fixed.hxx>
 #endif
@@ -47,9 +47,12 @@
 #ifndef _SV_BUTTON_HXX
 #include <vcl/button.hxx>
 #endif
+#include <comphelper/stl_types.hxx>
 
 namespace dbaui
 {
+    class OFieldDescription;
+
        // ========================================================
        // Wizard Page: OWizColumnSelect
        // ========================================================

File [changed]: WCopyTable.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/WCopyTable.hxx?r1=1.22&r2=1.22.28.1
Delta lines:  +47 -51
---------------------
--- WCopyTable.hxx      2007-09-26 14:50:42+0000        1.22
+++ WCopyTable.hxx      2007-11-08 14:21:04+0000        1.22.28.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WCopyTable.hxx,v $
  *
- *  $Revision: 1.22 $
+ *  $Revision: 1.22.28.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:50:42 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -128,6 +128,7 @@
                                ::std::bind2nd(m_aCase, _sColumnName)) != 
m_pVector->end();
                }
        };
+
        // ========================================================
        // Wizard Dialog
        // ========================================================
@@ -142,14 +143,6 @@
     public:
                
DECLARE_STL_MAP(::rtl::OUString,::rtl::OUString,::comphelper::UStringMixLess,TNameMapping);
 
-               enum Wizard_Create_Style
-               {
-                       WIZARD_APPEND_DATA = 0,
-                       WIZARD_DEF_DATA,
-                       WIZARD_DEF,
-                       WIZARD_DEF_VIEW
-               };
-
                enum Wizard_Button_Style
                {
                        WIZARD_NEXT,
@@ -180,11 +173,10 @@
                ODatabaseExport::TPositions                 m_vColumnPos;
                ::std::vector<sal_Int32>                    m_vColumnTypes;
 
-               ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet >               m_xDestObject; // can be 
a query or a table
-               ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >                 m_xConnection;  // dest 
conn
+               ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >                 m_xDestConnection;
 
                ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet >               m_xSourceObject;
-               ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >                 m_xSourceConnection;    
// source conn
+               ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >                 m_xSourceConnection;
 
                ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameAccess>             m_xSourceColumns;         
      // container
                ::com::sun::star::uno::Reference< 
::com::sun::star::util::XNumberFormatter >    m_xFormatter;
@@ -200,9 +192,9 @@
                ::rtl::OUString                                 m_aKeyName;
                TOTypeInfoSP                                    m_pTypeInfo; // 
default type
                sal_Bool                                                
m_bAddPKFirstTime;
-               Wizard_Create_Style             m_eCreateStyle;
+        sal_Int16                       m_nOperation;
                Wizard_Button_Style                 m_ePressed;
-               sal_Bool                                    
m_bCreatePrimaryColumn;
+               sal_Bool                                    
m_bCreatePrimaryKeyColumn;
 
 
     private:
@@ -217,28 +209,38 @@
                void construct();
                ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameAccess> getKeyColumns(const 
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& 
_xTable) const;
                // need for table creation
-               void appendColumns(::com::sun::star::uno::Reference< 
::com::sun::star::sdbcx::XColumnsSupplier>& _rxColSup,const 
ODatabaseExport::TColumnVector* _pVec,sal_Bool _bKeyColumns=sal_False);
-               void appendKey(::com::sun::star::uno::Reference< 
::com::sun::star::sdbcx::XKeysSupplier>& _rxSup,const 
ODatabaseExport::TColumnVector* _pVec);
+               void appendColumns( ::com::sun::star::uno::Reference< 
::com::sun::star::sdbcx::XColumnsSupplier>& _rxColSup, const 
ODatabaseExport::TColumnVector* _pVec, sal_Bool _bKeyColumns = sal_False ) 
const;
+               void appendKey(::com::sun::star::uno::Reference< 
::com::sun::star::sdbcx::XKeysSupplier>& _rxSup,const 
ODatabaseExport::TColumnVector* _pVec) const;
                // checks if the type is supported in the destination database
                sal_Bool supportsType(sal_Int32 _nDataType,sal_Int32& 
_rNewDataType);
 
+        void    impl_fillTypeInfo();
+
        public:
                // used for copy tables or queries
-               OCopyTableWizard(Window * pParent,
+               OCopyTableWizard(
+            Window * pParent,
+            const ::rtl::OUString& _rDefaultName,
+            sal_Int16 _nOperation,
                                                 const 
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >&      
         _xSourceObject,
                                                 const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >&        
         _xSourceConnection,
                                                 const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >&        
         _xConnection,
-                                                const 
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >&   
 _xFormatter,
-                                                const 
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory 
>& _rM);
+            const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+        );
 
                // used for importing rtf/html sources
-               OCopyTableWizard(Window * pParent,
+               OCopyTableWizard(
+            Window* pParent,
                                                const ::rtl::OUString& 
_rDefaultName,
+            sal_Int16 _nOperation,
                                                const 
ODatabaseExport::TColumns& _rDestColumns,
                                                const 
ODatabaseExport::TColumnVector& _rSourceColVec,
                                                const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& 
_xConnection,
                                                const 
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >&   
  _xFormatter,
-                                               const 
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory 
>& _rM);
+            TypeSelectionPageFactory _pTypeSelectionPageFactory,
+            SvStream& _rTypeSelectionPageArg,
+            const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rM
+        );
 
                virtual ~OCopyTableWizard();
 
@@ -250,16 +252,10 @@
                void                            RemoveWizardPage(OWizardPage* 
pPage); // Page goes again to user
                void                            CheckButtons(); // checks which 
button can be disabled, enabled
 
-               void                            fillTypeInfo();
-               /** has to be called after fillTypeInfo() and only when using 
the 1st ctor
-               */
-               void                            loadData();
-
                // returns a vector where the position of a column and if the 
column is in the selection
                // when not the value is COLUMN_POSITION_NOT_FOUND == 
(sal_uInt32)-1
                ODatabaseExport::TPositions     GetColumnPositions()    const { 
return m_vColumnPos; }
                ::std::vector<sal_Int32>        GetColumnTypes()                
const { return m_vColumnTypes; }
-               const TNameMapping*                     GetNameMapping()        
        const { return &m_mNameMapping; }
 
                void insertColumn(sal_Int32 _nPos,OFieldDescription* _pField);
 
@@ -273,16 +269,20 @@
                */
                void replaceColumn(sal_Int32 _nPos,OFieldDescription* 
_pField,const ::rtl::OUString& _sOldName);
 
-               ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > getDestObject() const { return 
m_xDestObject; }
-               /** 
-                       @return 
-                               <TRUE/> if I need to set the autoincrement 
value by myself otherwise <FALSE/>
+               /** returns whether a primary key should be created in the 
target database
                */
-               sal_Bool                isAutoincrementEnabled() const;
+               sal_Bool                shouldCreatePrimaryKey() const;
+        void            setCreatePrimaryKey( bool _bDoCreate, const 
::rtl::OUString& _rSuggestedName );
+
+        static bool     supportsPrimaryKey( const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& 
_rxConnection );
+        bool            supportsPrimaryKey() const { return 
supportsPrimaryKey( m_xDestConnection ); }
+
+        static bool     supportsViews( const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >& _rxConnection );
+        bool            supportsViews() const { return supportsViews( 
m_xDestConnection ); }
 
                /** returns the name of the primary key
                        @return
-                               The name of teh primary key.
+                               The name of the primary key.
                */
                ::rtl::OUString getPrimaryKeyName() const { return m_aKeyName; }
 
@@ -307,13 +307,11 @@
                void clearDestColumns();
 
                ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > createTable();
-               ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > createView();
-               // return true when the conenction supports primary keys
-               sal_Bool  supportsPrimaryKey() const;
+               ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > createView() const;
                sal_Int32 getMaxColumnNameLength() const;
 
-               void setCreateStyle(const Wizard_Create_Style& _eStyle);
-               Wizard_Create_Style getCreateStyle() const;
+               void setOperation( const sal_Int16 _nOperation );
+               sal_Int16 getOperation() const;
 
                ::rtl::OUString convertColumnName(      const 
TColumnFindFunctor&       _rCmpFunctor,
                                                                                
        const ::rtl::OUString&  _sColumnName,
@@ -328,9 +326,7 @@
 
         void removeColumnNameFromNameMap(const ::rtl::OUString& _sName);
 
-               //dyf add
-               void ResetsName(const ::rtl::OUString & _sName);
-               //dyf add end 
+               void SetTableName( const ::rtl::OUString& _rName );
        };
 }
 

File [changed]: WExtendPages.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/WExtendPages.hxx?r1=1.4&r2=1.4.348.1
Delta lines:  +10 -6
--------------------
--- WExtendPages.hxx    2005-09-08 15:42:37+0000        1.4
+++ WExtendPages.hxx    2007-11-08 14:21:04+0000        1.4.348.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WExtendPages.hxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.4.348.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 15:42:37 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -50,11 +50,13 @@
        protected:
                virtual SvParser*       createReader(sal_Int32 _nRows);
        public:
-               OWizHTMLExtend(Window* pParent,SvStream&        _rStream) 
-                       : OWizTypeSelect( pParent,&_rStream)
+               OWizHTMLExtend(Window* pParent, SvStream& _rStream) 
+                       : OWizTypeSelect( pParent, &_rStream )
                {
                }
 
+        static OWizTypeSelect* Create( Window* _pParent, SvStream& _rInput ) { 
return new OWizHTMLExtend( _pParent, _rInput ); }
+
                virtual ~OWizHTMLExtend(){}
        };
        // ========================================================
@@ -66,10 +68,12 @@
                virtual SvParser* createReader(sal_Int32 _nRows);
        public:
                OWizRTFExtend(Window* pParent,SvStream& _rStream) 
-                       : OWizTypeSelect( pParent,&_rStream)
+                       : OWizTypeSelect( pParent, &_rStream )
                {
                }
 
+        static OWizTypeSelect* Create( Window* _pParent, SvStream& _rInput ) { 
return new OWizRTFExtend( _pParent, _rInput ); }
+
                virtual ~OWizRTFExtend(){}
        };
 

File [changed]: WTabPage.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/WTabPage.hxx?r1=1.4&r2=1.4.88.1
Delta lines:  +5 -7
-------------------
--- WTabPage.hxx        2007-05-10 10:30:17+0000        1.4
+++ WTabPage.hxx        2007-11-08 14:21:04+0000        1.4.88.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WTabPage.hxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.4.88.1 $
  *
- *  last change: $Author: kz $ $Date: 2007/05/10 10:30:17 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -39,9 +39,6 @@
 #ifndef _SV_TABPAGE_HXX 
 #include <vcl/tabpage.hxx>
 #endif
-#ifndef DBAUI_DATABASEEXPORT_HXX
-#include "DExport.hxx"
-#endif
 
 namespace dbaui
 {
@@ -56,6 +53,7 @@
                sal_Bool                                        m_bFirstTime;   
// Page wird das erste mal gerufen ; should be set in the reset methode
 
                OWizardPage( Window* pParent, const ResId& rResId );// : 
TabPage(pParent,rResId),m_pParent((OCopyTableWizard*)pParent),m_bFirstTime(sal_True)
 {};
+
        public:
                virtual void            Reset ( )                       = 0;
                virtual sal_Bool        LeavePage()                     = 0;

File [changed]: WTypeSelect.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/WTypeSelect.hxx?r1=1.14&r2=1.14.88.1
Delta lines:  +14 -23
---------------------
--- WTypeSelect.hxx     2007-05-10 10:30:29+0000        1.14
+++ WTypeSelect.hxx     2007-11-08 14:21:04+0000        1.14.88.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WTypeSelect.hxx,v $
  *
- *  $Revision: 1.14 $
+ *  $Revision: 1.14.88.1 $
  *
- *  last change: $Author: kz $ $Date: 2007/05/10 10:30:29 $
+ *  last change: $Author: fs $ $Date: 2007/11/08 14:21:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -35,27 +35,14 @@
 #ifndef DBAUI_WIZ_TYPESELECT_HXX
 #define DBAUI_WIZ_TYPESELECT_HXX
 
-#ifndef DBAUI_WIZ_TABBPAGE_HXX
-#include "WTabPage.hxx"
-#endif
-#ifndef _SV_LSTBOX_HXX
-#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_FIELD_HXX
-#include <vcl/field.hxx>
-#endif
-#ifndef _SV_FIXED_HXX
-#include <vcl/fixed.hxx>
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
 #include "FieldDescControl.hxx"
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
 #include "TypeInfo.hxx"
-#endif
-#ifndef _SV_BUTTON_HXX
+#include "WTabPage.hxx"
+
 #include <vcl/button.hxx>
-#endif
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
 
 class SvStream;
 class SvParser;
@@ -107,6 +94,7 @@
                OWizTypeSelectList( Window* pParent, const ResId& rResId ) : 
MultiListBox(pParent,rResId) {};
                void                                    SetPKey(sal_Bool bPKey) 
{ m_bPKey = bPKey; }
        };
+
        // ========================================================
        // Wizard Page: OWizTypeSelect
        // Dient als Basis Klasse fuer unterschiedliche Kopiereigenschaften
@@ -147,12 +135,15 @@
                virtual sal_Bool                LeavePage();
                virtual String                  GetTitle() const;
 
-               OWizTypeSelect(Window* pParent,SvStream*        _pStream = 
NULL);
+               OWizTypeSelect(Window* pParent, SvStream* _pStream = NULL );
                virtual ~OWizTypeSelect();
 
                inline void setDisplayRow(sal_Int32 _nRow) { m_nDisplayRow = 
_nRow - 1; }
                inline void setDuplicateName(sal_Bool _bDuplicateName) { 
m_bDuplicateName = _bDuplicateName; }
        };
+
+    // ========================================================
+    typedef OWizTypeSelect* (*TypeSelectionPageFactory)( Window*, SvStream& );
 }
 #endif // DBAUI_WIZ_TYPESELECT_HXX
 




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

Reply via email to