LCOV - code coverage report
Current view: top level - xmloff/inc - txtflde.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 1 1 100.0 %
Date: 2014-04-11 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : /** @#file
      21             :  *  XML export of all text fields
      22             :  */
      23             : 
      24             : #ifndef INCLUDED_XMLOFF_INC_TXTFLDE_HXX
      25             : #define INCLUDED_XMLOFF_INC_TXTFLDE_HXX
      26             : 
      27             : #include <com/sun/star/uno/Reference.h>
      28             : #include <xmloff/xmlnmspe.hxx>
      29             : 
      30             : #include <rtl/ustring.hxx>
      31             : #include <xmloff/xmltoken.hxx>
      32             : 
      33             : #include <map>
      34             : #include <set>
      35             : 
      36             : 
      37             : class SvXMLExport;
      38             : struct XMLPropertyState;
      39             : 
      40             : namespace com { namespace sun { namespace star {
      41             :     namespace util { struct DateTime; }
      42             :     namespace util { struct Date; }
      43             :     namespace text { class XTextField; }
      44             :     namespace text { class XText; }
      45             :     namespace beans { class XPropertySet; }
      46             :     namespace beans { class XPropertySetInfo; }
      47             :     namespace frame { class XModel; }
      48             :     namespace uno { template<typename A> class Sequence; }
      49             : } } }
      50             : 
      51             : 
      52             : /// field IDs,
      53             : //   including translation between UNO speak and XML speak if appropriate
      54             : 
      55             : enum FieldIdEnum {
      56             :     FIELD_ID_SENDER,        // sender == extended user
      57             :     FIELD_ID_AUTHOR,
      58             :     FIELD_ID_DATE,          // current date
      59             :     FIELD_ID_TIME,          // current time (+date)
      60             :     FIELD_ID_PAGENUMBER,    // page number
      61             :     FIELD_ID_PAGESTRING,    // page contination string (page number string)
      62             :     FIELD_ID_REFPAGE_SET,   // set reference page
      63             :     FIELD_ID_REFPAGE_GET,   // get reference page number
      64             : 
      65             :     FIELD_ID_PLACEHOLDER,   // placeholder field == jump edit field
      66             : 
      67             :     FIELD_ID_VARIABLE_DECL, // field type for set variable
      68             :     FIELD_ID_VARIABLE_GET,  // get variable == get expression
      69             :     FIELD_ID_VARIABLE_SET,  // set variable == set expression
      70             :     FIELD_ID_VARIABLE_INPUT,    // input field (variable)
      71             :     FIELD_ID_USER_DECL,     // field type for user field
      72             :     FIELD_ID_USER_GET,      // user field
      73             :     FIELD_ID_USER_INPUT,    // input field (user field)
      74             :     FIELD_ID_TEXT_INPUT,    // input field (text)
      75             :     FIELD_ID_EXPRESSION,    // expression field = formula field
      76             :     FIELD_ID_SEQUENCE_DECL, // field type for sequence
      77             :     FIELD_ID_SEQUENCE,      // sequence field
      78             : 
      79             :     FIELD_ID_DATABASE_NEXT,     // select next row
      80             :     FIELD_ID_DATABASE_SELECT,   // select row # (NumSet)
      81             :     FIELD_ID_DATABASE_DISPLAY,  // display data (form letter field)
      82             :     FIELD_ID_DATABASE_NAME,     // display current db name (database name)
      83             :     FIELD_ID_DATABASE_NUMBER,   // display row # (SetNumber)
      84             : 
      85             :     FIELD_ID_DOCINFO_CREATION_AUTHOR,   // docinfo fields
      86             :     FIELD_ID_DOCINFO_CREATION_TIME,
      87             :     FIELD_ID_DOCINFO_CREATION_DATE,
      88             :     FIELD_ID_DOCINFO_DESCRIPTION,
      89             :     FIELD_ID_DOCINFO_CUSTOM,
      90             :     FIELD_ID_DOCINFO_PRINT_TIME,
      91             :     FIELD_ID_DOCINFO_PRINT_DATE,
      92             :     FIELD_ID_DOCINFO_PRINT_AUTHOR,
      93             :     FIELD_ID_DOCINFO_TITLE,
      94             :     FIELD_ID_DOCINFO_SUBJECT,
      95             :     FIELD_ID_DOCINFO_KEYWORDS,
      96             :     FIELD_ID_DOCINFO_REVISION,
      97             :     FIELD_ID_DOCINFO_EDIT_DURATION,
      98             :     FIELD_ID_DOCINFO_SAVE_TIME,
      99             :     FIELD_ID_DOCINFO_SAVE_DATE,
     100             :     FIELD_ID_DOCINFO_SAVE_AUTHOR,
     101             : 
     102             :     FIELD_ID_CONDITIONAL_TEXT,          // conditionally choose between 2 texts
     103             :     FIELD_ID_HIDDEN_TEXT,               // conditionally hide a text
     104             :     FIELD_ID_HIDDEN_PARAGRAPH,          // conditionally hide a paragraph
     105             : 
     106             :     FIELD_ID_TEMPLATE_NAME,     // display name of template
     107             :     FIELD_ID_CHAPTER,           // display name/number of current chapter
     108             :     FIELD_ID_FILE_NAME,         // display name of current file
     109             : 
     110             :     FIELD_ID_COUNT_PARAGRAPHS,      // statistics fields: - paragraphs
     111             :     FIELD_ID_COUNT_WORDS,           //                    - words
     112             :     FIELD_ID_COUNT_CHARACTERS,      //                    - chars
     113             :     FIELD_ID_COUNT_PAGES,           //                    - pages
     114             :     FIELD_ID_COUNT_TABLES,          //                    - tables
     115             :     FIELD_ID_COUNT_GRAPHICS,        //                    - graphics
     116             :     FIELD_ID_COUNT_OBJECTS,         //                    - objects
     117             : 
     118             :     FIELD_ID_MACRO,                 // macro fields
     119             :     FIELD_ID_REF_REFERENCE,         // get reference field (reference)
     120             :     FIELD_ID_REF_SEQUENCE,          // get reference field (sequence)
     121             :     FIELD_ID_REF_BOOKMARK,          // get reference field (bookmark)
     122             :     FIELD_ID_REF_FOOTNOTE,          // get reference field (footnote)
     123             :     FIELD_ID_REF_ENDNOTE,           // get reference field (endnote)
     124             :     FIELD_ID_DDE,                   // DDE field
     125             : 
     126             :     FIELD_ID_BIBLIOGRAPHY,          // bibliography index entry
     127             : 
     128             :     FIELD_ID_SHEET_NAME,            // name of current (spread-)sheet
     129             :     FIELD_ID_URL,                   // URL field (only Calc, Draw, Impress)
     130             : 
     131             :     FIELD_ID_SCRIPT,                // script fields (for HTML pages, mostly)
     132             :     FIELD_ID_ANNOTATION,            // annotation (notice) field
     133             : 
     134             :     FIELD_ID_COMBINED_CHARACTERS,   // combined characters (asian typography)
     135             : 
     136             :     FIELD_ID_META,                  // text:meta-field (RDF metadata)
     137             : 
     138             :     FIELD_ID_MEASURE,               // for measure shapes
     139             : 
     140             :     FIELD_ID_TABLE_FORMULA,         // DEPRECATED: table formulas (Writer 2.0)
     141             :     FIELD_ID_DROP_DOWN,             // DEPRECATED: dropdown fields (WW8)
     142             : 
     143             :     FIELD_ID_DRAW_HEADER,
     144             :     FIELD_ID_DRAW_FOOTER,
     145             :     FIELD_ID_DRAW_DATE_TIME,
     146             : 
     147             :     FIELD_ID_UNKNOWN        // invalid or unknown field type!
     148             : };
     149             : 
     150             : 
     151             : 
     152             : class XMLTextFieldExport
     153             : {
     154             :     SvXMLExport& rExport;
     155             : 
     156             :     /// store used text field master names (NULL means: don't collect)
     157             :     ::std::map<
     158             :             ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >,
     159             :             ::std::set< OUString > > *
     160             :         pUsedMasters;
     161             : 
     162             : public:
     163             : 
     164             :     XMLTextFieldExport( SvXMLExport& rExp,
     165             :                         /// XMLPropertyState for the combined characters field
     166             :                         XMLPropertyState* pCombinedCharState = NULL );
     167             :     virtual ~XMLTextFieldExport();
     168             : 
     169             :     /// Export this field and the surrounding span element with the formatting.
     170             :     /// To be called for every field in the document body.
     171             :     void ExportField(const ::com::sun::star::uno::Reference <
     172             :                         ::com::sun::star::text::XTextField > & rTextField,
     173             :                      sal_Bool bProgress );
     174             : 
     175             :     /// collect styles (character styles, data styles, ...) for this field
     176             :     /// (if appropriate).
     177             :     /// Also collect used field masters (if pUsedMasters is set)
     178             :     /// to be called for every field during style export.
     179             :     void ExportFieldAutoStyle(const ::com::sun::star::uno::Reference <
     180             :                         ::com::sun::star::text::XTextField > & rTextField,
     181             :                  const sal_Bool bProgress, const sal_Bool bRecursive );
     182             : 
     183             :     /// export field declarations.
     184             :     /// to be called once at beginning of document body.
     185             :     void ExportFieldDeclarations();
     186             : 
     187             :     /// export field declarations for fields used in the particular XText.
     188             :     /// (Requires that a list of used field declarations has previously been
     189             :     ///  built-up in ExportFieldAutoStyle() )
     190             :     void ExportFieldDeclarations(
     191             :         const ::com::sun::star::uno::Reference <
     192             :                 ::com::sun::star::text::XText > & rText);
     193             : 
     194             :     /// export all field declarations, or only those that have been used?
     195             :     /// Calling this method will reset the list of used field declataions.
     196             :     void SetExportOnlyUsedFieldDeclarations(
     197             :         sal_Bool bExportOnlyUsed = sal_True);
     198             : 
     199             :     // determine element or attribute names
     200             :     // (public, because they may be useful in related XML export classes)
     201             :     static enum ::xmloff::token::XMLTokenEnum MapPlaceholderType(sal_uInt16 nType);
     202             :     static enum ::xmloff::token::XMLTokenEnum MapTemplateDisplayFormat(sal_Int16 nType);
     203             :     static enum ::xmloff::token::XMLTokenEnum MapChapterDisplayFormat(sal_Int16 nType);
     204             :     static enum ::xmloff::token::XMLTokenEnum MapFilenameDisplayFormat(sal_Int16 nType);
     205             :     static enum ::xmloff::token::XMLTokenEnum MapDocInfoFieldName(enum FieldIdEnum nToken);
     206             :     static enum ::xmloff::token::XMLTokenEnum MapReferenceSource(sal_Int16 nType);
     207             :     static enum ::xmloff::token::XMLTokenEnum MapReferenceType(sal_Int16 nType);
     208             :     static enum ::xmloff::token::XMLTokenEnum MapCountFieldName(FieldIdEnum nToken);
     209             :     static enum ::xmloff::token::XMLTokenEnum MapBibliographyFieldName(const OUString& sName);
     210             :     static enum ::xmloff::token::XMLTokenEnum MapMeasureKind(sal_Int16 nKind);
     211             :     enum ::xmloff::token::XMLTokenEnum MapPageNumberName(const ::com::sun::star::uno::Reference<
     212             :                       ::com::sun::star::beans::XPropertySet> & xPropSet,
     213             :                       sal_Int32& nOffset);  /// also adjust page offset
     214             :     enum ::xmloff::token::XMLTokenEnum MapAuthorFieldName(const ::com::sun::star::uno::Reference <
     215             :                       ::com::sun::star::beans::XPropertySet > & xPropSet);
     216             :     enum ::xmloff::token::XMLTokenEnum MapSenderFieldName(const ::com::sun::star::uno::Reference <
     217             :                       ::com::sun::star::beans::XPropertySet > & xPropSet);
     218             : 
     219             : protected:
     220             : 
     221        2311 :     SvXMLExport& GetExport() { return rExport; }
     222             : 
     223             :     /// export a field after <text:span> is already written
     224             :     void ExportFieldHelper(
     225             :         const ::com::sun::star::uno::Reference<
     226             :                 ::com::sun::star::text::XTextField> & rTextField,
     227             :         const ::com::sun::star::uno::Reference<
     228             :                 ::com::sun::star::beans::XPropertySet> & rPropSet,
     229             :         const ::com::sun::star::uno::Reference<
     230             :                 ::com::sun::star::beans::XPropertySet> & rRangePropSet,
     231             :         enum FieldIdEnum nToken,
     232             :         sal_Bool bProgress );
     233             : 
     234             :     /// export an empty element
     235             :     void ExportElement(enum ::xmloff::token::XMLTokenEnum eElement, /// element token
     236             :                        sal_Bool bAddSpace = sal_False); /// add blanks around
     237             :                                                         /// element?
     238             : 
     239             :     /// export an element with string content
     240             :     void ExportElement(enum ::xmloff::token::XMLTokenEnum eElement, /// element token
     241             :                        const OUString& sContent, /// element content
     242             :                        sal_Bool bAddSpace = sal_False); /// add blanks around
     243             :                                                         /// element?
     244             : 
     245             :     /// export a macro (as used in the macro field)
     246             :     void ExportMacro( const ::com::sun::star::uno::Reference<
     247             :                           ::com::sun::star::beans::XPropertySet> & rPropSet,
     248             :                       const OUString& rContent);
     249             : 
     250             :     /// export text:meta-field (RDF metadata)
     251             :     void ExportMetaField( const ::com::sun::star::uno::Reference<
     252             :                               ::com::sun::star::beans::XPropertySet> & i_xMeta,
     253             :                           bool i_bAutoStyles, sal_Bool i_bProgress );
     254             : 
     255             :     /// export a boolean attribute
     256             :     void ProcessBoolean(
     257             :         enum ::xmloff::token::XMLTokenEnum eXmlName,    /// attribute token (namespace text)
     258             :         sal_Bool bBool,     /// attribute value
     259             :         sal_Bool bDefault); /// attribute default; omit, if attribute differs
     260             : 
     261             :     /// export an integer attribute
     262             :     void ProcessInteger(
     263             :         enum ::xmloff::token::XMLTokenEnum eXmlName,    /// attribute token (namespace text)
     264             :         sal_Int32 nNum);            /// attribute value
     265             : 
     266             :     /// export an integer attribute, omit if default
     267             :     void ProcessIntegerDef(
     268             :         enum ::xmloff::token::XMLTokenEnum eXmlName,    /// attribute token (namespace text)
     269             :         sal_Int32 nNum,             /// attribute value
     270             :         sal_Int32 nDefault);        /// default value
     271             : 
     272             :     /// export a string attribute
     273             :     void ProcessString(
     274             :         enum ::xmloff::token::XMLTokenEnum eXmlName,        /// attribute token (namespace text)
     275             :         const OUString& sValue,  /// attribute value
     276             :         sal_Bool bOmitEmpty = sal_False, /// omit attribute, if value is empty
     277             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     278             : 
     279             :     /// export a string attribute that gets a QName value
     280             :     void ProcessString(
     281             :         enum ::xmloff::token::XMLTokenEnum eXmlName,        /// attribute token (namespace text)
     282             :         sal_uInt16 nValuePrefix,
     283             :         const OUString& sValue,  /// attribute value
     284             :         sal_Bool bOmitEmpty = sal_False, /// omit attribute, if value is empty
     285             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     286             : 
     287             : 
     288             :     /// export a string attribute, omit if default
     289             :     void ProcessString(
     290             :         enum ::xmloff::token::XMLTokenEnum eXmlName,        /// attribute token (namespace text)
     291             :         const OUString& sValue,  /// attribute value
     292             :         const OUString& sDefault, /// default value; omit if equal
     293             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     294             : 
     295             :     /// export a string attribute, omit if default
     296             :     void ProcessString(
     297             :         enum ::xmloff::token::XMLTokenEnum eXmlName,        /// attribute token (namespace text)
     298             :         sal_uInt16 nValuePrefix,
     299             :         const OUString& sValue,  /// attribute value
     300             :         const OUString& sDefault, /// default value; omit if equal
     301             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     302             : 
     303             :     /// export a string attribute
     304             :     void ProcessString(
     305             :         enum ::xmloff::token::XMLTokenEnum eXmlName,        /// attribute token (namespace text)
     306             :         enum ::xmloff::token::XMLTokenEnum eValue,          /// attribute token
     307             :         sal_Bool bOmitEmpty = sal_False, /// omit attribute, if value is empty
     308             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     309             : 
     310             :     /// export a string attribute, omit if default
     311             :     void ProcessString(
     312             :         enum ::xmloff::token::XMLTokenEnum eXmlName,        /// attribute token (namespace text)
     313             :         enum ::xmloff::token::XMLTokenEnum eValue,          /// attribute value token
     314             :         enum ::xmloff::token::XMLTokenEnum eDefault,        /// default value token
     315             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     316             : 
     317             :     /// export a string as a sequence of paragraphs
     318             :     void ProcessParagraphSequence(
     319             :         /// string containing the paragraphs
     320             :         const OUString& sParagraphSequence);
     321             : 
     322             :     /// export a numbering format (numeric, roman, alphabetic, etc.)
     323             :     void ProcessNumberingType(
     324             :         sal_Int16 nNumberingType);      /// numbering type key
     325             : 
     326             :     /// export display attribute (value, formula, none)
     327             :     void ProcessDisplay(sal_Bool bIsVisible,    /// is visible?
     328             :                         sal_Bool bIsCommand,    /// is show command/show name?
     329             :                         sal_Bool bDefault = sal_True);  /// omit, if default
     330             : 
     331             :     /// export all data-style related attributes
     332             :     void ProcessValueAndType(
     333             :         sal_Bool bIsString,     /// do we process a string or a number?
     334             :         sal_Int32 nFormatKey,   /// format key for NumberFormatter; possibly -1
     335             :         const OUString& sContent, /// string content; possibly invalid
     336             :         const OUString& sDefault, /// default string
     337             :         double fValue,          /// float content; possibly invalid
     338             :         sal_Bool bExportValue,  /// export value attribute?
     339             :         sal_Bool bExportValueType,  /// export value-type attribute?
     340             :         sal_Bool bExportStyle,  /// export style-sttribute?
     341             :         sal_Bool bForceSystemLanguage, /// no style language export
     342             :         sal_Bool bTimeStyle = sal_False); /// exporting a time style?
     343             : 
     344             :     /// export times, dates and durations according to ISO 8601
     345             :     void ProcessDateTime(
     346             :         enum ::xmloff::token::XMLTokenEnum eXMLName,    /// attribute token
     347             :         double dValue,              /// date/time value
     348             :         sal_Bool bIsDate,           /// export as date (rather than date/time)?
     349             :         sal_Bool bIsDuration = sal_False,           /// export as duration
     350             :         sal_Bool bOmitDurationIfZero = sal_True,    /// omit zero-length durat.
     351             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     352             : 
     353             :     /// export a date, time, or duration
     354             :     void ProcessDateTime(
     355             :         enum ::xmloff::token::XMLTokenEnum eXMLName,    /// attribute token
     356             :         sal_Int32 nMinutes,             /// date/time value in minutes
     357             :         sal_Bool bIsDate,           /// export as date?
     358             :         sal_Bool bIsDuration,       /// export as duration?
     359             :         sal_Bool bOmitDurationIfZero,   /// omit zero-length durations
     360             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     361             : 
     362             :     /// export times, dates and durations according to ISO 8601
     363             :     void ProcessDateTime(
     364             :         enum ::xmloff::token::XMLTokenEnum eXMLName,    /// attribute token
     365             :         const ::com::sun::star::util::DateTime& rTime,      /// date/time value
     366             :         sal_Bool bIsDate,           /// export as date (rather than date/time)?
     367             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     368             : 
     369             :     /// export time or dateTime
     370             :     void ProcessTimeOrDateTime(
     371             :         enum ::xmloff::token::XMLTokenEnum eXMLName,    /// attribute token
     372             :         const ::com::sun::star::util::DateTime& rTime,  /// date/time value
     373             :         sal_uInt16 nPrefix = XML_NAMESPACE_TEXT);   /// attribute name prefix
     374             : 
     375             :     /// export all attributes for bibliography data fields
     376             :     void ProcessBibliographyData(
     377             :         const ::com::sun::star::uno::Reference <
     378             :             ::com::sun::star::beans::XPropertySet > & rPropertySet);
     379             : 
     380             :     /// export CommandTypeAttribute
     381             :     void ProcessCommandType(
     382             :         sal_Int32 nCommandType);        /// com::sun::star::sdb::CommandType
     383             : 
     384             :     void ProcessStringSequence(
     385             :         const ::com::sun::star::uno::Sequence<OUString>& rSequence,
     386             :         const OUString& sSelected );
     387             : 
     388             :     void ProcessStringSequence(
     389             :         const ::com::sun::star::uno::Sequence<OUString>& rSequence,
     390             :         sal_Int32 nSelected );
     391             : 
     392             :     /// export attributes that describe a data source
     393             :     void ExportDataBaseElement(
     394             :         enum ::xmloff::token::XMLTokenEnum eElement,
     395             :         const OUString& sContent,
     396             :         const ::com::sun::star::uno::Reference <
     397             :             ::com::sun::star::beans::XPropertySet > & rPropertySet,
     398             :         const ::com::sun::star::uno::Reference <
     399             :             ::com::sun::star::beans::XPropertySetInfo > & rPropertySetInfo );
     400             : 
     401             :     /// for XDependentTextFields, get PropertySet of FieldMaster
     402             :     ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >
     403             :     GetMasterPropertySet(const ::com::sun::star::uno::Reference <
     404             :                          ::com::sun::star::text::XTextField > & rTextField);
     405             : 
     406             :     /// get PropertySet of (any) DependentTextField for this FieldMaster
     407             :     sal_Bool GetDependentFieldPropertySet(
     408             :         const ::com::sun::star::uno::Reference<
     409             :         ::com::sun::star::beans::XPropertySet> & xmaster,
     410             :         ::com::sun::star::uno::Reference<
     411             :         ::com::sun::star::beans::XPropertySet> & xField);
     412             : 
     413             : 
     414             :     /// get field ID from XTextField (and it's Property-Set)
     415             :     enum FieldIdEnum GetFieldID(const ::com::sun::star::uno::Reference <
     416             :                           ::com::sun::star::text::XTextField > & rTextField,
     417             :                           const ::com::sun::star::uno::Reference <
     418             :                           ::com::sun::star::beans::XPropertySet > & xPropSet);
     419             : 
     420             :     /// get field ID from XTextField service name (and it's PropertySet)
     421             :     enum FieldIdEnum MapFieldName(const OUString& sFieldName,
     422             :                             const ::com::sun::star::uno::Reference <
     423             :                             ::com::sun::star::beans::XPropertySet> & xPropSet);
     424             : 
     425             :     /// determine, whether field has string or numeric content
     426             :     sal_Bool IsStringField(FieldIdEnum nFieldType,  /// field ID
     427             :                            const ::com::sun::star::uno::Reference <
     428             :                            ::com::sun::star::beans::XPropertySet > & xPropSet);
     429             : 
     430             : 
     431             :     /// explode a field master name into field type and field name
     432             :     sal_Bool ExplodeFieldMasterName(
     433             :         const OUString& sMasterName, /// name as returned by SO API
     434             :         OUString& sFieldType,        /// out: field type
     435             :         OUString& sVarName);         /// out: variable name
     436             : 
     437             :     /// make reference name for a foot- or endnote
     438             :     static OUString MakeFootnoteRefName(sal_Int16 nSeqNo);
     439             : 
     440             :     /// make reference name for a sequence field
     441             :     static OUString MakeSequenceRefName(sal_Int16 nSeqNo,
     442             :                                               const OUString& rSeqName);
     443             : 
     444             : private:
     445             :     // constants
     446             : 
     447             :     // service names
     448             :     const OUString sServicePrefix;
     449             :     const OUString sFieldMasterPrefix;
     450             :     const OUString sPresentationServicePrefix;
     451             : 
     452             :     // property names
     453             :     const OUString sPropertyAdjust;
     454             :     const OUString sPropertyAuthor;
     455             :     const OUString sPropertyChapterFormat;
     456             :     const OUString sPropertyChapterNumberingLevel;
     457             :     const OUString sPropertyCharStyleNames;
     458             :     const OUString sPropertyCondition;
     459             :     const OUString sPropertyContent;
     460             :     const OUString sPropertyDataBaseName;
     461             :     const OUString sPropertyDataBaseURL;
     462             :     const OUString sPropertyDataColumnName;
     463             :     const OUString sPropertyDataCommandType;
     464             :     const OUString sPropertyDataTableName;
     465             :     const OUString sPropertyDate;
     466             :     const OUString sPropertyDateTime;
     467             :     const OUString sPropertyDateTimeValue;
     468             :     const OUString sPropertyDDECommandElement;
     469             :     const OUString sPropertyDDECommandFile;
     470             :     const OUString sPropertyDDECommandType;
     471             :     const OUString sPropertyDependentTextFields;
     472             :     const OUString sPropertyFalseContent;
     473             :     const OUString sPropertyFields;
     474             :     const OUString sPropertyFieldSubType;
     475             :     const OUString sPropertyFileFormat;
     476             :     const OUString sPropertyFullName;
     477             :     const OUString sPropertyHint;
     478             :     const OUString sPropertyInitials;
     479             :     const OUString sPropertyInstanceName;
     480             :     const OUString sPropertyIsAutomaticUpdate;
     481             :     const OUString sPropertyIsConditionTrue;
     482             :     const OUString sPropertyIsDataBaseFormat;
     483             :     const OUString sPropertyIsDate;
     484             :     const OUString sPropertyIsExpression;
     485             :     const OUString sPropertyIsFixed;
     486             :     const OUString sPropertyIsFixedLanguage;
     487             :     const OUString sPropertyIsHidden;
     488             :     const OUString sPropertyIsInput;
     489             :     const OUString sPropertyIsShowFormula;
     490             :     const OUString sPropertyIsVisible;
     491             :     const OUString sPropertyItems;
     492             :     const OUString sPropertyLevel;
     493             :     const OUString sPropertyMacro;
     494             :     const OUString sPropertyMeasureKind;
     495             :     const OUString sPropertyName;
     496             :     const OUString sPropertyNumberFormat;
     497             :     const OUString sPropertyNumberingSeparator;
     498             :     const OUString sPropertyNumberingType;
     499             :     const OUString sPropertyOffset;
     500             :     const OUString sPropertyOn;
     501             :     const OUString sPropertyPlaceholder;
     502             :     const OUString sPropertyPlaceholderType;
     503             :     const OUString sPropertyReferenceFieldPart;
     504             :     const OUString sPropertyReferenceFieldSource;
     505             :     const OUString sPropertyReferenceFieldType;
     506             :     const OUString sPropertyRevision;
     507             :     const OUString sPropertyScriptType;
     508             :     const OUString sPropertySelectedItem;
     509             :     const OUString sPropertySequenceNumber;
     510             :     const OUString sPropertySequenceValue;
     511             :     const OUString sPropertySetNumber;
     512             :     const OUString sPropertySourceName;
     513             :     const OUString sPropertySubType;
     514             :     const OUString sPropertyTargetFrame;
     515             :     const OUString sPropertyTrueContent;
     516             :     const OUString sPropertyURL;
     517             :     const OUString sPropertyURLContent;
     518             :     const OUString sPropertyUserText;
     519             :     const OUString sPropertyValue;
     520             :     const OUString sPropertyVariableName;
     521             :     const OUString sPropertyVariableSubType;
     522             :     const OUString sPropertyHelp;
     523             :     const OUString sPropertyTooltip;
     524             :     const OUString sPropertyTextRange;
     525             : 
     526             :     const OUString sEmpty;
     527             : 
     528             :     XMLPropertyState* pCombinedCharactersPropertyState;
     529             : 
     530             : };
     531             : 
     532             : 
     533             : 
     534             : 
     535             : 
     536             : 
     537             : #endif
     538             : 
     539             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10