LibreOffice Module sw (master) 1
Public Member Functions | Private Attributes | List of all members
SwContentControl Class Reference

Stores the properties of a content control. More...

#include <formatcontentcontrol.hxx>

Inheritance diagram for SwContentControl:
[legend]
Collaboration diagram for SwContentControl:
[legend]

Public Member Functions

SwTextContentControlGetTextAttr () const
 
SwTextNodeGetTextNode () const
 
SwFormatContentControlGetFormatContentControl () const
 
void SetFormatContentControl (SwFormatContentControl *pFormat)
 
void NotifyChangeTextNode (SwTextNode *pTextNode)
 
const css::uno::WeakReference< css::text::XTextContent > & GetXContentControl () const
 
void SetXContentControl (const css::uno::Reference< css::text::XTextContent > &xContentCnotrol)
 
virtual void SwClientNotify (const SwModify &, const SfxHint &) override
 
 SwContentControl (SwFormatContentControl *pFormat)
 
virtual ~SwContentControl () override
 
void SetShowingPlaceHolder (bool bShowingPlaceHolder)
 
bool GetShowingPlaceHolder () const
 
void SetCheckbox (bool bCheckbox)
 
bool GetCheckbox () const
 
void SetChecked (bool bChecked)
 
bool GetChecked () const
 
void SetCheckedState (const OUString &rCheckedState)
 
OUString GetCheckedState () const
 
void SetUncheckedState (const OUString &rUncheckedState)
 
OUString GetUncheckedState () const
 
std::vector< SwContentControlListItemGetListItems () const
 
bool HasListItems () const
 
void SetListItems (const std::vector< SwContentControlListItem > &rListItems)
 
void SetPicture (bool bPicture)
 
bool GetPicture () const
 
void SetDate (bool bDate)
 
bool GetDate () const
 
void SetDateFormat (const OUString &rDateFormat)
 
OUString GetDateFormat () const
 
void SetDateLanguage (const OUString &rDateLanguage)
 
OUString GetDateLanguage () const
 
void SetCurrentDate (const OUString &rCurrentDate)
 
OUString GetCurrentDate () const
 
void SetCurrentDateValue (double fCurrentDate)
 Formats fCurrentDate and sets it. More...
 
double GetCurrentDateValue () const
 Parses m_aCurrentDate and returns it. More...
 
OUString GetDateString () const
 Formats m_oSelectedDate, taking m_aDateFormat and m_aDateLanguage into account. More...
 
void SetPlaceholderDocPart (const OUString &rPlaceholderDocPart)
 
OUString GetPlaceholderDocPart () const
 
void SetSelectedListItem (std::optional< size_t > oSelectedListItem)
 
std::optional< size_t > GetSelectedListItem () const
 
void SetSelectedDate (std::optional< double > oSelectedDate)
 
std::optional< double > GetSelectedDate () const
 
void dumpAsXml (xmlTextWriterPtr pWriter) const
 
void SetDataBindingPrefixMappings (const OUString &rDataBindingPrefixMappings)
 
OUString GetDataBindingPrefixMappings () const
 
void SetDataBindingXpath (const OUString &rDataBindingXpath)
 
OUString GetDataBindingXpath () const
 
void SetDataBindingStoreItemID (const OUString &rDataBindingStoreItemID)
 
OUString GetDataBindingStoreItemID () const
 
void SetColor (const OUString &rColor)
 
OUString GetColor () const
 
void SetReadWrite (bool bReadWrite)
 
bool GetReadWrite () const
 
- Public Member Functions inherited from sw::BroadcastingModify
virtual void CallSwClientNotify (const SfxHint &rHint) const override
 
- Public Member Functions inherited from SwModify
 SwModify ()
 
virtual void CallSwClientNotify (const SfxHint &rHint) const
 
virtual ~SwModify () override
 
void Add (SwClient *pDepend)
 
SwClientRemove (SwClient *pDepend)
 
bool HasWriterListeners () const
 
bool HasOnlyOneListener () const
 
virtual bool GetInfo (SfxPoolItem &) const override
 
void LockModify ()
 
void UnlockModify ()
 
bool IsModifyLocked () const
 
- Public Member Functions inherited from SwClient
 SwClient ()
 
 SwClient (SwClient &&) noexcept
 
