dbaccess/AllLangResTarget_dbu.mk | 1 dbaccess/UIConfig_dbaccess.mk | 4 dbaccess/source/ui/control/charsetlistbox.cxx | 18 dbaccess/source/ui/control/curledit.cxx | 13 dbaccess/source/ui/dlg/AutoControls_tmpl.hrc | 197 ---------- dbaccess/source/ui/dlg/ConnectionHelper.cxx | 84 ++-- dbaccess/source/ui/dlg/ConnectionHelper.hxx | 10 dbaccess/source/ui/dlg/ConnectionPage.cxx | 62 +-- dbaccess/source/ui/dlg/ConnectionPage.hxx | 4 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 61 ++- dbaccess/source/ui/dlg/ConnectionPageSetup.hxx | 8 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 8 dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 282 +++++--------- dbaccess/source/ui/dlg/TextConnectionHelper.hxx | 40 +- dbaccess/source/ui/dlg/dbadmin.src | 42 +- dbaccess/source/ui/dlg/dbadminsetup.hrc | 2 dbaccess/source/ui/dlg/dbadminsetup.src | 29 - dbaccess/source/ui/dlg/detailpages.cxx | 46 ++ dbaccess/source/ui/dlg/detailpages.hxx | 2 dbaccess/source/ui/dlg/textconnectionsettings.cxx | 10 dbaccess/source/ui/dlg/textconnectionsettings.src | 55 -- dbaccess/source/ui/inc/charsetlistbox.hxx | 1 dbaccess/source/ui/inc/curledit.hxx | 1 dbaccess/source/ui/inc/dbu_dlg.hrc | 6 dbaccess/source/ui/inc/dbu_resource.hrc | 9 dbaccess/source/ui/inc/textconnectionsettings.hxx | 3 dbaccess/uiconfig/ui/dbwiztextpage.ui | 166 ++++++++ dbaccess/uiconfig/ui/emptypage.ui | 16 dbaccess/uiconfig/ui/textconnectionsettings.ui | 84 ++++ dbaccess/uiconfig/ui/textpage.ui | 431 ++++++++++++++++++++++ extras/source/glade/libreoffice-catalog.xml.in | 6 31 files changed, 1127 insertions(+), 574 deletions(-)
New commits: commit 03fe3215e35d07319eac4a0e7a8d6e5563244492 Author: Szymon KÅos <eszka...@gmail.com> Date: Sun Jul 27 13:56:58 2014 +0200 PAGE_DBWIZARD_TEXT, PAGE_TEXT, DLG_TEXT_CONNECTION_SETTINGS conversion to .ui Change-Id: Iea5105cc33b436e9c0728df799b1ceb63f20e46e Reviewed-on: https://gerrit.libreoffice.org/10579 Tested-by: LibreOffice gerrit bot <ger...@libreoffice.org> Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/dbaccess/AllLangResTarget_dbu.mk b/dbaccess/AllLangResTarget_dbu.mk index 9cc5850..11150f8 100644 --- a/dbaccess/AllLangResTarget_dbu.mk +++ b/dbaccess/AllLangResTarget_dbu.mk @@ -46,7 +46,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\ dbaccess/source/ui/dlg/indexdialog.src \ dbaccess/source/ui/dlg/paramdialog.src \ dbaccess/source/ui/dlg/sqlmessage.src \ - dbaccess/source/ui/dlg/textconnectionsettings.src \ dbaccess/source/ui/dlg/UserAdmin.src \ dbaccess/source/ui/misc/dbumiscres.src \ dbaccess/source/ui/misc/WizardPages.src \ diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk index cb76450..6a79a08 100644 --- a/dbaccess/UIConfig_dbaccess.mk +++ b/dbaccess/UIConfig_dbaccess.mk @@ -19,7 +19,9 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \ dbaccess/uiconfig/ui/colwidthdialog \ dbaccess/uiconfig/ui/copytablepage \ dbaccess/uiconfig/ui/dbaseindexdialog \ + dbaccess/uiconfig/ui/dbwiztextpage \ dbaccess/uiconfig/ui/directsqldialog \ + dbaccess/uiconfig/ui/emptypage \ dbaccess/uiconfig/ui/fielddialog \ dbaccess/uiconfig/ui/finalpagewizard \ dbaccess/uiconfig/ui/generalpagedialog \ @@ -42,6 +44,8 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \ dbaccess/uiconfig/ui/tablesfilterdialog \ dbaccess/uiconfig/ui/tablesfilterpage \ dbaccess/uiconfig/ui/tablesjoindialog \ + dbaccess/uiconfig/ui/textconnectionsettings \ + dbaccess/uiconfig/ui/textpage \ dbaccess/uiconfig/ui/useradmindialog \ )) diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx index e1578d0..371f372 100644 --- a/dbaccess/source/ui/control/charsetlistbox.cxx +++ b/dbaccess/source/ui/control/charsetlistbox.cxx @@ -39,6 +39,24 @@ namespace dbaui } } + CharSetListBox::CharSetListBox( Window* _pParent, WinBits _nBits = WB_DROPDOWN ) + :ListBox( _pParent, _nBits ) + { + SetDropDownLineCount( 20 ); + + OCharsetDisplay::const_iterator charSet = m_aCharSets.begin(); + while ( charSet != m_aCharSets.end() ) + { + InsertEntry( (*charSet).getDisplayName() ); + ++charSet; + } + } + + extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCharSetListBox(Window *pParent) + { + return new CharSetListBox(pParent); + } + CharSetListBox::~CharSetListBox() { } diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index cab9949..3a24c58 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -33,6 +33,19 @@ OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,bo { } +OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, WinBits _nBits,bool _bShowPrefix) + :Edit(_pParent, _nBits) + ,m_pTypeCollection(NULL) + ,m_pForcedPrefix(NULL) + ,m_bShowPrefix(_bShowPrefix) +{ +} + +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeConnectionURLEdit(Window *pParent) +{ + return new OConnectionURLEdit(pParent, WB_BORDER, false); +} + OConnectionURLEdit::~OConnectionURLEdit() { // delete my sub controls diff --git a/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc b/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc index c6fdea8..08c4c0a 100644 --- a/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc +++ b/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc @@ -31,10 +31,6 @@ #define EDIT_X 101 #define FT_AUTOJDBCDRIVERCLASS 80 -#define FT_AUTOFIELDSEPARATOR 81 -#define FT_AUTOTEXTSEPARATOR 82 -#define FT_AUTODECIMALSEPARATOR 83 -#define FT_AUTOTHOUSANDSSEPARATOR 84 #define FT_AUTOPORTNUMBER 85 #define FT_AUTOPORTNUMBERDEFAULT 86 #define FT_AUTOBASEDN 87 @@ -43,26 +39,16 @@ #define FT_AUTODATABASENAME 90 #define FT_AUTOWIZARDHELPTEXT 91 #define FT_AUTOWIZARDHEADER 92 -#define FT_AUTOEXTENSIONHEADER 93 -#define FT_AUTOOWNEXTENSIONAPPENDIX 94 #define FT_CHARSET 95 #define FT_SOCKET 96 -#define FL_AUTOSEPARATOR2 80 #define FL_DATACONVERT 81 #define FL_SEPARATOR1 82 -#define CB_AUTOHEADER 80 - #define PB_AUTOTESTDRIVERCLASS 80 #define PB_AUTOBROWSEURL 81 #define PB_CREATEDB 82 -#define CM_AUTOFIELDSEPARATOR 80 -#define CM_AUTOTEXTSEPARATOR 81 -#define CM_AUTODECIMALSEPARATOR 82 -#define CM_AUTOTHOUSANDSSEPARATOR 83 - #define NF_AUTOPORTNUMBER 80 #define ET_AUTOBASEDN 80 @@ -70,22 +56,10 @@ #define ET_AUTODATABASENAME 82 #define ET_AUTOBROWSEURL 83 #define ET_AUTOJDBCDRIVERCLASS 84 -#define ET_AUTOOWNEXTENSION 85 #define ET_SOCKET 86 -#define RB_AUTOACCESSCTEXTFILES 80 -#define RB_AUTOACCESSCCSVFILES 81 -#define RB_AUTOACCESSOTHERS 82 - #define LB_CHARSET 80 -#define STR_AUTOFIELDSEPARATORLIST 100 -#define STR_AUTOTEXTSEPARATORLIST 101 -#define STR_AUTOTEXT_FIELD_SEP_NONE 102 -#define STR_AUTODELIMITER_MISSING 103 -#define STR_AUTODELIMITER_MUST_DIFFER 104 -#define STR_AUTONO_WILDCARDS 105 - #define AUTO_WIZARDHELPTEXT( AUTO_LINECOUNT ) \ FixedText FT_AUTOWIZARDHEADER \ { \ @@ -241,177 +215,6 @@ CurPos = 0 ; \ }; \ -#define AUTO_SEPARATORCONTROLGROUP(AUTO_Y,AUTOPAGE_X) \ - \ - FixedText FT_AUTOEXTENSIONHEADER \ - { \ - Pos = MAP_APPFONT ( START_X , AUTO_Y) ; \ - Size = MAP_APPFONT ( AUTOPAGE_X - 2*START_X , FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "Specify the type of files you want to access" ; \ - }; \ - \ - RadioButton RB_AUTOACCESSCTEXTFILES \ - { \ - HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSTXTFILES; \ - Pos = MAP_APPFONT (START_X + 6 , AUTO_Y + FIXEDTEXT_HEIGHT + RELATED_CONTROLS); \ - Size = MAP_APPFONT ( AUTOPAGE_X - 12 , FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "Plain text files (*.txt)" ; \ - }; \ - \ - RadioButton RB_AUTOACCESSCCSVFILES \ - { \ - HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSCSVFILES; \ - Pos = MAP_APPFONT (START_X + 6 , AUTO_Y + 2*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS); \ - Size = MAP_APPFONT ( AUTOPAGE_X - 12 , FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "'Comma separated value' files (*.csv)" ; \ - }; \ - \ - RadioButton RB_AUTOACCESSOTHERS \ - { \ - HelpId = HID_PAGE_DBWIZARD_TEXT_RB_ACCESSOTHERFILES; \ - Pos = MAP_APPFONT (START_X + 6 , AUTO_Y + 3*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS); \ - Size = MAP_APPFONT ( 50 , FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "Custom:" ; \ - }; \ - \ - Edit ET_AUTOOWNEXTENSION \ - { \ - HelpId = HID_PAGE_DBWIZARD_TEXT_ET_OWNEXTENSION; \ - Pos = MAP_APPFONT (START_X + 66, AUTO_Y + 3*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS - 2 ) ; \ - Size = MAP_APPFONT ( 60, EDIT_HEIGHT ) ; \ - TabStop = TRUE ; \ - Border = TRUE ; \ - }; \ - \ - FIXEDTEXT FT_AUTOOWNEXTENSIONAPPENDIX \ - { \ - Pos = MAP_APPFONT (START_X + 130 , AUTO_Y + 3 * ( FIXEDTEXT_HEIGHT + RELATED_CONTROLS ) ); \ - Size = MAP_APPFONT ( AUTOPAGE_X - 6 -(START_X + 130), FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "Custom: *.abc" ; \ - }; \ - \ - FixedLine FL_AUTOSEPARATOR2 \ - { \ - Pos = MAP_APPFONT ( START_X , AUTO_Y + 50) ; \ - Size = MAP_APPFONT ( AUTOPAGE_X - 2 * START_X , FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "Row Format"; \ - }; \ - \ - FixedText FT_AUTOFIELDSEPARATOR \ - { \ - Pos = MAP_APPFONT ( START_X + INDENTED_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT ) ; \ - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "Field separator" ; \ - }; \ - ComboBox CM_AUTOFIELDSEPARATOR \ - { \ - Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT - 2 ) ; \ - Size = MAP_APPFONT ( 32 , 60 ) ; \ - Text = ";" ; \ - TabStop = TRUE ; \ - DropDown = TRUE ; \ - HelpId = HID_DSADMIN_FIELD_SEPARATOR; \ - }; \ - \ - FixedText FT_AUTOTEXTSEPARATOR \ - { \ - Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS + EDIT_HEIGHT ) ; \ - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "Text separator" ; \ - }; \ - ComboBox CM_AUTOTEXTSEPARATOR \ - { \ - Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS + EDIT_HEIGHT - 2 ) ; \ - Size = MAP_APPFONT ( 32 , 60 ) ; \ - Text = "\"" ; \ - TabStop = TRUE ; \ - DropDown = TRUE ; \ - HelpId = HID_DSADMIN_TEXT_SEPARATOR; \ - }; \ - FixedText FT_AUTODECIMALSEPARATOR \ - { \ - Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS + 2*EDIT_HEIGHT ) ; \ - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "Decimal separator" ; \ - }; \ - ComboBox CM_AUTODECIMALSEPARATOR \ - { \ - Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS + 2*EDIT_HEIGHT - 2 ) ; \ - Size = MAP_APPFONT ( 32 , 60 ) ; \ - TabStop = TRUE ; \ - MaxTextLength = 1 ; \ - DropDown = TRUE ; \ - StringList = \ - { \ - "." ; \ - "," ; \ - ";" ; \ - ":" ; \ - }; \ - HelpId = HID_DSADMIN_DECIMAL_SEPARATOR; \ - }; \ - FixedText FT_AUTOTHOUSANDSSEPARATOR \ - { \ - Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + 3*EDIT_HEIGHT ) ; \ - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \ - Text[ en-US ] = "Thousands separator" ; \ - }; \ - ComboBox CM_AUTOTHOUSANDSSEPARATOR \ - { \ - Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + 3*EDIT_HEIGHT - 2 ) ; \ - Size = MAP_APPFONT ( 32 , 44 ) ; \ - Text = "." ; \ - TabStop = TRUE ; \ - MaxTextLength = 1 ; \ - DropDown = TRUE ; \ - StringList = \ - { \ - "," ; \ - "." ; \ - }; \ - HelpId = HID_DSADMIN_THOUSANDS_SEPARATOR; \ - }; \ - \ - CheckBox CB_AUTOHEADER \ - { \ - TabStop = TRUE ; \ - Pos = MAP_APPFONT ( START_X + INDENTED_X, AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 4*RELATED_CONTROLS + 4*EDIT_HEIGHT ) ; \ - Size = MAP_APPFONT ( 150 , CHECKBOX_HEIGHT ) ; \ - HelpId = HID_DSADMIN_TEXT_HEADER; \ - Text [ en-US ] = "~Text contains headers" ; \ - }; \ - \ - AUTO_CHARSET( AUTO_Y + 50 + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 4*RELATED_CONTROLS + 4*EDIT_HEIGHT + CHECKBOX_HEIGHT + UNRELATED_CONTROLS, AUTOPAGE_X ) \ - \ - String STR_AUTOTEXT_FIELD_SEP_NONE \ - { \ - Text[ en-US ] = "{None}"; \ - }; \ - \ - String STR_AUTOTEXTSEPARATORLIST \ - { \ - Text = "\"\t34\t'\t39" ; \ - }; \ - \ - String STR_AUTOFIELDSEPARATORLIST \ - { \ - Text [ x-comment ] = "EM Dec 2002: 'Space' refers to what you get when you hit the space bar on your keyboard."; \ - Text [ en-US ] = ";\t59\t,\t44\t:\t58\t{Tab}\t9\t{Space}\t32" ; \ - }; \ - \ - String STR_AUTODELIMITER_MISSING \ - { \ - Text[ en-US ] = "#1 must be set." ; \ - }; \ - String STR_AUTODELIMITER_MUST_DIFFER \ - { \ - Text[ en-US ] = "#1 and #2 must be different." ; \ - }; \ - String STR_AUTONO_WILDCARDS \ - { \ - Text[ en-US ] = "Wildcards such as ?,* are not allowed in #1." ; \ - }; - #define AUTO_HELP_BROWSECONTROLGROUP(AUTO_LINECOUNT, AUTO_HID, AUTO_HID2) \ AUTO_WIZARDHELPTEXT(AUTO_LINECOUNT) \ AUTO_BROWSECONTROLGROUP(START_X, INIT_Y + AUTO_LINECOUNT * FIXEDTEXT_HEIGHT + 2, WIZARD_PAGE_X, AUTO_HID, AUTO_HID2) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 25f37ab..44c9f75 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -92,25 +92,53 @@ namespace dbaui OConnectionHelper::OConnectionHelper( Window* pParent, const ResId& _rId, const SfxItemSet& _rCoreAttrs) : OGenericAdministrationPage(pParent, _rId, _rCoreAttrs) , m_bUserGrabFocus(false) - , m_aFT_Connection(this, ResId(FT_AUTOBROWSEURL, *_rId.GetResMgr())) - , m_aConnectionURL(this, ResId(ET_AUTOBROWSEURL, *_rId.GetResMgr())) - , m_aPB_Connection(this, ResId(PB_AUTOBROWSEURL, *_rId.GetResMgr())) - , m_aPB_CreateDB(this, ResId(PB_CREATEDB, *_rId.GetResMgr())) + , m_pFT_Connection(new FixedText(this, ResId(FT_AUTOBROWSEURL, *_rId.GetResMgr()))) + , m_pConnectionURL(new OConnectionURLEdit(this, ResId(ET_AUTOBROWSEURL, *_rId.GetResMgr()))) + , m_pPB_Connection(new PushButton(this, ResId(PB_AUTOBROWSEURL, *_rId.GetResMgr()))) + , m_pPB_CreateDB(new PushButton(this, ResId(PB_CREATEDB, *_rId.GetResMgr()))) , m_pCollection(NULL) + , m_bDelete(true) { // extract the datasource type collection from the item set DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rCoreAttrs.GetItem(DSID_TYPECOLLECTION)); if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); - m_aPB_Connection.SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections)); - m_aPB_CreateDB.SetClickHdl(LINK(this, OConnectionHelper, OnCreateDatabase)); + m_pPB_Connection->SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections)); + m_pPB_CreateDB->SetClickHdl(LINK(this, OConnectionHelper, OnCreateDatabase)); OSL_ENSURE(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !"); - m_aConnectionURL.SetTypeCollection(m_pCollection); + m_pConnectionURL->SetTypeCollection(m_pCollection); } - OConnectionHelper::~OConnectionHelper() + OConnectionHelper::OConnectionHelper( Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs) + : OGenericAdministrationPage(pParent, _rId, _rUIXMLDescription, _rCoreAttrs) + , m_bUserGrabFocus(false) + , m_pCollection(NULL) + , m_bDelete(false) { + get(m_pFT_Connection, "browseurllabel"); + get(m_pConnectionURL, "browseurl"); + get(m_pPB_Connection, "browse"); + get(m_pPB_CreateDB, "create"); + + // extract the datasource type collection from the item set + DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rCoreAttrs.GetItem(DSID_TYPECOLLECTION)); + if (pCollectionItem) + m_pCollection = pCollectionItem->getCollection(); + m_pPB_Connection->SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections)); + m_pPB_CreateDB->SetClickHdl(LINK(this, OConnectionHelper, OnCreateDatabase)); + OSL_ENSURE(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !"); + m_pConnectionURL->SetTypeCollection(m_pCollection); + } + OConnectionHelper::~OConnectionHelper() + { + if(m_bDelete) + { + delete m_pFT_Connection; + delete m_pConnectionURL; + delete m_pPB_Connection; + delete m_pPB_CreateDB; + } } void OConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) @@ -119,15 +147,15 @@ namespace dbaui bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); - m_aFT_Connection.Show(); - m_aConnectionURL.Show(); - m_aConnectionURL.ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) ); + m_pFT_Connection->Show(); + m_pConnectionURL->Show(); + m_pConnectionURL->ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) ); bool bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType ); - m_aPB_Connection.Show( bEnableBrowseButton ); + m_pPB_Connection->Show( bEnableBrowseButton ); bool bEnableCreateButton = m_pCollection->supportsDBCreation( m_eType ); - m_aPB_CreateDB.Show( bEnableCreateButton ); + m_pPB_CreateDB->Show( bEnableCreateButton ); SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, true); @@ -138,7 +166,7 @@ namespace dbaui setURL( sUrl ); checkTestConnection(); - m_aConnectionURL.ClearModifyFlag(); + m_pConnectionURL->ClearModifyFlag(); } OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); @@ -398,9 +426,9 @@ namespace dbaui } if ( _bPrefix ) - m_aConnectionURL.SetText( sURL ); + m_pConnectionURL->SetText( sURL ); else - m_aConnectionURL.SetTextNoPrefix( sURL ); + m_pConnectionURL->SetTextNoPrefix( sURL ); implUpdateURLDependentStates(); } @@ -408,7 +436,7 @@ namespace dbaui OUString OConnectionHelper::impl_getURL( bool _bPrefix ) const { // get the pure text - OUString sURL = _bPrefix ? m_aConnectionURL.GetText() : OUString(m_aConnectionURL.GetTextNoPrefix()); + OUString sURL = _bPrefix ? m_pConnectionURL->GetText() : OUString(m_pConnectionURL->GetTextNoPrefix()); OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" ); @@ -555,14 +583,14 @@ namespace dbaui switch (_rNEvt.GetType()) { case EVENT_GETFOCUS: - if (m_aConnectionURL.IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus) + if (m_pConnectionURL->IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus) { // a descendant of the URL edit field got the focus - m_aConnectionURL.SaveValueNoPrefix(); + m_pConnectionURL->SaveValueNoPrefix(); } break; case EVENT_LOSEFOCUS: - if (m_aConnectionURL.IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus) + if (m_pConnectionURL->IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus) { // a descendant of the URL edit field lost the focus if (!commitURL()) return true; // handled @@ -644,22 +672,22 @@ namespace dbaui void OConnectionHelper::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFT_Connection)); - _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aPB_Connection)); - _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aPB_CreateDB)); + _rControlList.push_back(new ODisableWrapper<FixedText>(m_pFT_Connection)); + _rControlList.push_back(new ODisableWrapper<PushButton>(m_pPB_Connection)); + _rControlList.push_back(new ODisableWrapper<PushButton>(m_pPB_CreateDB)); } void OConnectionHelper::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { - _rControlList.push_back( new OSaveValueWrapper<Edit>( &m_aConnectionURL ) ); + _rControlList.push_back( new OSaveValueWrapper<Edit>( m_pConnectionURL ) ); } bool OConnectionHelper::commitURL() { OUString sURL; OUString sOldPath; - sOldPath = m_aConnectionURL.GetSavedValueNoPrefix(); - sURL = m_aConnectionURL.GetTextNoPrefix(); + sOldPath = m_pConnectionURL->GetSavedValueNoPrefix(); + sURL = m_pConnectionURL->GetTextNoPrefix(); if ( m_pCollection->isFileSystemBased(m_eType) ) { @@ -691,7 +719,7 @@ namespace dbaui { case RET_RETRY: m_bUserGrabFocus = false; - m_aConnectionURL.GrabFocus(); + m_pConnectionURL->GrabFocus(); m_bUserGrabFocus = true; return false; @@ -704,7 +732,7 @@ namespace dbaui } setURLNoPrefix(sURL); - m_aConnectionURL.SaveValueNoPrefix(); + m_pConnectionURL->SaveValueNoPrefix(); return true; } void OConnectionHelper::askForFileName(::sfx2::FileDialogHelper& _aFileOpen) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx index 22ad795..95a222f 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx @@ -41,11 +41,12 @@ namespace dbaui public: OConnectionHelper( Window* pParent, const ResId& _rId, const SfxItemSet& _rCoreAttrs); + OConnectionHelper( Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs); virtual ~OConnectionHelper(); - FixedText m_aFT_Connection; - OConnectionURLEdit m_aConnectionURL; - PushButton m_aPB_Connection; - PushButton m_aPB_CreateDB; + FixedText *m_pFT_Connection; + OConnectionURLEdit *m_pConnectionURL; + PushButton *m_pPB_Connection; + PushButton *m_pPB_CreateDB; OUString m_eType; // the type can't be changed in this class, so we hold it as member. public: @@ -95,6 +96,7 @@ namespace dbaui OUString impl_getURL( bool _bPrefix ) const; void impl_setURL( const OUString& _rURL, bool _bPrefix ); void implUpdateURLDependentStates() const; + bool m_bDelete; }; } // namespace dbaui diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index ddb1a76..b3c05d6 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -101,7 +101,7 @@ namespace dbaui ,m_aTestJavaDriver(this, ModuleRes(PB_TESTDRIVERCLASS)) ,m_aTestConnection(this, ModuleRes(PB_TESTCONNECTION)) { - m_aConnectionURL.SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified)); + m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified)); m_aJavaDriver.SetModifyHdl(getControlModifiedLink()); m_aJavaDriver.SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified)); m_aUserName.SetModifyHdl(getControlModifiedLink()); @@ -133,50 +133,50 @@ namespace dbaui switch( eType ) { case ::dbaccess::DST_DBASE: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_DBASE_PATH_OR_FILE))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_DBASE_PATH); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_DBASE_PATH_OR_FILE))); + m_pConnectionURL->SetHelpId(HID_DSADMIN_DBASE_PATH); break; case ::dbaccess::DST_FLAT: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_FLAT_PATH_OR_FILE))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_FLAT_PATH); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_FLAT_PATH_OR_FILE))); + m_pConnectionURL->SetHelpId(HID_DSADMIN_FLAT_PATH); break; case ::dbaccess::DST_CALC: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_CALC_PATH_OR_FILE))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_CALC_PATH); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_CALC_PATH_OR_FILE))); + m_pConnectionURL->SetHelpId(HID_DSADMIN_CALC_PATH); break; case ::dbaccess::DST_ADO: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_COMMONURL))); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_COMMONURL))); break; case ::dbaccess::DST_MSACCESS: case ::dbaccess::DST_MSACCESS_2007: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_MSACCESS_MDB_FILE))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_MSACCESS_MDB_FILE); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_MSACCESS_MDB_FILE))); + m_pConnectionURL->SetHelpId(HID_DSADMIN_MSACCESS_MDB_FILE); break; case ::dbaccess::DST_MYSQL_NATIVE: case ::dbaccess::DST_MYSQL_JDBC: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_MYSQL_DATABASE_NAME))); - m_aConnectionURL.SetHelpId( HID_DSADMIN_MYSQL_DATABASE ); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_MYSQL_DATABASE_NAME))); + m_pConnectionURL->SetHelpId( HID_DSADMIN_MYSQL_DATABASE ); break; case ::dbaccess::DST_ORACLE_JDBC: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_ORACLE_DATABASE_NAME))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_ORACLE_DATABASE); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_ORACLE_DATABASE_NAME))); + m_pConnectionURL->SetHelpId(HID_DSADMIN_ORACLE_DATABASE); break; case ::dbaccess::DST_MYSQL_ODBC: case ::dbaccess::DST_ODBC: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_NAME_OF_ODBC_DATASOURCE))); - m_aConnectionURL.SetHelpId( eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_NAME_OF_ODBC_DATASOURCE))); + m_pConnectionURL->SetHelpId( eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE); break; case ::dbaccess::DST_LDAP: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_HOSTNAME))); - m_aConnectionURL.SetHelpId( HID_DSADMIN_LDAP_HOSTNAME ); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_HOSTNAME))); + m_pConnectionURL->SetHelpId( HID_DSADMIN_LDAP_HOSTNAME ); break; case ::dbaccess::DST_MOZILLA: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_MOZILLA_PROFILE_NAME))); - m_aConnectionURL.SetHelpId( HID_DSADMIN_MOZILLA_PROFILE_NAME ); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_MOZILLA_PROFILE_NAME))); + m_pConnectionURL->SetHelpId( HID_DSADMIN_MOZILLA_PROFILE_NAME ); break; case ::dbaccess::DST_THUNDERBIRD: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_THUNDERBIRD_PROFILE_NAME))); - m_aConnectionURL.SetHelpId( HID_DSADMIN_THUNDERBIRD_PROFILE_NAME ); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_THUNDERBIRD_PROFILE_NAME))); + m_pConnectionURL->SetHelpId( HID_DSADMIN_THUNDERBIRD_PROFILE_NAME ); break; case ::dbaccess::DST_OUTLOOK: case ::dbaccess::DST_OUTLOOKEXP: @@ -185,19 +185,19 @@ namespace dbaui case ::dbaccess::DST_EVOLUTION_LDAP: case ::dbaccess::DST_KAB: case ::dbaccess::DST_MACAB: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_NO_ADDITIONAL_SETTINGS))); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_NO_ADDITIONAL_SETTINGS))); { - OUString sText = m_aFT_Connection.GetText(); + OUString sText = m_pFT_Connection->GetText(); sText = sText.replaceAll("%test",m_aTestConnection.GetText()); OUString sTemp; sText = sText.replaceAll("~",sTemp); - m_aFT_Connection.SetText(sText); + m_pFT_Connection->SetText(sText); } - m_aConnectionURL.Hide(); + m_pConnectionURL->Hide(); break; case ::dbaccess::DST_JDBC: default: - m_aFT_Connection.SetText(OUString(ModuleRes(STR_COMMONURL))); + m_pFT_Connection->SetText(OUString(ModuleRes(STR_COMMONURL))); break; } @@ -206,7 +206,7 @@ namespace dbaui bool bShowUserAuthenfication = ( eAuthMode != AuthNone ); bool bShowUser = ( eAuthMode == AuthUserPwd ); - m_aPB_Connection.SetHelpId(HID_DSADMIN_BROWSECONN); + m_pPB_Connection->SetHelpId(HID_DSADMIN_BROWSECONN); m_aFL2.Show( bShowUserAuthenfication ); m_aUserNameLabel.Show( bShowUser && bShowUserAuthenfication ); m_aUserName.Show( bShowUser && bShowUserAuthenfication ); @@ -252,7 +252,7 @@ namespace dbaui checkTestConnection(); m_aUserName.ClearModifyFlag(); - m_aConnectionURL.ClearModifyFlag(); + m_pConnectionURL->ClearModifyFlag(); m_aJavaDriver.ClearModifyFlag(); } } @@ -296,7 +296,7 @@ namespace dbaui fillString(*_rSet,&m_aJavaDriver, DSID_JDBCDRIVERCLASS, bChangedSomething); } - fillString(*_rSet,&m_aConnectionURL, DSID_CONNECTURL, bChangedSomething); + fillString(*_rSet,m_pConnectionURL, DSID_CONNECTURL, bChangedSomething); return bChangedSomething; } @@ -328,7 +328,7 @@ namespace dbaui bool OConnectionTabPage::checkTestConnection() { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty(); + bool bEnableTestConnection = !m_pConnectionURL->IsVisible() || !m_pConnectionURL->GetTextNoPrefix().isEmpty(); if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC ) bEnableTestConnection = bEnableTestConnection && (!m_aJavaDriver.GetText().trim().isEmpty()); m_aTestConnection.Enable(bEnableTestConnection); diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx index 2e1c836..1a828ee 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx @@ -62,8 +62,8 @@ namespace dbaui virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; - inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(false); } - inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); } + inline void enableConnectionURL() { m_pConnectionURL->SetReadOnly(false); } + inline void disableConnectionURL() { m_pConnectionURL->SetReadOnly(); } /** changes the connection URL. <p>The new URL must be of the type which is currently selected, only the parts which do not diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index e775dbc..6820803 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -105,16 +105,16 @@ namespace dbaui OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId) :OConnectionHelper(pParent, ModuleRes(_rId), _rCoreAttrs) ,m_bUserGrabFocus(true) - ,m_aFT_HelpText(this, ModuleRes(FT_AUTOWIZARDHELPTEXT)) + ,m_pHelpText(new FixedText(this, ModuleRes(FT_AUTOWIZARDHELPTEXT))) { if ( USHRT_MAX != _nHelpTextResId ) { OUString sHelpText = ModuleRes(_nHelpTextResId); - m_aFT_HelpText.SetText(sHelpText); + m_pHelpText->SetText(sHelpText); } else - m_aFT_HelpText.Hide(); + m_pHelpText->Hide(); if ( USHRT_MAX != _nHeaderResId ) SetHeaderText(FT_AUTOWIZARDHEADER, _nHeaderResId); @@ -122,26 +122,57 @@ namespace dbaui if ( USHRT_MAX != _nUrlResId ) { OUString sLabelText = ModuleRes(_nUrlResId); - m_aFT_Connection.SetText(sLabelText); + m_pFT_Connection->SetText(sLabelText); if ( USHRT_MAX == _nHelpTextResId ) { - Point aPos = m_aFT_HelpText.GetPosPixel(); - Point aFTPos = m_aFT_Connection.GetPosPixel(); - Point aEDPos = m_aConnectionURL.GetPosPixel(); - Point aPBPos = m_aPB_Connection.GetPosPixel(); + Point aPos = m_pHelpText->GetPosPixel(); + Point aFTPos = m_pFT_Connection->GetPosPixel(); + Point aEDPos = m_pConnectionURL->GetPosPixel(); + Point aPBPos = m_pPB_Connection->GetPosPixel(); aEDPos.Y() = aPos.Y() + aEDPos.Y() - aFTPos.Y(); aPBPos.Y() = aPos.Y() + aPBPos.Y() - aFTPos.Y(); aFTPos.Y() = aPos.Y(); - m_aFT_Connection.SetPosPixel(aFTPos); - m_aConnectionURL.SetPosPixel(aEDPos); - m_aPB_Connection.SetPosPixel(aPBPos); + m_pFT_Connection->SetPosPixel(aFTPos); + m_pConnectionURL->SetPosPixel(aEDPos); + m_pPB_Connection->SetPosPixel(aPBPos); } } else - m_aFT_Connection.Hide(); + m_pFT_Connection->Hide(); - m_aConnectionURL.SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified)); + m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified)); + + SetRoadmapStateValue(false); + } + + OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId) + :OConnectionHelper(pParent, _rId, _rUIXMLDescription, _rCoreAttrs) + ,m_bUserGrabFocus(true) + { + get(m_pHelpText, "helptext"); + get(m_pHeaderText, "header"); + + if ( USHRT_MAX != _nHelpTextResId ) + { + OUString sHelpText = ModuleRes(_nHelpTextResId); + m_pHelpText->SetText(sHelpText); + } + else + m_pHelpText->Hide(); + + if ( USHRT_MAX != _nHeaderResId ) + m_pHeaderText->SetText(ModuleRes(_nHeaderResId)); + + if ( USHRT_MAX != _nUrlResId ) + { + OUString sLabelText = ModuleRes(_nUrlResId); + m_pFT_Connection->SetText(sLabelText); + } + else + m_pFT_Connection->Hide(); + + m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified)); SetRoadmapStateValue(false); } @@ -183,12 +214,12 @@ namespace dbaui bool OConnectionTabPageSetup::FillItemSet(SfxItemSet* _rSet) { bool bChangedSomething = false; - fillString(*_rSet,&m_aConnectionURL, DSID_CONNECTURL, bChangedSomething); + fillString(*_rSet,m_pConnectionURL, DSID_CONNECTURL, bChangedSomething); return bChangedSomething; } bool OConnectionTabPageSetup::checkTestConnection() { - return !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty(); + return !m_pConnectionURL->IsVisible() || !m_pConnectionURL->GetTextNoPrefix().isEmpty(); } IMPL_LINK(OConnectionTabPageSetup, OnEditModified, Edit*, /*_pEdit*/) diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index 13d6dbf..350fb22 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -39,7 +39,8 @@ namespace dbaui bool m_bUserGrabFocus : 1; protected: - FixedText m_aFT_HelpText; + FixedText *m_pHelpText; + FixedText *m_pHeaderText; // called when the test connection button was clicked DECL_LINK(OnEditModified,Edit*); @@ -56,8 +57,8 @@ namespace dbaui virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE; - inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(false); } - inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); } + inline void enableConnectionURL() { m_pConnectionURL->SetReadOnly(false); } + inline void disableConnectionURL() { m_pConnectionURL->SetReadOnly(); } /** changes the connection URL. <p>The new URL must be of the type which is currently selected, only the parts which do not @@ -68,6 +69,7 @@ namespace dbaui protected: OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId); + OConnectionTabPageSetup(Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId); virtual bool checkTestConnection() SAL_OVERRIDE; // nControlFlags is a combination of the CBTP_xxx-constants virtual ~OConnectionTabPageSetup(); diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 0944649..8b503cb 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -68,13 +68,11 @@ using namespace ::com::sun::star; // OTextConnectionPageSetup OTextConnectionPageSetup::OTextConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs ) - :OConnectionTabPageSetup(pParent, PAGE_DBWIZARD_TEXT, _rCoreAttrs, STR_TEXT_HELPTEXT, STR_TEXT_HEADERTEXT, STR_TEXT_PATH_OR_FILE) + :OConnectionTabPageSetup(pParent, "DBWizTextPage", "dbaccess/ui/dbwiztextpage.ui", _rCoreAttrs, STR_TEXT_HELPTEXT, STR_TEXT_HEADERTEXT, STR_TEXT_PATH_OR_FILE) { - m_pTextConnectionHelper = new OTextConnectionHelper( this, TC_EXTENSION | TC_SEPARATORS ); + m_pTextConnectionHelper = new OTextConnectionHelper( get<VclVBox>("TextPageContainer"), TC_EXTENSION | TC_SEPARATORS ); m_pTextConnectionHelper->SetClickHandler(LINK( this, OTextConnectionPageSetup, ImplGetExtensionHdl ) ); - - FreeResource(); } OTextConnectionPageSetup::~OTextConnectionPageSetup() @@ -596,7 +594,7 @@ using namespace ::com::sun::star; bool OJDBCConnectionPageSetup::checkTestConnection() { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty(); + bool bEnableTestConnection = !m_pConnectionURL->IsVisible() || !m_pConnectionURL->GetTextNoPrefix().isEmpty(); bEnableTestConnection = bEnableTestConnection && (!m_aETDriverClass.GetText().isEmpty()); return bEnableTestConnection; } diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 08bd843..f977c35 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -58,69 +58,69 @@ namespace dbaui { OTextConnectionHelper::OTextConnectionHelper( Window* pParent, const short _nAvailableSections ) - :Control( pParent, WB_DIALOGCONTROL ) - ,m_aFTExtensionHeader (this, ModuleRes(FT_AUTOEXTENSIONHEADER)) - ,m_aRBAccessTextFiles (this, ModuleRes(RB_AUTOACCESSCTEXTFILES)) - ,m_aRBAccessCSVFiles (this, ModuleRes(RB_AUTOACCESSCCSVFILES)) - ,m_aRBAccessOtherFiles (this, ModuleRes(RB_AUTOACCESSOTHERS)) - ,m_aETOwnExtension (this, ModuleRes(ET_AUTOOWNEXTENSION)) - ,m_aFTExtensionExample (this, ModuleRes(FT_AUTOOWNEXTENSIONAPPENDIX)) - ,m_aLineFormat (this, ModuleRes(FL_AUTOSEPARATOR2)) - ,m_aFieldSeparatorLabel (this, ModuleRes(FT_AUTOFIELDSEPARATOR)) - ,m_aFieldSeparator (this, ModuleRes(CM_AUTOFIELDSEPARATOR)) - ,m_aTextSeparatorLabel (this, ModuleRes(FT_AUTOTEXTSEPARATOR)) - ,m_aTextSeparator (this, ModuleRes(CM_AUTOTEXTSEPARATOR)) - ,m_aDecimalSeparatorLabel (this, ModuleRes(FT_AUTODECIMALSEPARATOR)) - ,m_aDecimalSeparator (this, ModuleRes(CM_AUTODECIMALSEPARATOR)) - ,m_aThousandsSeparatorLabel (this, ModuleRes(FT_AUTOTHOUSANDSSEPARATOR)) - ,m_aThousandsSeparator (this, ModuleRes(CM_AUTOTHOUSANDSSEPARATOR)) - ,m_aRowHeader (this, ModuleRes(CB_AUTOHEADER)) - ,m_aCharSetHeader (this, ModuleRes(FL_DATACONVERT)) - ,m_aCharSetLabel (this, ModuleRes(FT_CHARSET)) - ,m_aCharSet (this, ModuleRes(LB_CHARSET)) + :TabPage(pParent, "TextPage", "dbaccess/ui/textpage.ui") ,m_aFieldSeparatorList (ModuleRes(STR_AUTOFIELDSEPARATORLIST)) ,m_aTextSeparatorList (ModuleRes(STR_AUTOTEXTSEPARATORLIST)) ,m_aTextNone (ModuleRes(STR_AUTOTEXT_FIELD_SEP_NONE)) ,m_nAvailableSections( _nAvailableSections ) { + get(m_pExtensionHeader, "extensionheader"); + get(m_pAccessTextFiles, "textfile"); + get(m_pAccessCSVFiles, "csvfile"); + get(m_pAccessOtherFiles, "custom"); + get(m_pOwnExtension, "extension"); + get(m_pExtensionExample, "example"); + get(m_pFormatHeader, "formatlabel"); + get(m_pFieldSeparatorLabel, "fieldlabel"); + get(m_pFieldSeparator, "fieldseparator"); + get(m_pTextSeparatorLabel, "textlabel"); + get(m_pTextSeparator, "textseparator"); + get(m_pDecimalSeparatorLabel, "decimallabel"); + get(m_pDecimalSeparator, "decimalseparator"); + get(m_pThousandsSeparatorLabel, "thousandslabel"); + get(m_pThousandsSeparator, "thousandsseparator"); + get(m_pRowHeader, "containsheaders"); + get(m_pCharSetHeader, "charsetheader"); + get(m_pCharSetLabel, "charsetlabel"); + get(m_pCharSet, "charset"); sal_Int32 nCnt = comphelper::string::getTokenCount(m_aFieldSeparatorList, '\t'); sal_Int32 i; for( i = 0 ; i < nCnt ; i += 2 ) - m_aFieldSeparator.InsertEntry( m_aFieldSeparatorList.getToken( i, '\t' ) ); + m_pFieldSeparator->InsertEntry( m_aFieldSeparatorList.getToken( i, '\t' ) ); nCnt = comphelper::string::getTokenCount(m_aTextSeparatorList, '\t'); for( i=0 ; i<nCnt ; i+=2 ) - m_aTextSeparator.InsertEntry( m_aTextSeparatorList.getToken( i, '\t' ) ); - m_aTextSeparator.InsertEntry(m_aTextNone); + m_pTextSeparator->InsertEntry( m_aTextSeparatorList.getToken( i, '\t' ) ); + m_pTextSeparator->InsertEntry(m_aTextNone); // set the modify handlers - m_aFieldSeparator.SetUpdateDataHdl(getControlModifiedLink()); - m_aFieldSeparator.SetSelectHdl(getControlModifiedLink()); - m_aTextSeparator.SetUpdateDataHdl(getControlModifiedLink()); - m_aTextSeparator.SetSelectHdl(getControlModifiedLink()); - m_aCharSet.SetSelectHdl(getControlModifiedLink()); - - m_aFieldSeparator.SetModifyHdl(getControlModifiedLink()); - m_aTextSeparator.SetModifyHdl(getControlModifiedLink()); - m_aDecimalSeparator.SetModifyHdl(getControlModifiedLink()); - m_aThousandsSeparator.SetModifyHdl(getControlModifiedLink()); - m_aETOwnExtension.SetModifyHdl(LINK(this, OTextConnectionHelper, OnEditModified)); - m_aRBAccessTextFiles.SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); - m_aRBAccessCSVFiles.SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); - m_aRBAccessOtherFiles.SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); - m_aRBAccessCSVFiles.Check(true); + m_pFieldSeparator->SetUpdateDataHdl(getControlModifiedLink()); + m_pFieldSeparator->SetSelectHdl(getControlModifiedLink()); + m_pTextSeparator->SetUpdateDataHdl(getControlModifiedLink()); + m_pTextSeparator->SetSelectHdl(getControlModifiedLink()); + m_pCharSet->SetSelectHdl(getControlModifiedLink()); + + m_pFieldSeparator->SetModifyHdl(getControlModifiedLink()); + m_pTextSeparator->SetModifyHdl(getControlModifiedLink()); + m_pDecimalSeparator->SetModifyHdl(getControlModifiedLink()); + m_pThousandsSeparator->SetModifyHdl(getControlModifiedLink()); + m_pOwnExtension->SetModifyHdl(LINK(this, OTextConnectionHelper, OnEditModified)); + m_pAccessTextFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); + m_pAccessCSVFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); + m_pAccessOtherFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); + m_pAccessCSVFiles->Check(true); struct SectionDescriptor { short nFlag; Window* pFirstControl; } aSections[] = { - { TC_EXTENSION, &m_aFTExtensionHeader }, - { TC_SEPARATORS, &m_aLineFormat }, - { TC_HEADER, &m_aRowHeader }, - { TC_CHARSET, &m_aCharSetHeader }, + { TC_EXTENSION, m_pExtensionHeader }, + { TC_SEPARATORS, m_pFormatHeader }, + { TC_HEADER, m_pRowHeader }, + { TC_CHARSET, m_pCharSetHeader }, { 0, NULL } }; @@ -147,58 +147,8 @@ namespace dbaui pRealWindow->Hide(); pControl = pControl->GetWindow( WINDOW_NEXT ); } - - // move all controls in following sections up - if ( !pNextSection ) - continue; - const long nThisSectionStart = pThisSection->GetPosPixel().Y(); - const long nNextSectionStart = pNextSection->GetPosPixel().Y(); - const long nMoveOffset( nThisSectionStart - nNextSectionStart ); - while ( pControl ) - { - Point aPos = pControl->GetPosPixel(); - aPos.Move( 0, nMoveOffset ); - pControl->SetPosPixel( aPos ); - pControl = pControl->GetWindow( WINDOW_NEXT ); - } - } - - Rectangle aControlRectUnion; - for ( Window* pControl = aSections[0].pFirstControl; - pControl != NULL; - pControl = pControl->GetWindow( WINDOW_NEXT ) - ) - { - aControlRectUnion = aControlRectUnion.Union( Rectangle( pControl->GetPosPixel(), pControl->GetSizePixel() ) ); } - // need some adjustments to the positions, since the resource-specified - // positions for the control were relative to *our* parent, while by now - // the controls have |this| as parent. - - // first, move ourself to the upper left of the area occupied by all controls - SetPosPixel( aControlRectUnion.TopLeft() ); - - // then, compensate in the control positions, by moving them the up/left - for ( Window* pControl = aSections[0].pFirstControl; - pControl != NULL; - pControl = pControl->GetWindow( WINDOW_NEXT ) - ) - { - Point aPos( pControl->GetPosPixel() ); - aPos.Move( -aControlRectUnion.Left(), -aControlRectUnion.Top() ); - pControl->SetPosPixel( aPos ); - - // while we are here ... the controls should not have an own background - // (this would not be needed when our outer dialog were also the parent - // of the controls) - pControl->SetBackground(); - } - - // now, change our own size so all controls fit - SetSizePixel( aControlRectUnion.GetSize() ); - - SetBackground(); Show(); } @@ -221,32 +171,32 @@ namespace dbaui IMPL_LINK(OTextConnectionHelper, OnSetExtensionHdl, RadioButton*, /*_pRadioButton*/) { - bool bDoEnable = m_aRBAccessOtherFiles.IsChecked(); - m_aETOwnExtension.Enable(bDoEnable); - m_aFTExtensionExample.Enable(bDoEnable); + bool bDoEnable = m_pAccessOtherFiles->IsChecked(); + m_pOwnExtension->Enable(bDoEnable); + m_pExtensionExample->Enable(bDoEnable); m_aGetExtensionHandler.Call(this); return 0L; } void OTextConnectionHelper::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { - _rControlList.push_back(new OSaveValueWrapper<ComboBox>(&m_aFieldSeparator)); - _rControlList.push_back(new OSaveValueWrapper<ComboBox>(&m_aTextSeparator)); - _rControlList.push_back(new OSaveValueWrapper<ComboBox>(&m_aDecimalSeparator)); - _rControlList.push_back(new OSaveValueWrapper<ComboBox>(&m_aThousandsSeparator)); - _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aRowHeader)); - _rControlList.push_back(new OSaveValueWrapper<ListBox>(&m_aCharSet)); + _rControlList.push_back(new OSaveValueWrapper<ComboBox>(m_pFieldSeparator)); + _rControlList.push_back(new OSaveValueWrapper<ComboBox>(m_pTextSeparator)); + _rControlList.push_back(new OSaveValueWrapper<ComboBox>(m_pDecimalSeparator)); + _rControlList.push_back(new OSaveValueWrapper<ComboBox>(m_pThousandsSeparator)); + _rControlList.push_back(new OSaveValueWrapper<CheckBox>(m_pRowHeader)); + _rControlList.push_back(new OSaveValueWrapper<ListBox>(m_pCharSet)); } void OTextConnectionHelper::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFieldSeparatorLabel)); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aTextSeparatorLabel)); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aDecimalSeparatorLabel)); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aThousandsSeparatorLabel)); - _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aCharSetHeader)); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aCharSetLabel)); - _rControlList.push_back(new ODisableWrapper<ListBox>(&m_aCharSet)); + _rControlList.push_back(new ODisableWrapper<FixedText>(m_pFieldSeparatorLabel)); + _rControlList.push_back(new ODisableWrapper<FixedText>(m_pTextSeparatorLabel)); + _rControlList.push_back(new ODisableWrapper<FixedText>(m_pDecimalSeparatorLabel)); + _rControlList.push_back(new ODisableWrapper<FixedText>(m_pThousandsSeparatorLabel)); + _rControlList.push_back(new ODisableWrapper<FixedText>(m_pCharSetHeader)); + _rControlList.push_back(new ODisableWrapper<FixedText>(m_pCharSetLabel)); + _rControlList.push_back(new ODisableWrapper<ListBox>(m_pCharSet)); } void OTextConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bValid) @@ -270,90 +220,88 @@ namespace dbaui if ( ( m_nAvailableSections & TC_HEADER ) != 0 ) { SFX_ITEMSET_GET( _rSet, pHdrItem, SfxBoolItem, DSID_TEXTFILEHEADER, true ); - m_aRowHeader.Check( pHdrItem->GetValue() ); + m_pRowHeader->Check( pHdrItem->GetValue() ); } if ( ( m_nAvailableSections & TC_SEPARATORS ) != 0 ) { - SetSeparator( m_aFieldSeparator, m_aFieldSeparatorList, pDelItem->GetValue() ); - SetSeparator( m_aTextSeparator, m_aTextSeparatorList, pStrItem->GetValue() ); - m_aDecimalSeparator.SetText( pDecdelItem->GetValue() ); - m_aThousandsSeparator.SetText( pThodelItem->GetValue() ); + SetSeparator( *m_pFieldSeparator, m_aFieldSeparatorList, pDelItem->GetValue() ); + SetSeparator( *m_pTextSeparator, m_aTextSeparatorList, pStrItem->GetValue() ); + m_pDecimalSeparator->SetText( pDecdelItem->GetValue() ); + m_pThousandsSeparator->SetText( pThodelItem->GetValue() ); } if ( ( m_nAvailableSections & TC_CHARSET ) != 0 ) { - m_aCharSet.SelectEntryByIanaName( pCharsetItem->GetValue() ); + m_pCharSet->SelectEntryByIanaName( pCharsetItem->GetValue() ); } } bool OTextConnectionHelper::prepareLeave() { - LocalResourceAccess aStringResAccess(PAGE_TEXT, RSC_TABPAGE); - // for accessing the strings which are local to our own resource block OUString sExtension = GetExtension(); OUString aErrorText; Control* pErrorWin = NULL; - OUString aDelText(m_aFieldSeparator.GetText()); + OUString aDelText(m_pFieldSeparator->GetText()); if(aDelText.isEmpty()) { // No FieldSeparator aErrorText = ModuleRes(STR_AUTODELIMITER_MISSING); - aErrorText = aErrorText.replaceFirst("#1",m_aFieldSeparatorLabel.GetText()); - pErrorWin = &m_aFieldSeparator; + aErrorText = aErrorText.replaceFirst("#1",m_pFieldSeparatorLabel->GetText()); + pErrorWin = m_pFieldSeparator; } - else if (m_aDecimalSeparator.GetText().isEmpty()) + else if (m_pDecimalSeparator->GetText().isEmpty()) { // No DecimalSeparator aErrorText = ModuleRes(STR_AUTODELIMITER_MISSING); - aErrorText = aErrorText.replaceFirst("#1",m_aDecimalSeparatorLabel.GetText()); - pErrorWin = &m_aDecimalSeparator; + aErrorText = aErrorText.replaceFirst("#1",m_pDecimalSeparatorLabel->GetText()); + pErrorWin = m_pDecimalSeparator; } - else if (m_aTextSeparator.GetText() == m_aFieldSeparator.GetText()) + else if (m_pTextSeparator->GetText() == m_pFieldSeparator->GetText()) { // Field and TextSeparator must not be the same aErrorText = ModuleRes(STR_AUTODELIMITER_MUST_DIFFER); - aErrorText = aErrorText.replaceFirst("#1",m_aTextSeparatorLabel.GetText()); - aErrorText = aErrorText.replaceFirst("#2",m_aFieldSeparatorLabel.GetText()); - pErrorWin = &m_aTextSeparator; + aErrorText = aErrorText.replaceFirst("#1",m_pTextSeparatorLabel->GetText()); + aErrorText = aErrorText.replaceFirst("#2",m_pFieldSeparatorLabel->GetText()); + pErrorWin = m_pTextSeparator; } - else if (m_aDecimalSeparator.GetText() == m_aThousandsSeparator.GetText()) + else if (m_pDecimalSeparator->GetText() == m_pThousandsSeparator->GetText()) { // Thousands and DecimalSeparator must not be the same aErrorText = ModuleRes(STR_AUTODELIMITER_MUST_DIFFER); - aErrorText = aErrorText.replaceFirst("#1",m_aDecimalSeparatorLabel.GetText()); - aErrorText = aErrorText.replaceFirst("#2",m_aThousandsSeparatorLabel.GetText()); - pErrorWin = &m_aDecimalSeparator; + aErrorText = aErrorText.replaceFirst("#1",m_pDecimalSeparatorLabel->GetText()); + aErrorText = aErrorText.replaceFirst("#2",m_pThousandsSeparatorLabel->GetText()); + pErrorWin = m_pDecimalSeparator; } - else if (m_aFieldSeparator.GetText() == m_aThousandsSeparator.GetText()) + else if (m_pFieldSeparator->GetText() == m_pThousandsSeparator->GetText()) { // Thousands and FieldSeparator must not be the same aErrorText = ModuleRes(STR_AUTODELIMITER_MUST_DIFFER); - aErrorText = aErrorText.replaceFirst("#1",m_aFieldSeparatorLabel.GetText()); - aErrorText = aErrorText.replaceFirst("#2",m_aThousandsSeparatorLabel.GetText()); - pErrorWin = &m_aFieldSeparator; + aErrorText = aErrorText.replaceFirst("#1",m_pFieldSeparatorLabel->GetText()); + aErrorText = aErrorText.replaceFirst("#2",m_pThousandsSeparatorLabel->GetText()); + pErrorWin = m_pFieldSeparator; } - else if (m_aFieldSeparator.GetText() == m_aDecimalSeparator.GetText()) + else if (m_pFieldSeparator->GetText() == m_pDecimalSeparator->GetText()) { // Tenner and FieldSeparator must not be the same aErrorText = ModuleRes(STR_AUTODELIMITER_MUST_DIFFER); - aErrorText = aErrorText.replaceFirst("#1",m_aFieldSeparatorLabel.GetText()); - aErrorText = aErrorText.replaceFirst("#2",m_aDecimalSeparatorLabel.GetText()); - pErrorWin = &m_aFieldSeparator; + aErrorText = aErrorText.replaceFirst("#1",m_pFieldSeparatorLabel->GetText()); + aErrorText = aErrorText.replaceFirst("#2",m_pDecimalSeparatorLabel->GetText()); + pErrorWin = m_pFieldSeparator; } - else if (m_aTextSeparator.GetText() == m_aThousandsSeparator.GetText()) + else if (m_pTextSeparator->GetText() == m_pThousandsSeparator->GetText()) { // Thousands and TextSeparator must not be the same aErrorText = ModuleRes(STR_AUTODELIMITER_MUST_DIFFER); - aErrorText = aErrorText.replaceFirst("#1",m_aTextSeparatorLabel.GetText()); - aErrorText = aErrorText.replaceFirst("#2",m_aThousandsSeparatorLabel.GetText()); - pErrorWin = &m_aTextSeparator; + aErrorText = aErrorText.replaceFirst("#1",m_pTextSeparatorLabel->GetText()); + aErrorText = aErrorText.replaceFirst("#2",m_pThousandsSeparatorLabel->GetText()); + pErrorWin = m_pTextSeparator; } - else if (m_aTextSeparator.GetText() == m_aDecimalSeparator.GetText()) + else if (m_pTextSeparator->GetText() == m_pDecimalSeparator->GetText()) { // Tenner and TextSeparator must not be the same aErrorText = ModuleRes(STR_AUTODELIMITER_MUST_DIFFER); - aErrorText = aErrorText.replaceFirst("#1",m_aTextSeparatorLabel.GetText()); - aErrorText = aErrorText.replaceFirst("#2",m_aDecimalSeparatorLabel.GetText()); - pErrorWin = &m_aTextSeparator; + aErrorText = aErrorText.replaceFirst("#1",m_pTextSeparatorLabel->GetText()); + aErrorText = aErrorText.replaceFirst("#2",m_pDecimalSeparatorLabel->GetText()); + pErrorWin = m_pTextSeparator; } else if ((sExtension.indexOf('*') != -1) || (sExtension.indexOf('?') != -1)) { aErrorText = ModuleRes(STR_AUTONO_WILDCARDS); aErrorText = aErrorText.replaceFirst("#1",sExtension); - pErrorWin = &m_aETOwnExtension; + pErrorWin = m_pOwnExtension; } else return true; @@ -378,41 +326,41 @@ namespace dbaui if ( ( m_nAvailableSections & TC_HEADER ) != 0 ) { - if( m_aRowHeader.IsValueChangedFromSaved() ) + if( m_pRowHeader->IsValueChangedFromSaved() ) { - rSet.Put(SfxBoolItem(DSID_TEXTFILEHEADER, m_aRowHeader.IsChecked())); + rSet.Put(SfxBoolItem(DSID_TEXTFILEHEADER, m_pRowHeader->IsChecked())); bChangedSomething = true; } } if ( ( m_nAvailableSections & TC_SEPARATORS ) != 0 ) { - if( m_aFieldSeparator.IsValueChangedFromSaved() ) + if( m_pFieldSeparator->IsValueChangedFromSaved() ) { - rSet.Put( SfxStringItem(DSID_FIELDDELIMITER, GetSeparator( m_aFieldSeparator, m_aFieldSeparatorList) ) ); + rSet.Put( SfxStringItem(DSID_FIELDDELIMITER, GetSeparator( *m_pFieldSeparator, m_aFieldSeparatorList) ) ); bChangedSomething = true; } - if( m_aTextSeparator.IsValueChangedFromSaved() ) + if( m_pTextSeparator->IsValueChangedFromSaved() ) { - rSet.Put( SfxStringItem(DSID_TEXTDELIMITER, GetSeparator( m_aTextSeparator, m_aTextSeparatorList) ) ); + rSet.Put( SfxStringItem(DSID_TEXTDELIMITER, GetSeparator( *m_pTextSeparator, m_aTextSeparatorList) ) ); bChangedSomething = true; } - if( m_aDecimalSeparator.IsValueChangedFromSaved() ) + if( m_pDecimalSeparator->IsValueChangedFromSaved() ) { - rSet.Put( SfxStringItem(DSID_DECIMALDELIMITER, m_aDecimalSeparator.GetText().copy(0, 1) ) ); + rSet.Put( SfxStringItem(DSID_DECIMALDELIMITER, m_pDecimalSeparator->GetText().copy(0, 1) ) ); bChangedSomething = true; } - if( m_aThousandsSeparator.IsValueChangedFromSaved() ) + if( m_pThousandsSeparator->IsValueChangedFromSaved() ) { - rSet.Put( SfxStringItem(DSID_THOUSANDSDELIMITER, m_aThousandsSeparator.GetText().copy(0,1) ) ); + rSet.Put( SfxStringItem(DSID_THOUSANDSDELIMITER, m_pThousandsSeparator->GetText().copy(0,1) ) ); bChangedSomething = true; } } if ( ( m_nAvailableSections & TC_CHARSET ) != 0 ) { - if ( m_aCharSet.StoreSelectedCharSet( rSet, DSID_CHARSET ) ) + if ( m_pCharSet->StoreSelectedCharSet( rSet, DSID_CHARSET ) ) bChangedSomething = true; } @@ -422,26 +370,26 @@ namespace dbaui void OTextConnectionHelper::SetExtension(const OUString& _rVal) { if (_rVal == "txt") - m_aRBAccessTextFiles.Check(true); + m_pAccessTextFiles->Check(true); else if (_rVal == "csv") - m_aRBAccessCSVFiles.Check(true); + m_pAccessCSVFiles->Check(true); else { - m_aRBAccessOtherFiles.Check(true); - m_aFTExtensionExample.SetText(_rVal); + m_pAccessOtherFiles->Check(true); + m_pExtensionExample->SetText(_rVal); } } OUString OTextConnectionHelper::GetExtension() { OUString sExtension; - if (m_aRBAccessTextFiles.IsChecked()) + if (m_pAccessTextFiles->IsChecked()) sExtension = "txt"; - else if (m_aRBAccessCSVFiles.IsChecked()) + else if (m_pAccessCSVFiles->IsChecked()) sExtension = "csv"; else { - sExtension = m_aETOwnExtension.GetText(); + sExtension = m_pOwnExtension->GetText(); if ( comphelper::string::equals(sExtension.getToken(0,'.'), '*') ) sExtension = sExtension.copy(2); } @@ -456,7 +404,7 @@ namespace dbaui if( nPos == COMBOBOX_ENTRY_NOTFOUND ) return rBox.GetText().copy(0); - if ( !( &m_aTextSeparator == &rBox && nPos == (rBox.GetEntryCount()-1) ) ) + if ( !( m_pTextSeparator == &rBox && nPos == (rBox.GetEntryCount()-1) ) ) return OUString( static_cast< sal_Unicode >( rList.getToken((nPos*2)+1, nTok ).toInt32() )); // somewhat strange ... translates for instance an "32" into " " @@ -483,7 +431,7 @@ namespace dbaui if ( i >= nCnt ) { - if ( &m_aTextSeparator == &rBox && rVal.isEmpty() ) + if ( m_pTextSeparator == &rBox && rVal.isEmpty() ) rBox.SetText(m_aTextNone); else rBox.SetText( rVal.copy(0, 1) ); diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx index 168a6e1..a45574b 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx @@ -40,7 +40,7 @@ namespace dbaui #define TC_CHARSET ((short)0x08) // not yet implemented // OTextConnectionPage - class OTextConnectionHelper : public Control + class OTextConnectionHelper : public TabPage { OTextConnectionHelper(); @@ -51,25 +51,25 @@ namespace dbaui virtual ~OTextConnectionHelper(); private: - FixedText m_aFTExtensionHeader; - RadioButton m_aRBAccessTextFiles; - RadioButton m_aRBAccessCSVFiles; - RadioButton m_aRBAccessOtherFiles; - Edit m_aETOwnExtension; - FixedText m_aFTExtensionExample; - FixedLine m_aLineFormat; - FixedText m_aFieldSeparatorLabel; - ComboBox m_aFieldSeparator; - FixedText m_aTextSeparatorLabel; - ComboBox m_aTextSeparator; - FixedText m_aDecimalSeparatorLabel; - ComboBox m_aDecimalSeparator; - FixedText m_aThousandsSeparatorLabel; - ComboBox m_aThousandsSeparator; - CheckBox m_aRowHeader; - FixedLine m_aCharSetHeader; - FixedText m_aCharSetLabel; - CharSetListBox m_aCharSet; + FixedText *m_pExtensionHeader; + RadioButton *m_pAccessTextFiles; + RadioButton *m_pAccessCSVFiles; + RadioButton *m_pAccessOtherFiles; + Edit *m_pOwnExtension; + FixedText *m_pExtensionExample; + FixedText *m_pFormatHeader; + FixedText *m_pFieldSeparatorLabel; + ComboBox *m_pFieldSeparator; + FixedText *m_pTextSeparatorLabel; + ComboBox *m_pTextSeparator; + FixedText *m_pDecimalSeparatorLabel; + ComboBox *m_pDecimalSeparator; + FixedText *m_pThousandsSeparatorLabel; + ComboBox *m_pThousandsSeparator; + CheckBox *m_pRowHeader; + FixedText *m_pCharSetHeader; + FixedText *m_pCharSetLabel; + CharSetListBox *m_pCharSet; OUString m_aFieldSeparatorList; OUString m_aTextSeparatorList; OUString m_aTextNone; diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src index 6abc6be..904b8b1 100644 --- a/dbaccess/source/ui/dlg/dbadmin.src +++ b/dbaccess/source/ui/dlg/dbadmin.src @@ -383,17 +383,6 @@ TabPage PAGE_LDAP }; }; -TabPage PAGE_TEXT -{ - SVLook = TRUE ; - Hide = TRUE; - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; - HelpId = HID_DSADMIN_PAGE_TEXT; - - AUTO_SEPARATORCONTROLGROUP(UNRELATED_CONTROLS, PAGE_X) -}; - TabPage PAGE_USERDRIVER { SVLook = TRUE ; @@ -470,4 +459,35 @@ String STR_UNSUPPORTED_DATASOURCE_TYPE Text [ en-US ] = "This kind of data source is not supported on this platform.\nYou are allowed to change the settings, but you probably will not be able to connect to the database."; }; +String STR_AUTOTEXT_FIELD_SEP_NONE +{ + Text[ en-US ] = "{None}"; +}; + +String STR_AUTOTEXTSEPARATORLIST +{ + Text = "\"\t34\t'\t39" ; +}; + +String STR_AUTOFIELDSEPARATORLIST +{ + Text [ x-comment ] = "EM Dec 2002: 'Space' refers to what you get when you hit the space bar on your keyboard."; + Text [ en-US ] = ";\t59\t,\t44\t:\t58\t{Tab}\t9\t{Space}\t32" ; +}; + +String STR_AUTODELIMITER_MISSING +{ + Text[ en-US ] = "#1 must be set." ; +}; + +String STR_AUTODELIMITER_MUST_DIFFER +{ + Text[ en-US ] = "#1 and #2 must be different." ; +}; + +String STR_AUTONO_WILDCARDS +{ + Text[ en-US ] = "Wildcards such as ?,* are not allowed in #1." ; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbadminsetup.hrc b/dbaccess/source/ui/dlg/dbadminsetup.hrc index d775d79..547ffb8 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.hrc +++ b/dbaccess/source/ui/dlg/dbadminsetup.hrc @@ -26,7 +26,6 @@ #define STR_DBASE_HELPTEXT 28 #define STR_MSACCESS_HELPTEXT 29 -#define STR_TEXT_HELPTEXT 30 // FREE #define STR_ADO_HELPTEXT 32 #define STR_JDBC_HELPTEXT 33 @@ -37,7 +36,6 @@ #define STR_ORACLE_HELPTEXT 40 #define STR_DBASE_HEADERTEXT 41 #define STR_MSACCESS_HEADERTEXT 42 -#define STR_TEXT_HEADERTEXT 43 // FREE #define STR_ADO_HEADERTEXT 45 #define STR_JDBC_HEADERTEXT 46 diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src index cc4ed38..ed3658d 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.src +++ b/dbaccess/source/ui/dlg/dbadminsetup.src @@ -314,26 +314,21 @@ TabPage PAGE_DBWIZARD_DBASE AUTO_HELP_BROWSECONTROLGROUP( 3, HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION,HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION) }; -TabPage PAGE_DBWIZARD_TEXT -{ - HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_TEXT"; - String STR_TEXT_HEADERTEXT - { - Text[ en-US ] = "Set up a connection to text files" ; - }; - String STR_TEXT_HELPTEXT - { - Text[ en-US ] = "Select the folder where the CSV (Comma Separated Values) text files are stored. %PRODUCTNAME Base will open these files in read-only mode." ; - }; +String STR_TEXT_HEADERTEXT +{ + Text[ en-US ] = "Set up a connection to text files" ; +}; - String STR_TEXT_PATH_OR_FILE{ - Text[ en-US ] = "Path to text files"; - }; +String STR_TEXT_HELPTEXT +{ + Text[ en-US ] = "Select the folder where the CSV (Comma Separated Values) text files are stored. %PRODUCTNAME Base will open these files in read-only mode." ; +}; - AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE,HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE) - AUTO_SEPARATORCONTROLGROUP(82, WIZARD_PAGE_X) - }; +String STR_TEXT_PATH_OR_FILE +{ + Text[ en-US ] = "Path to text files"; +}; TabPage PAGE_DBWIZARD_MSACCESS { diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index f4ffd3d..05802b9 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -115,6 +115,45 @@ namespace dbaui FreeResource(); } + OCommonBehaviourTabPage::OCommonBehaviourTabPage(Window* pParent, const OString& rId, const OUString& rUIXMLDescription, const SfxItemSet& _rCoreAttrs, + sal_uInt32 nControlFlags) + + :OGenericAdministrationPage(pParent, rId, rUIXMLDescription, _rCoreAttrs) + ,m_pOptionsLabel(NULL) + ,m_pOptions(NULL) + ,m_pDataConvertFixedLine(NULL) + ,m_pCharsetLabel(NULL) + ,m_pCharset(NULL) + ,m_pAutoFixedLine(NULL) + ,m_pAutoRetrievingEnabled(NULL) + ,m_pAutoIncrementLabel(NULL) + ,m_pAutoIncrement(NULL) + ,m_pAutoRetrievingLabel(NULL) + ,m_pAutoRetrieving(NULL) + ,m_nControlFlags(nControlFlags) + { + + if ((m_nControlFlags & CBTP_USE_OPTIONS) == CBTP_USE_OPTIONS) + { + m_pOptionsLabel = get<FixedText>("optionslabel"); + m_pOptionsLabel->Show(); + m_pOptions = get<Edit>("options"); + m_pOptions->Show(); + m_pOptions->SetModifyHdl(getControlModifiedLink()); + } + + if ((m_nControlFlags & CBTP_USE_CHARSET) == CBTP_USE_CHARSET) + { + m_pDataConvertLabel = get<FixedText>("charsetheader"); + m_pDataConvertLabel->Show(); + m_pCharsetLabel = get<FixedText>("charsetlabel"); + m_pCharsetLabel->Show(); + m_pCharset = get<CharSetListBox>("charset"); + m_pCharset->Show(); + m_pCharset->SetSelectHdl(getControlModifiedLink()); + } + } + OCommonBehaviourTabPage::~OCommonBehaviourTabPage() { DELETEZ(m_pOptionsLabel); @@ -143,7 +182,7 @@ namespace dbaui if ((m_nControlFlags & CBTP_USE_CHARSET) == CBTP_USE_CHARSET) { - _rControlList.push_back(new ODisableWrapper<FixedLine>(m_pDataConvertFixedLine)); + //_rControlList.push_back(new ODisableWrapper<FixedLine>(m_pDataConvertFixedLine)); _rControlList.push_back(new ODisableWrapper<FixedText>(m_pCharsetLabel)); } } @@ -788,11 +827,10 @@ namespace dbaui // OTextDetailsPage OTextDetailsPage::OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) - :OCommonBehaviourTabPage(pParent, PAGE_TEXT, _rCoreAttrs, 0, false ) + :OCommonBehaviourTabPage(pParent, "EmptyPage", "dbaccess/ui/emptypage.ui", _rCoreAttrs, 0) { - m_pTextConnectionHelper = new OTextConnectionHelper( this, TC_EXTENSION | TC_HEADER | TC_SEPARATORS | TC_CHARSET ); - FreeResource(); + m_pTextConnectionHelper = new OTextConnectionHelper( get<VclVBox>("EmptyPage"), TC_EXTENSION | TC_HEADER | TC_SEPARATORS | TC_CHARSET ); } OTextDetailsPage::~OTextDetailsPage() diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index 1e13a6f..8ef5415 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -54,6 +54,7 @@ namespace dbaui Edit* m_pOptions; FixedLine* m_pDataConvertFixedLine; + FixedText* m_pDataConvertLabel; FixedText* m_pCharsetLabel; CharSetListBox* m_pCharset; @@ -71,6 +72,7 @@ namespace dbaui // nControlFlags is a combination of the CBTP_xxx-constants OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true); + OCommonBehaviourTabPage(Window* pParent, const OString& rId, const OUString& rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags); protected: virtual ~OCommonBehaviourTabPage(); diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx index 3c92494..6d8a27b 100644 --- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx +++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx @@ -30,15 +30,13 @@ namespace dbaui { // TextConnectionSettingsDialog TextConnectionSettingsDialog::TextConnectionSettingsDialog( Window* _pParent, SfxItemSet& _rItems ) - :ModalDialog( _pParent, ModuleRes( DLG_TEXT_CONNECTION_SETTINGS ) ) - ,m_aOK( this, ModuleRes( 1 ) ) - ,m_aCancel( this, ModuleRes( 1 ) ) + :ModalDialog( _pParent, "TextConnectionSettingsDialog", "dbaccess/ui/textconnectionsettings.ui" ) ,m_rItems( _rItems ) { - m_pTextConnectionHelper.reset( new OTextConnectionHelper( this, TC_HEADER | TC_SEPARATORS | TC_CHARSET ) ); - FreeResource(); + get(m_pOK, "ok"); + m_pTextConnectionHelper.reset( new OTextConnectionHelper( get<VclVBox>("TextPageContainer"), TC_HEADER | TC_SEPARATORS | TC_CHARSET ) ); - m_aOK.SetClickHdl( LINK( this, TextConnectionSettingsDialog, OnOK ) ); + m_pOK->SetClickHdl( LINK( this, TextConnectionSettingsDialog, OnOK ) ); } TextConnectionSettingsDialog::~TextConnectionSettingsDialog() diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.src b/dbaccess/source/ui/dlg/textconnectionsettings.src deleted file mode 100644 index 8ef8233..0000000 --- a/dbaccess/source/ui/dlg/textconnectionsettings.src +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "dbu_dlg.hrc" -#include "dbu_resource.hrc" -#include "AutoControls.hrc" - -#define DIALOG_WIDTH 200 -#define DIALOG_HEIGHT 160 - -ModalDialog DLG_TEXT_CONNECTION_SETTINGS -{ - HelpID = "dbaccess:ModalDialog:DLG_TEXT_CONNECTION_SETTINGS"; - Size = MAP_APPFONT( DIALOG_WIDTH, DIALOG_HEIGHT ); - OutputSize = TRUE ; - - Moveable = TRUE ; - Closeable = TRUE ; - - Text [ en-US ] = "Text Connection Settings"; - - AUTO_SEPARATORCONTROLGROUP( UNRELATED_CONTROLS, DIALOG_WIDTH ) - - OKButton 1 - { - Pos = MAP_APPFONT( DIALOG_WIDTH - 6 - BUTTON_WIDTH - RELATED_CONTROLS - BUTTON_WIDTH, DIALOG_HEIGHT - 6 - BUTTON_HEIGHT ); - Size = MAP_APPFONT( BUTTON_WIDTH, BUTTON_HEIGHT ); - - DefButton = TRUE; - }; - - CancelButton 1 - { - Pos = MAP_APPFONT( DIALOG_WIDTH - 6 - BUTTON_WIDTH, DIALOG_HEIGHT - 6 - BUTTON_HEIGHT ); - Size = MAP_APPFONT( BUTTON_WIDTH, BUTTON_HEIGHT ); - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx index 1a72da8..5a0df9d 100644 --- a/dbaccess/source/ui/inc/charsetlistbox.hxx +++ b/dbaccess/source/ui/inc/charsetlistbox.hxx @@ -34,6 +34,7 @@ namespace dbaui { public: CharSetListBox( Window* _pParent, const ResId& _rResId ); + CharSetListBox( Window* _pParent, WinBits _nBits ); virtual ~CharSetListBox(); void SelectEntryByIanaName( const OUString& _rIanaName ); diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx index 25bcb0d..9ff64d8 100644 --- a/dbaccess/source/ui/inc/curledit.hxx +++ b/dbaccess/source/ui/inc/curledit.hxx @@ -42,6 +42,7 @@ class OConnectionURLEdit : public Edit public: OConnectionURLEdit(Window* pParent, const ResId& rResId,bool _bShowPrefix = false); + OConnectionURLEdit(Window* pParent, WinBits _nBits,bool _bShowPrefix = false); virtual ~OConnectionURLEdit(); public: diff --git a/dbaccess/source/ui/inc/dbu_dlg.hrc b/dbaccess/source/ui/inc/dbu_dlg.hrc index 9065a06..97067e6 100644 --- a/dbaccess/source/ui/inc/dbu_dlg.hrc +++ b/dbaccess/source/ui/inc/dbu_dlg.hrc @@ -22,9 +22,9 @@ #include "dbu_resource.hrc" #define PAGE_X 281 -#define PAGE_Y 185 +#define PAGE_Y 215 #define WIZARD_PAGE_X 225 -#define WIZARD_PAGE_Y 210 +#define WIZARD_PAGE_Y 240 #define START_X 6 #define CHECKBOX_HEIGHT 8 @@ -83,6 +83,8 @@ #define STR_MSACCESS_FILTERNAME RID_STR_DLG_START + 39 #define STR_CONNECTION_NO_SUCCESS RID_STR_DLG_START + 40 #define STR_DBASE_PATH_OR_FILE RID_STR_DLG_START + 41 +#define STR_TEXT_HEADERTEXT RID_STR_DLG_START + 42 +#define STR_TEXT_HELPTEXT RID_STR_DLG_START + 43 #define STR_TEXT_PATH_OR_FILE RID_STR_DLG_START + 45 #define STR_FLAT_PATH_OR_FILE RID_STR_DLG_START + 46 #define STR_CALC_PATH_OR_FILE RID_STR_DLG_START + 47 diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc index 963fe36..f370b2d 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -88,7 +88,6 @@ #define DLG_COLLECTION_VIEW RID_DIALOG_START + 27 #define DLG_DATABASE_TYPE_CHANGE RID_DIALOG_START + 28 #define DLG_DATABASE_WIZARD RID_DIALOG_START + 29 -#define DLG_TEXT_CONNECTION_SETTINGS RID_DIALOG_START + 31 // tab pages @@ -117,7 +116,7 @@ #define PAGE_TABLESUBSCRIPTION RID_PAGE_START + 28 #define PAGE_DBWIZARD_DBASE RID_PAGE_START + 41 -#define PAGE_DBWIZARD_TEXT RID_PAGE_START + 42 + // FREE #define PAGE_DBWIZARD_MSACCESS RID_PAGE_START + 43 #define PAGE_DBWIZARD_LDAP RID_PAGE_START + 44 // FREE @@ -255,6 +254,12 @@ #define STR_QRY_LABEL RID_STR_GEN_START + 44 #define STR_TITLE_RENAME RID_STR_GEN_START + 45 #define STR_TITLE_PASTE_AS RID_STR_GEN_START + 46 +#define STR_AUTOFIELDSEPARATORLIST RID_STR_GEN_START + 47 +#define STR_AUTOTEXTSEPARATORLIST RID_STR_GEN_START + 48 +#define STR_AUTOTEXT_FIELD_SEP_NONE RID_STR_GEN_START + 49 +#define STR_AUTODELIMITER_MISSING RID_STR_GEN_START + 50 +#define STR_AUTODELIMITER_MUST_DIFFER RID_STR_GEN_START + 51 +#define STR_AUTONO_WILDCARDS RID_STR_GEN_START + 52 // untyped resources diff --git a/dbaccess/source/ui/inc/textconnectionsettings.hxx b/dbaccess/source/ui/inc/textconnectionsettings.hxx index 4ef97f4..0800250 100644 --- a/dbaccess/source/ui/inc/textconnectionsettings.hxx +++ b/dbaccess/source/ui/inc/textconnectionsettings.hxx @@ -49,8 +49,7 @@ namespace dbaui private: ::std::auto_ptr< OTextConnectionHelper > m_pTextConnectionHelper; - OKButton m_aOK; - CancelButton m_aCancel; + OKButton *m_pOK; SfxItemSet& m_rItems; private: diff --git a/dbaccess/uiconfig/ui/dbwiztextpage.ui b/dbaccess/uiconfig/ui/dbwiztextpage.ui new file mode 100644 index 0000000..d266b35 --- /dev/null +++ b/dbaccess/uiconfig/ui/dbwiztextpage.ui @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkBox" id="DBWizTextPage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">6</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="helptext"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="wrap">True</property> + <property name="max_width_chars">100</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> ... etc. - the rest is truncated
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits