LibreOffice Module sw (master) 1
|
UNO wrapper around an SwFormatField, i.e. More...
#include <unofield.hxx>
Classes | |
class | Impl |
Public Member Functions | |
SwServiceType | GetServiceId () const |
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 rtl::Reference< SwXTextField > | CreateXTextField (SwDoc *pDoc, SwFormatField const *pFormat, SwServiceType nServiceId=SwServiceType::Invalid) |
Private Member Functions | |
virtual | ~SwXTextField () override |
SwXTextField (SwFormatField &rFormat, SwDoc &rDoc) | |
SwXTextField (SwServiceType nServiceId, SwDoc *pDoc) | |
descriptor More... | |
Private Attributes | |
::sw::UnoImplPtr< Impl > | m_pImpl |
UNO wrapper around an SwFormatField, i.e.
a Writer field that the user creates via Insert -> Field.
Definition at line 118 of file unofield.hxx.
|
overrideprivatevirtual |
Definition at line 1189 of file unofield.cxx.
|
private |
Definition at line 1184 of file unofield.cxx.
References Invalid, and m_pImpl.
Referenced by CreateXTextField().
|
private |
descriptor
Definition at line 1161 of file unofield.cxx.
References FieldTypeDatabase, FieldTypeDatabaseName, FieldTypeDatabaseSetNum, FieldTypeSetExp, FieldTypeTableFormula, and m_pImpl.
|
overridevirtual |
Definition at line 2095 of file unofield.cxx.
References m_pImpl.
|
overridevirtual |
Definition at line 2477 of file unofield.cxx.
|
overridevirtual |
Definition at line 2487 of file unofield.cxx.
|
overridevirtual |
Definition at line 1319 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, sw::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, SwPosition::GetContentIndex(), SwPaM::GetDoc(), SwXTextRange::GetDoc(), GetExp, SwFormatField::GetField(), SwTextNode::GetFieldTextAttrAt(), IDocumentFieldsAccess::GetFieldType(), SwTextAttr::GetFormatField(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentFieldsAccess(), SwDoc::getIDocumentMarkAccess(), SwPaM::GetMark(), SwPostItField::GetName(), SwPaM::GetPoint(), SwPaM::GetPointNode(), SwTextField::GetpTextNode(), GetRef, SwTextAttr::GetStart(), SwDBField::GetSubType(), IDocumentFieldsAccess::GetSysFieldType(), SwNode::GetTextNode(), SwSetExpFieldType::GetType(), SwUserFieldType::GetType(), 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(), SwPaM::Move(), nType, PageNumber, PG_RANDOM, Postit, RefPageGet, RefPageSet, RES_TXTATR_ANNOTATION(), Script, SetExp, SwAuthorField::SetExpansion(), SwFileNameField::SetExpansion(), SwExtUserField::SetExpansion(), SwDropDownField::SetHelp(), SwInputField::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(), SwInputField::SetToolTip(), SwDropDownField::SetToolTip(), SwPageNumberField::SetUserString(), SwHiddenTextField::SetValue(), SwValueField::SetValue(), SwPaM::Start(), nsSwExtendedSubType::SUB_CMD, nsSwExtendedSubType::SUB_INVISIBLE, Table, TemplateName, TIMEFLD, type, u, update(), User, SwTextAttr::Which(), and sw::XTextRangeToSwPaM().
|
overridevirtual |
Definition at line 1275 of file unofield.cxx.
References SwXFieldMaster::GetFieldType(), SwFieldType::GetName(), lcl_ServiceIdToResId(), m_pImpl, and SwFieldType::Which().
|
static |
Definition at line 1194 of file unofield.cxx.
References SwFormatField::GetXTextField(), Invalid, m_pImpl, and SwXTextField().
Referenced by SwUnoCursorHelper::getCursorPropertyValue(), lcl_ExportHints(), and SwXServiceProvider::MakeInstance().
|
overridevirtual |
Definition at line 2076 of file unofield.cxx.
References SwTextField::DeleteTextField(), and m_pImpl.
|
overridevirtual |
Definition at line 2039 of file unofield.cxx.
References SwXTextRange::CreateXTextRange(), IDocumentMarkAccess::getAnnotationMarksBegin(), IDocumentMarkAccess::getAnnotationMarksEnd(), SwPostItField::GetName(), SwTextField::GetPamForTextField(), m_pImpl, Postit, and SwField::Which().
|
overridevirtual |
Definition at line 2552 of file unofield.cxx.
|
overridevirtual |
Definition at line 1307 of file unofield.cxx.
References SwField::ExpandField(), SwField::GetFieldName(), and m_pImpl.
|
overridevirtual |
Definition at line 2110 of file unofield.cxx.
References aSwMapProvider, SwUnoPropertyMapProvider::GetPropertyMapEntries(), SwUnoPropertyMapProvider::GetPropertySet(), SfxItemPropertySet::getPropertySetInfo(), Invalid, lcl_GetPropertyMapOfService(), m_pImpl, and PROPERTY_MAP_PARAGRAPH_EXTENSIONS.
|
overridevirtual |
Definition at line 2289 of file unofield.cxx.
References aSwMapProvider, aTypes, SwViewShell::CalcLayout(), SwEditShell::CalcLayout(), FIELD_PROP_BOOL1, FIELD_PROP_BOOL2, FIELD_PROP_BOOL3, FIELD_PROP_BOOL4, FIELD_PROP_BYTE1, FIELD_PROP_DATE, FIELD_PROP_DATE_TIME, FIELD_PROP_DOUBLE, FIELD_PROP_FORMAT, FIELD_PROP_IS_FIELD_DISPLAYED, FIELD_PROP_IS_FIELD_USED, FIELD_PROP_PAR1, FIELD_PROP_PAR2, FIELD_PROP_PAR3, FIELD_PROP_PAR4, FIELD_PROP_PAR5, FIELD_PROP_PAR6, FIELD_PROP_PROP_SEQ, FIELD_PROP_SHORT1, FIELD_PROP_STRINGS, FIELD_PROP_SUBTYPE, FIELD_PROP_TEXT, FIELD_PROP_USHORT1, FIELD_PROP_USHORT2, SwContentNode::FindLayoutRect(), FN_UNO_ANCHOR_TYPE, FN_UNO_ANCHOR_TYPES, FN_UNO_TEXT_WRAP, SwScriptInfo::GetBoundsOfHiddenRange(), SfxItemPropertyMap::getByName(), IDocumentLayoutAccess::GetCurrentViewShell(), SwDoc::GetEditShell(), SwDoc::getIDocumentLayoutAccess(), SwNode::GetNodes(), SfxItemPropertySet::getPropertyMap(), SwUnoPropertyMapProvider::GetPropertySet(), SwTextAttr::GetStart(), SwTextField::GetTextNode(), SwNodes::IsDocNodes(), SwTextNode::IsHidden(), lcl_GetPropertyMapOfService(), m_pImpl, SfxItemPropertyMapEntry::nWID, PROPERTY_MAP_PARAGRAPH_EXTENSIONS, SwField::QueryValue(), and SwRect::Width().
SwServiceType SwXTextField::GetServiceId | ( | ) | const |
Definition at line 1221 of file unofield.cxx.
References m_pImpl.
Referenced by SwXText::insertTextContent().
|
overridevirtual |
Definition at line 2576 of file unofield.cxx.
References SwXServiceProvider::GetProviderName(), m_pImpl, OldNameToNewName_Impl(), and sServiceName.
|
overridevirtual |
Definition at line 1295 of file unofield.cxx.
References SwXFieldMaster::CreateXFieldMaster(), and m_pImpl.
|
overridevirtual |
Definition at line 2102 of file unofield.cxx.
References m_pImpl.
|
overridevirtual |
Definition at line 2482 of file unofield.cxx.
|
overridevirtual |
Definition at line 2492 of file unofield.cxx.
|
overridevirtual |
Definition at line 2131 of file unofield.cxx.
References aSwMapProvider, CHANGED, Database, FIELD_PROP_BOOL1, FIELD_PROP_BOOL2, FIELD_PROP_BOOL3, FIELD_PROP_BOOL4, FIELD_PROP_BYTE1, FIELD_PROP_DATE, FIELD_PROP_DATE_TIME, FIELD_PROP_DOUBLE, FIELD_PROP_FORMAT, FIELD_PROP_PAR1, FIELD_PROP_PAR2, FIELD_PROP_PAR3, FIELD_PROP_PAR4, FIELD_PROP_PAR5, FIELD_PROP_PAR6, FIELD_PROP_PROP_SEQ, FIELD_PROP_SHORT1, FIELD_PROP_STRINGS, FIELD_PROP_SUBTYPE, FIELD_PROP_USHORT1, FIELD_PROP_USHORT2, SfxItemPropertyMap::getByName(), SWUnoHelper::GetEnumAsInt32(), SwDoc::getIDocumentFieldsAccess(), SwDoc::getIDocumentState(), SfxItemPropertySet::getPropertyMap(), SwUnoPropertyMapProvider::GetPropertySet(), SwTextAttr::GetStart(), SwTextField::GetTextNode(), lcl_GetPropertyMapOfService(), m_pImpl, SfxItemPropertyMapEntry::nFlags, SfxItemPropertyMapEntry::nWID, Postit, IDocumentFieldsAccess::PutValueToField(), IDocumentState::SetModified(), o3tl::tryAccess< bool >(), UNO_NAME_DATA_BASE_NAME, UNO_NAME_DATA_BASE_URL, UNO_NAME_DATA_COLUMN_NAME, UNO_NAME_DATA_TABLE_NAME, and SwField::Which().
|
overridevirtual |
Definition at line 2571 of file unofield.cxx.
References cppu::supportsService().
|
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 1238 of file unofield.cxx.
References sw::Default, IDocumentContentOperations::DeleteAndJoin(), SwNode::GetDoc(), SwFormatField::GetField(), SwTextNode::GetFieldTextAttrAt(), SwSetExpField::GetFormatField(), SwTextAttr::GetFormatField(), SwDoc::getIDocumentContentOperations(), SwSetExpField::GetInputFlag(), SwTextField::GetPamForTextField(), SwFormatField::GetTextField(), SwTextField::GetTextNode(), SwFormatField::GetXTextField(), IDocumentContentOperations::InsertPoolItem(), RES_TXTATR_FIELD(), RES_TXTATR_INPUTFIELD(), SwSetExpField::SetInputFlag(), and SfxPoolItem::Which().
Referenced by SwSetExpField::PutValue().
|
overridevirtual |
Definition at line 2497 of file unofield.cxx.
References Author, DateTime, DocInfo, SwExtUserFieldType::Expand(), SwAuthorFieldType::Expand(), Expand, ExtUser, Filename, SwField::GetFormat(), SwField::GetLanguage(), SwDocInfoField::GetName(), SwDocInfoField::GetSubType(), SwExtUserField::GetSubType(), SwField::GetTyp(), m_pImpl, SwAuthorField::SetExpansion(), SwFileNameField::SetExpansion(), SwDocInfoField::SetExpansion(), SwExtUserField::SetExpansion(), DateTime::SYSTEM, and SwField::Which().
Referenced by attach().
|
private |
Definition at line 124 of file unofield.hxx.
Referenced by addEventListener(), attach(), attachTextFieldMaster(), CreateXTextField(), dispose(), getAnchor(), getPresentation(), getPropertySetInfo(), getPropertyValue(), GetServiceId(), getSupportedServiceNames(), getTextFieldMaster(), removeEventListener(), setPropertyValue(), SwXTextField(), and update().