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

#include <unofield.hxx>

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

Classes

class  Impl
 

Public Member Functions

SwServiceType GetServiceId () const
 
virtual sal_Int64 SAL_CALL getSomething (const css::uno::Sequence< sal_Int8 > &rIdentifier) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &rServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual void SAL_CALL setPropertyValue (const OUString &rPropertyName, const css::uno::Any &rValue) override
 
virtual css::uno::Any SAL_CALL getPropertyValue (const OUString &rPropertyName) override
 
virtual void SAL_CALL addPropertyChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL removePropertyChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL addVetoableChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
 
virtual void SAL_CALL removeVetoableChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
 
virtual void SAL_CALL update () override
 
virtual void SAL_CALL attach (const css::uno::Reference< css::text::XTextRange > &xTextRange) override
 
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor () override
 
virtual OUString SAL_CALL getPresentation (sal_Bool bShowCommand) override
 
virtual void SAL_CALL attachTextFieldMaster (const css::uno::Reference< css::beans::XPropertySet > &xFieldMaster) override
 
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getTextFieldMaster () override
 

Static Public Member Functions

static void TransmuteLeadToInputField (SwSetExpField &rField)
 Convert between SwSetExpField with InputFlag false and InputFlag true. More...
 
static css::uno::Reference< css::text::XTextField > CreateXTextField (SwDoc *pDoc, SwFormatField const *pFormat, SwServiceType nServiceId=SwServiceType::Invalid)
 
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId ()
 

Private Member Functions

virtual ~SwXTextField () override
 
 SwXTextField (SwFormatField &rFormat, SwDoc &rDoc)
 
 SwXTextField (SwServiceType nServiceId, SwDoc *pDoc)
 descriptor More...
 

Private Attributes

::sw::UnoImplPtr< Implm_pImpl
 

Detailed Description

Definition at line 123 of file unofield.hxx.

Constructor & Destructor Documentation

SwXTextField::~SwXTextField ( )
overrideprivatevirtual

Definition at line 1222 of file unofield.cxx.

SwXTextField::SwXTextField ( SwFormatField rFormat,
SwDoc rDoc 
)
private

Definition at line 1217 of file unofield.cxx.

References Invalid, and m_pImpl.

Referenced by CreateXTextField().

SwXTextField::SwXTextField ( SwServiceType  nServiceId,
SwDoc pDoc 
)
private

Member Function Documentation

void SAL_CALL SwXTextField::addEventListener ( const css::uno::Reference< css::lang::XEventListener > &  xListener)
overridevirtual

Definition at line 2132 of file unofield.cxx.

References m_pImpl.

void SwXTextField::addPropertyChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
overridevirtual

Definition at line 2505 of file unofield.cxx.

void SwXTextField::addVetoableChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  xListener 
)
overridevirtual

Definition at line 2515 of file unofield.cxx.

void SAL_CALL SwXTextField::attach ( const css::uno::Reference< css::text::XTextRange > &  xTextRange)
overridevirtual

Definition at line 1360 of file unofield.cxx.

