24#include <com/sun/star/beans/PropertyAttribute.hpp>
25#include <com/sun/star/io/XPersistObject.hpp>
26#include <com/sun/star/io/XMarkableStream.hpp>
27#include <com/sun/star/form/XFormComponent.hpp>
28#include <com/sun/star/lang/XServiceInfo.hpp>
29#include <com/sun/star/form/binding/XBindableValue.hpp>
30#include <com/sun/star/beans/XPropertyContainer.hpp>
31#include <com/sun/star/text/XText.hpp>
54using namespace ::com::sun::star::form::binding;
64 static css::uno::Sequence<OUString> aColumnTypes = []()
66 css::uno::Sequence<OUString> tmp(10);
67 OUString* pNames = tmp.getArray();
86 static constexpr OUStringLiteral aModelPrefix (
u"com.sun.star.form.component.");
87 static constexpr OUStringLiteral aCompatibleModelPrefix (
u"stardiv.one.form.component.");
89 sal_Int32 nTypeId = -1;
94 sal_Int32 nPrefixPos = aModelName.indexOf(aModelPrefix);
96 sal_Int32 nCompatiblePrefixPos = aModelName.indexOf(aCompatibleModelPrefix);
97 DBG_ASSERT( (nPrefixPos != -1) || (nCompatiblePrefixPos != -1),
98 "::getColumnTypeByModelName() : wrong service!");
101 OUString aColumnType = (nPrefixPos != -1)
102 ? aModelName.copy(aModelPrefix.getLength())
103 : aModelName.copy(aCompatibleModelPrefix.getLength());
105 const css::uno::Sequence<OUString>& rColumnTypes =
getColumnTypes();
114 return theOGridColumnImplementationId.
getSeq();
120 sal_Int64 nReturn(0);
122 if ( comphelper::isUnoTunnelId<OGridColumn>(_rIdentifier) )
128 Reference< XUnoTunnel > xAggTunnel;
130 return xAggTunnel->getSomething( _rIdentifier );
138 return css::uno::Sequence<sal_Int8>();
154 Reference< XTypeProvider > xProv;
156 aTypes.addTypes( xProv->getTypes() );
179 if (!aReturn.hasValue())
181 aReturn = OPropertySetAggregationHelper::queryInterface(_rType);
193 ,m_aHidden(
Any( false ) )
194 ,m_aModelName(
std::move(_sModelName))
201 osl_atomic_increment( &m_refCount );
204 m_xAggregate.set( _rContext->getServiceManager()->createInstanceWithContext(
m_aModelName, _rContext ), UNO_QUERY );
214 osl_atomic_decrement( &m_refCount );
247 if (!OGridColumn_BASE::rBHelper.bDisposed)
256 css::uno::Reference<css::uno::XInterface> xIface;
266 OPropertySetAggregationHelper::disposing(_rSource);
268 Reference<XEventListener> xEvtLstner;
270 xEvtLstner->disposing(_rSource);
277 OGridColumn_BASE::disposing();
278 OPropertySetAggregationHelper::disposing();
280 Reference<XComponent> xComp;
329 Sequence< Property > aNewProps( _rProps.getLength() );
330 Property* pNewProps = aNewProps.getArray();
332 const Property* pProps = _rProps.getConstArray();
333 const Property* pPropsEnd = pProps + _rProps.getLength();
334 for ( ; pProps != pPropsEnd; ++pProps )
336 if ( aForbiddenProperties.find( pProps->Name ) == aForbiddenProperties.end()
338 *pNewProps++ = *pProps;
341 aNewProps.realloc( pNewProps - aNewProps.getArray() );
348 aDescriptor.realloc(5);
349 Property* pProperties = aDescriptor.getArray();
354 css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT);
380 OPropertySetAggregationHelper::getFastPropertyValue(rValue,
nHandle);
386 sal_Int32 nHandle,
const Any& rValue )
388 bool bModified(
false);
403 sal_Int32 nAlign( 0 );
404 if ( rConvertedValue >>= nAlign )
405 rConvertedValue <<= static_cast<sal_Int16>(nAlign);
421 DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING,
"invalid type" );
449 return OPropertySetAggregationHelper::getPropertyDefaultByHandle(
nHandle);
465 Reference<XMarkableStream> xMark(_rxOutStream, UNO_QUERY);
466 sal_Int32 nMark = xMark->createMark();
469 _rxOutStream->writeLong(nLen);
471 Reference<XPersistObject> xPersist;
473 xPersist->write(_rxOutStream);
476 nLen = xMark->offsetToMark(nMark) - 4;
477 xMark->jumpToMark(nMark);
478 _rxOutStream->writeLong(nLen);
479 xMark->jumpToFurthest();
480 xMark->deleteMark(nMark);
483 _rxOutStream->writeShort(0x0002);
485 sal_uInt16 nAnyMask = 0;
486 if (
m_aWidth.getValueType().getTypeClass() == TypeClass_LONG)
489 if (
m_aAlign.getValueTypeClass() == TypeClass_SHORT)
494 _rxOutStream->writeShort(nAnyMask);
496 if (nAnyMask &
WIDTH)
498 if (nAnyMask &
ALIGN)
513 sal_Int32 nLen = _rxInStream->readLong();
516 Reference<XMarkableStream> xMark(_rxInStream, UNO_QUERY);
517 sal_Int32 nMark = xMark->createMark();
518 Reference<XPersistObject> xPersist;
520 xPersist->read(_rxInStream);
522 xMark->jumpToMark(nMark);
523 _rxInStream->skipBytes(nLen);
524 xMark->deleteMark(nMark);
528 _rxInStream->readShort();
529 sal_uInt16 nAnyMask = _rxInStream->readShort();
531 if (nAnyMask &
WIDTH)
533 sal_Int32
nValue = _rxInStream->readLong();
537 if (nAnyMask &
ALIGN)
539 sal_Int16
nValue = _rxInStream->readShort();
544 bool bValue = _rxInStream->readBoolean();
553 bool bValue = _rxInStream->readBoolean();
568 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
576 css::uno::Sequence< css::beans::Property >& _rProps,
577 css::uno::Sequence< css::beans::Property >& _rAggregateProps
580 if (m_xAggregateSet.is())
582 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
602 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
610 css::uno::Sequence< css::beans::Property >& _rProps,
611 css::uno::Sequence< css::beans::Property >& _rAggregateProps
614 if (m_xAggregateSet.is())
616 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
636 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
644 css::uno::Sequence< css::beans::Property >& _rProps,
645 css::uno::Sequence< css::beans::Property >& _rAggregateProps
648 if (m_xAggregateSet.is())
650 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
670 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
678 css::uno::Sequence< css::beans::Property >& _rProps,
679 css::uno::Sequence< css::beans::Property >& _rAggregateProps
682 if (m_xAggregateSet.is())
684 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
704 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
712 css::uno::Sequence< css::beans::Property >& _rProps,
713 css::uno::Sequence< css::beans::Property >& _rAggregateProps
716 if (m_xAggregateSet.is())
718 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
738 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
746 css::uno::Sequence< css::beans::Property >& _rProps,
747 css::uno::Sequence< css::beans::Property >& _rAggregateProps
750 if (m_xAggregateSet.is())
752 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
772 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
780 css::uno::Sequence< css::beans::Property >& _rProps,
781 css::uno::Sequence< css::beans::Property >& _rAggregateProps
784 if (m_xAggregateSet.is())
786 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
806 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
814 css::uno::Sequence< css::beans::Property >& _rProps,
815 css::uno::Sequence< css::beans::Property >& _rAggregateProps
818 if (m_xAggregateSet.is())
820 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
840 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
848 css::uno::Sequence< css::beans::Property >& _rProps,
849 css::uno::Sequence< css::beans::Property >& _rAggregateProps
852 if (m_xAggregateSet.is())
854 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
874 css::uno::Reference< css::beans::XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
882 css::uno::Sequence< css::beans::Property >& _rProps,
883 css::uno::Sequence< css::beans::Property >& _rAggregateProps
886 if (m_xAggregateSet.is())
888 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
#define TYPE_FORMATTEDFIELD
#define TYPE_NUMERICFIELD
#define TYPE_PATTERNFIELD
#define TYPE_CURRENCYFIELD
::cppu::IPropertyArrayHelper * getArrayHelper()
const css::uno::Sequence< sal_Int8 > & getSeq() const
virtual css::uno::Any SAL_CALL queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual rtl::Reference< OGridColumn > createCloneColumn() const override
CheckBoxColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
ComboBoxColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual rtl::Reference< OGridColumn > createCloneColumn() const override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
virtual rtl::Reference< OGridColumn > createCloneColumn() const override
CurrencyFieldColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
DateFieldColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual rtl::Reference< OGridColumn > createCloneColumn() const override
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
ListBoxColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual rtl::Reference< OGridColumn > createCloneColumn() const override
virtual rtl::Reference< OGridColumn > createCloneColumn() const override
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
NumericFieldColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
static css::uno::Reference< css::uno::XAggregation > createAggregateClone(const OCloneableAggregation *_pOriginal)
css::uno::Reference< css::uno::XAggregation > m_xAggregate
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual rtl::Reference< OGridColumn > createCloneColumn() const =0
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Any getPropertyDefaultByHandle(sal_Int32 nHandle) const override
virtual ~OGridColumn() override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
static void clearAggregateProperties(css::uno::Sequence< css::beans::Property > &seqProps, bool bAllowDropDown)
void write(const css::uno::Reference< css::io::XObjectOutputStream > &_rxOutStream)
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &_rType) override
virtual void SAL_CALL disposing() override
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &_rIdentifier) override
void read(const css::uno::Reference< css::io::XObjectInputStream > &_rxInStream)
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
OGridColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext, OUString _sModelName)
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
static void setOwnProperties(css::uno::Sequence< css::beans::Property > &seqProps)
virtual rtl::Reference< OGridColumn > createCloneColumn() const override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
PatternFieldColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
TextFieldColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual rtl::Reference< OGridColumn > createCloneColumn() const override
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
virtual void fillProperties(css::uno::Sequence< css::beans::Property > &_rProps, css::uno::Sequence< css::beans::Property > &_rAggregateProps) const override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual rtl::Reference< OGridColumn > createCloneColumn() const override
TimeFieldColumn(const css::uno::Reference< css::uno::XComponentContext > &_rContext)
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
a helper class which merges sequences of <type scope="css::uno">Type</type>s, so that the resulting s...
#define DBG_ASSERT(sCon, aError)
constexpr OUStringLiteral PROPERTY_TABINDEX
constexpr OUStringLiteral PROPERTY_COLUMNSERVICENAME
constexpr OUStringLiteral PROPERTY_FILLCOLOR
constexpr OUStringLiteral PROPERTY_LABEL
constexpr OUStringLiteral PROPERTY_AUTOCOMPLETE
constexpr OUStringLiteral PROPERTY_FONT_FAMILY
constexpr OUStringLiteral PROPERTY_BACKGROUNDCOLOR
constexpr OUStringLiteral PROPERTY_FONT_SLANT
constexpr OUStringLiteral PROPERTY_VERTICAL_ALIGN
constexpr OUStringLiteral PROPERTY_CONTROLLABEL
constexpr OUStringLiteral PROPERTY_ALIGN
constexpr OUStringLiteral PROPERTY_DROPDOWN
constexpr OUStringLiteral PROPERTY_FONT_WEIGHT
constexpr OUStringLiteral PROPERTY_FONT_HEIGHT
constexpr OUStringLiteral PROPERTY_FONTRELIEF
constexpr OUStringLiteral PROPERTY_FONT_UNDERLINE
constexpr OUStringLiteral PROPERTY_VSCROLL
constexpr OUStringLiteral PROPERTY_FONT_STRIKEOUT
constexpr OUStringLiteral PROPERTY_FONT_WORDLINEMODE
constexpr OUStringLiteral PROPERTY_IMAGE_URL
constexpr OUStringLiteral PROPERTY_FONTEMPHASISMARK
constexpr OUStringLiteral PROPERTY_IMAGE_POSITION
constexpr OUStringLiteral PROPERTY_PRINTABLE
constexpr OUStringLiteral PROPERTY_HSCROLL
constexpr OUStringLiteral PROPERTY_WIDTH
constexpr OUStringLiteral PROPERTY_HIDDEN
constexpr OUStringLiteral PROPERTY_TEXTCOLOR
constexpr OUStringLiteral PROPERTY_FONT_CHARSET
constexpr OUStringLiteral PROPERTY_FONT
constexpr OUStringLiteral PROPERTY_ECHO_CHAR
constexpr OUStringLiteral PROPERTY_HARDLINEBREAKS
constexpr OUStringLiteral PROPERTY_ENABLEVISIBLE
constexpr OUStringLiteral PROPERTY_LINECOLOR
constexpr OUStringLiteral PROPERTY_FONT_STYLENAME
constexpr OUStringLiteral PROPERTY_TEXTLINECOLOR
constexpr OUStringLiteral PROPERTY_MULTISELECTION
constexpr OUStringLiteral PROPERTY_BORDERCOLOR
constexpr OUStringLiteral PROPERTY_TABSTOP
constexpr OUStringLiteral PROPERTY_RICH_TEXT
constexpr OUStringLiteral PROPERTY_FONT_NAME
constexpr OUStringLiteral PROPERTY_BORDER
bool getBOOL(const Any &_rAny)
bool query_aggregation(const css::uno::Reference< css::uno::XAggregation > &_rxAggregate, css::uno::Reference< iface > &_rxOut)
sal_Int16 getINT16(const Any &_rAny)
sal_Int64 getSomething_cast(void *p)
bool tryPropertyValue(Any &_rConvertedValue, Any &_rOldValue, const Any &_rValueToSet, const Any &_rCurrentValue, const Type &_rExpectedType)
sal_Int32 getINT32(const Any &_rAny)
bool isAssignableFrom(const Type &_rAssignable, const Type &_rFrom)
sal_Int32 findPos(const OUString &aStr, const css::uno::Sequence< OUString > &rList)
ListBox is a bit confusing / different from other form components, so here are a few notes:
const sal_uInt16 OLD_HIDDEN
const sal_uInt16 COMPATIBLE_HIDDEN
const css::uno::Sequence< OUString > & getColumnTypes()
sal_Int32 getColumnTypeByModelName(const OUString &aModelName)
#define PROPERTY_ID_COLUMNSERVICENAME
#define PROPERTY_ID_LABEL
#define PROPERTY_ID_WIDTH
#define PROPERTY_ID_HIDDEN
#define PROPERTY_ID_ALIGN
constexpr OUStringLiteral FRM_SUN_COMPONENT_TIMEFIELD
constexpr OUStringLiteral FRM_SUN_COMPONENT_CURRENCYFIELD
constexpr OUStringLiteral FRM_SUN_COMPONENT_COMBOBOX
constexpr OUStringLiteral FRM_SUN_COMPONENT_FORMATTEDFIELD
constexpr OUStringLiteral FRM_SUN_COMPONENT_PATTERNFIELD
constexpr OUStringLiteral FRM_SUN_COMPONENT_CHECKBOX
constexpr OUStringLiteral FRM_SUN_COMPONENT_LISTBOX
constexpr OUStringLiteral FRM_SUN_COMPONENT_NUMERICFIELD
constexpr OUStringLiteral FRM_SUN_COMPONENT_TEXTFIELD
constexpr OUStringLiteral FRM_COMPONENT_EDIT
constexpr OUStringLiteral FRM_SUN_COMPONENT_DATEFIELD