21#include <com/sun/star/form/FormComponentType.hpp>
22#include <com/sun/star/lang/XServiceInfo.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <osl/diagnose.h>
45 case FormComponentType::TEXTFIELD:
49 sClassName =
PcrRes(RID_STR_PROPTITLE_EDIT);
52 Reference< XServiceInfo > xInfo(xIFace, UNO_QUERY);
54 sClassName =
PcrRes(RID_STR_PROPTITLE_FORMATTED);
58 Reference< XPropertySet > xProps(xIFace, UNO_QUERY);
61 Reference< XPropertySetInfo > xPropsInfo = xProps->getPropertySetInfo();
63 sClassName =
PcrRes(RID_STR_PROPTITLE_FORMATTED);
70 case FormComponentType::COMMANDBUTTON:
71 sClassName =
PcrRes(RID_STR_PROPTITLE_PUSHBUTTON);
break;
72 case FormComponentType::RADIOBUTTON:
73 sClassName =
PcrRes(RID_STR_PROPTITLE_RADIOBUTTON);
break;
74 case FormComponentType::CHECKBOX:
75 sClassName =
PcrRes(RID_STR_PROPTITLE_CHECKBOX);
break;
76 case FormComponentType::LISTBOX:
77 sClassName =
PcrRes(RID_STR_PROPTITLE_LISTBOX);
break;
78 case FormComponentType::COMBOBOX:
79 sClassName =
PcrRes(RID_STR_PROPTITLE_COMBOBOX);
break;
80 case FormComponentType::GROUPBOX:
81 sClassName =
PcrRes(RID_STR_PROPTITLE_GROUPBOX);
break;
82 case FormComponentType::IMAGEBUTTON:
83 sClassName =
PcrRes(RID_STR_PROPTITLE_IMAGEBUTTON);
break;
84 case FormComponentType::FIXEDTEXT:
85 sClassName =
PcrRes(RID_STR_PROPTITLE_FIXEDTEXT);
break;
86 case FormComponentType::GRIDCONTROL:
87 sClassName =
PcrRes(RID_STR_PROPTITLE_DBGRID);
break;
88 case FormComponentType::FILECONTROL:
89 sClassName =
PcrRes(RID_STR_PROPTITLE_FILECONTROL);
break;
91 case FormComponentType::DATEFIELD:
92 sClassName =
PcrRes(RID_STR_PROPTITLE_DATEFIELD);
break;
93 case FormComponentType::TIMEFIELD:
94 sClassName =
PcrRes(RID_STR_PROPTITLE_TIMEFIELD);
break;
95 case FormComponentType::NUMERICFIELD:
96 sClassName =
PcrRes(RID_STR_PROPTITLE_NUMERICFIELD);
break;
97 case FormComponentType::CURRENCYFIELD:
98 sClassName =
PcrRes(RID_STR_PROPTITLE_CURRENCYFIELD);
break;
99 case FormComponentType::PATTERNFIELD:
100 sClassName =
PcrRes(RID_STR_PROPTITLE_PATTERNFIELD);
break;
101 case FormComponentType::IMAGECONTROL:
102 sClassName =
PcrRes(RID_STR_PROPTITLE_IMAGECONTROL);
break;
103 case FormComponentType::HIDDENCONTROL:
104 sClassName =
PcrRes(RID_STR_PROPTITLE_HIDDENCONTROL);
break;
106 case FormComponentType::CONTROL:
108 sClassName =
PcrRes(RID_STR_PROPTITLE_UNKNOWNCONTROL);
break;
117 Reference< XPropertySet > xComponentProps( _rxComponent, UNO_QUERY_THROW );
118 Reference< XPropertySetInfo > xPSI( xComponentProps->getPropertySetInfo(), UNO_SET_THROW );
120 sal_Int16 nControlType( FormComponentType::CONTROL );
123 OSL_VERIFY( xComponentProps->getPropertyValue(
PROPERTY_CLASSID ) >>= nControlType );
a property handler for any virtual string properties
sal_Int16 classifyComponent(const Reference< XInterface > &_rxComponent)
OUString PcrRes(TranslateId aId)
OUString GetUIHeadlineName(sal_Int16 nClassId, const Any &aUnoObj)