26#include <com/sun/star/uno/Reference.h>
29#include <rtl/ustring.hxx>
42 namespace util {
struct Date; }
43 namespace text {
class XTextField; }
44 namespace text {
class XText; }
46 namespace beans {
class XPropertySetInfo; }
47 namespace frame {
class XModel; }
48 namespace uno {
template<
typename A>
class Sequence; }
154 std::unique_ptr< ::std::map<
155 css::uno::Reference< css::text::XText >,
156 ::std::set< OUString > > >
163 std::unique_ptr<XMLPropertyState> pCombinedCharState );
168 void ExportField(
const css::uno::Reference < css::text::XTextField > & rTextField,
169 bool bProgress,
bool & rPrevCharIsSpace);
176 const bool bProgress,
const bool bRecursive );
186 const css::uno::Reference < css::text::XText > & rText);
191 bool bExportOnlyUsed =
true);
216 const css::uno::Reference< css::text::XTextField> & rTextField,
217 const css::uno::Reference< css::beans::XPropertySet> & rPropSet,
218 const css::uno::Reference< css::beans::XPropertySet> & rRangePropSet,
221 bool & rPrevCharIsSpace);
225 bool bAddSpace =
false);
230 const OUString& sContent);
233 void ExportMacro(
const css::uno::Reference< css::beans::XPropertySet> & rPropSet,
234 const OUString& rContent);
237 void ExportMetaField(
const css::uno::Reference< css::beans::XPropertySet> & i_xMeta,
238 bool i_bAutoStyles,
bool i_bProgress,
239 bool & rPrevCharIsSpace);
261 const OUString& sValue,
262 bool bOmitEmpty =
false,
268 sal_uInt16 nValuePrefix,
269 const OUString& sValue);
275 const OUString& sValue,
276 std::u16string_view sDefault);
281 sal_uInt16 nValuePrefix,
282 const OUString& sValue,
283 std::u16string_view sDefault);
300 std::u16string_view sParagraphSequence);
304 sal_Int16 nNumberingType);
313 sal_Int32 nFormatKey,
314 const OUString& sContent,
315 std::u16string_view sDefault,
318 bool bExportValueType,
320 bool bForceSystemLanguage,
321 bool bTimeStyle =
false);
329 bool bOmitDurationIfZero =
true,
342 const css::util::DateTime& rTime);
347 const css::util::DateTime& rTime);
351 const css::uno::Reference <
352 css::beans::XPropertySet > & rPropertySet);
356 sal_Int32 nCommandType);
359 const css::uno::Sequence<OUString>& rSequence,
360 const OUString& sSelected );
363 const css::uno::Sequence<OUString>& rSequence,
364 sal_Int32 nSelected );
369 const OUString& sContent,
370 const css::uno::Reference < css::beans::XPropertySet > & rPropertySet,
371 const css::uno::Reference < css::beans::XPropertySetInfo > & rPropertySetInfo );
374 static css::uno::Reference < css::beans::XPropertySet >
379 const css::uno::Reference< css::beans::XPropertySet> & xmaster,
380 css::uno::Reference< css::beans::XPropertySet> & xField);
385 const css::uno::Reference < css::beans::XPropertySet > & xPropSet);
389 const css::uno::Reference < css::beans::XPropertySet> & xPropSet);
393 const css::uno::Reference < css::beans::XPropertySet > & xPropSet);
398 std::u16string_view sMasterName,
399 OUString& sFieldType,
407 std::u16string_view rSeqName);
void ExportElement(enum ::xmloff::token::XMLTokenEnum eElement, const OUString &sContent)
add blanks around
void ProcessDateTime(enum ::xmloff::token::XMLTokenEnum eXMLName, double dValue, bool bIsDate, bool bIsDuration, bool bOmitDurationIfZero=true, sal_uInt16 nPrefix=XML_NAMESPACE_TEXT)
exporting a time style?
void ProcessString(enum ::xmloff::token::XMLTokenEnum eXmlName, sal_uInt16 nValuePrefix, const OUString &sValue)
attribute name prefix
static enum::xmloff::token::XMLTokenEnum MapSenderFieldName(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
element name for sender fields
void ProcessString(enum ::xmloff::token::XMLTokenEnum eXmlName, sal_uInt16 nValuePrefix, const OUString &sValue, std::u16string_view sDefault)
default value; omit if equal
void ExportFieldDeclarations(const css::uno::Reference< css::text::XText > &rText)
export field declarations for fields used in the particular XText.
void ProcessTimeOrDateTime(enum ::xmloff::token::XMLTokenEnum eXMLName, const css::util::DateTime &rTime)
date/time value
void ProcessValueAndType(bool bIsString, sal_Int32 nFormatKey, const OUString &sContent, std::u16string_view sDefault, double fValue, bool bExportValue, bool bExportValueType, bool bExportStyle, bool bForceSystemLanguage, bool bTimeStyle=false)
is show command/show name?
std::unique_ptr< ::std::map< css::uno::Reference< css::text::XText >, ::std::set< OUString > > > pUsedMasters
store used text field master names (NULL means: don't collect)
static enum::xmloff::token::XMLTokenEnum MapCountFieldName(FieldIdEnum nToken)
map count/statistics field token to XML name
void ProcessString(enum ::xmloff::token::XMLTokenEnum eXmlName, const OUString &sValue, bool bOmitEmpty=false, sal_uInt16 nPrefix=XML_NAMESPACE_TEXT)
default value
void ExportField(const css::uno::Reference< css::text::XTextField > &rTextField, bool bProgress, bool &rPrevCharIsSpace)
Export this field and the surrounding span element with the formatting.
XMLTextFieldExport(SvXMLExport &rExp, std::unique_ptr< XMLPropertyState > pCombinedCharState)
void ProcessDateTime(enum ::xmloff::token::XMLTokenEnum eXMLName, const css::util::DateTime &rTime)
export as duration?
static OUString MakeSequenceRefName(sal_Int16 nSeqNo, std::u16string_view rSeqName)
make reference name for a sequence field
void ProcessIntegerDef(enum ::xmloff::token::XMLTokenEnum eXmlName, sal_Int32 nNum, sal_Int32 nDefault)
attribute value
static enum::xmloff::token::XMLTokenEnum MapDocInfoFieldName(enum FieldIdEnum nToken)
void SetExportOnlyUsedFieldDeclarations(bool bExportOnlyUsed=true)
export all field declarations, or only those that have been used? Calling this method will reset the ...
void ExportElement(enum ::xmloff::token::XMLTokenEnum eElement, bool bAddSpace=false)
export an empty element
static enum::xmloff::token::XMLTokenEnum MapPlaceholderType(sal_uInt16 nType)
map placeholder type
static bool GetDependentFieldPropertySet(const css::uno::Reference< css::beans::XPropertySet > &xmaster, css::uno::Reference< css::beans::XPropertySet > &xField)
get PropertySet of (any) DependentTextField for this FieldMaster
static OUString MakeFootnoteRefName(sal_Int16 nSeqNo)
out: variable name
void ProcessString(enum ::xmloff::token::XMLTokenEnum eXmlName, enum ::xmloff::token::XMLTokenEnum eValue, enum ::xmloff::token::XMLTokenEnum eDefault)
attribute name prefix
void ProcessStringSequence(const css::uno::Sequence< OUString > &rSequence, const OUString &sSelected)
css::sdb::CommandType
void ProcessDateTime(enum ::xmloff::token::XMLTokenEnum eXMLName, sal_Int32 nMinutes, bool bIsDate, bool bIsDuration)
attribute name prefix
static enum::xmloff::token::XMLTokenEnum MapChapterDisplayFormat(sal_Int16 nType)
map ChapterDisplayFormat to XML string
static enum::xmloff::token::XMLTokenEnum MapPageNumberName(const css::uno::Reference< css::beans::XPropertySet > &xPropSet, sal_Int32 &nOffset)
void ProcessInteger(enum ::xmloff::token::XMLTokenEnum eXmlName, sal_Int32 nNum)
attribute default; omit, if attribute differs
void ExportFieldDeclarations()
export field declarations.
void ProcessBibliographyData(const css::uno::Reference< css::beans::XPropertySet > &rPropertySet)
date/time value
void ExportDataBaseElement(enum ::xmloff::token::XMLTokenEnum eElement, const OUString &sContent, const css::uno::Reference< css::beans::XPropertySet > &rPropertySet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropertySetInfo)
export attributes that describe a data source
static enum FieldIdEnum MapFieldName(std::u16string_view sFieldName, const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
get field ID from XTextField service name (and it's PropertySet)
static enum::xmloff::token::XMLTokenEnum MapReferenceType(sal_Int16 nType)
map ReferenceFieldPart to XML string
static enum::xmloff::token::XMLTokenEnum MapBibliographyFieldName(std::u16string_view sName)
static enum::xmloff::token::XMLTokenEnum MapFilenameDisplayFormat(sal_Int16 nType)
map FilenameDisplayFormat to XML attribute names
void ExportMetaField(const css::uno::Reference< css::beans::XPropertySet > &i_xMeta, bool i_bAutoStyles, bool i_bProgress, bool &rPrevCharIsSpace)
export text:meta-field (RDF metadata)
static enum::xmloff::token::XMLTokenEnum MapReferenceSource(sal_Int16 nType)
map ReferenceFieldPart to XML string
std::unique_ptr< XMLPropertyState > pCombinedCharactersPropertyState
void ProcessStringSequence(const css::uno::Sequence< OUString > &rSequence, sal_Int32 nSelected)
static enum FieldIdEnum GetFieldID(const css::uno::Reference< css::text::XTextField > &rTextField, const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
get field ID from XTextField (and it's Property-Set)
void ExportFieldAutoStyle(const css::uno::Reference< css::text::XTextField > &rTextField, const bool bProgress, const bool bRecursive)
collect styles (character styles, data styles, ...) for this field (if appropriate).
static bool IsStringField(FieldIdEnum nFieldType, const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
determine, whether field has string or numeric content
void ProcessCommandType(sal_Int32 nCommandType)
export CommandTypeAttribute
static enum::xmloff::token::XMLTokenEnum MapTemplateDisplayFormat(sal_Int16 nType)
map TemplateDisplayFormat to XML
static enum::xmloff::token::XMLTokenEnum MapAuthorFieldName(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
also adjust page offset
static enum::xmloff::token::XMLTokenEnum MapMeasureKind(sal_Int16 nKind)
static void ExplodeFieldMasterName(std::u16string_view sMasterName, OUString &sFieldType, OUString &sVarName)
explode a field master name into field type and field name
void ProcessParagraphSequence(std::u16string_view sParagraphSequence)
default value token
void ProcessNumberingType(sal_Int16 nNumberingType)
export a numbering format (numeric, roman, alphabetic, etc.)
void ExportMacro(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const OUString &rContent)
element content
void ProcessString(enum ::xmloff::token::XMLTokenEnum eXmlName, const OUString &sValue, std::u16string_view sDefault)
attribute value
static css::uno::Reference< css::beans::XPropertySet > GetMasterPropertySet(const css::uno::Reference< css::text::XTextField > &rTextField)
for XDependentTextFields, get PropertySet of FieldMaster
void ExportFieldHelper(const css::uno::Reference< css::text::XTextField > &rTextField, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySet > &rRangePropSet, enum FieldIdEnum nToken, bool bProgress, bool &rPrevCharIsSpace)
export a field after <text:span> is already written
void ProcessDisplay(bool bIsVisible, bool bIsCommand)
numbering type key
void ProcessString(enum ::xmloff::token::XMLTokenEnum eXmlName, enum ::xmloff::token::XMLTokenEnum eValue, sal_uInt16 nPrefix=XML_NAMESPACE_TEXT)
default value; omit if equal
SvXMLExport & GetExport()
void ProcessBoolean(enum ::xmloff::token::XMLTokenEnum eXmlName, bool bBool, bool bDefault)
export a boolean attribute
class SAL_NO_VTABLE XPropertySet
XMLTokenEnum
The enumeration of all XML tokens.
Smart struct to transport an Any with an index to the appropriate property-name.
@ FIELD_ID_HIDDEN_PARAGRAPH
@ FIELD_ID_DOCINFO_CREATION_AUTHOR
@ FIELD_ID_DOCINFO_SAVE_DATE
@ FIELD_ID_CONDITIONAL_TEXT
@ FIELD_ID_COUNT_GRAPHICS
@ FIELD_ID_DATABASE_DISPLAY
@ FIELD_ID_DRAW_DATE_TIME
@ FIELD_ID_DOCINFO_DESCRIPTION
@ FIELD_ID_DATABASE_SELECT
@ FIELD_ID_DOCINFO_PRINT_AUTHOR
@ FIELD_ID_COMBINED_CHARACTERS
@ FIELD_ID_DOCINFO_SAVE_AUTHOR
@ FIELD_ID_DOCINFO_CREATION_TIME
@ FIELD_ID_DOCINFO_CREATION_DATE
@ FIELD_ID_DOCINFO_KEYWORDS
@ FIELD_ID_DOCINFO_REVISION
@ FIELD_ID_COUNT_CHARACTERS
@ FIELD_ID_VARIABLE_INPUT
@ FIELD_ID_DOCINFO_SUBJECT
@ FIELD_ID_DOCINFO_EDIT_DURATION
@ FIELD_ID_COUNT_PARAGRAPHS
@ FIELD_ID_DATABASE_NUMBER
@ FIELD_ID_DOCINFO_PRINT_DATE
@ FIELD_ID_DOCINFO_SAVE_TIME
@ FIELD_ID_DOCINFO_PRINT_TIME
@ FIELD_ID_DOCINFO_CUSTOM
constexpr sal_uInt16 XML_NAMESPACE_TEXT