LibreOffice Module xmloff (master) 1
Functions | Variables
txtfldi.cxx File Reference
#include <sal/config.h>
#include <cassert>
#include <txtfldi.hxx>
#include <txtvfldi.hxx>
#include <utility>
#include <xmloff/xmlimp.hxx>
#include <xmloff/txtimp.hxx>
#include <xmloff/xmlnamespace.hxx>
#include <xmloff/namespacemap.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmluconv.hxx>
#include <xmloff/xmlement.hxx>
#include <XMLStringBufferImportContext.hxx>
#include <xmloff/XMLEventsImportContext.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/text/UserDataPart.hpp>
#include <com/sun/star/style/NumberingType.hpp>
#include <com/sun/star/text/PlaceholderType.hpp>
#include <com/sun/star/text/ReferenceFieldPart.hpp>
#include <com/sun/star/text/ReferenceFieldSource.hpp>
#include <com/sun/star/text/XTextContent.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/text/XDependentTextField.hpp>
#include <com/sun/star/text/FilenameDisplayFormat.hpp>
#include <com/sun/star/text/ChapterFormat.hpp>
#include <com/sun/star/text/TemplateDisplayFormat.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/text/BibliographyDataType.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
#include <sax/tools/converter.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <rtl/math.hxx>
#include <tools/debug.hxx>
#include <osl/diagnose.h>
#include <comphelper/diagnose_ex.hxx>
Include dependency graph for txtfldi.cxx:

Go to the source code of this file.

Functions

constexpr OUStringLiteral gsPropertyFieldSubType (u"UserDataType")
 
constexpr OUStringLiteral gsPropertyAuthorFullName (u"FullName")
 
constexpr OUStringLiteral gsPropertyUserText (u"UserText")
 
constexpr OUStringLiteral gsPropertyPlaceholderType (u"PlaceHolderType")
 
constexpr OUStringLiteral gsPropertyPlaceholder (u"PlaceHolder")
 
constexpr OUStringLiteral gsPropertyAdjust (u"Adjust")
 
constexpr OUStringLiteral gsPropertyDataBaseName (u"DataBaseName")
 
constexpr OUStringLiteral gsPropertyDataBaseURL (u"DataBaseURL")
 
constexpr OUStringLiteral gsPropertyTableName (u"DataTableName")
 
constexpr OUStringLiteral gsPropertyDataCommandType (u"DataCommandType")
 
constexpr OUStringLiteral gsPropertyIsVisible (u"IsVisible")
 
constexpr OUStringLiteral sPropertyRevision (u"Revision")
 
constexpr OUStringLiteral gsPropertyTrueContent (u"TrueContent")
 
constexpr OUStringLiteral gsPropertyFalseContent (u"FalseContent")
 
constexpr OUStringLiteral gsPropertyIsConditionTrue (u"IsConditionTrue")
 
constexpr OUStringLiteral gsPropertyChapterFormat (u"ChapterFormat")
 
constexpr OUStringLiteral gsPropertyLevel (u"Level")
 
static bool lcl_ProcessLabel (const Reference< XFastAttributeList > &xAttrList, OUString &rLabel, bool &rIsSelected)
 

Variables

constexpr OUStringLiteral sAPI_textfield_prefix = u"com.sun.star.text.TextField."
 
constexpr char16_t sAPI_fieldmaster_prefix [] = u"com.sun.star.text.FieldMaster."
 
constexpr OUStringLiteral sAPI_presentation_prefix = u"com.sun.star.presentation.TextField."
 
constexpr OUStringLiteral sAPI_date_time = u"DateTime"
 
constexpr OUStringLiteral sAPI_page_number = u"PageNumber"
 
constexpr OUStringLiteral sAPI_docinfo_change_date_time = u"DocInfo.ChangeDateTime"
 
constexpr OUStringLiteral sAPI_docinfo_create_date_time = u"DocInfo.CreateDateTime"
 
constexpr OUStringLiteral sAPI_docinfo_custom = u"DocInfo.Custom"
 
constexpr OUStringLiteral sAPI_docinfo_print_date_time = u"DocInfo.PrintDateTime"
 
constexpr OUStringLiteral sAPI_dde = u"DDE"
 
