diff options
author | Noel Power <noel.power@novell.com> | 2011-11-29 10:26:33 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-11-29 10:28:44 +0000 |
commit | 34a9faf23c3d84b88a1610481266812bed3b71e8 (patch) | |
tree | 55c1daefadeeae13f43c7456078a3036e7cebdb0 /basctl | |
parent | ecbf39171991069d794133797e5f8714c3d7d7f9 (diff) |
add spinbutton control to insertcontrolbar for basic dialog editor
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 7 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedfac.cxx | 5 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 5 | ||||
-rw-r--r-- | basctl/source/dlged/dlgresid.src | 4 | ||||
-rw-r--r-- | basctl/source/inc/dlgeddef.hxx | 1 | ||||
-rw-r--r-- | basctl/source/inc/dlgresid.hrc | 1 | ||||
-rw-r--r-- | basctl/uiconfig/basicide/toolbar/insertcontrolsbar.xml | 4 |
7 files changed, 24 insertions, 3 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index a348274947b8..b5c287d431f8 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -361,6 +361,7 @@ void DialogWindow::GetState( SfxItemSet& rSet ) case OBJ_DLG_FORMATTEDFIELD: nObj = SVX_SNAP_FORMATTEDFIELD; break; case OBJ_DLG_PATTERNFIELD: nObj = SVX_SNAP_PATTERNFIELD; break; case OBJ_DLG_FILECONTROL: nObj = SVX_SNAP_FILECONTROL; break; + case OBJ_DLG_SPINBUTTON: nObj = SVX_SNAP_SPINBUTTON; break; case OBJ_DLG_TREECONTROL: nObj = SVX_SNAP_TREECONTROL; break; default: nObj = 0; } @@ -563,6 +564,12 @@ void DialogWindow::ExecuteCommand( SfxRequest& rReq ) GetEditor()->SetInsertObj( OBJ_DLG_FILECONTROL ); } break; + case SVX_SNAP_SPINBUTTON: + { + GetEditor()->SetMode( DLGED_INSERT ); + GetEditor()->SetInsertObj( OBJ_DLG_SPINBUTTON ); + } + break; case SVX_SNAP_TREECONTROL: { GetEditor()->SetMode( DLGED_INSERT ); diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index 4c90d211251b..92c0da48ff13 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -70,7 +70,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) if( (pObjFactory->nInventor == DlgInventor) && (pObjFactory->nIdentifier >= OBJ_DLG_PUSHBUTTON) && - (pObjFactory->nIdentifier <= OBJ_DLG_TREECONTROL) ) + (pObjFactory->nIdentifier <= OBJ_DLG_SPINBUTTON) ) { switch( pObjFactory->nIdentifier ) { @@ -183,6 +183,9 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) case OBJ_DLG_FILECONTROL: pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFileControlModel" )) , xDialogSFact ); break; + case OBJ_DLG_SPINBUTTON: + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlSpinButtonModel") , xDialogSFact ); + break; case OBJ_DLG_TREECONTROL: DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.tree.TreeControlModel" )) , xDialogSFact ); pObjFactory->pNewObj = pNew; diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index eb4bc56b3eb9..2e2d8dfaba1c 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -783,7 +783,10 @@ sal_Bool DlgEdObj::supportsService( const sal_Char* _pServiceName ) const { nResId = RID_STR_CLASS_TREECONTROL; } - + else if ( supportsService( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) + { + nResId = RID_STR_CLASS_SPINCONTROL; + } else { nResId = RID_STR_CLASS_CONTROL; diff --git a/basctl/source/dlged/dlgresid.src b/basctl/source/dlged/dlgresid.src index ee37d82233e1..752f1b2deccf 100644 --- a/basctl/source/dlged/dlgresid.src +++ b/basctl/source/dlged/dlgresid.src @@ -117,6 +117,10 @@ String RID_STR_CLASS_TREECONTROL { Text = "TreeControl" ; }; +String RID_STR_CLASS_SPINCONTROL +{ + Text = "SpinButton" ; +}; // Property Browser Headline ---------------------------------------------------------------- diff --git a/basctl/source/inc/dlgeddef.hxx b/basctl/source/inc/dlgeddef.hxx index cceecb6a8f28..a7be1fa232c5 100644 --- a/basctl/source/inc/dlgeddef.hxx +++ b/basctl/source/inc/dlgeddef.hxx @@ -61,6 +61,7 @@ const sal_uInt32 DlgInventor = sal_uInt32('D')*0x00000001+ #define OBJ_DLG_PATTERNFIELD ((sal_uInt16)22) #define OBJ_DLG_FILECONTROL ((sal_uInt16)23) #define OBJ_DLG_TREECONTROL ((sal_uInt16)24) +#define OBJ_DLG_SPINBUTTON ((sal_uInt16)25) // control properties #define DLGED_PROP_BACKGROUNDCOLOR ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BackgroundColor" ) ) diff --git a/basctl/source/inc/dlgresid.hrc b/basctl/source/inc/dlgresid.hrc index 3499cd5ed7c6..a46246fe3ce4 100644 --- a/basctl/source/inc/dlgresid.hrc +++ b/basctl/source/inc/dlgresid.hrc @@ -58,6 +58,7 @@ #define RID_STR_TRANSLATION_NOTLOCALIZED ( RID_DLG_START + 21 ) #define RID_STR_TRANSLATION_DEFAULT ( RID_DLG_START + 22 ) #define RID_STR_CLASS_TREECONTROL ( RID_DLG_START + 23 ) +#define RID_STR_CLASS_SPINCONTROL ( RID_DLG_START + 24 ) // Property Browser Headline Id's ----------------------------------------------------------- #define RID_STR_BRWTITLE_PROPERTIES ( RID_DLG_START + 60 ) diff --git a/basctl/uiconfig/basicide/toolbar/insertcontrolsbar.xml b/basctl/uiconfig/basicide/toolbar/insertcontrolsbar.xml index fe0edf689bba..4603b5415578 100644 --- a/basctl/uiconfig/basicide/toolbar/insertcontrolsbar.xml +++ b/basctl/uiconfig/basicide/toolbar/insertcontrolsbar.xml @@ -19,8 +19,8 @@ <toolbar:toolbaritem xlink:href=".uno:InsertListbox" toolbar:helpid="helpid:10191" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:Combobox" toolbar:helpid="helpid:10192" toolbar:style="radio" /> <toolbar:toolbarbreak/> - <toolbar:toolbaritem xlink:href=".uno:HScrollbar" toolbar:helpid="helpid:10194" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:VScrollbar" toolbar:helpid="helpid:10195" toolbar:style="radio" /> + <toolbar:toolbaritem xlink:href=".uno:HScrollbar" toolbar:helpid="helpid:10194" toolbar:style="radio" /> <toolbar:toolbarbreak/> <toolbar:toolbaritem xlink:href=".uno:Groupbox" toolbar:helpid="helpid:10189" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:ProgressBar" toolbar:helpid="helpid:10927" toolbar:style="radio" /> @@ -40,4 +40,6 @@ <toolbar:toolbaritem xlink:href=".uno:InsertFileControl" toolbar:helpid="helpid:10942" toolbar:style="radio" /> <toolbar:toolbaritem xlink:href=".uno:InsertTreeControl" toolbar:style="radio" /> <toolbar:toolbarbreak/> +<toolbar:toolbaritem xlink:href=".uno:SpinButton" toolbar:helpid="helpid:10769" toolbar:style="radio" /> + <toolbar:toolbarbreak/> </toolbar:toolbar> |