References SL::aData, aDocInfoSubTypeFromService, AF_FIXED, AF_NAME, AF_SHORTCUT, aName, Author, Chapter, SwGetExpField::ChgExpStr(), SwSetExpField::ChgExpStr(), CombinedChars, ConditionalText, SwMacroField::CreateMacroString(), Database, DatabaseName, DATEFLD, DateTime, DbNextSet, DbNumSet, DbSetNumber, Dde, DEFAULT, IDocumentContentOperations::DeleteAndJoin(), nsSwDocInfoSubType::DI_SUB_DATE, nsSwDocInfoSubType::DI_SUB_FIXED, nsSwDocInfoSubType::DI_SUB_TIME, DocInfo, DocStat, Dropdown, DS_CHAR, DS_GRF, DS_OLE, DS_PAGE, DS_PARA, DS_TBL, DS_WORD, DateTime::EMPTY, SwPaM::End(), ExtUser, FF_FIXED, FIELD_PROP_DATE_TIME, FIELD_PROP_FORMAT, FIELD_PROP_PAR4, FIELD_PROP_PROP_SEQ, FIELD_PROP_SHORT1, FIELD_PROP_SUBTYPE, FIELD_PROP_USHORT1, FIELD_PROP_USHORT2, FieldTypeAnnotation, FieldTypeAuthor, FieldTypeBibliography, FieldTypeChapter, FieldTypeCharacterCount, FieldTypeCombinedCharacters, FieldTypeConditionedText, FieldTypeDatabase, FieldTypeDatabaseName, FieldTypeDatabaseNextSet, FieldTypeDatabaseNumSet, FieldTypeDatabaseSetNum, FieldTypeDateTime, FieldTypeDDE, FieldTypeDocInfo, FieldTypeDocInfoChangeAuthor, FieldTypeDocInfoChangeDateTime, FieldTypeDocInfoCreateAuthor, FieldTypeDocInfoCreateDateTime, FieldTypeDocInfoCustom, FieldTypeDocInfoDescription, FieldTypeDocInfoEditTime, FieldTypeDocInfoKeywords, FieldTypeDocInfoPrintAuthor, FieldTypeDocInfoPrintDateTime, FieldTypeDocInfoRevision, FieldTypeDocInfoSubject, FieldTypeDocInfoTitle, FieldTypeDropdown, FieldTypeEmbeddedObjectCount, FieldTypeFileName, FieldTypeGetExp, FieldTypeGetReference, FieldTypeGraphicObjectCount, FieldTypeHiddenPara, FieldTypeHiddenText, FieldTypeInput, FieldTypeInputUser, FieldTypeJumpEdit, FieldTypeMacro, FieldTypePageCount, FieldTypePageNum, FieldTypeParagraphCount, FieldTypeRefPageGet, FieldTypeRefPageSet, FieldTypeScript, FieldTypeSetExp, FieldTypeTableCount, FieldTypeTableFormula, FieldTypeTemplateName, FieldTypeUser, FieldTypeUserExt, FieldTypeWordCount, Filename, FIXEDFLD, FORCEHINTEXPAND, OTextCursorHelper::GetDoc(), SwXTextRange::GetDoc(), SwPaM::GetDoc(), GetExp, SwFormatField::GetField(), SwTextNode::GetFieldTextAttrAt(), IDocumentFieldsAccess::GetFieldType(), SwTextAttr::GetFormatField(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentFieldsAccess(), SwDoc::getIDocumentMarkAccess(), SwIndex::GetIndex(), SwPaM::GetMark(), SwPostItField::GetName(), SwPaM::GetNode(), SwPaM::GetPoint(), SwTextField::GetpTextNode(), GetRef, SwTextAttr::GetStart(), SwDBField::GetSubType(), IDocumentFieldsAccess::GetSysFieldType(), SwTextField::GetTextNode(), SwNode::GetTextNode(), OTextCursorHelper::getUnoTunnelId(), SwXTextRange::getUnoTunnelId(), nsSwGetSetExpType::GSE_EXPR, nsSwGetSetExpType::GSE_FORMULA, nsSwGetSetExpType::GSE_STRING, SwPaM::HasMark(), HiddenPara, HiddenText, INP_TXT, INP_USR, Input, IDocumentFieldsAccess::InsertFieldType(), IDocumentContentOperations::InsertPoolItem(), SwXTextCursor::IsAtEndOfMeta(), JumpEdit, m_pImpl, Macro, IDocumentMarkAccess::makeAnnotationMark(), SwDBData::nCommandType, SwPosition::nContent, nType, PageNumber, PG_RANDOM, Postit, RefPageGet, RefPageSet, RES_TXTATR_ANNOTATION(), SwDBData::sCommand, Script, SwDBData::sDataSource, SetExp, SwAuthorField::SetExpansion(), SwFileNameField::SetExpansion(), SwExtUserField::SetExpansion(), SwDropDownField::SetHelp(), SwHiddenParaField::SetHidden(), SwSetExpField::SetInputFlag(), SwDropDownField::SetItems(), SwGetExpField::SetLateInitialization(), SwChapterField::SetLevel(), SwPaM::SetMark(), SwDropDownField::SetName(), SwDateTimeField::SetOffset(), SwPostItField::SetPar2(), SwSetExpField::SetPromptText(), SwDropDownField::SetSelectedItem(), SwSetExpField::SetSeqNumber(), SwDBSetNumberField::SetSetNumber(), SwRefPageGetField::SetText(), SwPostItField::SetTextObject(), SwDropDownField::SetToolTip(), SwPageNumberField::SetUserString(), SwHiddenTextField::SetValue(), SwValueField::SetValue(), SwPaM::Start(), nsSwExtendedSubType::SUB_CMD, nsSwExtendedSubType::SUB_INVISIBLE, Table, TemplateName, TIMEFLD, type, update(), User, USHRT_MAX, SwTextAttr::Which(), and sw::XTextRangeToSwPaM().

void SAL_CALL SwXTextField::attachTextFieldMaster ( const css::uno::Reference< css::beans::XPropertySet > &  xFieldMaster)
overridevirtual
uno::Reference< text::XTextField > SwXTextField::CreateXTextField ( SwDoc pDoc,
SwFormatField const *  pFormat,
SwServiceType  nServiceId = SwServiceType::Invalid 
)
static
void SAL_CALL SwXTextField::dispose ( void  )
overridevirtual

Definition at line 2113 of file unofield.cxx.

References SwTextField::DeleteTextField(), and m_pImpl.

uno::Reference< text::XTextRange > SAL_CALL SwXTextField::getAnchor ( )
overridevirtual
OUString SAL_CALL SwXTextField::getImplementationName ( )
overridevirtual

Definition at line 2580 of file unofield.cxx.

OUString SAL_CALL SwXTextField::getPresentation ( sal_Bool  bShowCommand)
overridevirtual

Definition at line 1348 of file unofield.cxx.

References SwField::ExpandField(), SwField::GetFieldName(), and m_pImpl.

uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXTextField::getPropertySetInfo ( )
overridevirtual
uno::Any SAL_CALL SwXTextField::getPropertyValue ( const OUString &  rPropertyName)
overridevirtual
SwServiceType SwXTextField::GetServiceId ( ) const

Definition at line 1254 of file unofield.cxx.

References m_pImpl.

sal_Int64 SAL_CALL SwXTextField::getSomething ( const css::uno::Sequence< sal_Int8 > &  rIdentifier)
overridevirtual

Definition at line 1189 of file unofield.cxx.

Referenced by TransmuteLeadToInputField().

uno::Sequence< OUString > SAL_CALL SwXTextField::getSupportedServiceNames ( )
overridevirtual
uno::Reference< beans::XPropertySet > SAL_CALL SwXTextField::getTextFieldMaster ( )
overridevirtual

Definition at line 1338 of file unofield.cxx.

References SwXFieldMaster::CreateXFieldMaster(), and m_pImpl.

const uno::Sequence< sal_Int8 > & SwXTextField::getUnoTunnelId ( )
static

Definition at line 1183 of file unofield.cxx.

References sw::proofreadingiterator::get().

Referenced by TransmuteLeadToInputField().

void SAL_CALL SwXTextField::removeEventListener ( const css::uno::Reference< css::lang::XEventListener > &  xListener)
overridevirtual

Definition at line 2139 of file unofield.cxx.

References m_pImpl.

void SwXTextField::removePropertyChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
overridevirtual

Definition at line 2510 of file unofield.cxx.

void SwXTextField::removeVetoableChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  xListener 
)
overridevirtual

