Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/xmloff/inc/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 18 kB image not shown  

Quelle  txtflde.hxx

  Sprache: C
 

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
informationregarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
*License,Version 20 ( "icense);    use thisfile
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */


/** @#file
 *  XML export of all text fields
 */


#pragma once

#include <com/sun/star/uno/Reference.h>
#include <xmloff/xmlnamespace.hxx>

#include <rtl/ustring.hxx>
#include <xmloff/xmltoken.hxx>

#include <map>
#include <set>
#include <memory>
#include <optional>
#include <string_view>

class SvXMLExport;
struct XMLPropertyState;

namespace com::sun::star {
    namespace util { struct DateTime; }
    namespace text { class XTextField; }
    namespace text { class XText; }
    namespace beans classXPropertySet }
    namespace beans { class XPropertySetInfo; }
    namespace uno { template<typename A> class Sequence; }
}


/// field IDs,
//   including translation between UNO speak and XML speak if appropriate

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
FIELD_ID_SENDERjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
    ,
    FIELD_ID_DATE,          #includemap
    include>
    class SvXMLExport
FIELD_ID_PAGENUMBER// page number
    FIELD_ID_PAGESTRING,    // page continuation string (page number string)::sun:star java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    FIELD_ID_REFPAGE_SET,   // set reference pagenamespace  {  XText
    FIELD_ID_REFPAGE_GET,   // get reference page number

    FIELD_ID_PLACEHOLDER,   // placeholder field == jump edit field

    FIELD_ID_VARIABLE_GET,  // get variable == get expression
    FIELD_ID_VARIABLE_SET  / set variable == set expression
    FIELD_ID_VARIABLE_INPUT,    // input field (variable)
    FIELD_ID_USER_GET,      // user field
    FIELD_ID_USER_INPUTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    FIELD_ID_TEXT_INPUT          java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    ,// page continuation string (page number string)
    FIELD_ID_SEQUENCE,   

FIELD_ID_DATABASE_NEXT     // select next row
    FIELD_ID_DATABASE_SELECT,   
    FIELD_ID_DATABASE_DISPLAY