virtual ~SwClient () override
 
std::optional< sw::ModifyChangedHintCheckRegistration (const SfxPoolItem *pOldValue)
 
void CheckRegistrationFormat (SwFormat &rOld)
 
const SwModifyGetRegisteredIn () const
 
SwModifyGetRegisteredIn ()
 
void EndListeningAll ()
 
void StartListeningToSameModifyAs (const SwClient &)
 
virtual bool GetInfo (SfxPoolItem &) const
 
- Public Member Functions inherited from sw::WriterListener
bool IsLast () const
 
virtual const SwCellFrameDynCastCellFrame () const
 
virtual const SwTabFrameDynCastTabFrame () const
 
virtual const SwRowFrameDynCastRowFrame () const
 
- Public Member Functions inherited from sw::BroadcasterMixin
 BroadcasterMixin ()=default
 
 BroadcasterMixin (BroadcasterMixin const &)=default
 
BroadcasterMixinoperator= (const BroadcasterMixin &)
 
SvtBroadcasterGetNotifier ()
 

Private Attributes

css::uno::WeakReference< css::text::XTextContent > m_wXContentControl
 
SwFormatContentControlm_pFormat
 
SwTextNodem_pTextNode
 Can be nullptr if not in a document for undo purposes. More...
 
bool m_bShowingPlaceHolder = false
 Current content is placeholder text. More...
 
bool m_bCheckbox = false
 Display the content control as a checkbox. More...
 
bool m_bChecked = false
 If m_bCheckbox is true, is the checkbox checked? More...
 
OUString m_aCheckedState
 If m_bCheckbox is true, the value of a checked checkbox. More...
 
OUString m_aUncheckedState
 If m_bCheckbox is true, the value of an unchecked checkbox. More...
 
std::vector< SwContentControlListItemm_aListItems
 
bool m_bPicture = false
 
bool m_bDate = false
 
OUString m_aDateFormat
 If m_bDate is true, the date format in a syntax accepted by SvNumberFormatter::PutEntry(). More...
 
OUString m_aDateLanguage
 If m_bDate is true, the date's BCP 47 language tag. More...
 
OUString m_aCurrentDate
 Date in YYYY-MM-DDT00:00:00Z format. More...
 
OUString m_aPlaceholderDocPart
 The placeholder's doc part: just remembered. More...
 
OUString m_aDataBindingPrefixMappings
 The data bindings's prefix mappings: just remembered. More...
 
OUString m_aDataBindingXpath
 The data bindings's XPath: just remembered. More...
 
OUString m_aDataBindingStoreItemID
 The data bindings's store item ID: just remembered. More...
 
OUString m_aColor
 The color: just remembered. More...
 
std::optional< size_t > m_oSelectedListItem
 Stores a list item index, in case the doc model is not yet updated. More...
 
std::optional< double > m_oSelectedDate
 Stores a date timestamp, in case the doc model is not yet updated. More...
 
bool m_bReadWrite = false
 E.g. More...
 

Additional Inherited Members

virtual void SwClientNotify (const SwModify &, const SfxHint &rHint) override
 
- Protected Member Functions inherited from SwClient
 SwClient (SwModify *pToRegisterIn)
 
SwModifyGetRegisteredInNonConst () const
 
virtual void SwClientNotify (const SwModify &, const SfxHint &rHint) override
 
- Protected Member Functions inherited from sw::WriterListener
 WriterListener ()
 
virtual ~WriterListener () COVERITY_NOEXCEPT_FALSE
 
virtual void SwClientNotify (const SwModify &, const SfxHint &rHint)=0
 

Detailed Description

Stores the properties of a content control.

Definition at line 103 of file formatcontentcontrol.hxx.

Constructor & Destructor Documentation

◆ SwContentControl()

SwContentControl::SwContentControl ( SwFormatContentControl pFormat)
explicit

Definition at line 168 of file attrcontentcontrol.cxx.

◆ ~SwContentControl()

SwContentControl::~SwContentControl ( )
overridevirtual

Definition at line 175 of file attrcontentcontrol.cxx.

Member Function Documentation

◆ dumpAsXml()

void SwContentControl::dumpAsXml ( xmlTextWriterPtr  pWriter) const