Definition at line 2520 of file unofield.cxx.

void SAL_CALL SwXTextField::setPropertyValue ( const OUString &  rPropertyName,
const css::uno::Any &  rValue 
)
overridevirtual
sal_Bool SAL_CALL SwXTextField::supportsService ( const OUString &  rServiceName)
overridevirtual

Definition at line 2599 of file unofield.cxx.

References cppu::supportsService().

void SwXTextField::TransmuteLeadToInputField ( SwSetExpField rField)
static

Convert between SwSetExpField with InputFlag false and InputFlag true.

Unfortunately the InputFlag is exposed in the API as "Input" property and is mutable; in the UI and in ODF these are 2 different types of fields, so the API design is very questionable. In order to keep the mutable property, the whole thing has to be reconstructed from scratch, to replace the SwTextField hint with SwTextInputField or vice versa. The SwFormatField will be replaced - it must be, because the Which changes - but the SwXTextField must not be disposed in the operation, it has to be disconnected first and at the end connected to the new instance!

Definition at line 1271 of file unofield.cxx.

References SwFormatField::GetField(), SwSetExpField::GetFormatField(), SwSetExpField::GetInputFlag(), SwTextField::GetPamForTextField(), getSomething(), SwFormatField::GetTextField(), getUnoTunnelId(), SwFormatField::GetXTextField(), m_pImpl, RES_TXTATR_FIELD(), RES_TXTATR_INPUTFIELD(), void(), and SfxPoolItem::Which().

Referenced by SwSetExpField::PutValue().

void SAL_CALL SwXTextField::update ( )
overridevirtual

Member Data Documentation

::sw::UnoImplPtr<Impl> SwXTextField::m_pImpl
private

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