FIELD_ID_DATABASE_NAME// display current db name (database name)
    FIELD_ID_DATABASE_NUMBER// display row # (SetNumber)

    FIELD_ID_DOCINFO_CREATION_AUTHOR,       ,    /input (variable
        ,    / field field
    FIELD_ID_DOCINFO_CREATION_DATE,
    FIELD_ID_DOCINFO_DESCRIPTION,
    FIELD_ID_DOCINFO_CUSTOM,
FIELD_ID_DOCINFO_PRINT_TIME,
    FIELD_ID_DOCINFO_PRINT_DATEFIELD_ID_DATABASE_NEXT,    /select  java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
FIELD_ID_DOCINFO_PRINT_AUTHOR
    FIELD_ID_DOCINFO_TITLE,
    FIELD_ID_DOCINFO_SUBJECT,/java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
    FIELD_ID_DOCINFO_KEYWORDS,
    FIELD_ID_DOCINFO_REVISION
FIELD_ID_DOCINFO_EDIT_DURATION
    ,
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
THOR

java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    FIELD_ID_HIDDEN_TEXT,FIELD_ID_HIDDEN_TEXT               
    FIELD_ID_HIDDEN_PARAGRAPH,          // conditionally hide a paragraph

    FIELD_ID_TEMPLATE_NAME
    FIELD_ID_CHAPTER           
    FIELD_ID_CHAPTER,           

    FIELD_ID_COUNT_PARAGRAPHS,      // statistics fields: - paragraphs,         // display name of current file
    FIELD_ID_COUNT_WORDS           //                    - words
    FIELD_ID_COUNT_CHARACTERS,      //                    - chars
    FIELD_ID_COUNT_PAGES,           //                    - pages
    FIELD_ID_COUNT_PAGES_RANGE,     //                    - pages in section/range

    FIELD_ID_COUNT_TABLES,          //                    - tables
    FIELD_ID_COUNT_GRAPHICS,        //                    - graphics
    FIELD_ID_COUNT_OBJECTS,         //                    - objects

    FIELD_ID_MACRO                 // macro fields
    FIELD_ID_REF_REFERENCE,         // get reference field (reference)
    FIELD_ID_REF_SEQUENCE          // get reference field (sequence)
    FIELD_ID_REF_BOOKMARK,          // get reference field (bookmark)
    FIELD_ID_REF_FOOTNOTE// get reference field (footnote)
    FIELD_ID_REF_ENDNOTE,           // get reference field (endnote)
    FIELD_ID_REF_STYLE,             // styleref field
    FIELD_ID_DDE// DDE field

    FIELD_ID_BIBLIOGRAPHY,          // bibliography index entry

    FIELD_ID_SHEET_NAME,    FIELD_ID_REF_ENDNOTE           / get reference  (endnote
    FIELD_ID_URL    FIELD_ID_DDE,//DDE

    FIELD_ID_SCRIPT,                // script fields (for HTML pages, mostly)
    FIELD_ID_ANNOTATION,            

    FIELD_ID_COMBINED_CHARACTERS,   // combined characters (asian typography)

    FIELD_ID_META,                  // text:meta-field (RDF metadata)

    FIELD_ID_MEASURE,               // for measure shapes

    FIELD_ID_TABLE_FORMULA,         // DEPRECATED: table formulas (Writer 2.0)
    FIELD_ID_DROP_DOWN              : dropdownfields(W8java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72

    FIELD_ID_DRAW_HEADER,
    FIELD_ID_DRAW_FOOTER
    FIELD_ID_DRAW_DATE_TIME,

    FIELD_ID_UNKNOWN        // invalid or unknown field type!
};


class
{
    SvXMLExport&rExport;

    /// store used text field master names (NULL means: don't collect)
    std:
cssuno:Referencecsstext >,
            ::std::}
        moUsedMasters

public:{

    XMLTextFieldExport( SvXMLExport& rExp,
                        /// XMLPropertyState for the combined characters field
                        
    ~XMLTextFieldExport();

    /// Export this field and the surrounding span element with the formatting.
    /// To be called for every field in the document body.:uno:Reference css:text:XText
     ExportField css::: <css:text:XTextField > rTextField
                     bool        moUsedMastersjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

    /// collect styles (character styles, data styles, ...) for this field
    /// (if appropriate).
    /// Also collect used field masters (if pUsedMasters is set)
    /// to be called for every field during style export.
    void ExportFieldAutoStylefieldin  document.
                 constboolbProgress

    /// export field declarations.
    /// to be called once at beginning of document body.
    voidExportFieldDeclarations(;

    /// export field declarations for fields used in the particular XText.
/java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
    ///  built-up in ExportFieldAutoStyle() )
    void ExportFieldDeclarationsvoidExportFieldAutoStyle( css::: < csstext >&rTextField,
         :::: <csstextXText&rTextjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

    /// export all field declarations, or only those that have been used?
    /// Calling this method will reset the list of used field declarations.
     (
        bool bExportOnlyUsed = true);

    // determine element or attribute names
    // (public, because they may be useful in related XML export classes)const::uno:Reference  csstextXText &rText
    static enum ::xmloff::token::XMLTokenEnum     // Calling this method will reset the list of used field declarations.
    static enum ::xmloff::oken:XMLTokenEnumMapTemplateDisplayFormatsal_Int16 nType;
    static enum ::xmloff::token::XMLTokenEnum MapChapterDisplayFormat(sal_Int16 nType);
        bool bExportOnlyUsed true);
    static enum ::xmloff::token     enum :xmlofftoken:MLTokenEnum MapPlaceholderTypesal_uInt16 nType;
    staticenum ::xmloff::token::XMLTokenEnum MapReferenceSourcesal_Int16 nType);
    static enum ::xmloff::token::XMLTokenEnumMapChapterDisplayFormatsal_Int16 nType);
    static enum:xmloff:tokenXMLTokenEnumMapCountFieldName( nToken
    static enum ::xmloff::token::XMLTokenEnum MapBibliographyFieldName(std::u16string_view sName);
    static ::mloff::token::XMLTokenEnum MapMeasureKind(sal_Int16 nKindjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
     enum ::xmloff::token::XMLTokenEnum MapPageNumberName(const css::uno::Reference< css::beans::XPropertySet> & xPropSet,
                      sal_Int32& nOffset);  /// also adjust page offset
    static enum ::xmloff::token::XMLTokenEnum MapReferenceTypesal_Int16nType
enum::::token::XMLTokenEnum MapSenderFieldName cssunoReferencecss::XPropertySet  xPropSet)java.lang.StringIndexOutOfBoundsException: Index 131 out of bounds for length 131

private:

    SvXMLExport& GetExport() {      enum:xmlofftoken:XMLTokenEnum(sal_Int16nKind)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78

    /// export a field after <text:span> is already writtensal_Int32&nOffset);  /// also adjust page offset
 ExportFieldHelper(
        const css::uno::Reference< css enum:xmloff::::XMLTokenEnum(constcssuno::Reference css::beans:XPropertySet > & xPropSet);
        const css::uno::Reference< 
        const
        eldIdEnum nToken
        
    // export a field after <text:span> is already writtenvoidExportFieldHelper(

    /// export an empty element
    void ExportElement(enum         constcss:uno:< css:textXTextField> &rTextField
                        bAddSpace =false);/// add blanks around
                                                         ::Referencecss::XPropertySet>  rRangePropSet,

/// export an element with string content
    voidExportElement(enum :xmlofftokenXMLTokenEnumeElement, /// element token
                       const OUString& sContent
                       sal_uInt16 nNamespace    void ExportElement :xmlofftoken:XMLTokenEnum, /// element token

    /// export a macro (as used in the macro field)
    void/// element?
                      const OUString& rContent);

/// export text:meta-field (RDF metadata)
    voidvoid(enum:xmlofftoken:XMLTokenEnum eElement,/// element token
                          bool i_bAutoStyles, bool i_bProgress,
                          bool & rPrevCharIsSpace);


    voidProcessBoolean(
        enum ::xmloff                       OUString& rContent);
        bool bBool,     /// attribute value
        bool bDefault,
        sal_uInt16nPrefix;/// namespace

    /// export a boolean attributebool&rPrevCharIsSpace);
    void ProcessBoolean
enum:xmlofftokenXMLTokenEnumeXmlName,    // attribute token (namespace text)
        boolbBool/// attribute value
        bool bDefault); /// attribute default; omit, if attribute differs

    /// export an integer attribute
    voidProcessInteger(
        enum ::xmloff::token        sal_uInt16 nPrefix);/// namespace
        sal_Int32 nNum);            /// attribute value

    /// export an integer attribute, omit if default bBool,    /// attribute value
    void ProcessIntegerDef(
        enum :xmlofftoken::MLTokenEnum,    /// attribute token (namespace text)
        sal_Int32 nNum,             /// attribute value
        sal_Int32 nDefault);        /// default value

    /// export a string attribute
     ProcessString
        enum :xmloff::token:XMLTokenEnumeXmlName        /// attribute token (namespace text)
const OUString& sValue/// attribute value
        boolbOmitEmpty false/// omit attribute, if value is empty
        sal_uInt16     ProcessIntegerDef

    /// export a string attribute that gets a QName value
    void ProcessString(
        enum ::xmloff::token::XMLTokenEnum        sal_Int32nNum             /// attribute value
        sal_uInt16 nValuePrefix,
        const


    /// export a string attribute, omit if default         ::xmlofftoken:MLTokenEnumeXmlName,        /// attribute token (namespace text)
    void ProcessString
        enum ::xmloff::token, /// omit attribute, if value is empty
const&sValue/
        std::u16string_view sDefault); /// default value; omit if equal

    /// export a string attribute, omit if default
    voidProcessString
        enum :sal_uInt16nValuePrefix,
sal_uInt16,
        const OUString& sValue
    /// export a string attribute, omit if default

    /// export a string attribute ProcessString
    void ProcessString(
        enum ::xmloff::token::XMLTokenEnum        const OUString sValue/// attribute value
enum:xmloff::token:: ,          
        sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix

    /// export a string attribute, omit if default
    void    void ProcessString(
        enum ::xmloff::token::XMLTokenEnumeXmlName        /// attribute token (namespace text)
        enum ::mloff::token:XMLTokenEnumeValue,         /// attribute value token
        enum ::xmloff::token::XMLTokenEnum eDefault);       /// default value token

    /// export a string as a sequence of paragraphs ,  /// attribute value
     ProcessParagraphSequencejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
/// string containing the paragraphs
        std:enumxmloff:token:XMLTokenEnum eValue,          

    /// export a numbering format (numeric, roman, alphabetic, etc.)
    void ProcessNumberingType(
        sal_Int16 nNumberingType);      /// numbering type key

    /// export display attribute (value, formula, none)
    void ProcessDisplay(bool bIsVisible,    /// is visible?
    /// export a string attribute, omit if default

    /// export all data-style related attributes
    void ProcessValueAndType(
        bool bIsString,     /// do we process a string or a number?
        sal_Int32nFormatKey,   /// format key for NumberFormatter; possibly -1
        const OUString& sContent eDefault;       /// default value token
tring
        double fValue,          /// float content; possibly invalid
        bool bExportValue,          /// string containing the paragraphs
        boolbExportValueType  // export value-type attribute?
        bool bExportStyle,  /// export style-attribute?
        bool bForceSystemLanguage,/java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
boolbTimeStyle  false // exporting a time style?

    /// export times, dates and durations according to ISO 8601
    void/// export display attribute (value, formula, none)
        enum ::    voidProcessDisplay(bool bIsVisible,    /// is visible?
        double dValue,              /// date/time value
        bool bIsDate,           /// export as date (rather than date/time)?
        bool bIsDuration,           /// export as duration
        bool bOmitDurationIfZero weprocess a  or anumber?
        sal_uInt16 nPrefix XML_NAMESPACE_TEXT);   /// attribute name prefix

    /// export a date, time, or duration
    voidProcessDateTime(
        enum ::stdu16string_viewsDefault,/// default string
sal_Int32,             
        bool ,  
        bool bIsDuration);       /// export as duration?

    /// export times, dates and durations according to ISO 8601
    void ProcessDateTime(
        enum :xmloff::::XMLTokenEnumeXMLName,    
        const        bTimeStyle=); // exporting a time style?

    /// export time or dateTime
    voidProcessTimeOrDateTime(
        enum ::xmloff::token::XMLTokenEnum eXMLName,    /// attribute token
constcss::::DateTime rTime);  /// date/time value

    // export all attributes for bibliography data fields
    void ProcessBibliographyData(
bool           
            cssbeans >& rPropertySet);

        sal_uInt16 nPrefix= XML_NAMESPACE_TEXT);   /// attribute name prefix
    void ProcessCommandType
/// css::sdb::CommandType

    voidProcessDateTime(
        const        enum::xmloff:token::XMLTokenEnum eXMLName/// attribute token
        const OUString& sSelected );

    void ProcessStringSequence(
        const ::uno:equence<OUString> rSequence,
        sal_Int32 nSelected );

    /// export attributes that describe a data source
    void
        enum ::xmloff::token::XMLTokenEnum     ProcessTimeOrDateTime
        constOUStringsContent
        constcssutilDateTime& rTime);/// date/time value
            /// export all attributes for bibliography data fields

    /// for XDependentTextFields, get PropertySet of FieldMaster
    static::beans:: > &rPropertySet);
GetMasterPropertySet cssunoReference csstextXTextField >&rTextField

    // get PropertySet of (any) DependentTextField for this FieldMaster
    static bool GetDependentFieldPropertySet(
        
        ::unoReferencecss:eans::XPropertySet>&xField);


    /// get field ID from XTextField (and it's Property-Set)
    static enum FieldIdEnum GetFieldID(const css::uno::Reference < css::text::XTextField > &&nbsp;rTextField,
                          const css::uno::Reference < css::beans::XPropertySet > & xPropSet);

    /// get field ID from XTextField service name (and it's PropertySet)
    static enum FieldIdEnum<OUString&rSequence,
                            const

    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    static bool IsStringField(FieldIdEnumenum:xmlofftoken::XMLTokenEnum eElement,
                           const css::uno::Reference < css::beans::XPropertySet > & xPropSet);


    /// explode a field master name into field type and field name
    static ExplodeFieldMasterName
        std::u16string_view sMasterName, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
OUStringsFieldType,/// out: field type
        OUString& sVarName);    GetMasterPropertySet(onst::uno:Reference ::textXTextField >&rTextField);

    /// make reference name for a foot- or endnote
    static OUString

    /// make reference name for a sequence field
    static OUString MakeSequenceRefName(sal_Int16 nSeqNo,
                                              ::16 rSeqName);

    std::unique_ptr<XMLPropertyState        ::::Reference cssbeansXPropertySet> &xField)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65

};


/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5 in Prozent
C=64 H=100 G=83

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.