diff options
author | Frank Schönheit <fs@openoffice.org> | 2001-03-05 13:53:13 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2001-03-05 13:53:13 +0000 |
commit | 69a660a95799ff00231d7d2a5e8bd9ac26048568 (patch) | |
tree | 48e74655ddd6a6a6874142e003cc1065816bc085 | |
parent | 432d5b86e13ee70862da89a6c32c9b1c663def74 (diff) |
finished the grid control wizard
-rw-r--r-- | extensions/source/dbpilots/controlwizard.cxx | 31 | ||||
-rw-r--r-- | extensions/source/dbpilots/controlwizard.hxx | 68 | ||||
-rw-r--r-- | extensions/source/dbpilots/dbpilots.src | 39 | ||||
-rw-r--r-- | extensions/source/dbpilots/dbpresid.hrc | 19 | ||||
-rw-r--r-- | extensions/source/dbpilots/dbpservices.cxx | 9 | ||||
-rw-r--r-- | extensions/source/dbpilots/groupboxwiz.cxx | 9 | ||||
-rw-r--r-- | extensions/source/dbpilots/groupboxwiz.hxx | 9 | ||||
-rw-r--r-- | extensions/source/dbpilots/listcombowizard.cxx | 9 | ||||
-rw-r--r-- | extensions/source/dbpilots/listcombowizard.hxx | 9 | ||||
-rw-r--r-- | extensions/source/dbpilots/makefile.mk | 15 | ||||
-rw-r--r-- | extensions/source/dbpilots/optiongrouplayouter.cxx | 36 | ||||
-rw-r--r-- | extensions/source/dbpilots/optiongrouplayouter.hxx | 9 | ||||
-rw-r--r-- | extensions/source/dbpilots/wizardservices.cxx | 34 | ||||
-rw-r--r-- | extensions/source/dbpilots/wizardservices.hxx | 21 |
14 files changed, 193 insertions, 124 deletions
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 497eabb63323..18fd2b9973b3 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -2,9 +2,9 @@ * * $RCSfile: controlwizard.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: fs $ $Date: 2001-02-28 09:18:30 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -195,8 +195,13 @@ namespace dbp _rList.Clear(); const ::rtl::OUString* pItems = _rItems.getConstArray(); const ::rtl::OUString* pEnd = pItems + _rItems.getLength(); - for (;pItems < pEnd; ++pItems) - _rList.InsertEntry(*pItems); + sal_uInt16 nPos; + sal_Int32 nIndex = 0; + for (;pItems < pEnd; ++pItems, ++nIndex) + { + nPos = _rList.InsertEntry(*pItems); + _rList.SetEntryData(nPos, reinterpret_cast<void*>(nIndex)); + } } //--------------------------------------------------------------------- @@ -206,8 +211,13 @@ namespace dbp _rList.Clear(); const ::rtl::OUString* pItems = _rItems.getConstArray(); const ::rtl::OUString* pEnd = pItems + _rItems.getLength(); + sal_uInt16 nPos; + sal_Int32 nIndex = 0; for (;pItems < pEnd; ++pItems) - _rList.InsertEntry(*pItems); + { + nPos = _rList.InsertEntry(*pItems); + _rList.SetEntryData(nPos, reinterpret_cast<void*>(nIndex)); + } } //===================================================================== @@ -246,7 +256,7 @@ namespace dbp { DBG_ERROR("OControlWizard::activate: could not obtain the class id!"); } - if (!approveControlType(nClassId)) + if (!approveControl(nClassId)) { // TODO: MessageBox or exception return RET_CANCEL; @@ -414,6 +424,9 @@ namespace dbp m_aContext.xObjectShape.clear(); m_aContext.aFieldNames.realloc(0); + m_aContext.xObjectContainer.clear(); + m_aContext.xFields.clear(); + Any aSQLException; Reference< XPreparedStatement > xStatement; try @@ -492,7 +505,10 @@ namespace dbp } if (xColumns.is()) + { m_aContext.aFieldNames = xColumns->getElementNames(); + m_aContext.xFields = xColumns; + } } catch(SQLContext& e) { aSQLException <<= e; } catch(SQLWarning& e) { aSQLException <<= e; } @@ -631,6 +647,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.3 2001/02/28 09:18:30 fs + * finalized the list/combo wizard + * * Revision 1.2 2001/02/23 15:19:08 fs * some changes / centralizations - added the list-/combobox wizard * diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx index de3fff1908a1..d398a22d8798 100644 --- a/extensions/source/dbpilots/controlwizard.hxx +++ b/extensions/source/dbpilots/controlwizard.hxx @@ -2,9 +2,9 @@ * * $RCSfile: controlwizard.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: fs $ $Date: 2001-02-28 09:18:30 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,27 +68,6 @@ #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ -#include <com/sun/star/beans/XPropertySet.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_ -#include <com/sun/star/sdbc/XRowSet.hpp> -#endif -#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ -#include <com/sun/star/uno/Sequence.hxx> -#endif -#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGE_HPP_ -#include <com/sun/star/drawing/XDrawPage.hpp> -#endif -#ifndef _COM_SUN_STAR_DRAWING_XCONTROLSHAPE_HPP_ -#include <com/sun/star/drawing/XControlShape.hpp> -#endif -#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 @@ -116,6 +95,9 @@ #ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_ #include "componentmodule.hxx" #endif +#ifndef _EXTENSIONS_DBP_WIZARDCONTEXT_HXX_ +#include "wizardcontext.hxx" +#endif class ResId; //......................................................................... @@ -134,41 +116,6 @@ namespace dbp //===================================================================== //= OControlWizardPage //===================================================================== - 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; - }; - - //===================================================================== - //= OControlWizardPage - //===================================================================== class OControlWizard; class OControlWizardPage : public ::svt::OWizardPage { @@ -235,7 +182,7 @@ namespace dbp sal_Bool needDatasourceSelection(); - virtual sal_Bool approveControlType(sal_Int16 _nClassId) = 0; + virtual sal_Bool approveControl(sal_Int16 _nClassId) = 0; // ModalDialog overridables virtual short Execute(); @@ -261,6 +208,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.3 2001/02/28 09:18:30 fs + * finalized the list/combo wizard + * * Revision 1.2 2001/02/23 15:19:08 fs * some changes / centralizations - added the list-/combobox wizard * diff --git a/extensions/source/dbpilots/dbpilots.src b/extensions/source/dbpilots/dbpilots.src index 368773bd28d5..2c8122d7de85 100644 --- a/extensions/source/dbpilots/dbpilots.src +++ b/extensions/source/dbpilots/dbpilots.src @@ -2,9 +2,9 @@ * * $RCSfile: dbpilots.src,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: fs $ $Date: 2001-02-28 09:18:30 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -103,6 +103,38 @@ ModalDialog RID_DLG_LISTCOMBOWIZARD Hide = TRUE; }; +ModalDialog RID_DLG_GRIDWIZARD +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Moveable = TRUE ; + Closeable = TRUE ; + Hide = TRUE; + + Text = "AutoPilot Tabellenelement"; + Text [ english ] = "AutoPilot Table Control"; + Text [ english_us ] = "AutoPilot Table Control"; + Text [ portuguese ] = "AutoPiloto - Elemento de tabela"; + Text [ russian ] = " "; + Text [ dutch ] = "AutoPiloot Tabelelement"; + Text [ french ] = "AutoPilote d'lment de table"; + Text [ spanish ] = "AutoPiloto - Elemento de tabla"; + Text [ italian ] = "Pilota automatico - Elemento tabella "; + Text [ danish ] = "AutoPilot - tabelelement"; + Text [ swedish ] = "AutoPilot tabellelement"; + Text [ polish ] = "AutoPilot elementu tabeli"; + Text [ portuguese_brazilian ] = "AutoPilot Tabellenelement"; + Text [ japanese ] = "߲ۯ \\\\vf"; + Text [ chinese_simplified ] = "Զļ Ԫ"; + Text [ chinese_traditional ] = "۰ɮקUz 椸"; + Text [ arabic ] = " "; + Text [ dutch ] = "AutoPiloot Tabelelement"; + Text [ chinese_simplified ] = "Զļ Ԫ"; + Text [ greek ] = " AutoPilot"; + Text [ korean ] = "ڵϷ ǥ "; + Text [ turkish ] = "OtoPilot Tablo esi"; +}; + String RID_STR_LISTWIZARD_TITLE { Text = "AutoPilot Listenfeld"; @@ -165,6 +197,9 @@ String RID_STR_COULDNOTOPENTABLE /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.3 2001/02/28 09:18:30 fs + * finalized the list/combo wizard + * * Revision 1.2 2001/02/23 15:19:08 fs * some changes / centralizations - added the list-/combobox wizard * diff --git a/extensions/source/dbpilots/dbpresid.hrc b/extensions/source/dbpilots/dbpresid.hrc index 56e5f2d4a3f8..e2fcfd67c90c 100644 --- a/extensions/source/dbpilots/dbpresid.hrc +++ b/extensions/source/dbpilots/dbpresid.hrc @@ -2,9 +2,9 @@ * * $RCSfile: dbpresid.hrc,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: fs $ $Date: 2001-02-28 09:18:30 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,12 +84,15 @@ #define RID_STR_LISTWIZARD_TITLE (RID_STRING_START + 3 ) #define RID_STR_COMBOWIZARD_TITLE (RID_STRING_START + 4 ) #define RID_STR_COULDNOTOPENTABLE (RID_STRING_START + 5 ) +#define RID_STR_DATEPOSTFIX (RID_STRING_START + 6 ) +#define RID_STR_TIMEPOSTFIX (RID_STRING_START + 7 ) //======================================================================== // dialogs #define RID_DLG_GROUPBOXWIZARD ( RID_DIALOG_START + 1 ) #define RID_DLG_LISTCOMBOWIZARD ( RID_DIALOG_START + 2 ) +#define RID_DLG_GRIDWIZARD ( RID_DIALOG_START + 3 ) //======================================================================== // tab pages @@ -103,6 +106,7 @@ #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 ) +#define RID_PAGE_GW_FIELDSELECTION ( RID_PAGE_START + 10 ) //======================================================================== // ErrorBox @@ -143,6 +147,8 @@ #define FT_VALUELISTFIELD 16 #define FT_TABLEFIELD 17 #define FT_EXPLANATION 18 +#define FT_EXISTING_FIELDS 19 +#define FT_SELECTED_FIELDS 20 //........................................................................ // ListBox @@ -154,6 +160,8 @@ #define LB_STOREINFIELD 4 #define LB_SELECTTABLE 5 #define LB_SELECTFIELD 6 +#define LB_EXISTING_FIELDS 7 +#define LB_SELECTED_FIELDS 8 //........................................................................ // Edit @@ -168,6 +176,10 @@ #define PB_MOVETORIGHT 1 #define PB_MOVETOLEFT 2 +#define PB_FIELDRIGHT 3 +#define PB_ALLFIELDSRIGHT 4 +#define PB_FIELDLEFT 5 +#define PB_ALLFIELDSLEFT 6 //........................................................................ // RadioButton @@ -209,6 +221,9 @@ /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.3 2001/02/28 09:18:30 fs + * finalized the list/combo wizard + * * Revision 1.2 2001/02/23 15:19:08 fs * some changes / centralizations - added the list-/combobox wizard * diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx index 5c2946e02778..c297bb333d8e 100644 --- a/extensions/source/dbpilots/dbpservices.cxx +++ b/extensions/source/dbpilots/dbpservices.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dbpservices.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,6 +74,7 @@ using namespace ::com::sun::star::registry; extern "C" void SAL_CALL createRegistryInfo_OGroupBoxWizard(); extern "C" void SAL_CALL createRegistryInfo_OListComboWizard(); +extern "C" void SAL_CALL createRegistryInfo_OGridWizard(); //--------------------------------------------------------------------------------------- @@ -84,6 +85,7 @@ extern "C" void SAL_CALL dbp_initializeModule() { createRegistryInfo_OGroupBoxWizard(); createRegistryInfo_OListComboWizard(); + createRegistryInfo_OGridWizard(); ::dbp::OModule::setResourceFilePrefix("dbp"); s_bInit = sal_True; } @@ -144,6 +146,9 @@ extern "C" void* SAL_CALL component_getFactory( /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.2 2001/02/23 15:19:08 fs + * some changes / centralizations - added the list-/combobox wizard + * * Revision 1.1 2001/02/21 09:23:00 fs * initial checkin - form control auto pilots * diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 839292bf6f82..0d312b61ae35 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -2,9 +2,9 @@ * * $RCSfile: groupboxwiz.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: fs $ $Date: 2001-03-02 09:42:40 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -111,7 +111,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OGroupBoxWizard::approveControlType(sal_Int16 _nClassId) + sal_Bool OGroupBoxWizard::approveControl(sal_Int16 _nClassId) { return FormComponentType::GROUPBOX == _nClassId; } @@ -588,6 +588,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.4 2001/03/02 09:42:40 fs + * #84540# #84541# corrected the Next button behaviour on the first and last tab page + * * Revision 1.3 2001/02/28 09:18:30 fs * finalized the list/combo wizard * diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx index fa6528bc2de0..2a99980f8b44 100644 --- a/extensions/source/dbpilots/groupboxwiz.hxx +++ b/extensions/source/dbpilots/groupboxwiz.hxx @@ -2,9 +2,9 @@ * * $RCSfile: groupboxwiz.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: fs $ $Date: 2001-03-02 09:42:40 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -115,7 +115,7 @@ namespace dbp virtual sal_Bool onFinish(sal_Int32 _nResult); - virtual sal_Bool approveControlType(sal_Int16 _nClassId); + virtual sal_Bool approveControl(sal_Int16 _nClassId); protected: void createRadios(); @@ -269,6 +269,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.4 2001/03/02 09:42:40 fs + * #84540# #84541# corrected the Next button behaviour on the first and last tab page + * * Revision 1.3 2001/02/28 09:18:30 fs * finalized the list/combo wizard * diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 24534bd0aff1..0140ad1ca770 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -2,9 +2,9 @@ * * $RCSfile: listcombowizard.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2001-02-28 09:18:30 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -123,7 +123,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OListComboWizard::approveControlType(sal_Int16 _nClassId) + sal_Bool OListComboWizard::approveControl(sal_Int16 _nClassId) { switch (_nClassId) { @@ -597,6 +597,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.2 2001/02/28 09:18:30 fs + * finalized the list/combo wizard + * * Revision 1.1 2001/02/23 15:20:11 fs * initial checkin - list-/combobox wizard (not comlpletely finished yet) * diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx index dead1716923c..32a4b97357fa 100644 --- a/extensions/source/dbpilots/listcombowizard.hxx +++ b/extensions/source/dbpilots/listcombowizard.hxx @@ -2,9 +2,9 @@ * * $RCSfile: listcombowizard.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2001-02-28 09:18:30 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -121,7 +121,7 @@ namespace dbp virtual sal_Bool onFinish(sal_Int32 _nResult); - virtual sal_Bool approveControlType(sal_Int16 _nClassId); + virtual sal_Bool approveControl(sal_Int16 _nClassId); sal_uInt16 getFinalState() const { return isListBox() ? LCW_STATE_FIELDLINK : LCW_STATE_COMBODBFIELD; } @@ -266,6 +266,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.2 2001/02/28 09:18:30 fs + * finalized the list/combo wizard + * * Revision 1.1 2001/02/23 15:20:18 fs * initial checkin - list-/combobox wizard (not comlpletely finished yet) * diff --git a/extensions/source/dbpilots/makefile.mk b/extensions/source/dbpilots/makefile.mk index 1b9c1f47ec60..2a611b2cbe2d 100644 --- a/extensions/source/dbpilots/makefile.mk +++ b/extensions/source/dbpilots/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.2 $ +# $Revision: 1.3 $ # -# last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $ +# last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -90,7 +90,9 @@ CDEFS+=-DCOMPMOD_NAMESPACE=dbp # --- Files -------------------------------------------------------- -CXXFILES= listcombowizard.cxx \ +CXXFILES= dbptools.cxx \ + gridwizard.cxx \ + listcombowizard.cxx \ optiongrouplayouter.cxx \ commonpagesdbp.cxx \ groupboxwiz.cxx \ @@ -99,7 +101,9 @@ CXXFILES= listcombowizard.cxx \ moduledbp.cxx \ dbpservices.cxx -SLOFILES= $(SLO)$/listcombowizard.obj \ +SLOFILES= $(SLO)$/dbptools.obj \ + $(SLO)$/gridwizard.obj \ + $(SLO)$/listcombowizard.obj \ $(SLO)$/optiongrouplayouter.obj \ $(SLO)$/commonpagesdbp.obj \ $(SLO)$/groupboxwiz.obj \ @@ -109,7 +113,8 @@ SLOFILES= $(SLO)$/listcombowizard.obj \ $(SLO)$/dbpservices.obj -SRCFILES= commonpagesdbp.src \ +SRCFILES= gridpages.src \ + commonpagesdbp.src \ dbpilots.src \ groupboxpages.src \ listcombopages.src diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx index 7eb56292cd19..9634bce0ad91 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.cxx +++ b/extensions/source/dbpilots/optiongrouplayouter.cxx @@ -2,9 +2,9 @@ * * $RCSfile: optiongrouplayouter.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2001-02-21 12:11:58 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -98,6 +98,9 @@ #ifndef _EXTENSIONS_DBP_GROUPBOXWIZ_HXX_ #include "groupboxwiz.hxx" #endif +#ifndef _EXTENSIONS_DBP_DBPTOOLS_HXX_ +#include "dbptools.hxx" +#endif //......................................................................... namespace dbp @@ -129,30 +132,6 @@ namespace dbp } //--------------------------------------------------------------------- - void OOptionGroupLayouter::disambiguateName(const OControlWizardContext& _rContext, ::rtl::OUString& _rElementsName) - { - try - { - Reference< XNameAccess > xNameChecker(_rContext.xForm, UNO_QUERY); - - ::rtl::OUString sBase(_rElementsName); - for (sal_Int32 i=1; i<0x7FFFFFFF; ++i) - { - _rElementsName = sBase; - _rElementsName += ::rtl::OUString::valueOf((sal_Int32)i); - if (!xNameChecker->hasByName(_rElementsName)) - return; - } - // can't do anything ... no free names - _rElementsName = sBase; - } - catch(Exception&) - { - DBG_ERROR("OOptionGroupLayouter::disambiguateName: something went (strangely) wrong!"); - } - } - - //--------------------------------------------------------------------- void OOptionGroupLayouter::doLayout(const OControlWizardContext& _rContext, const OOptionGroupSettings& _rSettings) { Reference< XShapes > xPageShapes(_rContext.xDrawPage, UNO_QUERY); @@ -206,7 +185,7 @@ namespace dbp aButtonPosition.X = aShapePosition.X + OFFSET; ::rtl::OUString sElementsName = ::rtl::OUString::createFromAscii("RadioGroup"); - disambiguateName(_rContext, sElementsName); + disambiguateName(Reference< XNameAccess >(_rContext.xForm, UNO_QUERY), sElementsName); const String* pLabels = _rSettings.aLabels.begin(); const String* pValues = _rSettings.aValues.begin(); @@ -299,6 +278,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.2 2001/02/21 12:11:58 fs + * +disambiguateName + * * Revision 1.1 2001/02/21 09:24:28 fs * initial checkin - form control auto pilots * diff --git a/extensions/source/dbpilots/optiongrouplayouter.hxx b/extensions/source/dbpilots/optiongrouplayouter.hxx index 713126c598ab..d73d79b4cfae 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.hxx +++ b/extensions/source/dbpilots/optiongrouplayouter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: optiongrouplayouter.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2001-02-21 12:11:58 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -111,8 +111,6 @@ namespace dbp void implAnchorShape( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxShapeProps ); - - void disambiguateName(const OControlWizardContext& _rContext, ::rtl::OUString& _rElementsName); }; //......................................................................... @@ -124,6 +122,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.2 2001/02/21 12:11:58 fs + * +disambiguateName + * * Revision 1.1 2001/02/21 09:24:36 fs * initial checkin - form control auto pilots * diff --git a/extensions/source/dbpilots/wizardservices.cxx b/extensions/source/dbpilots/wizardservices.cxx index 0bbcb6661b85..cc24925408ac 100644 --- a/extensions/source/dbpilots/wizardservices.cxx +++ b/extensions/source/dbpilots/wizardservices.cxx @@ -2,9 +2,9 @@ * * $RCSfile: wizardservices.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,6 +71,9 @@ #ifndef _EXTENSIONS_DBP_LISTCOMBOWIZARD_HXX_ #include "listcombowizard.hxx" #endif +#ifndef _EXTENSIONS_DBP_GRIDWIZARD_HXX_ +#include "gridwizard.hxx" +#endif // the registration methods extern "C" void SAL_CALL createRegistryInfo_OGroupBoxWizard() @@ -87,6 +90,13 @@ extern "C" void SAL_CALL createRegistryInfo_OListComboWizard() > aAutoRegistration; } +extern "C" void SAL_CALL createRegistryInfo_OGridWizard() +{ + static ::dbp::OMultiInstanceAutoRegistration< + ::dbp::OUnoAutoPilot< ::dbp::OGridWizard, ::dbp::OGridSI > + > aAutoRegistration; +} + //......................................................................... namespace dbp { @@ -128,6 +138,23 @@ namespace dbp return aReturn; } + //===================================================================== + //= OGridSI + //===================================================================== + //--------------------------------------------------------------------- + ::rtl::OUString OGridSI::getImplementationName() const + { + return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbp.OGridWizard"); + } + + //--------------------------------------------------------------------- + Sequence< ::rtl::OUString > OGridSI::getServiceNames() const + { + Sequence< ::rtl::OUString > aReturn(1); + aReturn[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.GridControlAutoPilot"); + return aReturn; + } + //......................................................................... } // namespace dbp //......................................................................... @@ -135,6 +162,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.2 2001/02/23 15:19:08 fs + * some changes / centralizations - added the list-/combobox wizard + * * Revision 1.1 2001/02/21 09:24:59 fs * initial checkin - form control auto pilots * diff --git a/extensions/source/dbpilots/wizardservices.hxx b/extensions/source/dbpilots/wizardservices.hxx index 16d138bd105b..8fbc885d2625 100644 --- a/extensions/source/dbpilots/wizardservices.hxx +++ b/extensions/source/dbpilots/wizardservices.hxx @@ -2,9 +2,9 @@ * * $RCSfile: wizardservices.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2001-02-23 15:19:08 $ + * last change: $Author: fs $ $Date: 2001-03-05 14:53:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,7 +89,7 @@ namespace dbp //===================================================================== //= OListComboSI //===================================================================== - /// service info for the group box wizard + /// service info for the list/combo box wizard struct OListComboSI { public: @@ -98,6 +98,18 @@ namespace dbp getServiceNames() const; }; + //===================================================================== + //= OGridSI + //===================================================================== + /// service info for the grid wizard + struct OGridSI + { + public: + ::rtl::OUString getImplementationName() const; + ::com::sun::star::uno::Sequence< ::rtl::OUString > + getServiceNames() const; + }; + //......................................................................... } // namespace dbp //......................................................................... @@ -107,6 +119,9 @@ namespace dbp /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.2 2001/02/23 15:19:08 fs + * some changes / centralizations - added the list-/combobox wizard + * * Revision 1.1 2001/02/21 09:25:07 fs * initial checkin - form control auto pilots * |