diff options
-rw-r--r-- | dbaccess/UIConfig_dbaccess.mk | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbadmin.src | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwiz.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/WCopyTable.hxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbu_dlg.hrc | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbu_misc.hrc | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbu_resource.hrc | 18 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 84 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WizardPages.hrc | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WizardPages.src | 52 | ||||
-rw-r--r-- | dbaccess/uiconfig/ui/rtfcopytabledialog.ui | 12 |
12 files changed, 94 insertions, 116 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk index 6530e9666222..6f1751b07a38 100644 --- a/dbaccess/UIConfig_dbaccess.mk +++ b/dbaccess/UIConfig_dbaccess.mk @@ -42,6 +42,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \ dbaccess/uiconfig/ui/querypropertiesdialog \ dbaccess/uiconfig/ui/relationdialog \ dbaccess/uiconfig/ui/rowheightdialog \ + dbaccess/uiconfig/ui/rtfcopytabledialog \ dbaccess/uiconfig/ui/savedialog \ dbaccess/uiconfig/ui/specialjdbcconnectionpage \ dbaccess/uiconfig/ui/specialsettingspage \ diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src index 904b8b1f03e8..c28cabe1d7fa 100644 --- a/dbaccess/source/ui/dlg/dbadmin.src +++ b/dbaccess/source/ui/dlg/dbadmin.src @@ -73,18 +73,8 @@ Size = MAP_APPFONT ( 97 , EDIT_HEIGHT ) ; \ }; -ModalDialog DLG_DATABASE_TYPE_CHANGE +String STR_DATABASE_TYPE_CHANGE { - OutputSize = TRUE ; - Moveable = TRUE; - Closeable = TRUE ; - Hide = TRUE; - HelpId = HID_DSADMIN_TYPE_DIALOG; - - TabControl 1 - { - OutputSize = TRUE ; - }; Text [ en-US ] = "Database properties" ; }; diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index b7e4592d5a7d..38eb78562522 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -68,7 +68,7 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent ,const Reference< XComponentContext >& _rxORB ,const ::com::sun::star::uno::Any& _aDataSourceName ) - :OWizardMachine(_pParent, ModuleRes(DLG_DATABASE_TYPE_CHANGE), WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP ) + :OWizardMachine(_pParent, WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP ) ,m_pOutSet(NULL) ,m_bResetting(false) ,m_bApplied(false) @@ -98,8 +98,8 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _pItems->GetItem(DSID_TYPECOLLECTION)); m_pCollection = pCollectionItem->getCollection(); - FreeResource(); ActivatePage(); + setTitleBase(ModuleRes(STR_DATABASE_TYPE_CHANGE)); } ODbTypeWizDialog::~ODbTypeWizDialog() diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 13ff9f658d0a..2db0e8f2b2f4 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -180,7 +180,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent m_pHelp->SetUniqueId(UID_DBWIZ_HELP); SetRoadmapInteractive( true ); ActivatePage(); - SetText(ModuleRes(STR_DBWIZARDTITLE)); + setTitleBase(ModuleRes(STR_DBWIZARDTITLE)); } void ODbTypeWizDialogSetup::declareAuthDepPath( const OUString& _sURL, PathId _nPathId, const svt::RoadmapWizardTypes::WizardPath& _rPaths) diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx index c8b6831f72c3..02557530cf32 100644 --- a/dbaccess/source/ui/inc/WCopyTable.hxx +++ b/dbaccess/source/ui/inc/WCopyTable.hxx @@ -238,11 +238,11 @@ namespace dbaui ODatabaseExport::TColumns m_vSourceColumns; ODatabaseExport::TColumnVector m_vSourceVec; - HelpButton m_pbHelp; - CancelButton m_pbCancel; - PushButton m_pbPrev; - PushButton m_pbNext; - OKButton m_pbFinish; + HelpButton* m_pbHelp; + CancelButton* m_pbCancel; + PushButton* m_pbPrev; + PushButton* m_pbNext; + PushButton* m_pbFinish; OTypeInfoMap m_aTypeInfo; ::std::vector<OTypeInfoMap::iterator> m_aTypeInfoIndex; @@ -325,7 +325,7 @@ namespace dbaui virtual ~OCopyTableWizard(); virtual long DeactivatePage() SAL_OVERRIDE; - OKButton& GetOKButton() { return m_pbFinish; } + OKButton& GetOKButton() { return static_cast<OKButton&>(*m_pbFinish); } Wizard_Button_Style GetPressedButton() const { return m_ePressed; } void EnableButton(Wizard_Button_Style eStyle, bool bEnable); void AddWizardPage(OWizardPage* pPage); // delete page from OCopyTableWizard diff --git a/dbaccess/source/ui/inc/dbu_dlg.hrc b/dbaccess/source/ui/inc/dbu_dlg.hrc index 76195eec4527..f3b3823a59cd 100644 --- a/dbaccess/source/ui/inc/dbu_dlg.hrc +++ b/dbaccess/source/ui/inc/dbu_dlg.hrc @@ -150,9 +150,11 @@ #define STR_ORACLE_DRIVERCLASSTEXT RID_STR_DLG_START + 99 #define STR_ORACLE_HELPTEXT RID_STR_DLG_START + 100 +#define STR_DATABASE_TYPE_CHANGE RID_STR_DLG_START + 101 + // please adjust checking before insert new strings -#define LAST_STR_HERE RID_STR_DLG_START + 101 +#define LAST_STR_HERE RID_STR_DLG_START + 102 #if LAST_STR_HERE > RID_STR_DLG_END #error Resource-Id Overflow in #file, #line diff --git a/dbaccess/source/ui/inc/dbu_misc.hrc b/dbaccess/source/ui/inc/dbu_misc.hrc index 510633b162f5..ed0aacd7434a 100644 --- a/dbaccess/source/ui/inc/dbu_misc.hrc +++ b/dbaccess/source/ui/inc/dbu_misc.hrc @@ -40,6 +40,10 @@ #define STR_INVALID_TABLE_NAME RID_STR_MISC_START + 16 #define STR_INVALID_TABLE_NAME_LENGTH RID_STR_MISC_START + 17 +#define STR_WIZ_PB_PREV RID_STR_MISC_START + 18 +#define STR_WIZ_PB_NEXT RID_STR_MISC_START + 19 +#define STR_WIZ_PB_OK RID_STR_MISC_START + 20 + // please adjust checking before insert new strings #if STR_INVALID_TABLE_NAME_LENGTH > RID_STR_MISC_END diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc index bef894c49d18..f87497de3867 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -45,28 +45,28 @@ #define RID_STR_CONTROL_END RID_STR_CONTROL_START + 30 // 40 - 69 #define RID_STR_DLG_START RID_STR_CONTROL_END -#define RID_STR_DLG_END RID_STR_DLG_START + 113 // 70 - 182 +#define RID_STR_DLG_END RID_STR_DLG_START + 144 // 70 - 183 + 30 free #define RID_STR_MISC_START RID_STR_DLG_END -#define RID_STR_MISC_END RID_STR_MISC_START + 20 // 183 - 202 +#define RID_STR_MISC_END RID_STR_MISC_START + 20 // 214 - 233 #define RID_STR_QRY_START RID_STR_MISC_END -#define RID_STR_QRY_END RID_STR_QRY_START + 80 // 203 - 282 +#define RID_STR_QRY_END RID_STR_QRY_START + 80 // 234 - 313 #define RID_STR_TBL_START RID_STR_QRY_END -#define RID_STR_TBL_END RID_STR_TBL_START + 80 // 283 - 362 +#define RID_STR_TBL_END RID_STR_TBL_START + 80 // 314 - 393 #define RID_STR_REL_START RID_STR_TBL_END -#define RID_STR_REL_END RID_STR_REL_START + 10 // 363 - 382 +#define RID_STR_REL_END RID_STR_REL_START + 10 // 394 - 413 #define RID_STR_UNO_START RID_STR_REL_END -#define RID_STR_UNO_END RID_STR_UNO_START + 20 // 383 - 402 +#define RID_STR_UNO_END RID_STR_UNO_START + 20 // 414 - 433 #define RID_STR_GEN_START RID_STR_UNO_END -#define RID_STR_GEN_END RID_STR_GEN_START + 56 // 403 - 458 +#define RID_STR_GEN_END RID_STR_GEN_START + 56 // 434 - 489 #define RID_STR_APP_START RID_STR_GEN_END -#define RID_STR_APP_END RID_STR_APP_START + 40 // 459 - 498 +#define RID_STR_APP_END RID_STR_APP_START + 40 // 490 - 529 #if RID_STR_GEN_END > RID_DBACCESS_END #error Resource-Id Ueberlauf in #file, #line @@ -77,7 +77,6 @@ #define DLG_JOIN_TABADD RID_DIALOG_START + 14 // FREE -#define WIZ_RTFCOPYTABLE RID_DIALOG_START + 16 // FREE // FREE #define DLG_INDEXDESIGN RID_DIALOG_START + 19 @@ -86,7 +85,6 @@ // FREE // FREE #define DLG_COLLECTION_VIEW RID_DIALOG_START + 27 -#define DLG_DATABASE_TYPE_CHANGE RID_DIALOG_START + 28 // tab pages diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 6e6fcd299fed..c478b573a500 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -504,12 +504,7 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const OUString& _rDefaultN const ICopyTableSourceObject& _rSourceObject, const Reference< XConnection >& _xSourceConnection, const Reference< XConnection >& _xConnection, const Reference< XComponentContext >& _rxContext, const Reference< XInteractionHandler>& _xInteractionHandler) - : WizardDialog( pParent, ModuleRes(WIZ_RTFCOPYTABLE)) - ,m_pbHelp( this , ModuleRes(PB_HELP)) - ,m_pbCancel( this , ModuleRes(PB_CANCEL)) - ,m_pbPrev( this , ModuleRes(PB_PREV)) - ,m_pbNext( this , ModuleRes(PB_NEXT)) - ,m_pbFinish( this , ModuleRes(PB_OK)) + : WizardDialog( pParent, "RTFCopyTable", "dbaccess/ui/rtfcopytabledialog.ui") ,m_mNameMapping(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) ,m_xDestConnection( _xConnection ) ,m_rSourceObject( _rSourceObject ) @@ -601,13 +596,8 @@ OCopyTableWizard::OCopyTableWizard( Window* pParent, const OUString& _rDefaultNa const ODatabaseExport::TColumns& _rSourceColumns, const ODatabaseExport::TColumnVector& _rSourceColVec, const Reference< XConnection >& _xConnection, const Reference< XNumberFormatter >& _xFormatter, TypeSelectionPageFactory _pTypeSelectionPageFactory, SvStream& _rTypeSelectionPageArg, const Reference< XComponentContext >& _rxContext ) - :WizardDialog( pParent, ModuleRes(WIZ_RTFCOPYTABLE)) + :WizardDialog( pParent, "RTFCopyTable", "dbaccess/ui/rtfcopytabledialog.ui") ,m_vSourceColumns(_rSourceColumns) - ,m_pbHelp( this , ModuleRes(PB_HELP)) - ,m_pbCancel( this , ModuleRes(PB_CANCEL)) - ,m_pbPrev( this , ModuleRes(PB_PREV)) - ,m_pbNext( this , ModuleRes(PB_NEXT)) - ,m_pbFinish( this , ModuleRes(PB_OK)) ,m_mNameMapping(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) ,m_xDestConnection( _xConnection ) ,m_rSourceObject( DummyCopySource::Instance() ) @@ -649,32 +639,44 @@ OCopyTableWizard::OCopyTableWizard( Window* pParent, const OUString& _rDefaultNa void OCopyTableWizard::construct() { - AddButton( &m_pbHelp, WIZARDDIALOG_BUTTON_STDOFFSET_X ); - AddButton( &m_pbCancel, WIZARDDIALOG_BUTTON_STDOFFSET_X ); - AddButton( &m_pbPrev ); - AddButton( &m_pbNext, WIZARDDIALOG_BUTTON_STDOFFSET_X ); - AddButton( &m_pbFinish ); + AddButton( m_pbHelp = new HelpButton(this, WB_TABSTOP) ); + AddButton( m_pbCancel = new CancelButton(this, WB_TABSTOP) ); + AddButton( m_pbPrev = new PushButton(this, WB_TABSTOP)); + AddButton( m_pbNext = new PushButton(this, WB_TABSTOP)); + AddButton( m_pbFinish = new PushButton(this, WB_TABSTOP)); - m_pbPrev.SetClickHdl( LINK( this, OCopyTableWizard, ImplPrevHdl ) ); - m_pbNext.SetClickHdl( LINK( this, OCopyTableWizard, ImplNextHdl ) ); - m_pbFinish.SetClickHdl( LINK( this, OCopyTableWizard, ImplOKHdl ) ); + m_pbHelp->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); + m_pbCancel->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); + m_pbPrev->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); + m_pbNext->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); + m_pbFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); - SetActivatePageHdl( LINK( this, OCopyTableWizard, ImplActivateHdl ) ); + m_pbPrev->SetText(ModuleRes(STR_WIZ_PB_PREV)); + m_pbNext->SetText(ModuleRes(STR_WIZ_PB_NEXT)); + m_pbFinish->SetText(ModuleRes(STR_WIZ_PB_OK)); + + m_pbHelp->Show(); + m_pbCancel->Show(); + m_pbPrev->Show(); + m_pbNext->Show(); + m_pbFinish->Show(); + + m_pbPrev->SetClickHdl( LINK( this, OCopyTableWizard, ImplPrevHdl ) ); + m_pbNext->SetClickHdl( LINK( this, OCopyTableWizard, ImplNextHdl ) ); + m_pbFinish->SetClickHdl( LINK( this, OCopyTableWizard, ImplOKHdl ) ); - SetPrevButton( &m_pbPrev ); - SetNextButton( &m_pbNext ); + SetActivatePageHdl( LINK( this, OCopyTableWizard, ImplActivateHdl ) ); - ShowButtonFixedLine( true ); + SetPrevButton( m_pbPrev ); + SetNextButton( m_pbNext ); - m_pbNext.GrabFocus(); + m_pbNext->GrabFocus(); if (m_vDestColumns.size()) // source is a html or rtf table - m_pbNext.SetStyle(m_pbFinish.GetStyle() | WB_DEFBUTTON); + m_pbNext->SetStyle(m_pbFinish->GetStyle() | WB_DEFBUTTON); else - m_pbFinish.SetStyle(m_pbFinish.GetStyle() | WB_DEFBUTTON); - - FreeResource(); + m_pbFinish->SetStyle(m_pbFinish->GetStyle() | WB_DEFBUTTON); m_pTypeInfo = TOTypeInfoSP(new OTypeInfo()); m_pTypeInfo->aUIName = m_sTypeNames.getToken(TYPE_OTHER, ';'); @@ -701,6 +703,12 @@ OCopyTableWizard::~OCopyTableWizard() m_aTypeInfoIndex.clear(); m_aTypeInfo.clear(); m_aDestTypeInfoIndex.clear(); + + delete m_pbHelp; + delete m_pbCancel; + delete m_pbPrev; + delete m_pbNext; + delete m_pbFinish; } IMPL_LINK_NOARG(OCopyTableWizard, ImplPrevHdl) @@ -949,20 +957,20 @@ void OCopyTableWizard::CheckButtons() if(GetCurLevel() == 0) // the first page has no back button { if(m_nPageCount > 1) - m_pbNext.Enable(true); + m_pbNext->Enable(true); else - m_pbNext.Enable(false); + m_pbNext->Enable(false); - m_pbPrev.Enable(false); + m_pbPrev->Enable(false); } else if(GetCurLevel() == m_nPageCount-1) // the last page has no next button { - m_pbNext.Enable(false); - m_pbPrev.Enable(true); + m_pbNext->Enable(false); + m_pbPrev->Enable(true); } else { - m_pbPrev.Enable(true); + m_pbPrev->Enable(true); // next already has its state } } @@ -971,11 +979,11 @@ void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle, bool bEnable) { Button* pButton; if(eStyle == WIZARD_NEXT) - pButton = &m_pbNext; + pButton = m_pbNext; else if(eStyle == WIZARD_PREV) - pButton = &m_pbPrev; + pButton = m_pbPrev; else - pButton = &m_pbFinish; + pButton = m_pbFinish; pButton->Enable(bEnable); } diff --git a/dbaccess/source/ui/misc/WizardPages.hrc b/dbaccess/source/ui/misc/WizardPages.hrc index b7075bfc4e97..cf62039640cc 100644 --- a/dbaccess/source/ui/misc/WizardPages.hrc +++ b/dbaccess/source/ui/misc/WizardPages.hrc @@ -22,11 +22,6 @@ #define LB_NEW_COLUMN_NAMES 2 #define PB_AUTO 5 -#define PB_OK 6 -#define PB_CANCEL 7 -#define PB_HELP 8 -#define PB_NEXT 9 -#define PB_PREV 10 #define IB_COLUMN_UP 12 #define IB_COLUMN_DOWN 13 #define IB_COLUMN_UP_RIGHT 14 diff --git a/dbaccess/source/ui/misc/WizardPages.src b/dbaccess/source/ui/misc/WizardPages.src index c4f8c3f46d61..47ffbb96bb1e 100644 --- a/dbaccess/source/ui/misc/WizardPages.src +++ b/dbaccess/source/ui/misc/WizardPages.src @@ -51,51 +51,19 @@ String STR_WIZ_NAME_MATCHING_TITEL Text [ en-US ] = "Assign columns" ; }; -ModalDialog WIZ_RTFCOPYTABLE +String STR_WIZ_PB_PREV { - HelpID = "dbaccess:ModalDialog:WIZ_RTFCOPYTABLE"; - - Text [ en-US ] = "Copy RTF Table" ; - - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE; + Text [ en-US ] = "< ~Back"; +}; - HelpButton PB_HELP - { - TabStop = TRUE ; - Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; - Text [ en-US ] = "~Help"; - }; - CancelButton PB_CANCEL - { - TabStop = TRUE ; - Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; - Text [ en-US ] = "~Cancel"; - }; - PushButton PB_PREV - { - HelpID = "dbaccess:PushButton:WIZ_RTFCOPYTABLE:PB_PREV"; - TabStop = TRUE ; - Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; - Text [ en-US ] = "< ~Back"; - }; - PushButton PB_NEXT - { - HelpID = "dbaccess:PushButton:WIZ_RTFCOPYTABLE:PB_NEXT"; - TabStop = TRUE ; - Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; - Text [ en-US ] = "~Next>"; - }; - OKButton PB_OK - { - TabStop = TRUE ; - Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; - Text [ en-US ] = "C~reate"; - }; +String STR_WIZ_PB_NEXT +{ + Text [ en-US ] = "~Next>"; +}; +String STR_WIZ_PB_OK +{ + Text [ en-US ] = "C~reate"; }; TabPage TAB_WIZ_TYPE_SELECT diff --git a/dbaccess/uiconfig/ui/rtfcopytabledialog.ui b/dbaccess/uiconfig/ui/rtfcopytabledialog.ui new file mode 100644 index 000000000000..7a6a17fbdc96 --- /dev/null +++ b/dbaccess/uiconfig/ui/rtfcopytabledialog.ui @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="RTFCopyTable"> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Copy RTF Table</property> + <property name="type_hint">dialog</property> + </object> +</interface> |