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

The shared part of a user field. More...

#include <usrfld.hxx>

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

Public Member Functions

 SwUserFieldType (SwDoc *pDocPtr, const OUString &)
 
virtual OUString GetName () const override
 Only in derived classes. More...
 
virtual std::unique_ptr< SwFieldTypeCopy () const override
 
OUString Expand (sal_uInt32 nFormat, sal_uInt16 nSubType, LanguageType nLng)
 
OUString GetContent (sal_uInt32 nFormat=0)
 
void SetContent (const OUString &rStr, sal_uInt32 nFormat=0)
 
bool IsValid () const
 
double GetValue (SwCalc &rCalc)
 
double GetValue () const
 
void SetValue (const double nVal)
 
sal_uInt16 GetType () const
 
void SetType (sal_uInt16)
 
bool IsDeleted () const
 
void SetDeleted (bool b)
 
virtual void QueryValue (css::uno::Any &rVal, sal_uInt16 nMId) const override
 
virtual void PutValue (const css::uno::Any &rVal, sal_uInt16 nMId) override
 
void dumpAsXml (xmlTextWriterPtr pWriter) const override
 
- Public Member Functions inherited from SwValueFieldType
SwDocGetDoc () const
 
void SetDoc (SwDoc *pNewDoc)
 
bool UseFormat () const
 
void EnableFormat (bool bFormat=true)
 
