LibreOffice Module xmloff (master)  1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
XMLTextFieldImportContext Class Referenceabstract

abstract class for text field import More...

#include <txtfldi.hxx>

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

Public Member Functions

 XMLTextFieldImportContext (SvXMLImport &rImport, XMLTextImportHelper &rHlp, const char *pService, sal_uInt16 nPrfx, const OUString &rLocalName)
 whether this field is valid ? More...
 
virtual void SAL_CALL characters (const OUString &sContent) override
 element name w/o prefix More...
 
virtual void SAL_CALL startFastElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
 parses attributes and calls ProcessAttribute More...
 
virtual void SAL_CALL endFastElement (sal_Int32 nElement) override
 create XTextField and insert into document; calls PrepareTextField More...
 
- Public Member Functions inherited from SvXMLImportContext
bool IsPrefixFilledIn () const
 
sal_uInt16 GetPrefix () const
 
const OUString & GetLocalName () const
 
 SvXMLImportContext (SvXMLImport &rImport, sal_uInt16 nPrfx, const OUString &rLName)
 A contexts constructor does anything that is required if an element starts. More...
 
 SvXMLImportContext (SvXMLImport &rImport)
 
virtual ~SvXMLImportContext ()
 A contexts destructor does anything that is required if an element ends. More...
 
