From 05e81af1f87b09c6a08683726822824fbcaa7bec Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Thu, 3 Jul 2014 09:33:14 +0200 Subject: RID_DLG_LISTCOMBOWIZARD tab pages conversion to .ui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I348a876413fa1acf2cf253784d53a0078bbedd92 Reviewed-on: https://gerrit.libreoffice.org/10043 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- extensions/UIConfig_sabpilot.mk | 6 + extensions/source/dbpilots/commonpagesdbp.cxx | 81 ++--- extensions/source/dbpilots/commonpagesdbp.hxx | 11 +- extensions/source/dbpilots/commonpagesdbp.src | 130 +------ extensions/source/dbpilots/controlwizard.cxx | 41 +-- extensions/source/dbpilots/controlwizard.hxx | 4 +- extensions/source/dbpilots/dbpresid.hrc | 55 +-- extensions/source/dbpilots/gridpages.src | 79 ----- extensions/source/dbpilots/gridwizard.cxx | 98 +++--- extensions/source/dbpilots/gridwizard.hxx | 16 +- extensions/source/dbpilots/groupboxpages.src | 61 ---- extensions/source/dbpilots/groupboxwiz.cxx | 83 ++--- extensions/source/dbpilots/groupboxwiz.hxx | 12 +- extensions/source/dbpilots/listcombopages.src | 157 +-------- extensions/source/dbpilots/listcombowizard.cxx | 93 +++--- extensions/source/dbpilots/listcombowizard.hxx | 22 +- .../uiconfig/sabpilot/ui/contentfieldpage.ui | 137 ++++++++ .../uiconfig/sabpilot/ui/contenttablepage.ui | 247 ++++++++++++++ extensions/uiconfig/sabpilot/ui/fieldlinkpage.ui | 140 ++++++++ .../sabpilot/ui/gridfieldsselectionpage.ui | 372 +++++++++++++++++++++ .../sabpilot/ui/groupradioselectionpage.ui | 332 ++++++++++++++++++ .../uiconfig/sabpilot/ui/tableselectionpage.ui | 188 +++++++++++ 22 files changed, 1643 insertions(+), 722 deletions(-) create mode 100644 extensions/uiconfig/sabpilot/ui/contentfieldpage.ui create mode 100644 extensions/uiconfig/sabpilot/ui/contenttablepage.ui create mode 100644 extensions/uiconfig/sabpilot/ui/fieldlinkpage.ui create mode 100644 extensions/uiconfig/sabpilot/ui/gridfieldsselectionpage.ui create mode 100644 extensions/uiconfig/sabpilot/ui/groupradioselectionpage.ui create mode 100644 extensions/uiconfig/sabpilot/ui/tableselectionpage.ui (limited to 'extensions') diff --git a/extensions/UIConfig_sabpilot.mk b/extensions/UIConfig_sabpilot.mk index 5623c5e25472..b833f4cf2238 100644 --- a/extensions/UIConfig_sabpilot.mk +++ b/extensions/UIConfig_sabpilot.mk @@ -10,11 +10,17 @@ $(eval $(call gb_UIConfig_UIConfig,modules/sabpilot)) $(eval $(call gb_UIConfig_add_uifiles,modules/sabpilot,\ + extensions/uiconfig/sabpilot/ui/contentfieldpage \ + extensions/uiconfig/sabpilot/ui/contenttablepage \ extensions/uiconfig/sabpilot/ui/datasourcepage \ extensions/uiconfig/sabpilot/ui/fieldassignpage \ + extensions/uiconfig/sabpilot/ui/fieldlinkpage \ + extensions/uiconfig/sabpilot/ui/gridfieldsselectionpage \ + extensions/uiconfig/sabpilot/ui/groupradioselectionpage \ extensions/uiconfig/sabpilot/ui/invokeadminpage \ extensions/uiconfig/sabpilot/ui/selecttablepage \ extensions/uiconfig/sabpilot/ui/selecttypepage \ + extensions/uiconfig/sabpilot/ui/tableselectionpage \ )) # vim: set noet sw=4 ts=4: diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index ee6dd8119221..d71a167d7d18 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -59,32 +60,28 @@ namespace dbp OTableSelectionPage::OTableSelectionPage(OControlWizard* _pParent) - :OControlWizardPage(_pParent, ModuleRes(RID_PAGE_TABLESELECTION)) - ,m_aData (this, ModuleRes(FL_DATA)) - ,m_aExplanation (this, ModuleRes(FT_EXPLANATION)) - ,m_aDatasourceLabel (this, ModuleRes(FT_DATASOURCE)) - ,m_aDatasource (this, ModuleRes(LB_DATASOURCE)) - ,m_aSearchDatabase (this, ModuleRes(PB_FORMDATASOURCE)) - ,m_aTableLabel (this, ModuleRes(FT_TABLE)) - ,m_aTable (this, ModuleRes(LB_TABLE)) + :OControlWizardPage(_pParent, "TableSelectionPage", "modules/sabpilot/ui/tableselectionpage.ui") { - FreeResource(); + get(m_pTable,"table"); + get(m_pDatasource, "datasource"); + get(m_pDatasourceLabel, "datasourcelabel"); + get(m_pSearchDatabase, "search"); implCollectDatasource(); - m_aDatasource.SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection)); - m_aTable.SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection)); - m_aTable.SetDoubleClickHdl(LINK(this, OTableSelectionPage, OnListboxDoubleClicked)); - m_aSearchDatabase.SetClickHdl(LINK(this, OTableSelectionPage, OnSearchClicked)); + m_pDatasource->SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection)); + m_pTable->SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection)); + m_pTable->SetDoubleClickHdl(LINK(this, OTableSelectionPage, OnListboxDoubleClicked)); + m_pSearchDatabase->SetClickHdl(LINK(this, OTableSelectionPage, OnSearchClicked)); - m_aDatasource.SetDropDownLineCount(10); + m_pDatasource->SetDropDownLineCount(10); } void OTableSelectionPage::ActivatePage() { OControlWizardPage::ActivatePage(); - m_aDatasource.GrabFocus(); + m_pDatasource->GrabFocus(); } @@ -93,10 +90,10 @@ namespace dbp if (!OControlWizardPage::canAdvance()) return false; - if (0 == m_aDatasource.GetSelectEntryCount()) + if (0 == m_pDatasource->GetSelectEntryCount()) return false; - if (0 == m_aTable.GetSelectEntryCount()) + if (0 == m_pTable->GetSelectEntryCount()) return false; return true; @@ -117,14 +114,11 @@ namespace dbp bool bEmbedded = ::dbtools::isEmbeddedInDatabase( rContext.xForm, xConnection ); if ( bEmbedded ) { - m_aDatasource.Hide(); - m_aDatasourceLabel.Hide(); - m_aSearchDatabase.Hide(); - m_aTableLabel.SetPosPixel(m_aDatasourceLabel.GetPosPixel()); - m_aTable.SetPosPixel(m_aDatasource.GetPosPixel()); - m_aDatasource.InsertEntry(sDataSourceName); + VclVBox *_pSourceBox = get("sourcebox"); + _pSourceBox->Hide(); + m_pDatasource->InsertEntry(sDataSourceName); } - m_aDatasource.SelectEntry(sDataSourceName); + m_pDatasource->SelectEntry(sDataSourceName); implFillTables(xConnection); @@ -134,13 +128,13 @@ namespace dbp OSL_VERIFY( rContext.xForm->getPropertyValue("CommandType") >>= nCommandType ); // search the entry of the given type with the given name - for ( sal_uInt16 nLookup = 0; nLookup < m_aTable.GetEntryCount(); ++nLookup ) + for ( sal_uInt16 nLookup = 0; nLookup < m_pTable->GetEntryCount(); ++nLookup ) { - if (sCommand.equals(m_aTable.GetEntry(nLookup))) + if (sCommand.equals(m_pTable->GetEntry(nLookup))) { - if ( reinterpret_cast< sal_IntPtr >( m_aTable.GetEntryData( nLookup ) ) == nCommandType ) + if ( reinterpret_cast< sal_IntPtr >( m_pTable->GetEntryData( nLookup ) ) == nCommandType ) { - m_aTable.SelectEntryPos( nLookup ); + m_pTable->SelectEntryPos( nLookup ); break; } } @@ -166,11 +160,11 @@ namespace dbp { xOldConn = getFormConnection(); - OUString sDataSource = m_aDatasource.GetSelectEntry(); + OUString sDataSource = m_pDatasource->GetSelectEntry(); rContext.xForm->setPropertyValue("DataSourceName", makeAny( sDataSource ) ); } - OUString sCommand = m_aTable.GetSelectEntry(); - sal_Int32 nCommandType = reinterpret_cast< sal_IntPtr >( m_aTable.GetEntryData( m_aTable.GetSelectEntryPos() ) ); + OUString sCommand = m_pTable->GetSelectEntry(); + sal_Int32 nCommandType = reinterpret_cast< sal_IntPtr >( m_pTable->GetEntryData( m_pTable->GetSelectEntryPos() ) ); rContext.xForm->setPropertyValue("Command", makeAny( sCommand ) ); rContext.xForm->setPropertyValue("CommandType", makeAny( nCommandType ) ); @@ -208,9 +202,9 @@ namespace dbp OUString sDataSourceName = aFileDlg.GetPath(); ::svt::OFileNotation aFileNotation(sDataSourceName); sDataSourceName = aFileNotation.get(::svt::OFileNotation::N_SYSTEM); - m_aDatasource.InsertEntry(sDataSourceName); - m_aDatasource.SelectEntry(sDataSourceName); - LINK(this, OTableSelectionPage, OnListboxSelection).Call(&m_aDatasource); + m_pDatasource->InsertEntry(sDataSourceName); + m_pDatasource->SelectEntry(sDataSourceName); + LINK(this, OTableSelectionPage, OnListboxSelection).Call(m_pDatasource); } return 0L; } @@ -225,7 +219,7 @@ namespace dbp IMPL_LINK( OTableSelectionPage, OnListboxSelection, ListBox*, _pBox ) { - if (&m_aDatasource == _pBox) + if (m_pDatasource == _pBox) { // new data source selected implFillTables(); } @@ -257,7 +251,7 @@ namespace dbp void OTableSelectionPage::implFillTables(const Reference< XConnection >& _rxConn) { - m_aTable.Clear(); + m_pTable->Clear(); WaitObject aWaitCursor(this); @@ -275,7 +269,7 @@ namespace dbp // connect to the data source try { - OUString sCurrentDatasource = m_aDatasource.GetSelectEntry(); + OUString sCurrentDatasource = m_pDatasource->GetSelectEntry(); if (!sCurrentDatasource.isEmpty()) { // obtain the DS object @@ -359,14 +353,11 @@ namespace dbp } Image aTableImage, aQueryImage; - { - ::svt::OLocalResourceAccess aLocalResAccess( ModuleRes( RID_PAGE_TABLESELECTION ), RSC_TABPAGE ); + aTableImage = Image( ModuleRes( IMG_TABLE ) ); + aQueryImage = Image( ModuleRes( IMG_QUERY ) ); - aTableImage = Image( ModuleRes( IMG_TABLE ) ); - aQueryImage = Image( ModuleRes( IMG_QUERY ) ); - } - lcl_fillEntries( m_aTable, aTableNames, aTableImage, CommandType::TABLE ); - lcl_fillEntries( m_aTable, aQueryNames, aQueryImage, CommandType::QUERY ); + lcl_fillEntries( *m_pTable, aTableNames, aTableImage, CommandType::TABLE ); + lcl_fillEntries( *m_pTable, aQueryNames, aQueryImage, CommandType::QUERY ); } @@ -376,7 +367,7 @@ namespace dbp { m_xDSContext = getContext().xDatasourceContext; if (m_xDSContext.is()) - fillListBox(m_aDatasource, m_xDSContext->getElementNames()); + fillListBox(*m_pDatasource, m_xDSContext->getElementNames()); } catch (const Exception&) { diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx index b348b9438185..b93e40eab718 100644 --- a/extensions/source/dbpilots/commonpagesdbp.hxx +++ b/extensions/source/dbpilots/commonpagesdbp.hxx @@ -36,13 +36,10 @@ namespace dbp class OTableSelectionPage : public OControlWizardPage { protected: - FixedLine m_aData; - FixedText m_aExplanation; - FixedText m_aDatasourceLabel; - ListBox m_aDatasource; - PushButton m_aSearchDatabase; - FixedText m_aTableLabel; - ListBox m_aTable; + FixedText *m_pDatasourceLabel; + ListBox *m_pDatasource; + PushButton *m_pSearchDatabase; + ListBox *m_pTable; ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseContext > m_xDSContext; diff --git a/extensions/source/dbpilots/commonpagesdbp.src b/extensions/source/dbpilots/commonpagesdbp.src index 2e8824f28907..d40c75954046 100644 --- a/extensions/source/dbpilots/commonpagesdbp.src +++ b/extensions/source/dbpilots/commonpagesdbp.src @@ -19,82 +19,17 @@ #include "dbpresid.hrc" -TabPage RID_PAGE_TABLESELECTION -{ - HelpID = "extensions:TabPage:RID_PAGE_TABLESELECTION"; - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; - Text [ en-US ] = "Data"; - - FixedLine FL_DATA - { - Pos = MAP_APPFONT ( 4 , 3 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ; - Text [ en-US ] = "Data"; - }; - FixedText FT_EXPLANATION - { - Pos = MAP_APPFONT ( 7 , 15 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10 , WINDOW_SIZE_Y - 21 ) ; - WordBreak = TRUE; - Group = TRUE; - Text [ en-US ] = "Currently, the form the control belongs to is not (or not completely) bound to a data source.\n\nPlease choose a data source and a table.\n\n\nPlease note that the settings made on this page will take effect immediately upon leaving the page."; - }; - FixedText FT_DATASOURCE - { - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 15 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10 , 8) ; - Group = TRUE; - Text [ en-US ] = "~Data source:"; - }; - ListBox LB_DATASOURCE - { - HelpID = "extensions:ListBox:RID_PAGE_TABLESELECTION:LB_DATASOURCE"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 26 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 27 , 14 ) ; - SVLook = TRUE ; - Border = TRUE ; - DropDown = TRUE ; - AutoHScroll = TRUE ; - }; - - PushButton PB_FORMDATASOURCE - { - HelpID = "extensions:PushButton:RID_PAGE_TABLESELECTION:PB_FORMDATASOURCE"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 + WINDOW_HALF_SIZE_X - 24 , 25 ) ; - Size = MAP_APPFONT ( 14 , 14 ) ; - Text [ en-US ] = "~..."; - }; - - FixedText FT_TABLE - { - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3, 46 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 14 , 8) ; - Group = TRUE; - Text [ en-US ] = "~Table / Query:"; - }; - ListBox LB_TABLE - { - HelpID = "extensions:ListBox:RID_PAGE_TABLESELECTION:LB_TABLE"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3, 57 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10 , WINDOW_SIZE_Y - 6 - 57 ) ; - SVLook = TRUE ; - Border = TRUE ; - Sort = TRUE; - AutoHScroll = TRUE ; - }; - Image IMG_TABLE - { - ImageBitmap = Bitmap { File = "sx03188.bmp"; }; - MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; - }; +Image IMG_TABLE +{ + ImageBitmap = Bitmap { File = "sx03188.bmp"; }; + MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; +}; - Image IMG_QUERY - { - ImageBitmap = Bitmap { File = "sx03202.bmp"; }; - MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; - }; +Image IMG_QUERY +{ + ImageBitmap = Bitmap { File = "sx03202.bmp"; }; + MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; }; TabPage RID_PAGE_OPTION_DBFIELD @@ -152,53 +87,6 @@ TabPage RID_PAGE_OPTION_DBFIELD }; }; -TabPage RID_PAGE_FORM_DATASOURCE_STATUS -{ - HelpID = "extensions:TabPage:RID_PAGE_FORM_DATASOURCE_STATUS"; - FixedLine FL_FORMSETINGS - { - Pos = MAP_APPFONT ( 4 , 3 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ; - Text [ en-US ] = "Form"; - }; - FixedText FT_FORMDATASOURCELABEL - { - Pos = MAP_APPFONT ( 7 , 15 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "Data source"; - }; - FixedText FT_FORMDATASOURCE - { - Pos = MAP_APPFONT ( 7 + 60 + 3 , 15 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X / 2 - 80 - 3 , 19 ) ; - WordBreak = TRUE; - }; - - FixedText FT_FORMCONTENTTYPELABEL - { - Pos = MAP_APPFONT ( WINDOW_SIZE_X / 2 + 3, 15 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "Content type"; - }; - FixedText FT_FORMCONTENTTYPE - { - Pos = MAP_APPFONT ( WINDOW_SIZE_X / 2 + 3 + 60 , 15 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - ( WINDOW_SIZE_X / 2 + 3 + 60 ) - 7 , 8 ) ; - }; - - FixedText FT_FORMTABLELABEL - { - Pos = MAP_APPFONT ( WINDOW_SIZE_X / 2 + 3, 26 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "Content"; - }; - FixedText FT_FORMTABLE - { - Pos = MAP_APPFONT ( WINDOW_SIZE_X / 2 + 3 + 60 , 26 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - ( WINDOW_SIZE_X / 2 + 3 + 60 ) - 7 , 8 ) ; - }; -}; - String RID_STR_TYPE_TABLE { Text [ en-US ] = "Table"; diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 530ef32a65e8..53179e65efd6 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -44,6 +44,7 @@ #include #include #include +#include namespace dbp @@ -84,7 +85,18 @@ namespace dbp OControlWizardPage::OControlWizardPage( OControlWizard* _pParent, const ResId& _rResId ) :OControlWizardPage_Base( _pParent, _rResId ) - ,m_pFormSettingsSeparator(NULL) + ,m_pFormDatasourceLabel(NULL) + ,m_pFormDatasource(NULL) + ,m_pFormContentTypeLabel(NULL) + ,m_pFormContentType(NULL) + ,m_pFormTableLabel(NULL) + ,m_pFormTable(NULL) + { + } + + + OControlWizardPage::OControlWizardPage( OControlWizard* _pParent, const OString& rID, const OUString& rUIXMLDescription ) + :OControlWizardPage_Base( _pParent, rID, rUIXMLDescription ) ,m_pFormDatasourceLabel(NULL) ,m_pFormDatasource(NULL) ,m_pFormContentTypeLabel(NULL) @@ -97,13 +109,6 @@ namespace dbp OControlWizardPage::~OControlWizardPage() { - delete m_pFormSettingsSeparator; - delete m_pFormDatasourceLabel; - delete m_pFormDatasource; - delete m_pFormContentTypeLabel; - delete m_pFormContentType; - delete m_pFormTableLabel; - delete m_pFormTable; } @@ -177,20 +182,18 @@ namespace dbp void OControlWizardPage::enableFormDatasourceDisplay() { - if (m_pFormSettingsSeparator) + if (m_pFormContentType) // nothing to do return; - ModuleRes aModuleRes(RID_PAGE_FORM_DATASOURCE_STATUS); - OLocalResourceAccess aLocalControls(aModuleRes, RSC_TABPAGE); - - m_pFormSettingsSeparator = new FixedLine(this, ModuleRes(FL_FORMSETINGS)); - m_pFormDatasourceLabel = new FixedText(this, ModuleRes(FT_FORMDATASOURCELABEL)); - m_pFormDatasource = new FixedText(this, ModuleRes(FT_FORMDATASOURCE)); - m_pFormContentTypeLabel = new FixedText(this, ModuleRes(FT_FORMCONTENTTYPELABEL)); - m_pFormContentType = new FixedText(this, ModuleRes(FT_FORMCONTENTTYPE)); - m_pFormTableLabel = new FixedText(this, ModuleRes(FT_FORMTABLELABEL)); - m_pFormTable = new FixedText(this, ModuleRes(FT_FORMTABLE)); + VclFrame *_pFrame = get("sourceframe"); + _pFrame->Show(); + get(m_pFormContentType,"contenttype"); + get(m_pFormContentTypeLabel,"contenttypelabel"); + get(m_pFormDatasource, "datasource"); + get(m_pFormDatasourceLabel, "datasourcelabel"); + get(m_pFormTable,"formtable"); + get(m_pFormTableLabel,"formtablelabel"); const OControlWizardContext& rContext = getContext(); if ( rContext.bEmbedded ) diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx index 8a048a21e69e..971f2ccd9e5a 100644 --- a/extensions/source/dbpilots/controlwizard.hxx +++ b/extensions/source/dbpilots/controlwizard.hxx @@ -57,7 +57,6 @@ namespace dbp class OControlWizardPage : public OControlWizardPage_Base { protected: - FixedLine* m_pFormSettingsSeparator; FixedText* m_pFormDatasourceLabel; FixedText* m_pFormDatasource; FixedText* m_pFormContentTypeLabel; @@ -76,6 +75,7 @@ namespace dbp public: OControlWizardPage( OControlWizard* _pParent, const ResId& _rResId ); + OControlWizardPage( OControlWizard* _pParent, const OString& rID, const OUString& rUIXMLDescription ); virtual ~OControlWizardPage(); protected: @@ -128,7 +128,7 @@ namespace dbp const OControlWizardContext& getContext() const { return m_aContext; } bool updateContext(const OAccessRegulator&); void setFormConnection(const OAccessRegulator&, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, bool _bAutoDispose = true ); - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getFormConnection(const OAccessRegulator&) const; /** returns the com.sun.star.task.InteractionHandler diff --git a/extensions/source/dbpilots/dbpresid.hrc b/extensions/source/dbpilots/dbpresid.hrc index 0aad843de951..620e4e75900d 100644 --- a/extensions/source/dbpilots/dbpresid.hrc +++ b/extensions/source/dbpilots/dbpresid.hrc @@ -42,6 +42,8 @@ #define RID_STR_TYPE_QUERY (RID_STRING_START + 8 ) #define RID_STR_TYPE_TABLE (RID_STRING_START + 9 ) #define RID_STR_TYPE_COMMAND (RID_STRING_START + 10 ) +#define RID_STR_FIELDINFO_LISTBOX (RID_STRING_START + 11 ) +#define RID_STR_FIELDINFO_COMBOBOX (RID_STRING_START + 12 ) // please adjust RID_STRING_END (below) when adding new strings #define RID_STRING_END RID_STR_TIMEPOSTFIX @@ -97,8 +99,6 @@ // local ids // FixedLine - -#define FL_DATA 1 #define FL_DEFAULTSELECTION 2 #define FL_OPTIONVALUES 3 #define FL_DATABASEFIELD_EXPL 4 @@ -108,9 +108,6 @@ // FixedText -#define FT_DATASOURCE 1 -#define FT_TABLE 2 -#define FT_RADIOLABELS 3 #define FT_RADIOBUTTONS 4 #define FT_DEFAULTSELECTION 5 #define FT_OPTIONVALUES_EXPL 6 @@ -119,51 +116,17 @@ #define FT_DATABASEFIELD_QUEST 9 #define FT_NAMEIT 10 #define FT_THATSALL 11 -#define FT_SELECTTABLE_LABEL 12 -#define FT_TABLEFIELDS 13 -#define FT_DISPLAYEDFIELD 14 -#define FT_CONTENTFIELD_INFO 15 -#define FT_VALUELISTFIELD 16 -#define FT_TABLEFIELD 17 -#define FT_EXPLANATION 18 -#define FT_EXISTING_FIELDS 19 -#define FT_SELECTED_FIELDS 20 -#define FT_FIELDLINK_DESC 21 -#define FT_FORMDATASOURCELABEL 22 -#define FT_FORMDATASOURCE 23 -#define FT_FORMTABLELABEL 24 -#define FT_FORMTABLE 25 -#define FT_FORMCONTENTTYPELABEL 26 -#define FT_FORMCONTENTTYPE 27 // ListBox -#define LB_DATASOURCE 1 -#define LB_TABLE 2 #define LB_RADIOBUTTONS 3 #define LB_DEFSELECTIONFIELD 3 #define LB_STOREINFIELD 4 -#define LB_SELECTTABLE 5 -#define LB_SELECTFIELD 6 -#define LB_EXISTING_FIELDS 7 -#define LB_SELECTED_FIELDS 8 // Edit -#define ET_RADIOLABELS 1 #define ET_OPTIONVALUE 2 #define ET_NAMEIT 3 -#define ET_DISPLAYEDFIELD 4 - -// PushButton - -#define PB_MOVETORIGHT 1 -#define PB_MOVETOLEFT 2 -#define PB_FIELDRIGHT 3 -#define PB_ALLFIELDSRIGHT 4 -#define PB_FIELDLEFT 5 -#define PB_ALLFIELDSLEFT 6 -#define PB_FORMDATASOURCE 7 // RadioButton @@ -172,20 +135,10 @@ #define RB_STOREINFIELD_YES 3 #define RB_STOREINFIELD_NO 4 -// ComboBox - -#define CMB_VALUELISTFIELD 1 -#define CMB_TABLEFIELD 2 - -// String - -#define STR_FIELDINFO_LISTBOX 1 -#define STR_FIELDINFO_COMBOBOX 2 - // Image -#define IMG_TABLE 1 -#define IMG_QUERY 3 +#define IMG_TABLE ( RID_DIALOG_START + 1 ) +#define IMG_QUERY ( RID_DIALOG_START + 2 ) #define WINDOW_SIZE_X 260 #define WINDOW_SIZE_Y 185 diff --git a/extensions/source/dbpilots/gridpages.src b/extensions/source/dbpilots/gridpages.src index 099eb90b1dec..bdcb8004c0af 100644 --- a/extensions/source/dbpilots/gridpages.src +++ b/extensions/source/dbpilots/gridpages.src @@ -19,85 +19,6 @@ #include "dbpresid.hrc" -TabPage RID_PAGE_GW_FIELDSELECTION -{ - HelpID = "extensions:TabPage:RID_PAGE_GW_FIELDSELECTION"; - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; - - Text [ en-US ] = "Field Selection"; - - FixedLine FL_FRAME - { - Pos = MAP_APPFONT ( 4 , 40 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ; - Text [ en-US ] = "Table element"; - }; - - FixedText FT_EXISTING_FIELDS - { - Pos = MAP_APPFONT ( 7, 52 ); - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 13, 8 ); - Text [ en-US ] = "Existing fields"; - }; - ListBox LB_EXISTING_FIELDS - { - HelpID = "extensions:ListBox:RID_PAGE_GW_FIELDSELECTION:LB_EXISTING_FIELDS"; - Pos = MAP_APPFONT ( 7 , 63 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 13, WINDOW_SIZE_Y - 63 - 6 ) ; - SVLook = TRUE ; - Border = TRUE ; - AutoHScroll = TRUE ; - Sort = FALSE; - DropDown = FALSE; - }; - PushButton PB_FIELDRIGHT - { - HelpID = "extensions:PushButton:RID_PAGE_GW_FIELDSELECTION:PB_FIELDRIGHT"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2, 63 ); - Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X, ITEM_BUTTON_SIZE_Y ); - Text = "->"; - }; - PushButton PB_ALLFIELDSRIGHT - { - HelpID = "extensions:PushButton:RID_PAGE_GW_FIELDSELECTION:PB_ALLFIELDSRIGHT"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2, 63 + ITEM_BUTTON_SIZE_Y + 3 ); - Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X, ITEM_BUTTON_SIZE_Y ); - Text = "=>>"; - }; - PushButton PB_FIELDLEFT - { - HelpID = "extensions:PushButton:RID_PAGE_GW_FIELDSELECTION:PB_FIELDLEFT"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2, 63 + ITEM_BUTTON_SIZE_Y + 3 + ITEM_BUTTON_SIZE_Y + 12 ); - Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X, ITEM_BUTTON_SIZE_Y ); - Text = "<-"; - }; - PushButton PB_ALLFIELDSLEFT - { - HelpID = "extensions:PushButton:RID_PAGE_GW_FIELDSELECTION:PB_ALLFIELDSLEFT"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2, 63 + ITEM_BUTTON_SIZE_Y + 3 + ITEM_BUTTON_SIZE_Y + 12 + ITEM_BUTTON_SIZE_Y + 3 ); - Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X, ITEM_BUTTON_SIZE_Y ); - Text = "<<="; - }; - FixedText FT_SELECTED_FIELDS - { - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + ITEM_BUTTON_SIZE_X / 2 + 6, 52 ); - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 13, 8 ); - Text [ en-US ] = "Selected fields"; - }; - ListBox LB_SELECTED_FIELDS - { - HelpID = "extensions:ListBox:RID_PAGE_GW_FIELDSELECTION:LB_SELECTED_FIELDS"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + ITEM_BUTTON_SIZE_X / 2 + 6 , 63 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 13, WINDOW_SIZE_Y - 63 - 6 ) ; - SVLook = TRUE ; - Border = TRUE ; - AutoHScroll = TRUE ; - Sort = FALSE; - DropDown = FALSE; - }; -}; - String RID_STR_DATEPOSTFIX { Text [ en-US ] = " (Date)"; diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index d7482a2e6ad1..9f599ccf2427 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -295,37 +295,33 @@ namespace dbp OGridFieldsSelection::OGridFieldsSelection( OGridWizard* _pParent ) - :OGridPage(_pParent, ModuleRes(RID_PAGE_GW_FIELDSELECTION)) - ,m_aFrame (this, ModuleRes(FL_FRAME)) - ,m_aExistFieldsLabel (this, ModuleRes(FT_EXISTING_FIELDS)) - ,m_aExistFields (this, ModuleRes(LB_EXISTING_FIELDS)) - ,m_aSelectOne (this, ModuleRes(PB_FIELDRIGHT)) - ,m_aSelectAll (this, ModuleRes(PB_ALLFIELDSRIGHT)) - ,m_aDeselectOne (this, ModuleRes(PB_FIELDLEFT)) - ,m_aDeselectAll (this, ModuleRes(PB_ALLFIELDSLEFT)) - ,m_aSelFieldsLabel (this, ModuleRes(FT_SELECTED_FIELDS)) - ,m_aSelFields (this, ModuleRes(LB_SELECTED_FIELDS)) + :OGridPage(_pParent, "GridFieldsSelection", "modules/sabpilot/ui/gridfieldsselectionpage.ui") { - FreeResource(); + get(m_pExistFields,"existingfields"); + get(m_pSelectOne,"fieldright"); + get(m_pSelectAll,"allfieldsright"); + get(m_pDeselectOne,"fieldleft"); + get(m_pDeselectAll,"allfieldsleft"); + get(m_pSelFields,"selectedfields"); enableFormDatasourceDisplay(); - m_aSelectOne.SetClickHdl(LINK(this, OGridFieldsSelection, OnMoveOneEntry)); - m_aSelectAll.SetClickHdl(LINK(this, OGridFieldsSelection, OnMoveAllEntries)); - m_aDeselectOne.SetClickHdl(LINK(this, OGridFieldsSelection, OnMoveOneEntry)); - m_aDeselectAll.SetClickHdl(LINK(this, OGridFieldsSelection, OnMoveAllEntries)); + m_pSelectOne->SetClickHdl(LINK(this, OGridFieldsSelection, OnMoveOneEntry)); + m_pSelectAll->SetClickHdl(LINK(this, OGridFieldsSelection, OnMoveAllEntries)); + m_pDeselectOne->SetClickHdl(LINK(this, OGridFieldsSelection, OnMoveOneEntry)); + m_pDeselectAll->SetClickHdl(LINK(this, OGridFieldsSelection, OnMoveAllEntries)); - m_aExistFields.SetSelectHdl(LINK(this, OGridFieldsSelection, OnEntrySelected)); - m_aSelFields.SetSelectHdl(LINK(this, OGridFieldsSelection, OnEntrySelected)); - m_aExistFields.SetDoubleClickHdl(LINK(this, OGridFieldsSelection, OnEntryDoubleClicked)); - m_aSelFields.SetDoubleClickHdl(LINK(this, OGridFieldsSelection, OnEntryDoubleClicked)); + m_pExistFields->SetSelectHdl(LINK(this, OGridFieldsSelection, OnEntrySelected)); + m_pSelFields->SetSelectHdl(LINK(this, OGridFieldsSelection, OnEntrySelected)); + m_pExistFields->SetDoubleClickHdl(LINK(this, OGridFieldsSelection, OnEntryDoubleClicked)); + m_pSelFields->SetDoubleClickHdl(LINK(this, OGridFieldsSelection, OnEntryDoubleClicked)); } void OGridFieldsSelection::ActivatePage() { OGridPage::ActivatePage(); - m_aExistFields.GrabFocus(); + m_pExistFields->GrabFocus(); } @@ -341,16 +337,16 @@ namespace dbp OGridPage::initializePage(); const OControlWizardContext& rContext = getContext(); - fillListBox(m_aExistFields, rContext.aFieldNames); + fillListBox(*m_pExistFields, rContext.aFieldNames); - m_aSelFields.Clear(); + m_pSelFields->Clear(); const OGridSettings& rSettings = getSettings(); const OUString* pSelected = rSettings.aSelectedFields.getConstArray(); const OUString* pEnd = pSelected + rSettings.aSelectedFields.getLength(); for (; pSelected < pEnd; ++pSelected) { - m_aSelFields.InsertEntry(*pSelected); - m_aExistFields.RemoveEntry(*pSelected); + m_pSelFields->InsertEntry(*pSelected); + m_pExistFields->RemoveEntry(*pSelected); } implCheckButtons(); @@ -363,13 +359,13 @@ namespace dbp return false; OGridSettings& rSettings = getSettings(); - sal_uInt16 nSelected = m_aSelFields.GetEntryCount(); + sal_uInt16 nSelected = m_pSelFields->GetEntryCount(); rSettings.aSelectedFields.realloc(nSelected); OUString* pSelected = rSettings.aSelectedFields.getArray(); for (sal_uInt16 i=0; iGetEntry(i); return true; } @@ -377,19 +373,19 @@ namespace dbp void OGridFieldsSelection::implCheckButtons() { - m_aSelectOne.Enable(m_aExistFields.GetSelectEntryCount() != 0); - m_aSelectAll.Enable(m_aExistFields.GetEntryCount() != 0); + m_pSelectOne->Enable(m_pExistFields->GetSelectEntryCount() != 0); + m_pSelectAll->Enable(m_pExistFields->GetEntryCount() != 0); - m_aDeselectOne.Enable(m_aSelFields.GetSelectEntryCount() != 0); - m_aDeselectAll.Enable(m_aSelFields.GetEntryCount() != 0); + m_pDeselectOne->Enable(m_pSelFields->GetSelectEntryCount() != 0); + m_pDeselectAll->Enable(m_pSelFields->GetEntryCount() != 0); - getDialog()->enableButtons(WZB_FINISH, 0 != m_aSelFields.GetEntryCount()); + getDialog()->enableButtons(WZB_FINISH, 0 != m_pSelFields->GetEntryCount()); } IMPL_LINK(OGridFieldsSelection, OnEntryDoubleClicked, ListBox*, _pList) { - PushButton* pSimulateButton = &m_aExistFields == _pList ? &m_aSelectOne : &m_aDeselectOne; + PushButton* pSimulateButton = m_pExistFields == _pList ? m_pSelectOne : m_pDeselectOne; if (pSimulateButton->IsEnabled()) return OnMoveOneEntry( pSimulateButton ); else @@ -406,13 +402,13 @@ namespace dbp IMPL_LINK(OGridFieldsSelection, OnMoveOneEntry, PushButton*, _pButton) { - bool bMoveRight = (&m_aSelectOne == _pButton); - ListBox& rMoveTo = bMoveRight ? m_aSelFields : m_aExistFields; + bool bMoveRight = (m_pSelectOne == _pButton); + ListBox& rMoveTo = bMoveRight ? *m_pSelFields : *m_pExistFields; // the index of the selected entry - sal_uInt16 nSelected = bMoveRight ? m_aExistFields.GetSelectEntryPos() : m_aSelFields.GetSelectEntryPos(); + sal_uInt16 nSelected = bMoveRight ? m_pExistFields->GetSelectEntryPos() : m_pSelFields->GetSelectEntryPos(); // the (original) relative position of the entry - sal_IntPtr nRelativeIndex = reinterpret_cast(bMoveRight ? m_aExistFields.GetEntryData(nSelected) : m_aSelFields.GetEntryData(nSelected)); + sal_IntPtr nRelativeIndex = reinterpret_cast(bMoveRight ? m_pExistFields->GetEntryData(nSelected) : m_pSelFields->GetEntryData(nSelected)); sal_uInt16 nInsertPos = SAL_MAX_UINT16; if (!bMoveRight) @@ -427,7 +423,7 @@ namespace dbp } // the text of the entry to move - OUString sMovingEntry = bMoveRight ? m_aExistFields.GetEntry(nSelected) : m_aSelFields.GetEntry(nSelected); + OUString sMovingEntry = bMoveRight ? m_pExistFields->GetEntry(nSelected) : m_pSelFields->GetEntry(nSelected); // insert the entry nInsertPos = rMoveTo.InsertEntry(sMovingEntry, nInsertPos); @@ -437,21 +433,21 @@ namespace dbp // remove the entry from it's old list if (bMoveRight) { - sal_Int32 nSelectPos = m_aExistFields.GetSelectEntryPos(); - m_aExistFields.RemoveEntry(nSelected); - if ((LISTBOX_ENTRY_NOTFOUND != nSelectPos) && (nSelectPos < m_aExistFields.GetEntryCount())) - m_aExistFields.SelectEntryPos(nSelectPos); + sal_Int32 nSelectPos = m_pExistFields->GetSelectEntryPos(); + m_pExistFields->RemoveEntry(nSelected); + if ((LISTBOX_ENTRY_NOTFOUND != nSelectPos) && (nSelectPos < m_pExistFields->GetEntryCount())) + m_pExistFields->SelectEntryPos(nSelectPos); - m_aExistFields.GrabFocus(); + m_pExistFields->GrabFocus(); } else { - sal_Int32 nSelectPos = m_aSelFields.GetSelectEntryPos(); - m_aSelFields.RemoveEntry(nSelected); - if ((LISTBOX_ENTRY_NOTFOUND != nSelectPos) && (nSelectPos < m_aSelFields.GetEntryCount())) - m_aSelFields.SelectEntryPos(nSelectPos); + sal_Int32 nSelectPos = m_pSelFields->GetSelectEntryPos(); + m_pSelFields->RemoveEntry(nSelected); + if ((LISTBOX_ENTRY_NOTFOUND != nSelectPos) && (nSelectPos < m_pSelFields->GetEntryCount())) + m_pSelFields->SelectEntryPos(nSelectPos); - m_aSelFields.GrabFocus(); + m_pSelFields->GrabFocus(); } implCheckButtons(); @@ -461,10 +457,10 @@ namespace dbp IMPL_LINK(OGridFieldsSelection, OnMoveAllEntries, PushButton*, _pButton) { - bool bMoveRight = (&m_aSelectAll == _pButton); - m_aExistFields.Clear(); - m_aSelFields.Clear(); - fillListBox(bMoveRight ? m_aSelFields : m_aExistFields, getContext().aFieldNames); + bool bMoveRight = (m_pSelectAll == _pButton); + m_pExistFields->Clear(); + m_pSelFields->Clear(); + fillListBox(bMoveRight ? *m_pSelFields : *m_pExistFields, getContext().aFieldNames); implCheckButtons(); return 0; diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx index cd89e7a298e5..e65e75d58506 100644 --- a/extensions/source/dbpilots/gridwizard.hxx +++ b/extensions/source/dbpilots/gridwizard.hxx @@ -75,6 +75,7 @@ namespace dbp { public: OGridPage( OGridWizard* _pParent, const ResId& _rId ) : OControlWizardPage(_pParent, _rId) { } + OGridPage( OGridWizard* _pParent, const OString& _rID, const OUString& _rUIXMLDescription ) : OControlWizardPage(_pParent, _rID, _rUIXMLDescription) { } protected: OGridSettings& getSettings() { return static_cast(getDialog())->getSettings(); } @@ -86,15 +87,12 @@ namespace dbp class OGridFieldsSelection : public OGridPage { protected: - FixedLine m_aFrame; - FixedText m_aExistFieldsLabel; - ListBox m_aExistFields; - PushButton m_aSelectOne; - PushButton m_aSelectAll; - PushButton m_aDeselectOne; - PushButton m_aDeselectAll; - FixedText m_aSelFieldsLabel; - ListBox m_aSelFields; + ListBox *m_pExistFields; + PushButton *m_pSelectOne; + PushButton *m_pSelectAll; + PushButton *m_pDeselectOne; + PushButton *m_pDeselectAll; + ListBox *m_pSelFields; public: OGridFieldsSelection( OGridWizard* _pParent ); diff --git a/extensions/source/dbpilots/groupboxpages.src b/extensions/source/dbpilots/groupboxpages.src index bc8eef8b9842..3d22719b1d39 100644 --- a/extensions/source/dbpilots/groupboxpages.src +++ b/extensions/source/dbpilots/groupboxpages.src @@ -19,67 +19,6 @@ #include "dbpresid.hrc" -TabPage RID_PAGE_GROUPRADIOSELECTION -{ - HelpID = "extensions:TabPage:RID_PAGE_GROUPRADIOSELECTION"; - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; - Text [ en-US ] = "Data"; - - FixedLine FL_DATA - { - Pos = MAP_APPFONT ( 4 , 40 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ; - }; - FixedText FT_RADIOLABELS - { - Pos = MAP_APPFONT ( 7 , 52 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 13, 24 ) ; - WordBreak = TRUE; - Group = TRUE; - Text [ en-US ] = "Which ~names do you want to give the option fields?"; - }; - Edit ET_RADIOLABELS - { - HelpID = "extensions:Edit:RID_PAGE_GROUPRADIOSELECTION:ET_RADIOLABELS"; - Pos = MAP_APPFONT ( 7 , 79 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 13, 12 ) ; - SVLook = TRUE ; - Border = TRUE ; - }; - PushButton PB_MOVETORIGHT - { - HelpID = "extensions:PushButton:RID_PAGE_GROUPRADIOSELECTION:PB_MOVETORIGHT"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 , 79 ) ; - Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X , ITEM_BUTTON_SIZE_Y ) ; - Text = "~>>"; - }; - PushButton PB_MOVETOLEFT - { - HelpID = "extensions:PushButton:RID_PAGE_GROUPRADIOSELECTION:PB_MOVETOLEFT"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 , 79 + ITEM_BUTTON_SIZE_Y + 3 ) ; - Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X , ITEM_BUTTON_SIZE_Y ) ; - Text = "~<<"; - }; - FixedText FT_RADIOBUTTONS - { - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + ITEM_BUTTON_SIZE_X / 2 + 6 , 52 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 6 - 7, 8 ) ; - Group = TRUE; - Text [ en-US ] = "~Option fields"; - }; - ListBox LB_RADIOBUTTONS - { - HelpID = "extensions:ListBox:RID_PAGE_GROUPRADIOSELECTION:LB_RADIOBUTTONS"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + ITEM_BUTTON_SIZE_X / 2 + 6 , 79 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 6 - 7, WINDOW_SIZE_Y - 79 - 6 ) ; - SVLook = TRUE ; - Border = TRUE ; - AutoHScroll = TRUE ; - Sort = FALSE; - }; -}; - TabPage RID_PAGE_DEFAULTFIELDSELECTION { HelpID = "extensions:TabPage:RID_PAGE_DEFAULTFIELDSELECTION"; diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index ed7c53d3a917..8733a279d796 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -186,51 +186,36 @@ namespace dbp ORadioSelectionPage::ORadioSelectionPage( OControlWizard* _pParent ) - :OGBWPage(_pParent, ModuleRes(RID_PAGE_GROUPRADIOSELECTION)) - ,m_aFrame (this, ModuleRes(FL_DATA)) - ,m_aRadioNameLabel (this, ModuleRes(FT_RADIOLABELS)) - ,m_aRadioName (this, ModuleRes(ET_RADIOLABELS)) - ,m_aMoveRight (this, ModuleRes(PB_MOVETORIGHT)) - ,m_aMoveLeft (this, ModuleRes(PB_MOVETOLEFT)) - ,m_aExistingRadiosLabel (this, ModuleRes(FT_RADIOBUTTONS)) - ,m_aExistingRadios (this, ModuleRes(LB_RADIOBUTTONS)) + :OGBWPage(_pParent, "GroupRadioSelectionPage", "modules/sabpilot/ui/groupradioselectionpage.ui") { - FreeResource(); + get(m_pRadioName, "radiolabels"); + get(m_pMoveRight, "toright"); + get(m_pMoveLeft, "toleft"); + get(m_pExistingRadios, "radiobuttons"); if (getContext().aFieldNames.getLength()) { enableFormDatasourceDisplay(); } - else - { - adjustControlForNoDSDisplay(&m_aFrame); - adjustControlForNoDSDisplay(&m_aRadioNameLabel); - adjustControlForNoDSDisplay(&m_aRadioName); - adjustControlForNoDSDisplay(&m_aMoveRight); - adjustControlForNoDSDisplay(&m_aMoveLeft); - adjustControlForNoDSDisplay(&m_aExistingRadiosLabel); - adjustControlForNoDSDisplay(&m_aExistingRadios, true); - } - m_aMoveLeft.SetClickHdl(LINK(this, ORadioSelectionPage, OnMoveEntry)); - m_aMoveRight.SetClickHdl(LINK(this, ORadioSelectionPage, OnMoveEntry)); - m_aRadioName.SetModifyHdl(LINK(this, ORadioSelectionPage, OnNameModified)); - m_aExistingRadios.SetSelectHdl(LINK(this, ORadioSelectionPage, OnEntrySelected)); + m_pMoveLeft->SetClickHdl(LINK(this, ORadioSelectionPage, OnMoveEntry)); + m_pMoveRight->SetClickHdl(LINK(this, ORadioSelectionPage, OnMoveEntry)); + m_pRadioName->SetModifyHdl(LINK(this, ORadioSelectionPage, OnNameModified)); + m_pExistingRadios->SetSelectHdl(LINK(this, ORadioSelectionPage, OnEntrySelected)); implCheckMoveButtons(); - m_aExistingRadios.EnableMultiSelection(true); + m_pExistingRadios->EnableMultiSelection(true); - getDialog()->defaultButton(&m_aMoveRight); + getDialog()->defaultButton(m_pMoveRight); - m_aExistingRadios.SetAccessibleRelationMemberOf(&m_aExistingRadios); - m_aExistingRadios.SetAccessibleRelationLabeledBy(&m_aExistingRadiosLabel); + m_pExistingRadios->SetAccessibleRelationMemberOf(m_pExistingRadios); } void ORadioSelectionPage::ActivatePage() { OGBWPage::ActivatePage(); - m_aRadioName.GrabFocus(); + m_pRadioName->GrabFocus(); } @@ -238,7 +223,7 @@ namespace dbp { OGBWPage::initializePage(); - m_aRadioName.SetText(""); + m_pRadioName->SetText(""); // no need to initialize the list of radios here // (we're the only one affecting this special setting, so it will be in the same state as last time this @@ -258,11 +243,11 @@ namespace dbp OOptionGroupSettings& rSettings = getSettings(); rSettings.aLabels.clear(); rSettings.aValues.clear(); - rSettings.aLabels.reserve(m_aExistingRadios.GetEntryCount()); - rSettings.aValues.reserve(m_aExistingRadios.GetEntryCount()); - for (::svt::WizardTypes::WizardState i=0; iGetEntryCount()); + rSettings.aValues.reserve(m_pExistingRadios->GetEntryCount()); + for (::svt::WizardTypes::WizardState i=0; iGetEntryCount(); ++i) { - rSettings.aLabels.push_back(m_aExistingRadios.GetEntry(i)); + rSettings.aLabels.push_back(m_pExistingRadios->GetEntry(i)); rSettings.aValues.push_back(OUString::number((i + 1))); } @@ -272,25 +257,25 @@ namespace dbp IMPL_LINK( ORadioSelectionPage, OnMoveEntry, PushButton*, _pButton ) { - bool bMoveLeft = (&m_aMoveLeft == _pButton); + bool bMoveLeft = (m_pMoveLeft == _pButton); if (bMoveLeft) { - while (m_aExistingRadios.GetSelectEntryCount()) - m_aExistingRadios.RemoveEntry(m_aExistingRadios.GetSelectEntryPos(0)); + while (m_pExistingRadios->GetSelectEntryCount()) + m_pExistingRadios->RemoveEntry(m_pExistingRadios->GetSelectEntryPos(0)); } else { - m_aExistingRadios.InsertEntry(m_aRadioName.GetText()); - m_aRadioName.SetText(""); + m_pExistingRadios->InsertEntry(m_pRadioName->GetText()); + m_pRadioName->SetText(""); } implCheckMoveButtons(); //adjust the focus if (bMoveLeft) - m_aExistingRadios.GrabFocus(); + m_pExistingRadios->GrabFocus(); else - m_aRadioName.GrabFocus(); + m_pRadioName->GrabFocus(); return 0L; } @@ -311,29 +296,29 @@ namespace dbp bool ORadioSelectionPage::canAdvance() const { - return 0 != m_aExistingRadios.GetEntryCount(); + return 0 != m_pExistingRadios->GetEntryCount(); } void ORadioSelectionPage::implCheckMoveButtons() { - bool bHaveSome = (0 != m_aExistingRadios.GetEntryCount()); - bool bSelectedSome = (0 != m_aExistingRadios.GetSelectEntryCount()); - bool bUnfinishedInput = (!m_aRadioName.GetText().isEmpty()); + bool bHaveSome = (0 != m_pExistingRadios->GetEntryCount()); + bool bSelectedSome = (0 != m_pExistingRadios->GetSelectEntryCount()); + bool bUnfinishedInput = (!m_pRadioName->GetText().isEmpty()); - m_aMoveLeft.Enable(bSelectedSome); - m_aMoveRight.Enable(bUnfinishedInput); + m_pMoveLeft->Enable(bSelectedSome); + m_pMoveRight->Enable(bUnfinishedInput); getDialog()->enableButtons(WZB_NEXT, bHaveSome); if (bUnfinishedInput) { - if (0 == (m_aMoveRight.GetStyle() & WB_DEFBUTTON)) - getDialog()->defaultButton(&m_aMoveRight); + if (0 == (m_pMoveRight->GetStyle() & WB_DEFBUTTON)) + getDialog()->defaultButton(m_pMoveRight); } else { - if (WB_DEFBUTTON == (m_aMoveRight.GetStyle() & WB_DEFBUTTON)) + if (WB_DEFBUTTON == (m_pMoveRight->GetStyle() & WB_DEFBUTTON)) getDialog()->defaultButton(WZB_NEXT); } } diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx index ccdad61e48b0..33bc09c8798f 100644 --- a/extensions/source/dbpilots/groupboxwiz.hxx +++ b/extensions/source/dbpilots/groupboxwiz.hxx @@ -80,6 +80,7 @@ namespace dbp { public: OGBWPage( OControlWizard* _pParent, const ResId& _rId ) : OControlWizardPage(_pParent, _rId) { } + OGBWPage( OControlWizard* _pParent, const OString& _rID, const OUString& _rUIXMLDescription ) : OControlWizardPage(_pParent, _rID, _rUIXMLDescription) { } protected: OOptionGroupSettings& getSettings() { return static_cast(getDialog())->getSettings(); } @@ -91,13 +92,10 @@ namespace dbp class ORadioSelectionPage : public OGBWPage { protected: - FixedLine m_aFrame; - FixedText m_aRadioNameLabel; - Edit m_aRadioName; - PushButton m_aMoveRight; - PushButton m_aMoveLeft; - FixedText m_aExistingRadiosLabel; - ListBox m_aExistingRadios; + Edit *m_pRadioName; + PushButton *m_pMoveRight; + PushButton *m_pMoveLeft; + ListBox *m_pExistingRadios; public: ORadioSelectionPage( OControlWizard* _pParent ); diff --git a/extensions/source/dbpilots/listcombopages.src b/extensions/source/dbpilots/listcombopages.src index 7223f46d269b..c2357982750f 100644 --- a/extensions/source/dbpilots/listcombopages.src +++ b/extensions/source/dbpilots/listcombopages.src @@ -19,163 +19,14 @@ #include "dbpresid.hrc" -TabPage RID_PAGE_LCW_CONTENTSELECTION_TABLE +String RID_STR_FIELDINFO_COMBOBOX { - HelpID = "extensions:TabPage:RID_PAGE_LCW_CONTENTSELECTION_TABLE"; - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; - - Text [ en-US ] = "Table Selection"; - - FixedLine FL_FRAME - { - Pos = MAP_APPFONT ( 4 , 40 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ; - Text [ en-US ] = "Control"; - }; - - FixedText FT_SELECTTABLE_LABEL - { - Pos = MAP_APPFONT ( 7 , 52 ) ; - Size = MAP_APPFONT ( 120, WINDOW_SIZE_Y - 21 ) ; - WordBreak = TRUE; - Group = TRUE; - Text [ en-US ] = "On the right side, you see all the tables from the data source of the form.\n\n\nChoose the table from which the data should be used as basis for the list content:"; - }; - ListBox LB_SELECTTABLE - { - HelpID = "extensions:ListBox:RID_PAGE_LCW_CONTENTSELECTION_TABLE:LB_SELECTTABLE"; - Pos = MAP_APPFONT ( 130 , 52 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 130 - 7, WINDOW_SIZE_Y - 52 - 6 ) ; - SVLook = TRUE ; - Border = TRUE ; - AutoHScroll = TRUE ; - Sort = FALSE; - DropDown = FALSE; - }; -}; - -TabPage RID_PAGE_LCW_CONTENTSELECTION_FIELD -{ - HelpID = "extensions:TabPage:RID_PAGE_LCW_CONTENTSELECTION_FIELD"; - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; - - Text [ en-US ] = "Field Selection"; - - FixedLine FL_FRAME - { - Pos = MAP_APPFONT ( 4 , 3 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ; - }; - - FixedText FT_TABLEFIELDS - { - Pos = MAP_APPFONT ( 7 , 15 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 3, 8 ) ; - WordBreak = TRUE; - Group = TRUE; - Text [ en-US ] = "Existing fields"; - }; - ListBox LB_SELECTFIELD - { - HelpID = "extensions:ListBox:RID_PAGE_LCW_CONTENTSELECTION_FIELD:LB_SELECTFIELD"; - Pos = MAP_APPFONT ( 7 , 26 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, WINDOW_SIZE_Y - 32 ) ; - SVLook = TRUE ; - Border = TRUE ; - AutoHScroll = TRUE ; - Sort = FALSE; - DropDown = FALSE; - }; - FixedText FT_DISPLAYEDFIELD - { - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 15 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, 8 ) ; - Text [ en-US ] = "Display field"; - }; - Edit ET_DISPLAYEDFIELD - { - HelpID = "extensions:Edit:RID_PAGE_LCW_CONTENTSELECTION_FIELD:ET_DISPLAYEDFIELD"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 26 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, 12 ) ; - SVLook = TRUE ; - Border = TRUE ; - ReadOnly = TRUE; - }; - FixedText FT_CONTENTFIELD_INFO - { - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 45 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, WINDOW_SIZE_Y - 51 ) ; - WordBreak = TRUE; - }; - String STR_FIELDINFO_COMBOBOX - { - Text [ en-US ] = "The contents of the field selected will be shown in the combo box list."; - }; - - String STR_FIELDINFO_LISTBOX - { - Text [ en-US ] = "The contents of the selected field will be shown in the list box if the linked fields are identical."; - }; + Text [ en-US ] = "The contents of the field selected will be shown in the combo box list."; }; -TabPage RID_PAGE_LCW_FIELDLINK +String RID_STR_FIELDINFO_LISTBOX { - HelpID = "extensions:TabPage:RID_PAGE_LCW_FIELDLINK"; - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; - - Text [ en-US ] = "Field Link"; - - FixedText FT_FIELDLINK_DESC - { - Pos = MAP_APPFONT ( 7 , 6 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 14 , 16 ) ; - WordBreak = TRUE; - Text [ en-US ] = "This is where you select fields with matching contents so that the value from the display field will be shown."; - }; - FixedLine FL_FRAME - { - Pos = MAP_APPFONT ( 4 , 25 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ; - }; - FixedText FT_VALUELISTFIELD - { - Pos = MAP_APPFONT ( 7 , 37 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, 8 ) ; - Group = TRUE; - Text [ en-US ] = "Field from the ~Value Table"; - }; - ComboBox CMB_VALUELISTFIELD - { - HelpID = "extensions:ComboBox:RID_PAGE_LCW_FIELDLINK:CMB_VALUELISTFIELD"; - Pos = MAP_APPFONT ( 7 , 48 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, WINDOW_SIZE_Y - 54 ) ; - SVLook = TRUE ; - Border = TRUE ; - DropDown = FALSE; - Sort = FALSE; - AutoHScroll = TRUE; - }; - FixedText FT_TABLEFIELD - { - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 37 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, 8 ) ; - Group = TRUE; - Text [ en-US ] = "Field from the ~List Table"; - }; - ComboBox CMB_TABLEFIELD - { - HelpID = "extensions:ComboBox:RID_PAGE_LCW_FIELDLINK:CMB_TABLEFIELD"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 48 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, WINDOW_SIZE_Y - 54 ) ; - SVLook = TRUE ; - Border = TRUE ; - DropDown = FALSE; - Sort = FALSE; - AutoHScroll = TRUE; - }; + Text [ en-US ] = "The contents of the selected field will be shown in the list box if the linked fields are identical."; }; String RID_STR_COMBOWIZ_DBFIELD diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 0c7337248772..b191e98e2ab1 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -275,24 +275,21 @@ namespace dbp OContentTableSelection::OContentTableSelection( OListComboWizard* _pParent ) - :OLCPage(_pParent, ModuleRes(RID_PAGE_LCW_CONTENTSELECTION_TABLE)) - ,m_aFrame (this, ModuleRes(FL_FRAME)) - ,m_aSelectTableLabel (this, ModuleRes(FT_SELECTTABLE_LABEL)) - ,m_aSelectTable (this, ModuleRes(LB_SELECTTABLE)) + :OLCPage(_pParent, "TableSelectionPage", "modules/sabpilot/ui/contenttablepage.ui") { - FreeResource(); + get(m_pSelectTable, "table"); enableFormDatasourceDisplay(); - m_aSelectTable.SetDoubleClickHdl(LINK(this, OContentTableSelection, OnTableDoubleClicked)); - m_aSelectTable.SetSelectHdl(LINK(this, OContentTableSelection, OnTableSelected)); + m_pSelectTable->SetDoubleClickHdl(LINK(this, OContentTableSelection, OnTableDoubleClicked)); + m_pSelectTable->SetSelectHdl(LINK(this, OContentTableSelection, OnTableSelected)); } void OContentTableSelection::ActivatePage() { OLCPage::ActivatePage(); - m_aSelectTable.GrabFocus(); + m_pSelectTable->GrabFocus(); } @@ -301,7 +298,7 @@ namespace dbp if (!OLCPage::canAdvance()) return false; - return 0 != m_aSelectTable.GetSelectEntryCount(); + return 0 != m_pSelectTable->GetSelectEntryCount(); } @@ -325,21 +322,21 @@ namespace dbp OLCPage::initializePage(); // fill the list with the table name - m_aSelectTable.Clear(); + m_pSelectTable->Clear(); try { Reference< XNameAccess > xTables = getTables(true); Sequence< OUString > aTableNames; if (xTables.is()) aTableNames = xTables->getElementNames(); - fillListBox(m_aSelectTable, aTableNames); + fillListBox(*m_pSelectTable, aTableNames); } catch(const Exception&) { OSL_FAIL("OContentTableSelection::initializePage: could not retrieve the table names!"); } - m_aSelectTable.SelectEntry(getSettings().sListContentTable); + m_pSelectTable->SelectEntry(getSettings().sListContentTable); } @@ -349,7 +346,7 @@ namespace dbp return false; OListComboSettings& rSettings = getSettings(); - rSettings.sListContentTable = m_aSelectTable.GetSelectEntry(); + rSettings.sListContentTable = m_pSelectTable->GetSelectEntry(); if (rSettings.sListContentTable.isEmpty() && (::svt::WizardTypes::eTravelBackward != _eReason)) // need to select a table return false; @@ -362,25 +359,20 @@ namespace dbp OContentFieldSelection::OContentFieldSelection( OListComboWizard* _pParent ) - :OLCPage(_pParent, ModuleRes(RID_PAGE_LCW_CONTENTSELECTION_FIELD)) - ,m_aFrame (this, ModuleRes(FL_FRAME)) - ,m_aTableFields (this, ModuleRes(FT_TABLEFIELDS)) - ,m_aSelectTableField (this, ModuleRes(LB_SELECTFIELD)) - ,m_aDisplayedFieldLabel (this, ModuleRes(FT_DISPLAYEDFIELD)) - ,m_aDisplayedField (this, ModuleRes(ET_DISPLAYEDFIELD)) - ,m_aInfo (this, ModuleRes(FT_CONTENTFIELD_INFO)) + :OLCPage(_pParent, "FieldSelectionPage", "modules/sabpilot/ui/contentfieldpage.ui") { - m_aInfo.SetText(ModuleRes( isListBox() ? STR_FIELDINFO_LISTBOX : STR_FIELDINFO_COMBOBOX).toString()); - FreeResource(); - m_aSelectTableField.SetSelectHdl(LINK(this, OContentFieldSelection, OnFieldSelected)); - m_aSelectTableField.SetDoubleClickHdl(LINK(this, OContentFieldSelection, OnTableDoubleClicked)); + get(m_pSelectTableField, "selectfield"); + get(m_pDisplayedField, "displayfield"); + get(m_pInfo, "info"); + m_pInfo->SetText(ModuleRes( isListBox() ? RID_STR_FIELDINFO_LISTBOX : RID_STR_FIELDINFO_COMBOBOX).toString()); + m_pSelectTableField->SetSelectHdl(LINK(this, OContentFieldSelection, OnFieldSelected)); + m_pSelectTableField->SetDoubleClickHdl(LINK(this, OContentFieldSelection, OnTableDoubleClicked)); } void OContentFieldSelection::ActivatePage() { OLCPage::ActivatePage(); - m_aTableFields.GrabFocus(); } @@ -389,10 +381,10 @@ namespace dbp OLCPage::initializePage(); // fill the list of fields - fillListBox(m_aSelectTableField, getTableFields(true)); + fillListBox(*m_pSelectTableField, getTableFields(true)); - m_aSelectTableField.SelectEntry(getSettings().sListContentField); - m_aDisplayedField.SetText(getSettings().sListContentField); + m_pSelectTableField->SelectEntry(getSettings().sListContentField); + m_pDisplayedField->SetText(getSettings().sListContentField); } @@ -401,13 +393,13 @@ namespace dbp if (!OLCPage::canAdvance()) return false; - return 0 != m_aSelectTableField.GetSelectEntryCount(); + return 0 != m_pSelectTableField->GetSelectEntryCount(); } IMPL_LINK( OContentFieldSelection, OnTableDoubleClicked, ListBox*, /*NOTINTERESTEDIN*/ ) { - if (m_aSelectTableField.GetSelectEntryCount()) + if (m_pSelectTableField->GetSelectEntryCount()) getDialog()->travelNext(); return 0L; } @@ -416,7 +408,7 @@ namespace dbp IMPL_LINK( OContentFieldSelection, OnFieldSelected, ListBox*, /*NOTINTERESTEDIN*/ ) { updateDialogTravelUI(); - m_aDisplayedField.SetText(m_aSelectTableField.GetSelectEntry()); + m_pDisplayedField->SetText(m_pSelectTableField->GetSelectEntry()); return 0L; } @@ -426,7 +418,7 @@ namespace dbp if (!OLCPage::commitPage(_eReason)) return false; - getSettings().sListContentField = m_aSelectTableField.GetSelectEntry(); + getSettings().sListContentField = m_pSelectTableField->GetSelectEntry(); return true; } @@ -436,27 +428,22 @@ namespace dbp OLinkFieldsPage::OLinkFieldsPage( OListComboWizard* _pParent ) - :OLCPage(_pParent, ModuleRes(RID_PAGE_LCW_FIELDLINK)) - ,m_aDescription (this, ModuleRes(FT_FIELDLINK_DESC)) - ,m_aFrame (this, ModuleRes(FL_FRAME)) - ,m_aValueListFieldLabel (this, ModuleRes(FT_VALUELISTFIELD)) - ,m_aValueListField (this, ModuleRes(CMB_VALUELISTFIELD)) - ,m_aTableFieldLabel (this, ModuleRes(FT_TABLEFIELD)) - ,m_aTableField (this, ModuleRes(CMB_TABLEFIELD)) + :OLCPage(_pParent, "FieldLinkPage", "modules/sabpilot/ui/fieldlinkpage.ui") { - FreeResource(); + get(m_pValueListField, "valuefield"); + get(m_pTableField, "listtable"); - m_aValueListField.SetModifyHdl(LINK(this, OLinkFieldsPage, OnSelectionModified)); - m_aTableField.SetModifyHdl(LINK(this, OLinkFieldsPage, OnSelectionModified)); - m_aValueListField.SetSelectHdl(LINK(this, OLinkFieldsPage, OnSelectionModified)); - m_aTableField.SetSelectHdl(LINK(this, OLinkFieldsPage, OnSelectionModified)); + m_pValueListField->SetModifyHdl(LINK(this, OLinkFieldsPage, OnSelectionModified)); + m_pTableField->SetModifyHdl(LINK(this, OLinkFieldsPage, OnSelectionModified)); + m_pValueListField->SetSelectHdl(LINK(this, OLinkFieldsPage, OnSelectionModified)); + m_pTableField->SetSelectHdl(LINK(this, OLinkFieldsPage, OnSelectionModified)); } void OLinkFieldsPage::ActivatePage() { OLCPage::ActivatePage(); - m_aValueListField.GrabFocus(); + m_pValueListField->GrabFocus(); } @@ -465,13 +452,13 @@ namespace dbp OLCPage::initializePage(); // fill the value list - fillListBox(m_aValueListField, getContext().aFieldNames); + fillListBox(*m_pValueListField, getContext().aFieldNames); // fill the table field list - fillListBox(m_aTableField, getTableFields(true)); + fillListBox(*m_pTableField, getTableFields(true)); // the initial selections - m_aValueListField.SetText(getSettings().sLinkedFormField); - m_aTableField.SetText(getSettings().sLinkedListField); + m_pValueListField->SetText(getSettings().sLinkedFormField); + m_pTableField->SetText(getSettings().sLinkedListField); implCheckFinish(); } @@ -486,8 +473,8 @@ namespace dbp void OLinkFieldsPage::implCheckFinish() { - bool bInvalidSelection = (COMBOBOX_ENTRY_NOTFOUND == m_aValueListField.GetEntryPos(m_aValueListField.GetText())); - bInvalidSelection |= (COMBOBOX_ENTRY_NOTFOUND == m_aTableField.GetEntryPos(m_aTableField.GetText())); + bool bInvalidSelection = (COMBOBOX_ENTRY_NOTFOUND == m_pValueListField->GetEntryPos(m_pValueListField->GetText())); + bInvalidSelection |= (COMBOBOX_ENTRY_NOTFOUND == m_pTableField->GetEntryPos(m_pTableField->GetText())); getDialog()->enableButtons(WZB_FINISH, !bInvalidSelection); } @@ -504,8 +491,8 @@ namespace dbp if (!OLCPage::commitPage(_eReason)) return false; - getSettings().sLinkedFormField = m_aValueListField.GetText(); - getSettings().sLinkedListField = m_aTableField.GetText(); + getSettings().sLinkedFormField = m_pValueListField->GetText(); + getSettings().sLinkedListField = m_pTableField->GetText(); return true; } diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx index d0550303c82f..d7576093d036 100644 --- a/extensions/source/dbpilots/listcombowizard.hxx +++ b/extensions/source/dbpilots/listcombowizard.hxx @@ -89,6 +89,7 @@ namespace dbp { public: OLCPage( OListComboWizard* _pParent, const ResId& _rId ) : OControlWizardPage(_pParent, _rId) { } + OLCPage( OListComboWizard* _pParent, const OString& rID, const OUString& rUIXMLDescription ) : OControlWizardPage(_pParent, rID, rUIXMLDescription) { } protected: OListComboSettings& getSettings() { return static_cast(getDialog())->getSettings(); } @@ -107,9 +108,7 @@ namespace dbp class OContentTableSelection : public OLCPage { protected: - FixedLine m_aFrame; - FixedText m_aSelectTableLabel; - ListBox m_aSelectTable; + ListBox *m_pSelectTable; public: OContentTableSelection( OListComboWizard* _pParent ); @@ -134,12 +133,9 @@ namespace dbp class OContentFieldSelection : public OLCPage { protected: - FixedLine m_aFrame; - FixedText m_aTableFields; - ListBox m_aSelectTableField; - FixedText m_aDisplayedFieldLabel; - Edit m_aDisplayedField; - FixedText m_aInfo; + ListBox *m_pSelectTableField; + Edit *m_pDisplayedField; + FixedText *m_pInfo; public: @@ -164,12 +160,8 @@ namespace dbp class OLinkFieldsPage : public OLCPage { protected: - FixedText m_aDescription; - FixedLine m_aFrame; - FixedText m_aValueListFieldLabel; - ComboBox m_aValueListField; - FixedText m_aTableFieldLabel; - ComboBox m_aTableField; + ComboBox *m_pValueListField; + ComboBox *m_pTableField; public: diff --git a/extensions/uiconfig/sabpilot/ui/contentfieldpage.ui b/extensions/uiconfig/sabpilot/ui/contentfieldpage.ui new file mode 100644 index 000000000000..c0c90086c268 --- /dev/null +++ b/extensions/uiconfig/sabpilot/ui/contentfieldpage.ui @@ -0,0 +1,137 @@ + + + + + + True + False + True + True + 6 + vertical + 6 + + + True + False + True + True + 12 + True + + + True + False + True + True + vertical + 6 + + + True + False + start + Existing fields + True + selectfield:border + + + False + True + 0 + + + + + True + True + True + True + + + + + + True + True + 1 + + + + + True + True + 0 + + + + + True + False + True + True + vertical + 6 + + + True + False + start + start + Display field + True + True + displayfield + + + False + True + 0 + + + + + True + True + True + False + + + + False + True + 1 + + + + + True + False + True + True + 0 + 0 + True + + + False + True + 2 + + + + + True + True + 1 + + + + + True + True + 0 + + + + diff --git a/extensions/uiconfig/sabpilot/ui/contenttablepage.ui b/extensions/uiconfig/sabpilot/ui/contenttablepage.ui new file mode 100644 index 000000000000..5fc5673255e9 --- /dev/null +++ b/extensions/uiconfig/sabpilot/ui/contenttablepage.ui @@ -0,0 +1,247 @@ + + + + + + True + False + True + True + 6 + vertical + 12 + + + True + False + True + 0 + none + + + True + False + True + 6 + 12 + + + True + False + True + 6 + + + True + False + 12 + + + True + False + start + Data source + + + 0 + 0 + 1 + 1 + + + + + True + False + start + Content type + + + 0 + 1 + 1 + 1 + + + + + True + False + start + Content + + + 0 + 2 + 1 + 1 + + + + + False + True + 0 + + + + + True + False + True + 6 + 6 + + + True + False + start + + + 0 + 0 + 1 + 1 + + + + + True + False + start + + + 0 + 1 + 1 + 1 + + + + + True + False + start + + + 0 + 2 + 1 + 1 + + + + + False + True + 1 + + + + + + + + + True + False + Form + + + + + + + + False + True + 0 + + + + + True + False + True + True + 0 + none + + + True + False + True + True + 6 + 12 + + + True + False + True + True + 12 + True + + + True + False + start + start + True + 0 + 0 + On the right side, you see all the tables from the data source of the form. + + +Choose the table from which the data should be used as basis for the list content: + True + True + table:border + 50 + + + False + True + 0 + + + + + True + True + True + True + + + + + + False + True + 1 + + + + + + + + + True + False + Control + + + + + + + + True + True + 2 + + + + diff --git a/extensions/uiconfig/sabpilot/ui/fieldlinkpage.ui b/extensions/uiconfig/sabpilot/ui/fieldlinkpage.ui new file mode 100644 index 000000000000..c1d7eb7c63f0 --- /dev/null +++ b/extensions/uiconfig/sabpilot/ui/fieldlinkpage.ui @@ -0,0 +1,140 @@ + + + + + + True + False + True + True + 6 + vertical + 12 + + + True + False + 0 + 0 + This is where you select fields with matching contents so that the value from the display field will be shown. + True + 90 + + + False + True + 0 + + + + + True + False + True + True + 6 + + + True + False + True + True + vertical + 6 + + + True + False + start + Field from the _Value Table + True + valuefield + + + False + True + 0 + + + + + True + False + True + True + + + False + + + + + False + True + 1 + + + + + True + True + 0 + + + + + True + False + True + True + vertical + 6 + + + True + False + start + Field from the _List Table + True + listtable + + + False + True + 0 + + + + + True + False + True + True + + + False + + + + + False + True + 1 + + + + + True + True + 1 + + + + + True + True + 1 + + + + diff --git a/extensions/uiconfig/sabpilot/ui/gridfieldsselectionpage.ui b/extensions/uiconfig/sabpilot/ui/gridfieldsselectionpage.ui new file mode 100644 index 000000000000..0d308a2cd720 --- /dev/null +++ b/extensions/uiconfig/sabpilot/ui/gridfieldsselectionpage.ui @@ -0,0 +1,372 @@ + + + + + + 200 + True + False + True + True + 6 + vertical + 12 + + + True + False + start + True + 0 + none + + + True + False + 6 + 12 + + + True + False + True + 12 + + + True + False + 6 + + + True + False + start + Data source + + + 0 + 0 + 1 + 1 + + + + + True + False + start + Content type + + + 0 + 1 + 1 + 1 + + + + + True + False + start + Content + + + 0 + 2 + 1 + 1 + + + + + False + True + 0 + + + + + True + False + True + 6 + + + True + False + start + + + 0 + 0 + 1 + 1 + + + + + True + False + start + + + 0 + 1 + 1 + 1 + + + + + True + False + start + + + 0 + 2 + 1 + 1 + + + + + False + True + 1 + + + + + + + + + True + False + Form + + + + + + + + False + True + 0 + + + + + True + False + True + True + 0 + none + + + True + False + True + True + 6 + 12 + + + True + False + 6 + 12 + + + True + True + True + True + + + + + + 2 + 1 + 1 + 1 + + + + + True + False + start + Selected fields + True + selectedfields:border + + + 2 + 0 + 1 + 1 + + + + + True + False + vertical + 6 + + + True + False + vertical + 6 + start + + + -> + False + True + True + True + + + False + True + 0 + + + + + =>> + False + True + True + True + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 6 + start + + + <- + False + True + True + True + + + False + True + 0 + + + + + <<= + False + True + True + True + + + False + True + 1 + + + + + False + True + 1 + + + + + 1 + 1 + 1 + 1 + + + + + True + True + True + True + + + + + + 0 + 1 + 1 + 1 + + + + + True + False + start + Existing fields + True + existingfields:border + + + 0 + 0 + 1 + 1 + + + + + + + + + + + + True + False + Table element + + + + + + + + True + True + 2 + + + + diff --git a/extensions/uiconfig/sabpilot/ui/groupradioselectionpage.ui b/extensions/uiconfig/sabpilot/ui/groupradioselectionpage.ui new file mode 100644 index 000000000000..8372b91994f4 --- /dev/null +++ b/extensions/uiconfig/sabpilot/ui/groupradioselectionpage.ui @@ -0,0 +1,332 @@ + + + + + + 200 + True + False + True + True + 6 + vertical + 12 + + + False + start + True + 0 + none + + + True + False + True + 6 + 12 + + + True + False + True + 12 + + + True + False + 6 + + + True + False + start + Data source + + + 0 + 0 + 1 + 1 + + + + + True + False + start + Content type + + + 0 + 1 + 1 + 1 + + + + + True + False + start + Content + + + 0 + 2 + 1 + 1 + + + + + False + True + 0 + + + + + True + False + True + 6 + 6 + + + True + False + start + + + 0 + 0 + 1 + 1 + + + + + True + False + start + + + 0 + 1 + 1 + 1 + + + + + True + False + start + + + 0 + 2 + 1 + 1 + + + + + False + True + 1 + + + + + + + + + True + False + Form + + + + + + + + False + True + 0 + + + + + True + False + True + True + 0 + none + + + True + False + True + True + 6 + 12 + + + True + False + True + True + 6 + 12 + + + True + True + True + True + + + + + + 2 + 1 + 1 + 1 + + + + + True + False + start + 0 + 0 + _Option fields + True + radiobuttons:border + + + 2 + 0 + 1 + 1 + + + + + True + False + vertical + 6 + start + + + _>> + False + True + True + True + True + + + False + True + 0 + + + + + _<< + False + True + True + True + True + + + False + True + 1 + + + + + 1 + 1 + 1 + 1 + + + + + True + True + start + True + + + + 0 + 1 + 1 + 1 + + + + + True + False + 0 + 0 + Which _names do you want to give the option fields? + True + True + 42 + + + 0 + 0 + 1 + 1 + + + + + + + + + + + + True + False + Table element + + + + + + + + False + True + 2 + + + + + + + + + + + + diff --git a/extensions/uiconfig/sabpilot/ui/tableselectionpage.ui b/extensions/uiconfig/sabpilot/ui/tableselectionpage.ui new file mode 100644 index 000000000000..c27aa8d5ed02 --- /dev/null +++ b/extensions/uiconfig/sabpilot/ui/tableselectionpage.ui @@ -0,0 +1,188 @@ + + + + + + True + False + True + True + 6 + vertical + 6 + + + True + False + True + True + 0 + none + + + True + False + 6 + 12 + + + True + False + True + True + 6 + True + + + True + False + start + start + True + 0 + 0 + Currently, the form the control belongs to is not (or not completely) bound to a data source. + +Please choose a data source and a table. + + +Please note that the settings made on this page will take effect immediately upon leaving the page. + True + 45 + + + False + True + 0 + + + + + True + False + True + True + vertical + 6 + + + True + False + start + _Data source: + True + datasource:border + + + False + True + 0 + + + + + True + True + True + True + + + + + + True + True + 1 + + + + + _... + False + True + True + True + True + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + True + True + vertical + 6 + + + True + False + start + _Table / Query: + True + table:border + + + False + True + 0 + + + + + True + True + True + True + + + + + + True + True + 1 + + + + + True + True + 3 + + + + + + + + + True + False + Data + + + + + + + + True + True + 0 + + + + -- cgit