constexpr OUStringLiteral sAPI_url = u"URL"
 
constexpr OUStringLiteral sAPI_is_fixed = u"IsFixed"
 
constexpr OUStringLiteral sAPI_content = u"Content"
 
constexpr OUStringLiteral sAPI_author = u"Author"
 
constexpr OUStringLiteral sAPI_hint = u"Hint"
 
constexpr OUStringLiteral sAPI_name = u"Name"
 
constexpr OUStringLiteral sAPI_sub_type = u"SubType"
 
constexpr OUStringLiteral sAPI_date_time_value = u"DateTimeValue"
 
constexpr OUStringLiteral sAPI_number_format = u"NumberFormat"
 
constexpr OUStringLiteral sAPI_numbering_type = u"NumberingType"
 
constexpr OUStringLiteral sAPI_offset = u"Offset"
 
constexpr OUStringLiteral sAPI_condition = u"Condition"
 
constexpr OUStringLiteral sAPI_set_number = u"SetNumber"
 
constexpr OUStringLiteral sAPI_file_format = u"FileFormat"
 
constexpr OUStringLiteral sAPI_is_date = u"IsDate"
 
constexpr OUStringLiteral sAPI_current_presentation = u"CurrentPresentation"
 
constexpr OUStringLiteral sAPI_is_hidden = u"IsHidden"
 
constexpr OUStringLiteral sAPI_is_fixed_language = u"IsFixedLanguage"
 
constexpr OUStringLiteral sAPI_true = u"TRUE"
 
SvXMLEnumMapEntry< PageNumberType > const lcl_aSelectPageAttrMap []
 
const SvXMLEnumMapEntry< sal_uInt16 > aFilenameDisplayMap []
 
const SvXMLEnumMapEntry< sal_uInt16 > aTemplateDisplayMap []
 
const SvXMLEnumMapEntry< sal_uInt16 > aChapterDisplayMap []
 
SvXMLEnumMapEntry< sal_uInt16 > const lcl_aReferenceTypeTokenMap []
 
SvXMLEnumMapEntry< sal_uInt16 > const aBibliographyDataTypeMap []
 

Function Documentation

◆ gsPropertyAdjust()

constexpr OUStringLiteral gsPropertyAdjust ( u"Adjust"  )
constexpr

◆ gsPropertyAuthorFullName()

constexpr OUStringLiteral gsPropertyAuthorFullName ( u"FullName"  )
constexpr

◆ gsPropertyChapterFormat()

constexpr OUStringLiteral gsPropertyChapterFormat ( u"ChapterFormat"  )
constexpr

◆ gsPropertyDataBaseName()

constexpr OUStringLiteral gsPropertyDataBaseName ( u"DataBaseName"  )
constexpr

◆ gsPropertyDataBaseURL()

constexpr OUStringLiteral gsPropertyDataBaseURL ( u"DataBaseURL"  )
constexpr

◆ gsPropertyDataCommandType()

constexpr OUStringLiteral gsPropertyDataCommandType ( u"DataCommandType"  )
constexpr

◆ gsPropertyFalseContent()

constexpr OUStringLiteral gsPropertyFalseContent ( u"FalseContent"  )
constexpr

◆ gsPropertyFieldSubType()

constexpr OUStringLiteral gsPropertyFieldSubType ( u"UserDataType"  )
constexpr

◆ gsPropertyIsConditionTrue()

constexpr OUStringLiteral gsPropertyIsConditionTrue ( u"IsConditionTrue"  )
constexpr

◆ gsPropertyIsVisible()

constexpr OUStringLiteral gsPropertyIsVisible ( u"IsVisible"  )
constexpr

◆ gsPropertyLevel()

constexpr OUStringLiteral gsPropertyLevel ( u"Level"  )
constexpr

◆ gsPropertyPlaceholder()

constexpr OUStringLiteral gsPropertyPlaceholder ( u"PlaceHolder"  )
constexpr

◆ gsPropertyPlaceholderType()

constexpr OUStringLiteral gsPropertyPlaceholderType ( u"PlaceHolderType"  )
constexpr

◆ gsPropertyTableName()