virtual SvXMLImportContextRef CreateChildContext (sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
 Create a children element context. More...
 
virtual void StartElement (const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
 StartElement is called after a context has been constructed and before an elements context is parsed. More...
 
virtual void SAL_CALL startUnknownElement (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL endUnknownElement (const OUString &Namespace, const OUString &Name) override
 
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) final override
 
virtual void SAL_CALL acquire () final override throw ()
 
virtual void SAL_CALL release () final override throw ()
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () final override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () final override
 

Static Public Member Functions

static XMLTextFieldImportContextCreateTextFieldImportContext (SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_uInt16 nPrefix, const OUString &rName, sal_uInt16 nToken)
 create the appropriate field context from (for use in paragraph import) More...
 

Protected Member Functions

XMLTextImportHelperGetImportHelper ()
 get helper More...
 
const OUString & GetServiceName () const
 
void SetServiceName (const OUString &sStr)
 
OUString const & GetContent ()
 
virtual void ProcessAttribute (sal_Int32 nAttrToken, const OUString &sAttrValue)=0
 process attribute values More...
 
virtual void PrepareField (const css::uno::Reference< css::beans::XPropertySet > &xPropertySet)=0
 prepare XTextField for insertion into document More...
 
bool CreateField (css::uno::Reference< css::beans::XPropertySet > &xField, const OUString &sServiceName)
 create field from ServiceName More...
 
- Protected Member Functions inherited from SvXMLImportContext
SvXMLImportGetImport ()
 
const SvXMLImportGetImport () const
 

Static Protected Member Functions

static void ForceUpdate (const css::uno::Reference< css::beans::XPropertySet > &rPropertySet)
 force an update of the field's value call update on optional XUpdatable interface; (disable Fixed property) More...
 

Protected Attributes

OUString sServicePrefix
 the import helper More...
 
bool bValid
 

Private Attributes

OUStringBuffer sContentBuffer
 
OUString sContent
 collect character data More...
 
OUString sServiceName
 character data after collection More...
 
XMLTextImportHelperrTextImportHelper
 service name for text field More...
 

Detailed Description

abstract class for text field import

Definition at line 50 of file txtfldi.hxx.

Constructor & Destructor Documentation

XMLTextFieldImportContext::XMLTextFieldImportContext ( SvXMLImport rImport,
XMLTextImportHelper rHlp,
const char *  pService,
sal_uInt16  nPrfx,
const OUString &  rLocalName 
)

whether this field is valid ?

Parameters
rHlpXML Import
pServiceText import helper
nPrfxname of SO API service
rLocalNamenamespace prefix

Definition at line 119 of file txtfldi.cxx.

References DBG_ASSERT, and sServiceName.

Member Function Documentation

void XMLTextFieldImportContext::characters ( const OUString &  sContent)
overridevirtual

element name w/o prefix

process character data: will be collected in member sContentBuffer

Reimplemented from SvXMLImportContext.

Definition at line 184 of file txtfldi.cxx.

References sContentBuffer.

bool XMLTextFieldImportContext::CreateField ( css::uno::Reference< css::beans::XPropertySet > &  xField,
const OUString &  sServiceName 
)
protected
XMLTextFieldImportContext * XMLTextFieldImportContext::CreateTextFieldImportContext ( SvXMLImport rImport,
XMLTextImportHelper rHlp,
sal_uInt16  nPrefix,
const OUString &  rName,
sal_uInt16  nToken 
)
static

create the appropriate field context from (for use in paragraph import)

create the appropriate field context from

Definition at line 217 of file txtfldi.cxx.

References XML_TOK_DRAW_DATE_TIME, XML_TOK_DRAW_FOOTER, XML_TOK_DRAW_HEADER, XML_TOK_TEXT_ANNOTATION, XML_TOK_TEXT_ANNOTATION_END, XML_TOK_TEXT_AUTHOR_INITIALS, XML_TOK_TEXT_AUTHOR_NAME, XML_TOK_TEXT_BIBLIOGRAPHY_MARK, XML_TOK_TEXT_BOOKMARK_REF, XML_TOK_TEXT_CHAPTER, XML_TOK_TEXT_CHARACTER_COUNT, XML_TOK_TEXT_CONDITIONAL_TEXT, XML_TOK_TEXT_DATABASE_DISPLAY, XML_TOK_TEXT_DATABASE_NAME, XML_TOK_TEXT_DATABASE_NEXT, XML_TOK_TEXT_DATABASE_ROW_NUMBER, XML_TOK_TEXT_DATABASE_SELECT, XML_TOK_TEXT_DATE, XML_TOK_TEXT_DDE, XML_TOK_TEXT_DOCUMENT_CREATION_AUTHOR, XML_TOK_TEXT_DOCUMENT_CREATION_DATE, XML_TOK_TEXT_DOCUMENT_CREATION_TIME, XML_TOK_TEXT_DOCUMENT_DESCRIPTION, XML_TOK_TEXT_DOCUMENT_EDIT_DURATION, XML_TOK_TEXT_DOCUMENT_KEYWORDS, XML_TOK_TEXT_DOCUMENT_PRINT_AUTHOR, XML_TOK_TEXT_DOCUMENT_PRINT_DATE, XML_TOK_TEXT_DOCUMENT_PRINT_TIME, XML_TOK_TEXT_DOCUMENT_REVISION, XML_TOK_TEXT_DOCUMENT_SAVE_AUTHOR, XML_TOK_TEXT_DOCUMENT_SAVE_DATE, XML_TOK_TEXT_DOCUMENT_SAVE_TIME, XML_TOK_TEXT_DOCUMENT_SUBJECT, XML_TOK_TEXT_DOCUMENT_TITLE, XML_TOK_TEXT_DOCUMENT_USER_DEFINED, XML_TOK_TEXT_DROP_DOWN, XML_TOK_TEXT_EXPRESSION, XML_TOK_TEXT_FILENAME, XML_TOK_TEXT_GET_PAGE_VAR, XML_TOK_TEXT_HIDDEN_PARAGRAPH, XML_TOK_TEXT_HIDDEN_TEXT, XML_TOK_TEXT_IMAGE_COUNT, XML_TOK_TEXT_MACRO, XML_TOK_TEXT_MEASURE, XML_TOK_TEXT_NOTE_REF, XML_TOK_TEXT_OBJECT_COUNT, XML_TOK_TEXT_PAGE_CONTINUATION, XML_TOK_TEXT_PAGE_CONTINUATION_STRING, XML_TOK_TEXT_PAGE_COUNT, XML_TOK_TEXT_PAGE_NAME, XML_TOK_TEXT_PAGE_NUMBER, XML_TOK_TEXT_PARAGRAPH_COUNT, XML_TOK_TEXT_PLACEHOLDER, XML_TOK_TEXT_REFERENCE_REF, XML_TOK_TEXT_SCRIPT, XML_TOK_TEXT_SENDER_CITY, XML_TOK_TEXT_SENDER_COMPANY, XML_TOK_TEXT_SENDER_COUNTRY, XML_TOK_TEXT_SENDER_EMAIL, XML_TOK_TEXT_SENDER_FAX, XML_TOK_TEXT_SENDER_FIRSTNAME, XML_TOK_TEXT_SENDER_INITIALS, XML_TOK_TEXT_SENDER_LASTNAME, XML_TOK_TEXT_SENDER_PHONE_PRIVATE, XML_TOK_TEXT_SENDER_PHONE_WORK, XML_TOK_TEXT_SENDER_POSITION, XML_TOK_TEXT_SENDER_POSTAL_CODE, XML_TOK_TEXT_SENDER_STATE_OR_PROVINCE, XML_TOK_TEXT_SENDER_STREET, XML_TOK_TEXT_SENDER_TITLE, XML_TOK_TEXT_SEQUENCE, XML_TOK_TEXT_SEQUENCE_REF, XML_TOK_TEXT_SET_PAGE_VAR, XML_TOK_TEXT_SHEET_NAME, XML_TOK_TEXT_TABLE_COUNT, XML_TOK_TEXT_TABLE_FORMULA, XML_TOK_TEXT_TEMPLATENAME, XML_TOK_TEXT_TEXT_INPUT, XML_TOK_TEXT_TIME, XML_TOK_TEXT_USER_FIELD_GET, XML_TOK_TEXT_USER_FIELD_INPUT, XML_TOK_TEXT_VARIABLE_GET, XML_TOK_TEXT_VARIABLE_INPUT, XML_TOK_TEXT_VARIABLE_SET, and XML_TOK_TEXT_WORD_COUNT.

void XMLTextFieldImportContext::endFastElement ( sal_Int32  nElement)
overridevirtual
void XMLTextFieldImportContext::ForceUpdate ( const css::uno::Reference< css::beans::XPropertySet > &  rPropertySet)
staticprotected

force an update of the field's value call update on optional XUpdatable interface; (disable Fixed property)

Definition at line 511 of file txtfldi.cxx.

Referenced by XMLSenderFieldImportContext::PrepareField(), XMLAuthorFieldImportContext::PrepareField(), XMLTimeFieldImportContext::PrepareField(), XMLSimpleDocInfoImportContext::PrepareField(), and XMLRevisionDocInfoImportContext::PrepareField().

OUString const & XMLTextFieldImportContext::GetContent ( )
protected
XMLTextImportHelper& XMLTextFieldImportContext::GetImportHelper ( )
inlineprotected
const OUString& XMLTextFieldImportContext::GetServiceName ( ) const
inlineprotected
virtual void XMLTextFieldImportContext::PrepareField ( const css::uno::Reference< css::beans::XPropertySet > &  xPropertySet)
protectedpure virtual
virtual void XMLTextFieldImportContext::ProcessAttribute ( sal_Int32  nAttrToken,
const OUString &  sAttrValue 
)
protectedpure virtual
void XMLTextFieldImportContext::SetServiceName ( const OUString &  sStr)
inlineprotected
void XMLTextFieldImportContext::startFastElement ( sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList 
)
overridevirtual

Member Data Documentation

bool XMLTextFieldImportContext::bValid
protected

Definition at line 62 of file txtfldi.hxx.

Referenced by XMLMacroFieldImportContext::createFastChildContext(), endFastElement(), XMLSetVarFieldImportContext::endFastElement(), XMLDatabaseDisplayImportContext::endFastElement(), XMLDdeFieldImportContext::endFastElement(), XMLAnnotationImportContext::endFastElement(), XMLVarFieldImportContext::ProcessAttribute(), XMLPlaceholderFieldImportContext::ProcessAttribute(), XMLDatabaseNameImportContext::ProcessAttribute(), XMLDatabaseNextImportContext::ProcessAttribute(), XMLDatabaseSelectImportContext::ProcessAttribute(), XMLTableFormulaImportContext::ProcessAttribute(), XMLDatabaseNumberImportContext::ProcessAttribute(), XMLDatabaseDisplayImportContext::ProcessAttribute(), XMLUserDocInfoImportContext::ProcessAttribute(), XMLHiddenParagraphImportContext::ProcessAttribute(), XMLConditionalTextImportContext::ProcessAttribute(), XMLHiddenTextImportContext::ProcessAttribute(), XMLMacroFieldImportContext::ProcessAttribute(), XMLReferenceFieldImportContext::ProcessAttribute(), XMLDdeFieldImportContext::ProcessAttribute(), XMLUrlFieldImportContext::ProcessAttribute(), XMLScriptImportContext::ProcessAttribute(), XMLMeasureFieldImportContext::ProcessAttribute(), XMLSenderFieldImportContext::startFastElement(), XMLAuthorFieldImportContext::startFastElement(), XMLAnnotationImportContext::XMLAnnotationImportContext(), XMLBibliographyFieldImportContext::XMLBibliographyFieldImportContext(), XMLChapterImportContext::XMLChapterImportContext(), XMLCountFieldImportContext::XMLCountFieldImportContext(), XMLDateTimeDocInfoImportContext::XMLDateTimeDocInfoImportContext(), XMLDateTimeFieldImportContext::XMLDateTimeFieldImportContext(), XMLDropDownFieldImportContext::XMLDropDownFieldImportContext(), XMLExpressionFieldImportContext::XMLExpressionFieldImportContext(), XMLFileNameImportContext::XMLFileNameImportContext(), XMLFooterFieldImportContext::XMLFooterFieldImportContext(), XMLHeaderFieldImportContext::XMLHeaderFieldImportContext(), XMLPageContinuationImportContext::XMLPageContinuationImportContext(), XMLPageNameFieldImportContext::XMLPageNameFieldImportContext(), XMLPageNumberImportContext::XMLPageNumberImportContext(), XMLPageVarGetFieldImportContext::XMLPageVarGetFieldImportContext(), XMLPageVarSetFieldImportContext::XMLPageVarSetFieldImportContext(), XMLRevisionDocInfoImportContext::XMLRevisionDocInfoImportContext(), XMLSheetNameImportContext::XMLSheetNameImportContext(), XMLSimpleDocInfoImportContext::XMLSimpleDocInfoImportContext(), XMLTemplateNameImportContext::XMLTemplateNameImportContext(), XMLTextInputFieldImportContext::XMLTextInputFieldImportContext(), XMLTimeFieldImportContext::XMLTimeFieldImportContext(), and XMLUserDocInfoImportContext::XMLUserDocInfoImportContext().

XMLTextImportHelper& XMLTextFieldImportContext::rTextImportHelper
private

service name for text field

Definition at line 56 of file txtfldi.hxx.

Referenced by endFastElement(), and GetImportHelper().

OUString XMLTextFieldImportContext::sContent
private

collect character data

Definition at line 54 of file txtfldi.hxx.

Referenced by GetContent().

OUStringBuffer XMLTextFieldImportContext::sContentBuffer
private

Definition at line 53 of file txtfldi.hxx.

Referenced by characters(), and GetContent().

OUString XMLTextFieldImportContext::sServiceName
private

character data after collection

Definition at line 55 of file txtfldi.hxx.

Referenced by GetServiceName(), and XMLTextFieldImportContext().

OUString XMLTextFieldImportContext::sServicePrefix
protected

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