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) const |
void | SetContent (const OUString &rStr, sal_uInt32 nFormat=0) |
OUString | GetInputOrDateTime (sal_uInt32 nFormat) const |
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 | EnsureValid () |
void | dumpAsXml (xmlTextWriterPtr pWriter) const override |
Public Member Functions inherited from SwValueFieldType | |
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 |
OUString | GetInputOrDateTime (const OUString &rInput, const double &rVal, sal_uInt32 nFormat) const |
Query input or formatted value for dialog. More... | |
Public Member Functions inherited from SwFieldType | |
unotools::WeakReference< SwXFieldMaster > const & | GetXObject () const |
void | SetXObject (rtl::Reference< SwXFieldMaster > const &xFieldMaster) |
virtual OUString | GetName () const |
Only in derived classes. More... | |
virtual std::unique_ptr< SwFieldType > | Copy () const =0 |
virtual void | QueryValue (css::uno::Any &rVal, sal_uInt16 nWhich) const |
virtual void | PutValue (const css::uno::Any &rVal, sal_uInt16 nWhich) |
SwFieldIds | Which () const |
void | PrintHiddenPara () |
virtual void | dumpAsXml (xmlTextWriterPtr pWriter) const |
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< SwNodeOffset > &rvNodeIndex) |
void | GatherRefFields (std::vector< SwGetRefField * > &rvRFields, const sal_uInt16 nTyp) |
void | GatherFields (std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const |
void | GatherDdeTables (std::vector< SwDDETable * > &rvTables) const |
void | UpdateDocPos (const SwTwips nDocPos) |
virtual void | UpdateFields () |
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 Public Member Functions inherited from SwFieldType | |
static const OUString & | GetTypeStr (SwFieldTypesEnum nTypeId) |
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... | |
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 176 of file usrfld.cxx.
References SwValueFieldType::EnableFormat(), m_aName, m_bDeleted, and m_bValidValue.
Referenced by Copy().
|
overridevirtual |
Implements SwFieldType.
Definition at line 199 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 387 of file usrfld.cxx.
References SwFieldType::dumpAsXml(), m_aContent, m_aContentLang, and m_nValue.
void SwUserFieldType::EnsureValid | ( | ) |
Definition at line 379 of file usrfld.cxx.
References SwValueFieldType::GetDoc(), GetValue(), and IsValid().
OUString SwUserFieldType::Expand | ( | sal_uInt32 | nFormat, |
sal_uInt16 | nSubType, | ||
LanguageType | nLng | ||
) |
Definition at line 187 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 | ) | const |
Definition at line 283 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().
OUString SwUserFieldType::GetInputOrDateTime | ( | sal_uInt32 | nFormat | ) | const |
Definition at line 278 of file usrfld.cxx.
References GetInputOrDateTime(), GetValue(), and m_aContent.
Referenced by GetInputOrDateTime(), and SwFieldVarPage::SubTypeHdl().
|
overridevirtual |
Only in derived classes.
Reimplemented from SwFieldType.
Definition at line 212 of file usrfld.cxx.
References m_aName.
Referenced by SwFieldVarPage::SubTypeHdl().
|
inline |
Definition at line 90 of file usrfld.hxx.
References m_nType.
Referenced by SwXTextField::attach(), SwFieldVarPage::SubTypeHdl(), and SwCalc::VarLook().
|
inline |
Definition at line 84 of file usrfld.hxx.
References m_nValue.
Referenced by EnsureValid(), GetContent(), and GetInputOrDateTime().
double SwUserFieldType::GetValue | ( | SwCalc & | rCalc | ) |
Definition at line 236 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(), SwCalc::SetCharClass(), and Syntax.
Referenced by sw::DocumentFieldsManager::UpdateUsrFields(), and SwCalc::VarLook().
|
inline |
Definition at line 69 of file usrfld.hxx.
|
inline |
Definition at line 81 of file usrfld.hxx.
References m_bValidValue.
Referenced by EnsureValid(), and SwCalc::VarLook().
|
overridevirtual |
Reimplemented from SwFieldType.
Definition at line 345 of file usrfld.cxx.
References SwValueFieldType::DoubleToString(), FIELD_PROP_BOOL1, FIELD_PROP_DOUBLE, FIELD_PROP_PAR2, LanguageTag::getBcp47(), LanguageTag::getLanguageType(), nsSwGetSetExpType::GSE_EXPR, nsSwGetSetExpType::GSE_STRING, m_aContent, m_aContentLang, m_nType, and m_nValue.
|
overridevirtual |
Reimplemented from SwFieldType.
Definition at line 327 of file usrfld.cxx.
References 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 299 of file usrfld.cxx.
References SwValueFieldType::DoubleToString(), LanguageTag::getBcp47(), SwValueFieldType::GetDoc(), SwDoc::getIDocumentState(), SwDoc::GetIDocumentUndoRedo(), LanguageTag::getLanguageType(), IDocumentState::IsModified(), m_aContent, m_aContentLang, SAL_MAX_UINT32, IDocumentState::SetModified(), and SetValue().
Referenced by SwFieldInputDlg::Apply(), SwInputField::applyFieldContent(), IMPL_LINK(), and SwFieldMgr::InsertField().
|
inline |
Definition at line 70 of file usrfld.hxx.
|
inline |
Definition at line 93 of file usrfld.hxx.
References SwValueFieldType::EnableFormat(), nsSwGetSetExpType::GSE_STRING, and m_nType.
Referenced by IMPL_LINK().
|
inline |
|
overrideprivatevirtual |
Definition at line 217 of file usrfld.cxx.
References SwValueFieldType::GetDoc(), SfxHint::GetId(), SwDoc::getIDocumentFieldsAccess(), IDocumentFieldsAccess::GetSysFieldType(), Input, m_bValidValue, and SwFieldType::UpdateFields().
|
private |
String value type.
Definition at line 42 of file usrfld.hxx.
Referenced by Copy(), dumpAsXml(), Expand(), GetContent(), GetInputOrDateTime(), 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().