26#include <com/sun/star/beans/PropertyAttribute.hpp>
27#include <com/sun/star/form/FormComponentType.hpp>
45 :OControlModel(_rxFactory, OUString())
47 m_nClassId = FormComponentType::HIDDENCONTROL;
51OHiddenModel::OHiddenModel(
const OHiddenModel* _pOriginal,
const Reference<XComponentContext>& _rxFactory )
52 :OControlModel( _pOriginal, _rxFactory )
54 m_sHiddenValue = _pOriginal->m_sHiddenValue;
58OHiddenModel::~OHiddenModel( )
63css::uno::Reference< css::util::XCloneable > SAL_CALL OHiddenModel::createClone()
66 pClone->clonedFrom(
this);
71void OHiddenModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle)
const
77 OControlModel::getFastPropertyValue(_rValue, _nHandle);
82void OHiddenModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle,
const Any& _rValue)
87 DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_STRING,
"OHiddenModel::setFastPropertyValue_NoBroadcast : invalid type !" );
88 _rValue >>= m_sHiddenValue;
91 OControlModel::setFastPropertyValue_NoBroadcast(_nHandle, _rValue);
96sal_Bool OHiddenModel::convertFastPropertyValue(
97 Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle,
const Any& _rValue)
99 bool bModified(
false);
103 bModified =
tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_sHiddenValue);
106 bModified = OControlModel::convertFastPropertyValue(_rConvertedValue, _rOldValue, _nHandle, _rValue);
113void OHiddenModel::describeFixedProperties( Sequence< Property >& _rProps )
const
116 css::beans::Property* pProperties = _rProps.getArray();
121 DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(),
"<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?");
126css::uno::Sequence<OUString> SAL_CALL OHiddenModel::getSupportedServiceNames()
128 return css::uno::Sequence<OUString>{
134OUString SAL_CALL OHiddenModel::getServiceName()
140void SAL_CALL OHiddenModel::write(
const Reference<XObjectOutputStream>& _rxOutStream)
143 _rxOutStream->writeShort(0x0002);
146 _rxOutStream << m_sHiddenValue;
148 OControlModel::write(_rxOutStream);
152void SAL_CALL OHiddenModel::read(
const Reference<XObjectInputStream>& _rxInStream)
155 sal_uInt16
nVersion = _rxInStream->readShort();
161 case 1 : { OUString sDummy; _rxInStream >> sDummy; _rxInStream >> m_sHiddenValue; }
break;
162 case 2 : _rxInStream >> m_sHiddenValue;
break;
163 default : OSL_FAIL(
"OHiddenModel::read : unknown version !"); m_sHiddenValue.clear();
165 OControlModel::read(_rxInStream);
170extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
172 css::uno::Sequence<css::uno::Any>
const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_form_OHiddenModel_get_implementation(css::uno::XComponentContext *component, css::uno::Sequence< css::uno::Any > const &)
OHiddenModel(const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
#define DBG_ASSERT(sCon, aError)
constexpr OUStringLiteral PROPERTY_NAME
constexpr OUStringLiteral PROPERTY_HIDDEN_VALUE
constexpr OUStringLiteral PROPERTY_CLASSID
constexpr OUStringLiteral PROPERTY_TAG
bool tryPropertyValue(Any &_rConvertedValue, Any &_rOldValue, const Any &_rValueToSet, const Any &_rCurrentValue, const Type &_rExpectedType)
ListBox is a bit confusing / different from other form components, so here are a few notes:
#define PROPERTY_ID_CLASSID
#define PROPERTY_ID_HIDDEN_VALUE
constexpr OUStringLiteral FRM_SUN_FORMCOMPONENT
constexpr OUStringLiteral FRM_COMPONENT_HIDDEN
constexpr OUStringLiteral FRM_SUN_COMPONENT_HIDDENCONTROL
constexpr OUStringLiteral FRM_COMPONENT_HIDDENCONTROL