1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef DBAUI_WIZ_COLUMNSELECT_HXX 24 #define DBAUI_WIZ_COLUMNSELECT_HXX 25 26 #include "WTabPage.hxx" 27 #include "WCopyTable.hxx" 28 29 #ifndef _SV_FIXED_HXX 30 #include <vcl/fixed.hxx> 31 #endif 32 #ifndef _SV_LSTBOX_HXX 33 #include <vcl/lstbox.hxx> 34 #endif 35 #ifndef _SV_BUTTON_HXX 36 #include <vcl/button.hxx> 37 #endif 38 #include <comphelper/stl_types.hxx> 39 40 namespace dbaui 41 { 42 class OFieldDescription; 43 44 // ======================================================== 45 // Wizard Page: OWizColumnSelect 46 // ======================================================== 47 48 class OWizColumnSelect : public OWizardPage 49 { 50 51 FixedLine m_flColumns; 52 MultiListBox m_lbOrgColumnNames; // left side 53 ImageButton m_ibColumn_RH; 54 ImageButton m_ibColumns_RH; 55 ImageButton m_ibColumn_LH; 56 ImageButton m_ibColumns_LH; 57 MultiListBox m_lbNewColumnNames; // right side 58 59 60 DECL_LINK( ButtonClickHdl, Button * ); 61 DECL_LINK( ListDoubleClickHdl, MultiListBox * ); 62 63 64 void clearListBox(MultiListBox& _rListBox); 65 void fillColumns( ListBox* pRight, 66 ::std::vector< ::rtl::OUString> &_rRightColumns); 67 68 void createNewColumn( ListBox* _pListbox, 69 OFieldDescription* _pSrcField, 70 ::std::vector< ::rtl::OUString>& _rRightColumns, 71 const ::rtl::OUString& _sColumnName, 72 const ::rtl::OUString& _sExtraChars, 73 sal_Int32 _nMaxNameLen, 74 const ::comphelper::TStringMixEqualFunctor& _aCase); 75 76 void moveColumn( ListBox* _pRight, 77 ListBox* _pLeft, 78 ::std::vector< ::rtl::OUString>& _rRightColumns, 79 const ::rtl::OUString& _sColumnName, 80 const ::rtl::OUString& _sExtraChars, 81 sal_Int32 _nMaxNameLen, 82 const ::comphelper::TStringMixEqualFunctor& _aCase); 83 84 void enableButtons(); 85 86 87 sal_uInt16 adjustColumnPosition(ListBox* _pLeft, 88 const ::rtl::OUString& _sColumnName, 89 ODatabaseExport::TColumnVector::size_type nCurrentPos, 90 const ::comphelper::TStringMixEqualFunctor& _aCase); 91 92 public: 93 virtual void Reset ( ); 94 virtual void ActivatePage(); 95 virtual sal_Bool LeavePage(); 96 virtual String GetTitle() const ; 97 98 OWizColumnSelect(Window* pParent); 99 virtual ~OWizColumnSelect(); 100 }; 101 } 102 #endif // DBAUI_WIZ_COLUMNSELECT_HXX 103 104 105 106