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

Generated by: LCOV version 1.10