◆ GetCheckbox()

bool SwContentControl::GetCheckbox ( ) const
inline

Definition at line 205 of file formatcontentcontrol.hxx.

◆ GetChecked()

bool SwContentControl::GetChecked ( ) const
inline

Definition at line 209 of file formatcontentcontrol.hxx.

◆ GetCheckedState()

OUString SwContentControl::GetCheckedState ( ) const
inline

Definition at line 213 of file formatcontentcontrol.hxx.

◆ GetColor()

OUString SwContentControl::GetColor ( ) const
inline

Definition at line 300 of file formatcontentcontrol.hxx.

References m_aColor.

◆ GetCurrentDate()

OUString SwContentControl::GetCurrentDate ( ) const
inline

Definition at line 246 of file formatcontentcontrol.hxx.

◆ GetCurrentDateValue()

double SwContentControl::GetCurrentDateValue ( ) const

◆ GetDataBindingPrefixMappings()

OUString SwContentControl::GetDataBindingPrefixMappings ( ) const
inline

Definition at line 282 of file formatcontentcontrol.hxx.

◆ GetDataBindingStoreItemID()

OUString SwContentControl::GetDataBindingStoreItemID ( ) const
inline

Definition at line 296 of file formatcontentcontrol.hxx.

◆ GetDataBindingXpath()

OUString SwContentControl::GetDataBindingXpath ( ) const
inline

Definition at line 289 of file formatcontentcontrol.hxx.

◆ GetDate()

bool SwContentControl::GetDate ( ) const
inline

Definition at line 234 of file formatcontentcontrol.hxx.

◆ GetDateFormat()

OUString SwContentControl::GetDateFormat ( ) const
inline

Definition at line 238 of file formatcontentcontrol.hxx.

◆ GetDateLanguage()

OUString SwContentControl::GetDateLanguage ( ) const
inline

Definition at line 242 of file formatcontentcontrol.hxx.

◆ GetDateString()

OUString SwContentControl::GetDateString ( ) const

◆ GetFormatContentControl()

SwFormatContentControl * SwContentControl::GetFormatContentControl ( ) const
inline

Definition at line 174 of file formatcontentcontrol.hxx.

◆ GetListItems()

std::vector< SwContentControlListItem > SwContentControl::GetListItems ( ) const
inline

Definition at line 219 of file formatcontentcontrol.hxx.

◆ GetPicture()

bool SwContentControl::GetPicture ( ) const
inline

Definition at line 230 of file formatcontentcontrol.hxx.

◆ GetPlaceholderDocPart()

OUString SwContentControl::GetPlaceholderDocPart ( ) const
inline

Definition at line 262 of file formatcontentcontrol.hxx.

◆ GetReadWrite()

bool SwContentControl::GetReadWrite ( ) const
inline

Definition at line 304 of file formatcontentcontrol.hxx.

◆ GetSelectedDate()

std::optional< double > SwContentControl::GetSelectedDate ( ) const
inline

Definition at line 273 of file formatcontentcontrol.hxx.

◆ GetSelectedListItem()

std::optional< size_t > SwContentControl::GetSelectedListItem ( ) const
inline

Definition at line 269 of file formatcontentcontrol.hxx.

◆ GetShowingPlaceHolder()

bool SwContentControl::GetShowingPlaceHolder ( ) const
inline

Definition at line 201 of file formatcontentcontrol.hxx.

◆ GetTextAttr()

SwTextContentControl * SwContentControl::GetTextAttr ( ) const

◆ GetTextNode()

SwTextNode * SwContentControl::GetTextNode ( ) const
inline

Definition at line 172 of file formatcontentcontrol.hxx.

Referenced by SwXContentControl::SetContentRange().

◆ GetUncheckedState()

OUString SwContentControl::GetUncheckedState ( ) const
inline

Definition at line 217 of file formatcontentcontrol.hxx.

◆ GetXContentControl()

const css::uno::WeakReference< css::text::XTextContent > & SwContentControl::GetXContentControl ( ) const
inline

Definition at line 180 of file formatcontentcontrol.hxx.

◆ HasListItems()

bool SwContentControl::HasListItems ( ) const
inline

Definition at line 221 of file formatcontentcontrol.hxx.