constexpr OUStringLiteral gsPropertyTableName ( u"DataTableName"  )
constexpr

◆ gsPropertyTrueContent()

constexpr OUStringLiteral gsPropertyTrueContent ( u"TrueContent"  )
constexpr

◆ gsPropertyUserText()

constexpr OUStringLiteral gsPropertyUserText ( u"UserText"  )
constexpr

◆ lcl_ProcessLabel()

static bool lcl_ProcessLabel ( const Reference< XFastAttributeList > &  xAttrList,
OUString &  rLabel,
bool &  rIsSelected 
)
static

◆ sPropertyRevision()

constexpr OUStringLiteral sPropertyRevision ( u"Revision"  )
constexpr

Variable Documentation

◆ aBibliographyDataTypeMap

SvXMLEnumMapEntry<sal_uInt16> const aBibliographyDataTypeMap[]
Initial value:
=
{
{ XML_ARTICLE, BibliographyDataType::ARTICLE },
{ XML_BOOK, BibliographyDataType::BOOK },
{ XML_BOOKLET, BibliographyDataType::BOOKLET },
{ XML_CONFERENCE, BibliographyDataType::CONFERENCE },
{ XML_CUSTOM1, BibliographyDataType::CUSTOM1 },
{ XML_CUSTOM2, BibliographyDataType::CUSTOM2 },
{ XML_CUSTOM3, BibliographyDataType::CUSTOM3 },
{ XML_CUSTOM4, BibliographyDataType::CUSTOM4 },
{ XML_CUSTOM5, BibliographyDataType::CUSTOM5 },
{ XML_EMAIL, BibliographyDataType::EMAIL },
{ XML_INBOOK, BibliographyDataType::INBOOK },
{ XML_INCOLLECTION, BibliographyDataType::INCOLLECTION },
{ XML_INPROCEEDINGS, BibliographyDataType::INPROCEEDINGS },
{ XML_JOURNAL, BibliographyDataType::JOURNAL },
{ XML_MANUAL, BibliographyDataType::MANUAL },
{ XML_MASTERSTHESIS, BibliographyDataType::MASTERSTHESIS },
{ XML_MISC, BibliographyDataType::MISC },
{ XML_PHDTHESIS, BibliographyDataType::PHDTHESIS },
{ XML_PROCEEDINGS, BibliographyDataType::PROCEEDINGS },
{ XML_TECHREPORT, BibliographyDataType::TECHREPORT },
{ XML_UNPUBLISHED, BibliographyDataType::UNPUBLISHED },
{ XML_WWW, BibliographyDataType::WWW },
}

Definition at line 2906 of file txtfldi.cxx.

Referenced by XMLBibliographyFieldImportContext::startFastElement().

◆ aChapterDisplayMap

const SvXMLEnumMapEntry<sal_uInt16> aChapterDisplayMap[]
Initial value:
=
{
{ XML_NAME, ChapterFormat::NAME },
{ XML_NUMBER, ChapterFormat::NUMBER },
{ XML_NUMBER_AND_NAME, ChapterFormat::NAME_NUMBER },
{ XML_PLAIN_NUMBER_AND_NAME, ChapterFormat::NO_PREFIX_SUFFIX },
{ XML_PLAIN_NUMBER, ChapterFormat::DIGIT },
}
@ XML_PLAIN_NUMBER_AND_NAME
Definition: xmltoken.hxx:1521

Definition at line 2089 of file txtfldi.cxx.

Referenced by XMLChapterImportContext::ProcessAttribute().

◆ aFilenameDisplayMap

const SvXMLEnumMapEntry<sal_uInt16> aFilenameDisplayMap[]
Initial value:
=
{
{ XML_PATH, FilenameDisplayFormat::PATH },
{ XML_NAME, FilenameDisplayFormat::NAME },
{ XML_NAME_AND_EXTENSION, FilenameDisplayFormat::NAME_AND_EXT },
{ XML_FULL, FilenameDisplayFormat::FULL },
}
@ XML_NAME_AND_EXTENSION
Definition: xmltoken.hxx:1366

Definition at line 1954 of file txtfldi.cxx.

Referenced by XMLFileNameImportContext::ProcessAttribute().

◆ aTemplateDisplayMap

