LibreOffice Module sw (master)
1
|
The shared part of a user field. More...
#include <usrfld.hxx>
Public Member Functions | |
SwUserFieldType (SwDoc *pDocPtr, const OUString &) | |
virtual OUString | GetName () const override |
Only in derived classes. More... | |
virtual std::unique_ptr< SwFieldType > | Copy () 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 |
![]() | |
SwDoc * | GetDoc () 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 |
![]() | |
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 |
void | PrintHiddenPara () |
SwFormatField * | FindFormatForField (const SwField *) const |
SwFormatField * | FindFormatForPostItId (sal_uInt32 nPostItId) const |
void | CollectPostIts (std::vector< SwFormatField * > &rvFormatFields, IDocumentRedlineAccess const &rIDRA, bool HideRedlines) |
bool | HasHiddenInformationNotes () const |
void | GatherNodeIndex (std::vector< sal_uLong > &rvNodeIndex) |
void | GatherRefFields (std::vector< SwGetRefField * > &rvRFields, const sal_uInt16 nTyp) |
void | GatherFields (std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const |
![]() | |
virtual void | CallSwClientNotify (const SfxHint &rHint) const override |
![]() | |
SwModify () | |
virtual | ~SwModify () override |
void | Add (SwClient *pDepend) |
SwClient * | Remove (SwClient *pDepend) |
bool | HasWriterListeners () const |
virtual bool | GetInfo (SfxPoolItem &) const override |
void | LockModify () |
void | UnlockModify () |
void | SetInCache (bool bNew) |
void | SetInDocDTOR () |
bool | IsModifyLocked () const |
bool | IsInCache () const |
void | CheckCaching (const sal_uInt16 nWhich) |
bool | HasOnlyOneListener () const |
![]() | |
SwClient () | |
SwClient (SwClient &&) noexcept | |
virtual | ~SwClient () override |
std::unique_ptr< sw::ModifyChangedHint > | CheckRegistration (const SfxPoolItem *pOldValue) |
void | CheckRegistrationFormat (SwFormat &rOld) |
const SwModify * | GetRegisteredIn () const |
SwModify * | GetRegisteredIn () |
void | EndListeningAll () |
void | StartListeningToSameModifyAs (const SwClient &) |
![]() | |
bool | IsLast () const |
![]() | |
BroadcasterMixin ()=default | |
BroadcasterMixin (BroadcasterMixin const &)=default | |
BroadcasterMixin & | operator= (const BroadcasterMixin &) |
SvtBroadcaster & | GetNotifier () |
Private Member Functions | |
virtual void | SwClientNotify (const SwModify &, const SfxHint &) override |
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... | |
OUString | m_aContentLang |
Language used by m_aContents. More... | |
sal_uInt16 | m_nType |
Additional Inherited Members | |
![]() | |
static OUString | GetTypeStr (SwFieldTypesEnum nTypeId) |
![]() | |
SwValueFieldType (SwDoc *pDocPtr, SwFieldIds nWhichId) | |
SwValueFieldType (const SwValueFieldType &rTyp) | |
![]() | |
SwFieldType (SwFieldIds nWhichId) | |
Single argument ctors shall be explicit. More... | |
![]() | |
SwClient (SwModify *pToRegisterIn) | |
SwModify * | GetRegisteredInNonConst () const |
![]() | |
WriterListener () | |
virtual | ~WriterListener () COVERITY_NOEXCEPT_FALSE |
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 34 of file usrfld.hxx.
SwUserFieldType::SwUserFieldType | ( | SwDoc * | pDocPtr, |
const OUString & | aNam | ||
) |
Definition at line 175 of file usrfld.cxx.
References SwValueFieldType::EnableFormat(), m_aName, m_bDeleted, and m_bValidValue.
Referenced by Copy().
|
overridevirtual |
Implements SwFieldType.
Definition at line 198 of file usrfld.cxx.
References SwValueFieldType::GetDoc(), m_aContent, m_aContentLang, m_aName, m_bDeleted, m_bValidValue, m_nType, m_nValue, and SwUserFieldType().
|
overridevirtual |
Reimplemented from SwFieldType.
Definition at line 370 of file usrfld.cxx.
References SwFieldType::dumpAsXml(), m_aContent, m_aContentLang, and m_nValue.
OUString SwUserFieldType::Expand | ( | sal_uInt32 | nFormat, |
sal_uInt16 | nSubType, | ||
LanguageType | nLng | ||
) |
Definition at line 186 of file usrfld.cxx.
References SwValueFieldType::EnableFormat(), SwValueFieldType::ExpandValue(), nsSwGetSetExpType::GSE_EXPR, m_aContent, m_nType, m_nValue, and nsSwExtendedSubType::SUB_CMD.
OUString SwUserFieldType::GetContent | ( | sal_uInt32 | nFormat = 0 | ) |
Definition at line 274 of file usrfld.cxx.
References SwValueFieldType::GetDoc(), SwDoc::GetNumberFormatter(), SvNumberFormatter::GetOutputString(), GetValue(), m_aContent, and SAL_MAX_UINT32.
Referenced by SwFieldInputDlg::Apply(), SwInputField::ExpandImpl(), SwFieldMgr::InsertField(), SwFieldVarPage::SubTypeHdl(), SwFieldInputDlg::SwFieldInputDlg(), and SwCalc::VarLook().
|
overridevirtual |
Only in derived classes.
Reimplemented from SwFieldType.
Definition at line 211 of file usrfld.cxx.
References m_aName.
Referenced by SwFieldVarPage::SubTypeHdl().
|
inline |
Definition at line 87 of file usrfld.hxx.
References m_nType.
Referenced by SwFieldVarPage::SubTypeHdl(), and SwCalc::VarLook().
double SwUserFieldType::GetValue | ( | SwCalc & | rCalc | ) |
Definition at line 232 of file usrfld.cxx.
References SwCalc::Calculate(), LanguageTag::getBcp47(), SwCalc::GetCharClass(), SwSbxValue::GetDouble(), CharClass::getLanguageTag(), SwCalc::IsCalcError(), m_aContent, m_aContentLang, m_bValidValue, m_nValue, SwCalc::Pop(), SwCalc::Push(), SwCalc::SetCalcError(), CharClass::setLanguageTag(), and Syntax.
Referenced by SwFormatField::UpdateTextNode(), sw::DocumentFieldsManager::UpdateUsrFields(), and SwCalc::VarLook().
|
inline |
|
inline |
Definition at line 67 of file usrfld.hxx.
|
inline |
Definition at line 78 of file usrfld.hxx.
References m_bValidValue.
Referenced by SwFormatField::UpdateTextNode(), and SwCalc::VarLook().
|
overridevirtual |
Reimplemented from SwFieldType.
Definition at line 336 of file usrfld.cxx.
References assert(), SwValueFieldType::DoubleToString(), FIELD_PROP_BOOL1, FIELD_PROP_DOUBLE, FIELD_PROP_PAR2, LanguageTag::getBcp47(), nsSwGetSetExpType::GSE_EXPR, nsSwGetSetExpType::GSE_STRING, m_aContent, m_aContentLang, m_nType, and m_nValue.
|
overridevirtual |
Reimplemented from SwFieldType.
Definition at line 318 of file usrfld.cxx.
References assert(), FIELD_PROP_BOOL1, FIELD_PROP_DOUBLE, FIELD_PROP_PAR2, nsSwGetSetExpType::GSE_EXPR, m_aContent, m_nType, and m_nValue.
void SwUserFieldType::SetContent | ( | const OUString & | rStr, |
sal_uInt32 | nFormat = 0 |
||
) |
Definition at line 290 of file usrfld.cxx.
References SwValueFieldType::DoubleToString(), LanguageTag::getBcp47(), SwValueFieldType::GetDoc(), SwDoc::getIDocumentState(), SwDoc::GetIDocumentUndoRedo(), IDocumentState::IsModified(), m_aContent, m_aContentLang, SAL_MAX_UINT32, IDocumentState::SetModified(), IDocumentUndoRedo::SetUndoNoResetModified(), and SetValue().
Referenced by SwFieldInputDlg::Apply(), SwInputField::applyFieldContent(), and SwFieldMgr::InsertField().
|
inline |
Definition at line 68 of file usrfld.hxx.
|
inline |
Definition at line 90 of file usrfld.hxx.
References SwValueFieldType::EnableFormat(), nsSwGetSetExpType::GSE_STRING, and m_nType.
Referenced by IMPL_LINK().
|
inline |
|
overrideprivatevirtual |
Reimplemented from SwModify.
Definition at line 216 of file usrfld.cxx.
References sw::BroadcastingModify::CallSwClientNotify(), SwValueFieldType::GetDoc(), SwDoc::getIDocumentFieldsAccess(), IDocumentFieldsAccess::GetSysFieldType(), Input, SwModify::IsModifyLocked(), SwModify::LockModify(), m_bValidValue, SwModify::UnlockModify(), and SwFieldType::UpdateFields().
|
private |
String value type.
Definition at line 42 of file usrfld.hxx.
Referenced by Copy(), dumpAsXml(), Expand(), GetContent(), GetValue(), PutValue(), QueryValue(), and SetContent().
|
private |
Language used by m_aContents.
Definition at line 44 of file usrfld.hxx.
Referenced by Copy(), dumpAsXml(), GetValue(), PutValue(), and SetContent().
|
private |
Definition at line 40 of file usrfld.hxx.
Referenced by Copy(), GetName(), and SwUserFieldType().
|
private |
Definition at line 37 of file usrfld.hxx.
Referenced by Copy(), and SwUserFieldType().
|
private |
Definition at line 36 of file usrfld.hxx.
Referenced by Copy(), GetValue(), IsValid(), SwClientNotify(), and SwUserFieldType().
|
private |
Definition at line 45 of file usrfld.hxx.
Referenced by Copy(), Expand(), GetType(), PutValue(), QueryValue(), and SetType().
|
private |
Float value type.
Definition at line 39 of file usrfld.hxx.
Referenced by Copy(), dumpAsXml(), Expand(), GetValue(), PutValue(), QueryValue(), and SetValue().