[Libreoffice-commits] .: basctl/source basctl/uiconfig

Noel Power noelp at kemper.freedesktop.org
Tue Nov 29 02:28:37 PST 2011


 basctl/source/basicide/baside3.cxx                     |    7 +++++++
 basctl/source/dlged/dlgedfac.cxx                       |    5 ++++-
 basctl/source/dlged/dlgedobj.cxx                       |    5 ++++-
 basctl/source/dlged/dlgresid.src                       |    4 ++++
 basctl/source/inc/dlgeddef.hxx                         |    1 +
 basctl/source/inc/dlgresid.hrc                         |    1 +
 basctl/uiconfig/basicide/toolbar/insertcontrolsbar.xml |    4 +++-
 7 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit 34a9faf23c3d84b88a1610481266812bed3b71e8
Author: Noel Power <noel.power at novell.com>
Date:   Tue Nov 29 10:26:33 2011 +0000

    add spinbutton control to insertcontrolbar for basic dialog editor

diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index a348274..b5c287d 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 4c90d21..92c0da4 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 eb4bc56..2e2d8df 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 ee37d82..752f1b2 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 cceecb6..a7be1fa 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 3499cd5..a46246f 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 fe0edf6..4603b54 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>


More information about the Libreoffice-commits mailing list