const SvXMLEnumMapEntry<sal_uInt16> aTemplateDisplayMap[]
Initial value:
=
{
{ XML_FULL, TemplateDisplayFormat::FULL },
{ XML_PATH, TemplateDisplayFormat::PATH },
{ XML_NAME, TemplateDisplayFormat::NAME },
{ XML_NAME_AND_EXTENSION, TemplateDisplayFormat::NAME_AND_EXT },
{ XML_AREA, TemplateDisplayFormat::AREA },
{ XML_TITLE, TemplateDisplayFormat::TITLE },
}

Definition at line 2035 of file txtfldi.cxx.

Referenced by XMLTemplateNameImportContext::ProcessAttribute().

◆ lcl_aReferenceTypeTokenMap

SvXMLEnumMapEntry<sal_uInt16> const lcl_aReferenceTypeTokenMap[]
Initial value:
=
{
{ XML_PAGE, ReferenceFieldPart::PAGE},
{ XML_CHAPTER, ReferenceFieldPart::CHAPTER },
{ XML_TEXT, ReferenceFieldPart::TEXT },
{ XML_DIRECTION, ReferenceFieldPart::UP_DOWN },
{ XML_CATEGORY_AND_VALUE, ReferenceFieldPart::CATEGORY_AND_NUMBER },
{ XML_CAPTION, ReferenceFieldPart::ONLY_CAPTION },
{ XML_VALUE, ReferenceFieldPart::ONLY_SEQUENCE_NUMBER },
{ XML_NUMBER, ReferenceFieldPart::NUMBER },
{ XML_NUMBER_NO_SUPERIOR, ReferenceFieldPart::NUMBER_NO_CONTEXT },
{ XML_NUMBER_ALL_SUPERIOR, ReferenceFieldPart::NUMBER_FULL_CONTEXT },
}
@ XML_CATEGORY_AND_VALUE
Definition: xmltoken.hxx:404
@ XML_NUMBER_NO_SUPERIOR
Definition: xmltoken.hxx:3278
@ XML_NUMBER_ALL_SUPERIOR
Definition: xmltoken.hxx:3279

Definition at line 2476 of file txtfldi.cxx.

Referenced by XMLReferenceFieldImportContext::ProcessAttribute().

◆ lcl_aSelectPageAttrMap

SvXMLEnumMapEntry<PageNumberType> const lcl_aSelectPageAttrMap[]
Initial value:
=
{
{ XML_PREVIOUS, PageNumberType_PREV },
{ XML_CURRENT, PageNumberType_CURRENT },
{ XML_NEXT, PageNumberType_NEXT },
{ XML_TOKEN_INVALID, PageNumberType(0) },
}

Definition at line 671 of file txtfldi.cxx.

Referenced by XMLPageContinuationImportContext::ProcessAttribute(), and XMLPageNumberImportContext::ProcessAttribute().

◆ sAPI_author

constexpr OUStringLiteral sAPI_author = u"Author"
constexpr

◆ sAPI_condition

constexpr OUStringLiteral sAPI_condition = u"Condition"
constexpr

Definition at line 114 of file txtfldi.cxx.

◆ sAPI_content

constexpr OUStringLiteral sAPI_content = u"Content"
constexpr

◆ sAPI_current_presentation

constexpr OUStringLiteral sAPI_current_presentation = u"CurrentPresentation"
constexpr

◆ sAPI_date_time

constexpr OUStringLiteral sAPI_date_time = u"DateTime"
constexpr

Definition at line 94 of file txtfldi.cxx.

◆ sAPI_date_time_value

constexpr OUStringLiteral sAPI_date_time_value = u"DateTimeValue"
constexpr

Definition at line 110 of file txtfldi.cxx.

Referenced by XMLAnnotationImportContext::PrepareField().

◆ sAPI_dde

constexpr OUStringLiteral sAPI_dde = u"DDE"
constexpr

◆ sAPI_docinfo_change_date_time

constexpr OUStringLiteral sAPI_docinfo_change_date_time = u"DocInfo.ChangeDateTime"
constexpr

Definition at line 96 of file txtfldi.cxx.

Referenced by XMLSimpleDocInfoImportContext::MapTokenToServiceName().

