44 return std::make_unique<SwDropDownFieldType>();
55 m_aName(rSrc.
m_aName), m_aHelp(rSrc.m_aHelp), m_aToolTip(rSrc.m_aToolTip)
66 if (sSelect.isEmpty())
68 vector<OUString>::const_iterator aIt =
m_aValues.begin();
73 if (sSelect.isEmpty())
80 return std::make_unique<SwDropDownField>(*
this);
126 vector<OUString>::const_iterator aIt =
152 nWhich &= ~CONVERT_TWIPS;
205 uno::Sequence<OUString>
aSeq;
virtual std::unique_ptr< SwFieldType > Copy() const override
Create a copy of this field type.
virtual ~SwDropDownFieldType() override
Destructor.
SwDropDownFieldType()
Constructor.
void SetSelectedItem(const OUString &rItem)
Sets the selected item.
virtual OUString GetPar2() const override
Returns the name of the field.
virtual ~SwDropDownField() override
Destructor.
void SetToolTip(const OUString &rToolTip)
Sets the tool tip of the field.
void SetItems(std::vector< OUString > &&rItems)
Sets the items of the dropdown box.
OUString m_aName
the name of the field
OUString m_aHelp
help text
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId) override
API: Sets a property value on the dropdown field.
css::uno::Sequence< OUString > GetItemSequence() const
Returns the items of the dropdown box.
virtual OUString GetPar1() const override
Returns the selected value.
SwDropDownField(SwFieldType *pTyp)
Constructor.
OUString m_aSelectedItem
the selected item
const OUString & GetName() const
Returns the name of the field.
virtual void SetPar2(const OUString &rStr) override
Sets the name of the field.
virtual std::unique_ptr< SwField > Copy() const override
Creates a copy of this field.
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const override
API: Gets a property value from the dropdown field.
const OUString & GetSelectedItem() const
Returns the selected item.
void SetHelp(const OUString &rHelp)
Sets the help text of the field.
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Expands the field.
OUString m_aToolTip
tool tip string
std::vector< OUString > m_aValues
the possible values (aka items) of the dropdown box
void SetName(const OUString &rName)
Sets the name of the field.
virtual void SetPar1(const OUString &rStr) override
Sets the selected value.
Instances of SwFields and those derived from it occur 0 to n times.
Base class of all fields.
The root element of a Writer document layout.
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
Sequence< sal_Int8 > aSeq
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
DstType sequenceToContainer(const css::uno::Sequence< SrcType > &i_Sequence)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
#define FIELD_PROP_STRINGS