◆ NotifyChangeTextNode()

void SwContentControl::NotifyChangeTextNode ( SwTextNode pTextNode)

◆ SetCheckbox()

void SwContentControl::SetCheckbox ( bool  bCheckbox)
inline

Definition at line 203 of file formatcontentcontrol.hxx.

◆ SetChecked()

void SwContentControl::SetChecked ( bool  bChecked)
inline

Definition at line 207 of file formatcontentcontrol.hxx.

◆ SetCheckedState()

void SwContentControl::SetCheckedState ( const OUString &  rCheckedState)
inline

Definition at line 211 of file formatcontentcontrol.hxx.

◆ SetColor()

void SwContentControl::SetColor ( const OUString &  rColor)
inline

Definition at line 298 of file formatcontentcontrol.hxx.

References m_aColor.

◆ SetCurrentDate()

void SwContentControl::SetCurrentDate ( const OUString &  rCurrentDate)
inline

Definition at line 244 of file formatcontentcontrol.hxx.

◆ SetCurrentDateValue()

void SwContentControl::SetCurrentDateValue ( double  fCurrentDate)

◆ SetDataBindingPrefixMappings()

void SwContentControl::SetDataBindingPrefixMappings ( const OUString &  rDataBindingPrefixMappings)
inline

Definition at line 277 of file formatcontentcontrol.hxx.

◆ SetDataBindingStoreItemID()

void SwContentControl::SetDataBindingStoreItemID ( const OUString &  rDataBindingStoreItemID)
inline

Definition at line 291 of file formatcontentcontrol.hxx.

◆ SetDataBindingXpath()

void SwContentControl::SetDataBindingXpath ( const OUString &  rDataBindingXpath)
inline

Definition at line 284 of file formatcontentcontrol.hxx.

◆ SetDate()

void SwContentControl::SetDate ( bool  bDate)
inline

Definition at line 232 of file formatcontentcontrol.hxx.

◆ SetDateFormat()

void SwContentControl::SetDateFormat ( const OUString &  rDateFormat)
inline

Definition at line 236 of file formatcontentcontrol.hxx.

◆ SetDateLanguage()

void SwContentControl::SetDateLanguage ( const OUString &  rDateLanguage)
inline

Definition at line 240 of file formatcontentcontrol.hxx.

◆ SetFormatContentControl()

void SwContentControl::SetFormatContentControl ( SwFormatContentControl pFormat)
inline

Definition at line 176 of file formatcontentcontrol.hxx.

◆ SetListItems()

void SwContentControl::SetListItems ( const std::vector< SwContentControlListItem > &  rListItems)
inline

Definition at line 223 of file formatcontentcontrol.hxx.

◆ SetPicture()

void SwContentControl::SetPicture ( bool  bPicture)
inline

Definition at line 228 of file formatcontentcontrol.hxx.

◆ SetPlaceholderDocPart()

void SwContentControl::SetPlaceholderDocPart ( const OUString &  rPlaceholderDocPart)
inline

Definition at line 257 of file formatcontentcontrol.hxx.

◆ SetReadWrite()

void SwContentControl::SetReadWrite ( bool  bReadWrite)
inline

Definition at line 302 of file formatcontentcontrol.hxx.

◆ SetSelectedDate()

void SwContentControl::SetSelectedDate ( std::optional< double >  oSelectedDate)
inline

Definition at line 271 of file formatcontentcontrol.hxx.

◆ SetSelectedListItem()

void SwContentControl::SetSelectedListItem ( std::optional< size_t >  oSelectedListItem)
inline

Definition at line 264 of file formatcontentcontrol.hxx.

◆ SetShowingPlaceHolder()

void SwContentControl::SetShowingPlaceHolder ( bool  bShowingPlaceHolder)
inline

Definition at line 196 of file formatcontentcontrol.hxx.

◆ SetUncheckedState()

void SwContentControl::SetUncheckedState ( const OUString &  rUncheckedState)
inline

Definition at line 215 of file formatcontentcontrol.hxx.

◆ SetXContentControl()

void SwContentControl::SetXContentControl ( const css::uno::Reference< css::text::XTextContent > &  xContentCnotrol)
inline

Definition at line 185 of file formatcontentcontrol.hxx.