◆ sAPI_docinfo_create_date_time

constexpr OUStringLiteral sAPI_docinfo_create_date_time = u"DocInfo.CreateDateTime"
constexpr

Definition at line 97 of file txtfldi.cxx.

Referenced by XMLSimpleDocInfoImportContext::MapTokenToServiceName().

◆ sAPI_docinfo_custom

constexpr OUStringLiteral sAPI_docinfo_custom = u"DocInfo.Custom"
constexpr

◆ sAPI_docinfo_print_date_time

constexpr OUStringLiteral sAPI_docinfo_print_date_time = u"DocInfo.PrintDateTime"
constexpr

Definition at line 99 of file txtfldi.cxx.

Referenced by XMLSimpleDocInfoImportContext::MapTokenToServiceName().

◆ sAPI_fieldmaster_prefix

constexpr char16_t sAPI_fieldmaster_prefix[] = u"com.sun.star.text.FieldMaster."
constexpr

◆ sAPI_file_format

constexpr OUStringLiteral sAPI_file_format = u"FileFormat"
constexpr

Definition at line 116 of file txtfldi.cxx.

◆ sAPI_hint

constexpr OUStringLiteral sAPI_hint = u"Hint"
constexpr

Definition at line 107 of file txtfldi.cxx.

Referenced by XMLMacroFieldImportContext::PrepareField().

◆ sAPI_is_date

constexpr OUStringLiteral sAPI_is_date = u"IsDate"
constexpr

Definition at line 117 of file txtfldi.cxx.

◆ sAPI_is_fixed

constexpr OUStringLiteral sAPI_is_fixed = u"IsFixed"
constexpr

Definition at line 104 of file txtfldi.cxx.

◆ sAPI_is_fixed_language

constexpr OUStringLiteral sAPI_is_fixed_language = u"IsFixedLanguage"
constexpr

Definition at line 120 of file txtfldi.cxx.

◆ sAPI_is_hidden

constexpr OUStringLiteral sAPI_is_hidden = u"IsHidden"
constexpr

Definition at line 119 of file txtfldi.cxx.

◆ sAPI_name

constexpr OUStringLiteral sAPI_name = u"Name"
constexpr

◆ sAPI_number_format

constexpr OUStringLiteral sAPI_number_format = u"NumberFormat"
constexpr

Definition at line 111 of file txtfldi.cxx.

◆ sAPI_numbering_type

constexpr OUStringLiteral sAPI_numbering_type = u"NumberingType"
constexpr

Definition at line 112 of file txtfldi.cxx.

Referenced by XMLPageVarGetFieldImportContext::PrepareField().

◆ sAPI_offset

constexpr OUStringLiteral sAPI_offset = u"Offset"
constexpr

Definition at line 113 of file txtfldi.cxx.

Referenced by XMLPageVarSetFieldImportContext::PrepareField().

◆ sAPI_page_number

constexpr OUStringLiteral sAPI_page_number = u"PageNumber"
constexpr

Definition at line 95 of file txtfldi.cxx.

◆ sAPI_presentation_prefix

constexpr OUStringLiteral sAPI_presentation_prefix = u"com.sun.star.presentation.TextField."
constexpr

◆ sAPI_set_number

constexpr OUStringLiteral sAPI_set_number = u"SetNumber"
constexpr

Definition at line 115 of file txtfldi.cxx.

◆ sAPI_sub_type

constexpr OUStringLiteral sAPI_sub_type = u"SubType"
constexpr

Definition at line 109 of file txtfldi.cxx.

◆ sAPI_textfield_prefix

constexpr OUStringLiteral sAPI_textfield_prefix = u"com.sun.star.text.TextField."
constexpr

Definition at line 90 of file txtfldi.cxx.

Referenced by XMLDdeFieldImportContext::endFastElement().

◆ sAPI_true

constexpr OUStringLiteral sAPI_true = u"TRUE"
constexpr

Definition at line 122 of file txtfldi.cxx.

◆ sAPI_url

constexpr OUStringLiteral sAPI_url = u"URL"
constexpr

Definition at line 101 of file txtfldi.cxx.

Referenced by XMLUrlFieldImportContext::PrepareField().