summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2001-02-23 14:19:08 +0000
committerFrank Schönheit <fs@openoffice.org>2001-02-23 14:19:08 +0000
commit56b4377daf0b8b09c36a90190d14454b8667a6a8 (patch)
tree28e5aaedf102fa607cb9ae35031eb6d9a49cc7d1
parent375094fb1c528c49c06cee2edf98918c80858610 (diff)
some changes / centralizations - added the list-/combobox wizard
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx150
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.hxx16
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.src35
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx189
-rw-r--r--extensions/source/dbpilots/controlwizard.hxx84
-rw-r--r--extensions/source/dbpilots/dbpilots.src38
-rw-r--r--extensions/source/dbpilots/dbpresid.hrc50
-rw-r--r--extensions/source/dbpilots/dbpservices.cxx9
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx38
-rw-r--r--extensions/source/dbpilots/groupboxwiz.hxx24
-rw-r--r--extensions/source/dbpilots/makefile.mk13
-rw-r--r--extensions/source/dbpilots/wizardservices.cxx34
-rw-r--r--extensions/source/dbpilots/wizardservices.hxx19
13 files changed, 562 insertions, 137 deletions
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index f62663cc4051..f76757fdb3fa 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: commonpagesdbp.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:21:36 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,6 +86,9 @@
#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_
#include <com/sun/star/sdbc/SQLWarning.hpp>
#endif
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
@@ -120,6 +123,7 @@ namespace dbp
OTableSelectionPage::OTableSelectionPage(OControlWizard* _pParent)
:OControlWizardPage(_pParent, ModuleRes(RID_PAGE_TABLESELECTION))
,m_aData (this, ResId(FL_DATA))
+ ,m_aExplanation (this, ResId(FT_EXPLANATION))
,m_aDatasourceLabel (this, ResId(FT_DATASOURCE))
,m_aDatasource (this, ResId(LB_DATASOURCE))
,m_aTableLabel (this, ResId(FT_TABLE))
@@ -131,6 +135,7 @@ namespace dbp
m_aDatasource.SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection));
m_aTable.SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection));
+ m_aTable.SetDoubleClickHdl(LINK(this, OTableSelectionPage, OnListboxDoubleClicked));
m_aDatasource.SetDropDownLineCount(10);
}
@@ -143,6 +148,76 @@ namespace dbp
}
//---------------------------------------------------------------------
+ sal_Bool OTableSelectionPage::determineNextButtonState()
+ {
+ if (!OControlWizardPage::determineNextButtonState())
+ return sal_False;
+
+ if (0 == m_aDatasource.GetSelectEntryCount())
+ return sal_False;
+
+ if (0 == m_aTable.GetSelectEntryCount())
+ return sal_False;
+
+ return sal_True;
+ }
+
+ //---------------------------------------------------------------------
+ void OTableSelectionPage::initializePage()
+ {
+ OControlWizardPage::initializePage();
+
+ const OControlWizardContext& rContext = getContext();
+ try
+ {
+ ::rtl::OUString sDataSourceName;
+ rContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("DataSourceName")) >>= sDataSourceName;
+ m_aDatasource.SelectEntry(sDataSourceName);
+
+ implFillTables();
+
+ ::rtl::OUString sTableName;
+ rContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("Command")) >>= sTableName;
+ m_aTable.SelectEntry(sTableName);
+ }
+ catch(Exception&)
+ {
+ DBG_ERROR("OTableSelectionPage::initializePage: caught an exception!");
+ }
+ }
+
+ //---------------------------------------------------------------------
+ sal_Bool OTableSelectionPage::commitPage(COMMIT_REASON _eReason)
+ {
+ if (!OControlWizardPage::commitPage(_eReason))
+ return sal_False;
+
+ const OControlWizardContext& rContext = getContext();
+ try
+ {
+ rContext.xForm->setPropertyValue(::rtl::OUString::createFromAscii("DataSourceName"), makeAny(::rtl::OUString(m_aDatasource.GetSelectEntry())));
+ rContext.xForm->setPropertyValue(::rtl::OUString::createFromAscii("Command"), makeAny(::rtl::OUString(m_aTable.GetSelectEntry())));
+ rContext.xForm->setPropertyValue(::rtl::OUString::createFromAscii("CommandType"), makeAny((sal_Int32)CommandType::TABLE));
+
+ updateContext();
+ }
+ catch(Exception&)
+ {
+ DBG_ERROR("OTableSelectionPage::commitPage: caught an exception!");
+ }
+
+ return sal_True;
+ }
+
+ //---------------------------------------------------------------------
+ IMPL_LINK( OTableSelectionPage, OnListboxDoubleClicked, ListBox*, _pBox )
+ {
+ if (_pBox->GetSelectEntryCount())
+ getDialog()->travelNext();
+ return 0L;
+ }
+
+ //---------------------------------------------------------------------
IMPL_LINK( OTableSelectionPage, OnListboxSelection, ListBox*, _pBox )
{
if (&m_aDatasource == _pBox)
@@ -152,6 +227,9 @@ namespace dbp
else
{
}
+
+ implCheckNextButton();
+
return 0L;
}
@@ -186,27 +264,30 @@ namespace dbp
Any aSQLException;
try
{
- // obtain the DS object
- Reference< XCompletedConnection > xDatasource;
- m_xDSContext->getByName(m_aDatasource.GetSelectEntry()) >>= xDatasource;
-
- // connect
- Reference< XConnection > xConn;
- if (xDatasource.is())
- xConn = xDatasource->connectWithCompletion(xHandler);
- else
- DBG_ERROR("OTableSelectionPage::implFillTables: invalid data source object returned by the context");
-
- // get the tables
- Reference< XTablesSupplier > xSupplTables(xConn, UNO_QUERY);
- if (xSupplTables.is())
+ ::rtl::OUString sCurrentDatasource = m_aDatasource.GetSelectEntry();
+ if (sCurrentDatasource.getLength())
{
- Reference< XNameAccess > xTables(xSupplTables->getTables(), UNO_QUERY);
- if (xTables.is())
- aTableNames = xTables->getElementNames();
- }
+ // obtain the DS object
+ Reference< XCompletedConnection > xDatasource;
+ Reference< XConnection > xConn;
+ if (m_xDSContext->getByName(sCurrentDatasource) >>= xDatasource)
+ { // connect
+ xConn = xDatasource->connectWithCompletion(xHandler);
+ }
+ else
+ DBG_ERROR("OTableSelectionPage::implFillTables: invalid data source object returned by the context");
- // TODO: dispose the connection ... event better: share it with the other pages ...
+ // get the tables
+ Reference< XTablesSupplier > xSupplTables(xConn, UNO_QUERY);
+ if (xSupplTables.is())
+ {
+ Reference< XNameAccess > xTables(xSupplTables->getTables(), UNO_QUERY);
+ if (xTables.is())
+ aTableNames = xTables->getElementNames();
+ }
+
+ // TODO: dispose the connection ... event better: share it with the other pages ...
+ }
}
catch(SQLContext& e) { aSQLException <<= e; }
catch(SQLWarning& e) { aSQLException <<= e; }
@@ -228,35 +309,17 @@ namespace dbp
}
// insert the table names into the list
- const ::rtl::OUString* pTables = aTableNames.getConstArray();
- const ::rtl::OUString* pEnd = pTables + aTableNames.getLength();
- for (; pTables != pEnd; ++pTables)
- m_aTable.InsertEntry(*pTables);
+ fillListBox(m_aTable, aTableNames);
}
//---------------------------------------------------------------------
void OTableSelectionPage::implCollectDatasource()
{
- Reference< XMultiServiceFactory > xORB = getServiceFactory();
try
{
- DBG_ASSERT(xORB.is(), "OTableSelectionPage::implCollectDatasource: invalid service factory!");
-
- Reference< XInterface > xContext;
- if (xORB.is())
- xContext = xORB->createInstance(::rtl::OUString::createFromAscii("com.sun.star.sdb.DatabaseContext"));
- DBG_ASSERT(xContext.is(), "OTableSelectionPage::implCollectDatasource: invalid database context!");
-
- m_xDSContext = Reference< XNameAccess >(xContext, UNO_QUERY);
- DBG_ASSERT(m_xDSContext.is() || !xContext.is(), "OTableSelectionPage::implCollectDatasource: invalid database context (missing the XNameAccess)!");
+ m_xDSContext = getContext().xDatasourceContext;
if (m_xDSContext.is())
- {
- Sequence< ::rtl::OUString > aNames = m_xDSContext->getElementNames();
- const ::rtl::OUString* pLoop = aNames.getConstArray();
- const ::rtl::OUString* pEnd = pLoop + aNames.getLength();
- for (; pLoop != pEnd; ++pLoop)
- m_aDatasource.InsertEntry(String(*pLoop));
- }
+ fillListBox(m_aDatasource, m_xDSContext->getElementNames());
}
catch (Exception&)
{
@@ -271,6 +334,9 @@ namespace dbp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:21:36 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 11:03:33 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx
index 9f61bbc81c66..59ee1316079f 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: commonpagesdbp.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:21:45 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,6 +87,7 @@ namespace dbp
{
protected:
FixedLine m_aData;
+ FixedText m_aExplanation;
FixedText m_aDatasourceLabel;
ListBox m_aDatasource;
FixedText m_aTableLabel;
@@ -102,11 +103,19 @@ namespace dbp
// TabPage overridables
void ActivatePage();
+ // OWizardPage overridables
+ virtual void initializePage();
+ virtual sal_Bool commitPage(COMMIT_REASON _eReason);
+
protected:
DECL_LINK( OnListboxSelection, ListBox* );
+ DECL_LINK( OnListboxDoubleClicked, ListBox* );
void implCollectDatasource();
void implFillTables();
+
+ // OControlWizardPage overridables
+ virtual sal_Bool determineNextButtonState();
};
//.........................................................................
@@ -119,6 +128,9 @@ namespace dbp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:21:45 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 11:02:03 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/commonpagesdbp.src b/extensions/source/dbpilots/commonpagesdbp.src
index 4448647564ef..0a4edef0228b 100644
--- a/extensions/source/dbpilots/commonpagesdbp.src
+++ b/extensions/source/dbpilots/commonpagesdbp.src
@@ -2,9 +2,9 @@
*
* $RCSfile: commonpagesdbp.src,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:21:55 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,8 +68,8 @@ TabPage RID_PAGE_TABLESELECTION
SVLook = TRUE ;
Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ;
Text = "Daten";
- Text [ english ] = "Daten";
- Text [ english_us ] = "Daten";
+ Text [ english ] = "Data";
+ Text [ english_us ] = "Data";
FixedLine FL_DATA
{
@@ -79,9 +79,25 @@ TabPage RID_PAGE_TABLESELECTION
Text [ english ] = "Data";
Text [ english_us ] = "Data";
};
- FixedText FT_DATASOURCE
+ 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 = "Das Formular, zu dem das Kontrollfeld gehört, ist im Augenblick noch nicht (oder noch nicht vollständig) an eine Datenquelle gebunden.\n\n"
+ "Bitte wählen Sie eine Datenquelle und eine Tabelle aus.\n\n\n"
+ "Bitte beachten Sie, daß die Einstellungen, die sie auf dieser Seiter für das Formular vornehmen, sofort beim Verlassen der Seite wirksam werden.";
+ Text [ english ] = "Currently, the form the control belongs to is not (or not completely) bound to a data source.\n\n"
+ "Please choose a data source and a table.\n\n\n"
+ "Please note that the settings made on this page will take effect immediately upon leaving the page.";
+ Text [ english_us ] = "Currently, the form the control belongs to is not (or not completely) bound to a data source.\n\n"
+ "Please choose a data source and a table.\n\n\n"
+ "Please 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 = "~Datenquelle:";
@@ -90,7 +106,7 @@ TabPage RID_PAGE_TABLESELECTION
};
ListBox LB_DATASOURCE
{
- Pos = MAP_APPFONT ( 7 , 26 ) ;
+ Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 26 ) ;
Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10 , 14 ) ;
SVLook = TRUE ;
Border = TRUE ;
@@ -99,7 +115,7 @@ TabPage RID_PAGE_TABLESELECTION
};
FixedText FT_TABLE
{
- Pos = MAP_APPFONT ( 7, 46 ) ;
+ Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3, 46 ) ;
Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 14 , 8) ;
Group = TRUE;
Text = "~Tabelle:";
@@ -108,7 +124,7 @@ TabPage RID_PAGE_TABLESELECTION
};
ListBox LB_TABLE
{
- Pos = MAP_APPFONT ( 7, 57 ) ;
+ 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 ;
@@ -119,6 +135,9 @@ TabPage RID_PAGE_TABLESELECTION
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:21:55 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 11:05:25 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index a7f74e57418c..ebaf5d7b9e15 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: controlwizard.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:22:07 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -95,12 +95,18 @@
#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGESUPPLIER_HPP_
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#endif
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
#endif
#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
//.........................................................................
namespace dbp
@@ -118,6 +124,19 @@ namespace dbp
using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::sheet;
+ using namespace ::com::sun::star::form;
+ using namespace ::svt;
+
+ //=====================================================================
+ //= OAccessRegulator
+ //=====================================================================
+ struct OAccessRegulator
+ {
+ friend class OControlWizardPage;
+
+ protected:
+ OAccessRegulator() { }
+ };
//=====================================================================
//= OControlWizardPage
@@ -135,6 +154,12 @@ namespace dbp
}
//---------------------------------------------------------------------
+ void OControlWizardPage::updateContext()
+ {
+ getDialog()->updateContext(OAccessRegulator());
+ }
+
+ //---------------------------------------------------------------------
const OControlWizardContext& OControlWizardPage::getContext()
{
return getDialog()->getContext();
@@ -146,6 +171,28 @@ namespace dbp
return getDialog()->getServiceFactory();
}
+ //---------------------------------------------------------------------
+ void OControlWizardPage::fillListBox(ListBox& _rList, const Sequence< ::rtl::OUString >& _rItems, sal_Bool _bClear)
+ {
+ if (_bClear)
+ _rList.Clear();
+ const ::rtl::OUString* pItems = _rItems.getConstArray();
+ const ::rtl::OUString* pEnd = pItems + _rItems.getLength();
+ for (;pItems < pEnd; ++pItems)
+ _rList.InsertEntry(*pItems);
+ }
+
+ //---------------------------------------------------------------------
+ void OControlWizardPage::fillListBox(ComboBox& _rList, const Sequence< ::rtl::OUString >& _rItems, sal_Bool _bClear)
+ {
+ if (_bClear)
+ _rList.Clear();
+ const ::rtl::OUString* pItems = _rItems.getConstArray();
+ const ::rtl::OUString* pEnd = pItems + _rItems.getLength();
+ for (;pItems < pEnd; ++pItems)
+ _rList.InsertEntry(*pItems);
+ }
+
//=====================================================================
//= OControlWizard
//=====================================================================
@@ -157,6 +204,46 @@ namespace dbp
{
m_aContext.xObjectModel = _rxObjectModel;
initContext();
+
+ SetPageSizePixel(LogicToPixel(::Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT));
+ ShowButtonFixedLine(sal_True);
+ defaultButton(WZB_NEXT);
+ enableButtons(WZB_FINISH, sal_False);
+ }
+
+ //---------------------------------------------------------------------
+ OControlWizard::~OControlWizard()
+ {
+ }
+
+ //---------------------------------------------------------------------
+ short OControlWizard::Execute()
+ {
+ // get the class id of the control we're dealing with
+ sal_Int16 nClassId = FormComponentType::CONTROL;
+ try
+ {
+ getContext().xObjectModel->getPropertyValue(::rtl::OUString::createFromAscii("ClassId")) >>= nClassId;
+ }
+ catch(Exception&)
+ {
+ DBG_ERROR("OControlWizard::activate: could not obtain the class id!");
+ }
+ if (!approveControlType(nClassId))
+ {
+ // TODO: MessageBox or exception
+ return RET_CANCEL;
+ }
+
+ ActivatePage();
+
+ return OControlWizard_Base::Execute();
+ }
+
+ //---------------------------------------------------------------------
+ void OControlWizard::ActivatePage()
+ {
+ OControlWizard_Base::ActivatePage();
}
//---------------------------------------------------------------------
@@ -268,6 +355,34 @@ namespace dbp
}
//---------------------------------------------------------------------
+ void OControlWizard::implGetDSContext()
+ {
+ Reference< XMultiServiceFactory > xORB = getServiceFactory();
+ try
+ {
+ DBG_ASSERT(xORB.is(), "OControlWizard::implGetDSContext: invalid service factory!");
+
+ Reference< XInterface > xContext;
+ if (xORB.is())
+ xContext = xORB->createInstance(::rtl::OUString::createFromAscii("com.sun.star.sdb.DatabaseContext"));
+ DBG_ASSERT(xContext.is(), "OControlWizard::implGetDSContext: invalid database context!");
+
+ m_aContext.xDatasourceContext = Reference< XNameAccess >(xContext, UNO_QUERY);
+ DBG_ASSERT(m_aContext.xDatasourceContext.is() || !xContext.is(), "OControlWizard::implGetDSContext: invalid database context (missing the XNameAccess)!");
+ }
+ catch(Exception&)
+ {
+ DBG_ERROR("OControlWizard::implGetDSContext: invalid database context!");
+ }
+ }
+
+ //---------------------------------------------------------------------
+ void OControlWizard::updateContext(const OAccessRegulator&)
+ {
+ initContext();
+ }
+
+ //---------------------------------------------------------------------
void OControlWizard::initContext()
{
DBG_ASSERT(m_aContext.xObjectModel.is(), "OGroupBoxWizard::initContext: have no control model to work with!");
@@ -284,6 +399,9 @@ namespace dbp
try
{
+ // get the datasource context
+ implGetDSContext();
+
// first, determine the form the control belongs to
implDetermineForm();
@@ -318,7 +436,8 @@ namespace dbp
if (xSupplyTables.is() && xSupplyTables->getTables().is() && xSupplyTables->getTables()->hasByName(sObjectName))
{
Reference< XColumnsSupplier > xSupplyColumns;
- xSupplyTables->getTables()->getByName(sObjectName) >>= xSupplyColumns;
+ m_aContext.xObjectContainer = xSupplyTables->getTables();
+ m_aContext.xObjectContainer->getByName(sObjectName) >>= xSupplyColumns;
DBG_ASSERT(xSupplyColumns.is(), "OControlWizard::initContext: invalid table columns!");
xColumns = xSupplyColumns->getColumns();
}
@@ -330,7 +449,8 @@ namespace dbp
if (xSupplyQueries.is() && xSupplyQueries->getQueries().is() && xSupplyQueries->getQueries()->hasByName(sObjectName))
{
Reference< XColumnsSupplier > xSupplyColumns;
- xSupplyQueries->getQueries()->getByName(sObjectName) >>= xSupplyColumns;
+ m_aContext.xObjectContainer = xSupplyQueries->getQueries();
+ m_aContext.xObjectContainer->getByName(sObjectName) >>= xSupplyColumns;
DBG_ASSERT(xSupplyColumns.is(), "OControlWizard::initContext: invalid query columns!");
xColumns = xSupplyColumns->getColumns();
}
@@ -374,12 +494,16 @@ namespace dbp
// the only thing we have at the moment is the label
try
{
- // the label of the control
- ::rtl::OUString sControlLabel(_pSettings->sControlLabel);
- m_aContext.xObjectModel->setPropertyValue(
- ::rtl::OUString::createFromAscii("Label"),
- makeAny(sControlLabel)
- );
+ ::rtl::OUString sLabelPropertyName = ::rtl::OUString::createFromAscii("Label");
+ Reference< XPropertySetInfo > xInfo = m_aContext.xObjectModel->getPropertySetInfo();
+ if (xInfo.is() && xInfo->hasPropertyByName(sLabelPropertyName))
+ {
+ ::rtl::OUString sControlLabel(_pSettings->sControlLabel);
+ m_aContext.xObjectModel->setPropertyValue(
+ ::rtl::OUString::createFromAscii("Label"),
+ makeAny(sControlLabel)
+ );
+ }
}
catch(Exception&)
{
@@ -397,10 +521,14 @@ namespace dbp
// initialize some settings from the control model give
try
{
- // the label of the control
- ::rtl::OUString sControlLabel;
- m_aContext.xObjectModel->getPropertyValue(::rtl::OUString::createFromAscii("Label")) >>= sControlLabel;
- _pSettings->sControlLabel = sControlLabel;
+ ::rtl::OUString sLabelPropertyName = ::rtl::OUString::createFromAscii("Label");
+ Reference< XPropertySetInfo > xInfo = m_aContext.xObjectModel->getPropertySetInfo();
+ if (xInfo.is() && xInfo->hasPropertyByName(sLabelPropertyName))
+ {
+ ::rtl::OUString sControlLabel;
+ m_aContext.xObjectModel->getPropertyValue(sLabelPropertyName) >>= sControlLabel;
+ _pSettings->sControlLabel = sControlLabel;
+ }
}
catch(Exception&)
{
@@ -409,8 +537,36 @@ namespace dbp
}
//---------------------------------------------------------------------
- OControlWizard::~OControlWizard()
+ sal_Bool OControlWizard::needDatasourceSelection()
{
+ // lemme see ...
+ return (0 == getContext().aFieldNames.getLength());
+ // if we got fields, the data source is valid ...
+// try
+// {
+// // first, we need a valid data source name
+// ::rtl::OUString sDataSourceName;
+// m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("DataSourceName")) >>= sDataSourceName;
+// if (m_aContext.xDatasourceContext.is() && m_aContext.xDatasourceContext->hasByName(sDataSourceName))
+// { // at least the data source name is valid ...
+// // then, a CommandType "table" would be nice ...
+// sal_Int32 nCommandType = CommandType::COMMAND;
+// m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("CommandType")) >>= nCommandType;
+// if (CommandType::TABLE == nCommandType)
+// { // okay ....
+// // now the table itself should be valid
+// ::rtl::OUString sTableName;
+// m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("Command")) >>= sTableName;
+// if (m_aContext.xObjectContainer.is() && m_aContext.xObjectContainer->hasByName(sTableName))
+// return sal_False;
+// }
+// }
+// }
+// catch(Exception&)
+// {
+// DBG_ERROR("OControlWizard::needDatasourceSelection: caught an exception while checking the form settings!");
+// }
+// return sal_True;
}
//.........................................................................
@@ -420,6 +576,9 @@ namespace dbp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:22:07 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 10:02:44 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx
index 394a05d3a3ca..d8d9f1678956 100644
--- a/extensions/source/dbpilots/controlwizard.hxx
+++ b/extensions/source/dbpilots/controlwizard.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: controlwizard.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:22:18 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,6 +86,36 @@
#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
#include <com/sun/star/frame/XModel.hpp>
#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
+#include <com/sun/star/container/XNameAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_FORMCOMPONENTTYPE_HPP_
+#include <com/sun/star/form/FormComponentType.hpp>
+#endif
+#ifndef _SV_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_EDIT_HXX
+#include <vcl/edit.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _SV_LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SV_COMBOBOX_HXX
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _EXTENSIONS_DBP_DBPTYPES_HXX_
+#include "dbptypes.hxx"
+#endif
+#ifndef _EXTENSIONS_DBP_DBPRESID_HRC_
+#include "dbpresid.hrc"
+#endif
+#ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_
+#include "componentmodule.hxx"
+#endif
class ResId;
//.........................................................................
@@ -106,18 +136,32 @@ namespace dbp
//=====================================================================
struct OControlWizardContext
{
+ // the global data source context
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
+ xDatasourceContext;
+
+ // the control mode
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
xObjectModel;
+ // the form the control model belongs to
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
xForm;
+ // the form as rowset
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >
xRowSet;
+ // the model of the document
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
xDocumentModel;
+ // the page where the control mode resides
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >
xDrawPage;
+ // the shape which carries the control
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XControlShape >
xObjectShape;
+ // the tables or queries of the data source the form is bound to (if any)
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
+ xObjectContainer;
+ // the column names of the object the form is bound to (table, query or SQL statement)
::com::sun::star::uno::Sequence< ::rtl::OUString >
aFieldNames;
};
@@ -133,15 +177,28 @@ namespace dbp
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
getServiceFactory();
const OControlWizardContext& getContext();
+ void updateContext();
public:
OControlWizardPage( OControlWizard* _pParent, const ResId& _rResId );
+
+ protected:
+ void fillListBox(
+ ListBox& _rList,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rItems,
+ sal_Bool _bClear = sal_True);
+ void fillListBox(
+ ComboBox& _rList,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rItems,
+ sal_Bool _bClear = sal_True);
};
+ struct OAccessRegulator;
//=====================================================================
//= OControlWizard
//=====================================================================
- class OControlWizard : public ::svt::OWizardMachine
+ typedef ::svt::OWizardMachine OControlWizard_Base;
+ class OControlWizard : public OControlWizard_Base
{
private:
OControlWizardContext m_aContext;
@@ -159,14 +216,15 @@ namespace dbp
);
~OControlWizard();
-// public:
-// OWizardMachine::travelNext;
+ // make the some base class methods public
+ sal_Bool travelNext() { return OControlWizard_Base::travelNext(); }
public:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
getServiceFactory() const { return m_xORB; }
- const OControlWizardContext& getContext() const { return m_aContext; }
+ const OControlWizardContext& getContext() const { return m_aContext; }
+ void updateContext(const OAccessRegulator&);
protected:
// initialize the derivees settings (which have to be derived from OControlWizardSettings)
@@ -175,12 +233,23 @@ namespace dbp
// commit the control-relevant settings
void commitControlSettings(OControlWizardSettings* _pSettings);
+ sal_Bool needDatasourceSelection();
+
+ virtual sal_Bool approveControlType(sal_Int16 _nClassId) = 0;
+
+ // ModalDialog overridables
+ virtual short Execute();
+
private:
void initContext();
+ void implGetDSContext();
void implDetermineForm();
void implDeterminePage();
void implDetermineShape();
+
+ // made private. Not to be used by derived (or external) classes
+ virtual void ActivatePage();
};
//.........................................................................
@@ -192,6 +261,9 @@ namespace dbp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:22:18 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 10:02:52 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/dbpilots.src b/extensions/source/dbpilots/dbpilots.src
index 24e4e62c6f35..4f5a18c68d52 100644
--- a/extensions/source/dbpilots/dbpilots.src
+++ b/extensions/source/dbpilots/dbpilots.src
@@ -2,9 +2,9 @@
*
* $RCSfile: dbpilots.src,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:22:40 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,11 +94,45 @@ ModalDialog RID_DLG_GROUPBOXWIZARD
Hide = TRUE;
};
+ModalDialog RID_DLG_LISTCOMBOWIZARD
+{
+ Text = "AutoPilot Listenfeld";
+ Text [ english ] = "Auto Pilot List field";
+ Text [ english_us ] = "Auto Pilot List field";
+ Text[ portuguese ] = "AutoPiloto- Caixa de listagem";
+ Text[ russian ] = "Àâòîïèëîò ñïèñêà";
+ Text[ dutch ] = "AutPiloot Keuzelijst";
+ Text[ french ] = "AutoPilote Zone de liste";
+ Text[ spanish ] = "AutoPiloto Listado";
+ Text[ italian ] = "Pilota automatico Casella di riepilogo";
+ Text[ danish ] = "AutoPilot rulleliste";
+ Text[ swedish ] = "AutoPilot listruta";
+ Text[ polish ] = "AutoPilot Pole listy";
+ Text[ portuguese_brazilian ] = "Create group";
+ Text[ japanese ] = "µ°ÄÊß²Û¯Ä Ø½Ą̈°ÙÄÞ";
+ Text[ chinese_simplified ] = "×Ô¶¯ÎĵµÖúÀí Áе¥À¸";
+ Text[ chinese_traditional ] = "¦Û°ÊÀɮקU²z ²M³æÄæ¦ì";
+ Text[ arabic ] = "ÇáãÑÔÏ ÇáÂáí Ü ãÑÈÚ ÞÇÆãÉ";
+ Text[ dutch ] = "AutPiloot Keuzelijst";
+ Text[ chinese_simplified ] = "×Ô¶¯ÎĵµÖúÀí Áе¥À¸";
+ Text[ greek ] = "AutoPilot Ðåäßï ëßóôáò";
+ Text[ korean ] = "ÀÚµ¿ÆÄÀÏ·µ ¸ñ·Ï Çʵå";
+ Text[ turkish ] = "OtoPilot Liste alaný";
+
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Hide = TRUE;
+};
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:22:40 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 10:47:53 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/dbpresid.hrc b/extensions/source/dbpilots/dbpresid.hrc
index 3f9387fdca5c..543af12ae4b0 100644
--- a/extensions/source/dbpilots/dbpresid.hrc
+++ b/extensions/source/dbpilots/dbpresid.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: dbpresid.hrc,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:22:51 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,16 +80,25 @@
// dialogs
#define RID_DLG_GROUPBOXWIZARD ( RID_DIALOG_START + 1 )
+#define RID_DLG_LISTCOMBOWIZARD ( RID_DIALOG_START + 2 )
//========================================================================
// tab pages
-#define RID_PAGE_TABLESELECTION ( RID_PAGE_START + 1 )
-#define RID_PAGE_GROUPRADIOSELECTION ( RID_PAGE_START + 2 )
-#define RID_PAGE_DEFAULTFIELDSELECTION ( RID_PAGE_START + 3 )
-#define RID_PAGE_OPTIONVALUES ( RID_PAGE_START + 4 )
-#define RID_PAGE_OPTION_DBFIELD ( RID_PAGE_START + 5 )
-#define RID_PAGE_OPTIONS_FINAL ( RID_PAGE_START + 6 )
+#define RID_PAGE_TABLESELECTION ( RID_PAGE_START + 1 )
+#define RID_PAGE_GROUPRADIOSELECTION ( RID_PAGE_START + 2 )
+#define RID_PAGE_DEFAULTFIELDSELECTION ( RID_PAGE_START + 3 )
+#define RID_PAGE_OPTIONVALUES ( RID_PAGE_START + 4 )
+#define RID_PAGE_OPTION_DBFIELD ( RID_PAGE_START + 5 )
+#define RID_PAGE_OPTIONS_FINAL ( RID_PAGE_START + 6 )
+#define RID_PAGE_LCW_CONTENTSELECTION_TABLE ( RID_PAGE_START + 7 )
+#define RID_PAGE_LCW_CONTENTSELECTION_FIELD ( RID_PAGE_START + 8 )
+#define RID_PAGE_LCW_FIELDLINK ( RID_PAGE_START + 9 )
+
+//========================================================================
+// ErrorBox
+
+#define RID_ERR_INVALID_FORM_CONNECTION ( RID_ERRORBOX_START + 1 )
//========================================================================
// local ids
@@ -102,6 +111,7 @@
#define FL_OPTIONVALUES 3
#define FL_DATABASEFIELD_EXPL 4
#define FL_NAMEIT 5
+#define FL_FRAME 6
//........................................................................
// FixedText
@@ -117,6 +127,13 @@
#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
//........................................................................
// ListBox
@@ -126,6 +143,8 @@
#define LB_RADIOBUTTONS 3
#define LB_DEFSELECTIONFIELD 3
#define LB_STOREINFIELD 4
+#define LB_SELECTTABLE 5
+#define LB_SELECTFIELD 6
//........................................................................
// Edit
@@ -133,6 +152,7 @@
#define ET_RADIOLABELS 1
#define ET_OPTIONVALUE 2
#define ET_NAMEIT 3
+#define ET_DISPLAYEDFIELD 4
//........................................................................
// PushButton
@@ -148,6 +168,17 @@
#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
//========================================================================
// defines
@@ -169,6 +200,9 @@
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:22:51 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 10:48:02 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx
index b694049edacb..5c2946e02778 100644
--- a/extensions/source/dbpilots/dbpservices.cxx
+++ b/extensions/source/dbpilots/dbpservices.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbpservices.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:23:00 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,6 +73,7 @@ using namespace ::com::sun::star::registry;
//---------------------------------------------------------------------------------------
extern "C" void SAL_CALL createRegistryInfo_OGroupBoxWizard();
+extern "C" void SAL_CALL createRegistryInfo_OListComboWizard();
//---------------------------------------------------------------------------------------
@@ -82,6 +83,7 @@ extern "C" void SAL_CALL dbp_initializeModule()
if (!s_bInit)
{
createRegistryInfo_OGroupBoxWizard();
+ createRegistryInfo_OListComboWizard();
::dbp::OModule::setResourceFilePrefix("dbp");
s_bInit = sal_True;
}
@@ -142,6 +144,9 @@ extern "C" void* SAL_CALL component_getFactory(
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:23:00 fs
+ * initial checkin - form control auto pilots
+ *
* Revision 1.1 2001/02/12 07:11:01 fs
* initial checkin - importing StarOffice 5.2 database files
*
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index bda455074af2..4442caa6f8f3 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: groupboxwiz.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:23:55 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,21 +62,9 @@
#ifndef _EXTENSIONS_DBP_GROUPBOXWIZ_HXX_
#include "groupboxwiz.hxx"
#endif
-#ifndef _EXTENSIONS_DBP_DBPRESID_HRC_
-#include "dbpresid.hrc"
-#endif
-#ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_
-#include "componentmodule.hxx"
-#endif
#ifndef _EXTENSIONS_DBP_COMMONPAGESDBP_HXX_
#include "commonpagesdbp.hxx"
#endif
-#ifndef _EXTENSIONS_DBP_DBPRESID_HRC_
-#include "dbpresid.hrc"
-#endif
-#ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_
-#include "componentmodule.hxx"
-#endif
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
@@ -106,6 +94,7 @@ namespace dbp
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
+ using namespace ::com::sun::star::form;
using namespace ::svt;
//=====================================================================
@@ -118,14 +107,13 @@ namespace dbp
,m_bVisitedDefault(sal_False)
,m_bVisitedDB(sal_False)
{
- SetPageSizePixel(LogicToPixel(Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MAP_APPFONT));
- ShowButtonFixedLine(sal_True);
- defaultButton(WZB_NEXT);
- enableButtons(WZB_FINISH, sal_False);
-
initControlSettings(&m_aSettings);
+ }
- ActivatePage();
+ //---------------------------------------------------------------------
+ sal_Bool OGroupBoxWizard::approveControlType(sal_Int16 _nClassId)
+ {
+ return FormComponentType::GROUPBOX == _nClassId;
}
//---------------------------------------------------------------------
@@ -613,12 +601,7 @@ namespace dbp
OMaybeListSelectionPage::initializePage();
// fill the fields page
- m_aStoreWhere.Clear();
- const OControlWizardContext& rContext = getContext();
- const ::rtl::OUString* pFieldLoop = rContext.aFieldNames.getConstArray();
- const ::rtl::OUString* pLoopEnd = pFieldLoop + rContext.aFieldNames.getLength();
- for (;pFieldLoop != pLoopEnd; ++pFieldLoop)
- m_aStoreWhere.InsertEntry(*pFieldLoop);
+ fillListBox(m_aStoreWhere, getContext().aFieldNames);
const OOptionGroupSettings& rSettings = getSettings();
implInitialize(rSettings.sDBField);
@@ -680,6 +663,9 @@ namespace dbp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:23:55 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 10:41:21 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx
index e794c53ad0ab..a50f871ea6d1 100644
--- a/extensions/source/dbpilots/groupboxwiz.hxx
+++ b/extensions/source/dbpilots/groupboxwiz.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: groupboxwiz.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:24:04 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,21 +65,6 @@
#ifndef _EXTENSIONS_DBP_CONTROLWIZARD_HXX
#include "controlwizard.hxx"
#endif
-#ifndef _SV_FIXED_HXX
-#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_EDIT_HXX
-#include <vcl/edit.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
-#include <vcl/lstbox.hxx>
-#endif
-#ifndef _EXTENSIONS_DBP_DBPTYPES_HXX_
-#include "dbptypes.hxx"
-#endif
//.........................................................................
namespace dbp
@@ -127,6 +112,8 @@ namespace dbp
virtual sal_Bool onFinish(sal_Int32 _nResult);
+ virtual sal_Bool approveControlType(sal_Int16 _nClassId);
+
protected:
void createRadios();
};
@@ -313,6 +300,9 @@ namespace dbp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:24:04 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 10:39:33 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/makefile.mk b/extensions/source/dbpilots/makefile.mk
index 68076b544efe..1b9c1f47ec60 100644
--- a/extensions/source/dbpilots/makefile.mk
+++ b/extensions/source/dbpilots/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.1 $
+# $Revision: 1.2 $
#
-# last change: $Author: fs $ $Date: 2001-02-21 09:24:12 $
+# last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -90,7 +90,8 @@ CDEFS+=-DCOMPMOD_NAMESPACE=dbp
# --- Files --------------------------------------------------------
-CXXFILES= optiongrouplayouter.cxx \
+CXXFILES= listcombowizard.cxx \
+ optiongrouplayouter.cxx \
commonpagesdbp.cxx \
groupboxwiz.cxx \
wizardservices.cxx \
@@ -98,7 +99,8 @@ CXXFILES= optiongrouplayouter.cxx \
moduledbp.cxx \
dbpservices.cxx
-SLOFILES= $(SLO)$/optiongrouplayouter.obj \
+SLOFILES= $(SLO)$/listcombowizard.obj \
+ $(SLO)$/optiongrouplayouter.obj \
$(SLO)$/commonpagesdbp.obj \
$(SLO)$/groupboxwiz.obj \
$(SLO)$/wizardservices.obj \
@@ -109,7 +111,8 @@ SLOFILES= $(SLO)$/optiongrouplayouter.obj \
SRCFILES= commonpagesdbp.src \
dbpilots.src \
- groupboxpages.src
+ groupboxpages.src \
+ listcombopages.src
RESLIB1NAME=dbp
RESLIB1SRSFILES= $(SRS)/dbp.srs
diff --git a/extensions/source/dbpilots/wizardservices.cxx b/extensions/source/dbpilots/wizardservices.cxx
index e3fb1ff57591..0bbcb6661b85 100644
--- a/extensions/source/dbpilots/wizardservices.cxx
+++ b/extensions/source/dbpilots/wizardservices.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: wizardservices.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:24:59 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,6 +68,9 @@
#ifndef _EXTENSIONS_DBP_GROUPBOXWIZ_HXX_
#include "groupboxwiz.hxx"
#endif
+#ifndef _EXTENSIONS_DBP_LISTCOMBOWIZARD_HXX_
+#include "listcombowizard.hxx"
+#endif
// the registration methods
extern "C" void SAL_CALL createRegistryInfo_OGroupBoxWizard()
@@ -77,6 +80,13 @@ extern "C" void SAL_CALL createRegistryInfo_OGroupBoxWizard()
> aAutoRegistration;
}
+extern "C" void SAL_CALL createRegistryInfo_OListComboWizard()
+{
+ static ::dbp::OMultiInstanceAutoRegistration<
+ ::dbp::OUnoAutoPilot< ::dbp::OListComboWizard, ::dbp::OListComboSI >
+ > aAutoRegistration;
+}
+
//.........................................................................
namespace dbp
{
@@ -101,6 +111,23 @@ namespace dbp
return aReturn;
}
+ //=====================================================================
+ //= OListComboSI
+ //=====================================================================
+ //---------------------------------------------------------------------
+ ::rtl::OUString OListComboSI::getImplementationName() const
+ {
+ return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbp.OListComboWizard");
+ }
+
+ //---------------------------------------------------------------------
+ Sequence< ::rtl::OUString > OListComboSI::getServiceNames() const
+ {
+ Sequence< ::rtl::OUString > aReturn(1);
+ aReturn[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.ListComboBoxAutoPilot");
+ return aReturn;
+ }
+
//.........................................................................
} // namespace dbp
//.........................................................................
@@ -108,6 +135,9 @@ namespace dbp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:24:59 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 10:24:18 fs
************************************************************************/
diff --git a/extensions/source/dbpilots/wizardservices.hxx b/extensions/source/dbpilots/wizardservices.hxx
index a2039726b7a7..16d138bd105b 100644
--- a/extensions/source/dbpilots/wizardservices.hxx
+++ b/extensions/source/dbpilots/wizardservices.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: wizardservices.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 09:25:07 $
+ * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,6 +86,18 @@ namespace dbp
getServiceNames() const;
};
+ //=====================================================================
+ //= OListComboSI
+ //=====================================================================
+ /// service info for the group box wizard
+ struct OListComboSI
+ {
+ public:
+ ::rtl::OUString getImplementationName() const;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getServiceNames() const;
+ };
+
//.........................................................................
} // namespace dbp
//.........................................................................
@@ -95,6 +107,9 @@ namespace dbp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/02/21 09:25:07 fs
+ * initial checkin - form control auto pilots
+ *
*
* Revision 1.0 14.02.01 10:27:36 fs
************************************************************************/