Kaydet (Commit) 87d1657d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:staticmethods

Change-Id: I04d3095c657deb72a20fa803964912cf6baf268b
üst 20bd8d04
...@@ -40,6 +40,46 @@ namespace pcr ...@@ -40,6 +40,46 @@ namespace pcr
using namespace ::com::sun::star::beans; using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::datatransfer; 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 //= OSimpleTabModel
...@@ -126,43 +166,6 @@ namespace pcr ...@@ -126,43 +166,6 @@ namespace pcr
ModalDialog::dispose(); 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() void TabOrderDialog::FillList()
{ {
DBG_ASSERT( m_xTempModel.is() && m_xControlContainer.is(), "TabOrderDialog::FillList: invalid call!" ); DBG_ASSERT( m_xTempModel.is() && m_xControlContainer.is(), "TabOrderDialog::FillList: invalid call!" );
......
...@@ -83,10 +83,6 @@ namespace pcr ...@@ -83,10 +83,6 @@ namespace pcr
void FillList(); void FillList();
static Image GetImage(
const css::uno::Reference< css::beans::XPropertySet > & _rxSet
);
public: public:
TabOrderDialog( TabOrderDialog(
vcl::Window* _pParent, vcl::Window* _pParent,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment