[Libreoffice-commits] core.git: extensions/source

Stephan Bergmann sbergman at redhat.com
Wed Dec 21 20:44:25 UTC 2016


 extensions/source/propctrlr/taborder.cxx |   77 ++++++++++++++++---------------
 extensions/source/propctrlr/taborder.hxx |    4 -
 2 files changed, 40 insertions(+), 41 deletions(-)

New commits:
commit 87d1657d6bd68e4a3d8ba461078a7bb1dc9ed121
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Dec 21 21:43:27 2016 +0100

    loplugin:staticmethods
    
    Change-Id: I04d3095c657deb72a20fa803964912cf6baf268b

diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx
index 4724a40..cf2b0ed 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -40,6 +40,46 @@ namespace pcr
     using namespace ::com::sun::star::beans;
     using namespace ::com::sun::star::datatransfer;
 
+    namespace {
+
+    Image GetImage( const Reference< XPropertySet >& _rxSet )
+    {
+        sal_uInt16 nImageId = RID_SVXBMP_CONTROL;
+        // TODO: classify controls also in Basic propbrw
+        if ( _rxSet.is() && ::comphelper::hasProperty( PROPERTY_CLASSID, _rxSet ) )
+        {
+            switch( ::comphelper::getINT16( _rxSet->getPropertyValue( PROPERTY_CLASSID ) ) )
+            {
+            case FormComponentType::COMMANDBUTTON:  nImageId = RID_SVXBMP_BUTTON; break;
+            case FormComponentType::FIXEDTEXT:      nImageId = RID_SVXBMP_FIXEDTEXT; break;
+            case FormComponentType::TEXTFIELD:      nImageId = RID_SVXBMP_EDITBOX; break;
+            case FormComponentType::RADIOBUTTON:    nImageId = RID_SVXBMP_RADIOBUTTON; break;
+            case FormComponentType::CHECKBOX:       nImageId = RID_SVXBMP_CHECKBOX; break;
+            case FormComponentType::LISTBOX:        nImageId = RID_SVXBMP_LISTBOX; break;
+            case FormComponentType::COMBOBOX:       nImageId = RID_SVXBMP_COMBOBOX; break;
+            case FormComponentType::GROUPBOX:       nImageId = RID_SVXBMP_GROUPBOX; break;
+            case FormComponentType::IMAGEBUTTON:    nImageId = RID_SVXBMP_IMAGEBUTTON; break;
+            case FormComponentType::FILECONTROL:    nImageId = RID_SVXBMP_FILECONTROL; break;
+            case FormComponentType::HIDDENCONTROL:  nImageId = RID_SVXBMP_HIDDEN; break;
+            case FormComponentType::DATEFIELD:      nImageId = RID_SVXBMP_DATEFIELD; break;
+            case FormComponentType::TIMEFIELD:      nImageId = RID_SVXBMP_TIMEFIELD; break;
+            case FormComponentType::NUMERICFIELD:   nImageId = RID_SVXBMP_NUMERICFIELD; break;
+            case FormComponentType::CURRENCYFIELD:  nImageId = RID_SVXBMP_CURRENCYFIELD; break;
+            case FormComponentType::PATTERNFIELD:   nImageId = RID_SVXBMP_PATTERNFIELD; break;
+            case FormComponentType::IMAGECONTROL:   nImageId = RID_SVXBMP_IMAGECONTROL; break;
+            case FormComponentType::GRIDCONTROL:    nImageId = RID_SVXBMP_GRID; break;
+            case FormComponentType::SCROLLBAR:      nImageId = RID_SVXBMP_SCROLLBAR; break;
+            case FormComponentType::SPINBUTTON:     nImageId = RID_SVXBMP_SPINBUTTON; break;
+            case FormComponentType::NAVIGATIONBAR:  nImageId = RID_SVXBMP_NAVIGATIONBAR; break;
+            default:
+                OSL_FAIL( "TabOrderDialog::GetImage: unknown control type" );
+            }
+        }
+
+        return Image(BitmapEx(PcrRes(nImageId)));;
+    }
+
+    }
 
     //= OSimpleTabModel
 
@@ -126,43 +166,6 @@ namespace pcr
         ModalDialog::dispose();
     }
 
-    Image TabOrderDialog::GetImage( const Reference< XPropertySet >& _rxSet )
-    {
-        sal_uInt16 nImageId = RID_SVXBMP_CONTROL;
-        // TODO: classify controls also in Basic propbrw
-        if ( _rxSet.is() && ::comphelper::hasProperty( PROPERTY_CLASSID, _rxSet ) )
-        {
-            switch( ::comphelper::getINT16( _rxSet->getPropertyValue( PROPERTY_CLASSID ) ) )
-            {
-            case FormComponentType::COMMANDBUTTON:  nImageId = RID_SVXBMP_BUTTON; break;
-            case FormComponentType::FIXEDTEXT:      nImageId = RID_SVXBMP_FIXEDTEXT; break;
-            case FormComponentType::TEXTFIELD:      nImageId = RID_SVXBMP_EDITBOX; break;
-            case FormComponentType::RADIOBUTTON:    nImageId = RID_SVXBMP_RADIOBUTTON; break;
-            case FormComponentType::CHECKBOX:       nImageId = RID_SVXBMP_CHECKBOX; break;
-            case FormComponentType::LISTBOX:        nImageId = RID_SVXBMP_LISTBOX; break;
-            case FormComponentType::COMBOBOX:       nImageId = RID_SVXBMP_COMBOBOX; break;
-            case FormComponentType::GROUPBOX:       nImageId = RID_SVXBMP_GROUPBOX; break;
-            case FormComponentType::IMAGEBUTTON:    nImageId = RID_SVXBMP_IMAGEBUTTON; break;
-            case FormComponentType::FILECONTROL:    nImageId = RID_SVXBMP_FILECONTROL; break;
-            case FormComponentType::HIDDENCONTROL:  nImageId = RID_SVXBMP_HIDDEN; break;
-            case FormComponentType::DATEFIELD:      nImageId = RID_SVXBMP_DATEFIELD; break;
-            case FormComponentType::TIMEFIELD:      nImageId = RID_SVXBMP_TIMEFIELD; break;
-            case FormComponentType::NUMERICFIELD:   nImageId = RID_SVXBMP_NUMERICFIELD; break;
-            case FormComponentType::CURRENCYFIELD:  nImageId = RID_SVXBMP_CURRENCYFIELD; break;
-            case FormComponentType::PATTERNFIELD:   nImageId = RID_SVXBMP_PATTERNFIELD; break;
-            case FormComponentType::IMAGECONTROL:   nImageId = RID_SVXBMP_IMAGECONTROL; break;
-            case FormComponentType::GRIDCONTROL:    nImageId = RID_SVXBMP_GRID; break;
-            case FormComponentType::SCROLLBAR:      nImageId = RID_SVXBMP_SCROLLBAR; break;
-            case FormComponentType::SPINBUTTON:     nImageId = RID_SVXBMP_SPINBUTTON; break;
-            case FormComponentType::NAVIGATIONBAR:  nImageId = RID_SVXBMP_NAVIGATIONBAR; break;
-            default:
-                OSL_FAIL( "TabOrderDialog::GetImage: unknown control type" );
-            }
-        }
-
-        return Image(BitmapEx(PcrRes(nImageId)));;
-    }
-
     void TabOrderDialog::FillList()
     {
         DBG_ASSERT( m_xTempModel.is() && m_xControlContainer.is(), "TabOrderDialog::FillList: invalid call!" );
diff --git a/extensions/source/propctrlr/taborder.hxx b/extensions/source/propctrlr/taborder.hxx
index 0c4aa9d..0db369e 100644
--- a/extensions/source/propctrlr/taborder.hxx
+++ b/extensions/source/propctrlr/taborder.hxx
@@ -83,10 +83,6 @@ namespace pcr
 
         void FillList();
 
-        static Image GetImage(
-            const css::uno::Reference< css::beans::XPropertySet > & _rxSet
-        );
-
     public:
         TabOrderDialog(
             vcl::Window* _pParent,


More information about the Libreoffice-commits mailing list