OUString ExpandValue (const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
 return value formatted as string More...
 
OUString DoubleToString (const double &rVal, LanguageType eLng) const
 
OUString DoubleToString (const double &rVal, sal_uInt32 nFormat) const
 
- Public Member Functions inherited from SwFieldType
SAL_DLLPRIVATE css::uno::WeakReference< css::beans::XPropertySet > const & GetXObject () const
 
SAL_DLLPRIVATE void SetXObject (css::uno::Reference< css::beans::XPropertySet > const &xFieldMaster)
 
SwFieldIds Which () const
 
void UpdateFields () const
 
- Public Member Functions inherited from SwModify
 SwModify ()
 
 SwModify (SwModify *pToRegisterIn)
 
void NotifyClients (const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
 
void ModifyBroadcast (const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
 
virtual void CallSwClientNotify (const SfxHint &rHint) const
 
virtual ~SwModify () override
 
void Add (SwClient *pDepend)
 
SwClientRemove (SwClient *pDepend)
 
bool HasWriterListeners () const
 
virtual bool GetInfo (SfxPoolItem &) const override
 
void LockModify ()
 
void UnlockModify ()
 
void SetInCache (bool bNew)
 
void SetInSwFntCache (bool bNew)
 
void SetInDocDTOR ()
 
bool IsModifyLocked () const
 
bool IsInCache () const
 
bool IsInSwFntCache () const
 
void CheckCaching (const sal_uInt16 nWhich)
 
bool HasOnlyOneListener () const
 
- Public Member Functions inherited from SwClient
 SwClient ()
 
 SwClient (SwClient &&) noexcept
 
virtual ~SwClient () override
 
virtual void SwClientNotify (const SwModify &, const SfxHint &rHint) override
 
std::unique_ptr< sw::ModifyChangedHintCheckRegistration (const SfxPoolItem *pOldValue)
 
virtual void ModifyNotification (const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
 
void SwClientNotifyCall (const SwModify &rModify, const SfxHint &rHint)
 
const SwModifyGetRegisteredIn () const
 
SwModifyGetRegisteredIn ()
 
void EndListeningAll ()
 
void StartListeningToSameModifyAs (const SwClient &)
 
- Public Member Functions inherited from sw::WriterListener
bool IsLast () const
 
- Public Member Functions inherited from sw::BroadcasterMixin
 BroadcasterMixin ()=default
 
 BroadcasterMixin (BroadcasterMixin const &)=default
 
BroadcasterMixinoperator= (const BroadcasterMixin &)
 
SvtBroadcasterGetNotifier ()
 

Protected Member Functions

virtual void Modify (const SfxPoolItem *pOld, const SfxPoolItem *pNew) override
 
- Protected Member Functions inherited from SwValueFieldType
 SwValueFieldType (SwDoc *pDocPtr, SwFieldIds nWhichId)
 
 SwValueFieldType (const SwValueFieldType &rTyp)
 
- Protected Member Functions inherited from SwFieldType
 SwFieldType (SwFieldIds nWhichId)
 Single argument ctors shall be explicit. More...
 
- Protected Member Functions inherited from SwClient
 SwClient (SwModify *pToRegisterIn)
 
SwModifyGetRegisteredInNonConst () const
 
- Protected Member Functions inherited from sw::WriterListener
 WriterListener ()
 
virtual ~WriterListener () COVERITY_NOEXCEPT_FALSE
 

Private Attributes

bool m_bValidValue: 1
 
bool m_bDeleted: 1
 
double m_nValue
 Float value type. More...
 
OUString m_aName
 
OUString m_aContent
 String value type. More...
 
sal_uInt16 m_nType
 

Additional Inherited Members

- Static Public Member Functions inherited from SwFieldType
static OUString GetTypeStr (SwFieldTypesEnum nTypeId)
 

Detailed Description

The shared part of a user field.

Tracks the value, but conversion between the float and string representation always happens with the system locale.

Definition at line 35 of file usrfld.hxx.

Constructor & Destructor Documentation

SwUserFieldType::SwUserFieldType ( SwDoc pDocPtr,
const OUString &  aNam 
)

Definition at line 181 of file usrfld.cxx.

References SwValueFieldType::EnableFormat(), m_aName, m_bDeleted, and m_bValidValue.

Referenced by Copy().

Member Function Documentation

std::unique_ptr< SwFieldType > SwUserFieldType::Copy ( ) const
overridevirtual
void SwUserFieldType::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual

Reimplemented from SwFieldType.

Definition at line 365 of file usrfld.cxx.

References SwFieldType::dumpAsXml(), m_aContent, and m_nValue.

OUString SwUserFieldType::Expand ( sal_uInt32  nFormat,
sal_uInt16  nSubType,
LanguageType  nLng 
)
OUString SwUserFieldType::GetContent ( sal_uInt32  nFormat = 0)
OUString SwUserFieldType::GetName ( ) const
overridevirtual

Only in derived classes.

Reimplemented from SwFieldType.

Definition at line 216 of file usrfld.cxx.

References m_aName.

Referenced by SwFieldVarPage::SubTypeHdl().

sal_uInt16 SwUserFieldType::GetType ( ) const
inline

Definition at line 86 of file usrfld.hxx.

References m_nType.

Referenced by SwFieldVarPage::SubTypeHdl(), and SwCalc::VarLook().

double SwUserFieldType::GetValue ( SwCalc rCalc)
double SwUserFieldType::GetValue ( ) const
inline

Definition at line 80 of file usrfld.hxx.

References m_nValue.

Referenced by GetContent().

bool SwUserFieldType::IsDeleted ( ) const
inline

Definition at line 66 of file usrfld.hxx.

bool SwUserFieldType::IsValid ( ) const
inline

Definition at line 77 of file usrfld.hxx.

References m_bValidValue.

Referenced by SwFormatField::Modify(), and SwCalc::VarLook().

void SwUserFieldType::Modify ( const SfxPoolItem pOld,
const SfxPoolItem pNew 
)
overrideprotectedvirtual
void SwUserFieldType::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nMId 
)
overridevirtual
void SwUserFieldType::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nMId 
) const
overridevirtual
void SwUserFieldType::SetContent ( const OUString &  rStr,
sal_uInt32  nFormat = 0 
)
void SwUserFieldType::SetDeleted ( bool  b)
inline

Definition at line 67 of file usrfld.hxx.

void SwUserFieldType::SetType ( sal_uInt16  nSub)
inline

Definition at line 89 of file usrfld.hxx.

References SwValueFieldType::EnableFormat(), nsSwGetSetExpType::GSE_STRING, and m_nType.

Referenced by IMPL_LINK().

void SwUserFieldType::SetValue ( const double  nVal)
inline

Definition at line 83 of file usrfld.hxx.

References m_nValue.

Referenced by SetContent().

Member Data Documentation

OUString SwUserFieldType::m_aContent
private

String value type.

Definition at line 43 of file usrfld.hxx.

Referenced by Copy(), dumpAsXml(), Expand(), GetContent(), GetValue(), PutValue(), QueryValue(), and SetContent().

OUString SwUserFieldType::m_aName
private

Definition at line 41 of file usrfld.hxx.

Referenced by Copy(), GetName(), and SwUserFieldType().

bool SwUserFieldType::m_bDeleted
private

Definition at line 38 of file usrfld.hxx.

Referenced by Copy(), and SwUserFieldType().

bool SwUserFieldType::m_bValidValue
private

Definition at line 37 of file usrfld.hxx.

Referenced by Copy(), GetValue(), IsValid(), Modify(), and SwUserFieldType().

sal_uInt16 SwUserFieldType::m_nType
private

Definition at line 44 of file usrfld.hxx.

Referenced by Copy(), Expand(), GetType(), PutValue(), QueryValue(), and SetType().

double SwUserFieldType::m_nValue
private

Float value type.

Definition at line 40 of file usrfld.hxx.

Referenced by Copy(), dumpAsXml(), Expand(), GetValue(), PutValue(), QueryValue(), and SetValue().


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