Referenced by SwClientNotify().

◆ SwClientNotify()

void SwContentControl::SwClientNotify ( const SwModify ,
const SfxHint rHint 
)
overridevirtual

Member Data Documentation

◆ m_aCheckedState

OUString SwContentControl::m_aCheckedState
private

If m_bCheckbox is true, the value of a checked checkbox.

Definition at line 122 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_aColor

OUString SwContentControl::m_aColor
private

The color: just remembered.

Definition at line 155 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_aCurrentDate

OUString SwContentControl::m_aCurrentDate
private

Date in YYYY-MM-DDT00:00:00Z format.

Definition at line 140 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml(), GetCurrentDateValue(), and SetCurrentDateValue().

◆ m_aDataBindingPrefixMappings

OUString SwContentControl::m_aDataBindingPrefixMappings
private

The data bindings's prefix mappings: just remembered.

Definition at line 146 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_aDataBindingStoreItemID

OUString SwContentControl::m_aDataBindingStoreItemID
private

The data bindings's store item ID: just remembered.

Definition at line 152 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_aDataBindingXpath

OUString SwContentControl::m_aDataBindingXpath
private

The data bindings's XPath: just remembered.

Definition at line 149 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_aDateFormat

OUString SwContentControl::m_aDateFormat
private

If m_bDate is true, the date format in a syntax accepted by SvNumberFormatter::PutEntry().

Definition at line 134 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml(), and GetDateString().

◆ m_aDateLanguage

OUString SwContentControl::m_aDateLanguage
private

If m_bDate is true, the date's BCP 47 language tag.

Definition at line 137 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml(), and GetDateString().

◆ m_aListItems

std::vector<SwContentControlListItem> SwContentControl::m_aListItems
private

Definition at line 127 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_aPlaceholderDocPart

OUString SwContentControl::m_aPlaceholderDocPart
private

The placeholder's doc part: just remembered.

Definition at line 143 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_aUncheckedState

OUString SwContentControl::m_aUncheckedState
private

If m_bCheckbox is true, the value of an unchecked checkbox.

Definition at line 125 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_bCheckbox

bool SwContentControl::m_bCheckbox = false
private

Display the content control as a checkbox.

Definition at line 116 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_bChecked

bool SwContentControl::m_bChecked = false
private

If m_bCheckbox is true, is the checkbox checked?

Definition at line 119 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_bDate

bool SwContentControl::m_bDate = false
private

Definition at line 131 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_bPicture

bool SwContentControl::m_bPicture = false
private

Definition at line 129 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_bReadWrite

bool SwContentControl::m_bReadWrite = false
private

E.g.

checkbox is read-only by default, but we still update contents on interaction internally. This flag is true for the duration of that interaction.

Definition at line 167 of file formatcontentcontrol.hxx.

◆ m_bShowingPlaceHolder

bool SwContentControl::m_bShowingPlaceHolder = false
private

Current content is placeholder text.

Definition at line 113 of file formatcontentcontrol.hxx.

Referenced by dumpAsXml().

◆ m_oSelectedDate

std::optional<double> SwContentControl::m_oSelectedDate
private

Stores a date timestamp, in case the doc model is not yet updated.

Definition at line 161 of file formatcontentcontrol.hxx.

Referenced by GetDateString().

◆ m_oSelectedListItem

std::optional<size_t> SwContentControl::m_oSelectedListItem
private

Stores a list item index, in case the doc model is not yet updated.

Definition at line 158 of file formatcontentcontrol.hxx.

◆ m_pFormat

SwFormatContentControl* SwContentControl::m_pFormat
private

Definition at line 107 of file formatcontentcontrol.hxx.

Referenced by GetTextAttr().

◆ m_pTextNode

SwTextNode* SwContentControl::m_pTextNode
private

Can be nullptr if not in a document for undo purposes.

Definition at line 110 of file formatcontentcontrol.hxx.

Referenced by GetCurrentDateValue(), GetDateString(), NotifyChangeTextNode(), and SetCurrentDateValue().

◆ m_wXContentControl

css::uno::WeakReference<css::text::XTextContent> SwContentControl::m_wXContentControl
private

Definition at line 105 of file formatcontentcontrol.hxx.


The documentation for this class was generated from the following files: