diff options
Diffstat (limited to 'sw/inc/tox.hxx')
-rw-r--r-- | sw/inc/tox.hxx | 236 |
1 files changed, 118 insertions, 118 deletions
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index ac4a490fef11..ce31eca2231f 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -74,7 +74,7 @@ class SW_DLLPUBLIC SwTOXMark friend void _InitCore(); friend class SwTxtTOXMark; - String aAltText; // Der Text des Eintrages ist unterschiedlich + String aAltText; // Der Text des Eintrages ist unterschiedlich String aPrimaryKey, aSecondaryKey; // three more strings for phonetic sorting @@ -84,9 +84,9 @@ class SW_DLLPUBLIC SwTOXMark SwTxtTOXMark* pTxtAttr; - USHORT nLevel; - BOOL bAutoGenerated : 1; // generated using a concordance file - BOOL bMainEntry : 1; // main entry emphasized by character style + USHORT nLevel; + BOOL bAutoGenerated : 1; // generated using a concordance file + BOOL bMainEntry : 1; // main entry emphasized by character style ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark; @@ -104,48 +104,48 @@ public: SwTOXMark& operator=( const SwTOXMark& rCopy ); // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; // SwClient virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ); void InvalidateTOXMark(); - String GetText() const; + String GetText() const; - inline BOOL IsAlternativeText() const; - inline const String& GetAlternativeText() const; + inline BOOL IsAlternativeText() const; + inline const String& GetAlternativeText() const; - inline void SetAlternativeText( const String& rAlt ); + inline void SetAlternativeText( const String& rAlt ); // content or user defined index inline void SetLevel(USHORT nLevel); - inline USHORT GetLevel() const; + inline USHORT GetLevel() const; // for alphabetical index only - inline void SetPrimaryKey(const String& rStr ); - inline void SetSecondaryKey(const String& rStr); + inline void SetPrimaryKey(const String& rStr ); + inline void SetSecondaryKey(const String& rStr); inline void SetTextReading(const String& rStr); inline void SetPrimaryKeyReading(const String& rStr ); inline void SetSecondaryKeyReading(const String& rStr); inline const String& GetPrimaryKey() const; - inline const String& GetSecondaryKey() const; + inline const String& GetSecondaryKey() const; inline const String& GetTextReading() const; inline const String& GetPrimaryKeyReading() const; inline const String& GetSecondaryKeyReading() const; - BOOL IsAutoGenerated() const {return bAutoGenerated;} - void SetAutoGenerated(BOOL bSet) {bAutoGenerated = bSet;} + BOOL IsAutoGenerated() const {return bAutoGenerated;} + void SetAutoGenerated(BOOL bSet) {bAutoGenerated = bSet;} - BOOL IsMainEntry() const {return bMainEntry;} - void SetMainEntry(BOOL bSet) { bMainEntry = bSet;} + BOOL IsMainEntry() const {return bMainEntry;} + void SetMainEntry(BOOL bSet) { bMainEntry = bSet;} inline const SwTOXType* GetTOXType() const; - const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; } - SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; } + const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; } + SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; } SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XDocumentIndexMark> const& GetXTOXMark() const @@ -168,12 +168,12 @@ public: // @@@ public copy ctor, but no copy assignment? SwTOXType(const SwTOXType& rCopy); - inline const String& GetTypeName() const; + inline const String& GetTypeName() const; inline TOXTypes GetType() const; private: - String aName; - TOXTypes eType; + String aName; + TOXTypes eType; // @@@ public copy ctor, but no copy assignment? SwTOXType & operator= (const SwTOXType &); @@ -183,25 +183,25 @@ private: Description: Structure of the index lines --------------------------------------------------------------------*/ -#define FORM_TITLE 0 -#define FORM_ALPHA_DELIMITTER 1 -#define FORM_PRIMARY_KEY 2 -#define FORM_SECONDARY_KEY 3 -#define FORM_ENTRY 4 +#define FORM_TITLE 0 +#define FORM_ALPHA_DELIMITTER 1 +#define FORM_PRIMARY_KEY 2 +#define FORM_SECONDARY_KEY 3 +#define FORM_ENTRY 4 /* Pattern structure - <E#> - entry number <E# CharStyleName,PoolId> - <ET> - entry text <ET CharStyleName,PoolId> + <E#> - entry number <E# CharStyleName,PoolId> + <ET> - entry text <ET CharStyleName,PoolId> <E> - entry text and number <E CharStyleName,PoolId> <T> - tab stop <T,,Position,Adjust> <C> - chapter info n = {0, 1, 2, 3, 4 } values of SwChapterFormat <C CharStyleName,PoolId> - <TX> - text token <X CharStyleName,PoolId, TOX_STYLE_DELIMITERTextContentTOX_STYLE_DELIMITER> + <TX> - text token <X CharStyleName,PoolId, TOX_STYLE_DELIMITERTextContentTOX_STYLE_DELIMITER> <#> - Page number <# CharStyleName,PoolId> <LS> - Link start <LS> <LE> - Link end <LE> - <A00> - Authority entry field <A02 CharStyleName, PoolId> + <A00> - Authority entry field <A02 CharStyleName, PoolId> */ // These enum values are stored and must not be changed! @@ -222,16 +222,16 @@ enum FormTokenType struct SW_DLLPUBLIC SwFormToken { - String sText; - String sCharStyleName; - SwTwips nTabStopPosition; - FormTokenType eTokenType; - USHORT nPoolId; + String sText; + String sCharStyleName; + SwTwips nTabStopPosition; + FormTokenType eTokenType; + USHORT nPoolId; SvxTabAdjust eTabAlign; - USHORT nChapterFormat; //SwChapterFormat; + USHORT nChapterFormat; //SwChapterFormat; USHORT nOutlineLevel;//the maximum permitted outline level in numbering - USHORT nAuthorityField; //enum ToxAuthorityField - sal_Unicode cTabFillChar; + USHORT nAuthorityField; //enum ToxAuthorityField + sal_Unicode cTabFillChar; sal_Bool bWithTab; // TRUE: do generate tab // character only the tab stop // #i21237# @@ -359,67 +359,67 @@ public: class SW_DLLPUBLIC SwForm { - SwFormTokens aPattern[ AUTH_TYPE_END + 1 ]; // #i21237# - String aTemplate[ AUTH_TYPE_END + 1 ]; + SwFormTokens aPattern[ AUTH_TYPE_END + 1 ]; // #i21237# + String aTemplate[ AUTH_TYPE_END + 1 ]; TOXTypes eType; USHORT nFormMaxLevel; - //USHORT nFirstTabPos; -> Value in tab token -// BOOL bHasFirstTabPos : 1; - BOOL bGenerateTabPos : 1; - BOOL bIsRelTabPos : 1; - BOOL bCommaSeparated : 1; + //USHORT nFirstTabPos; -> Value in tab token +// BOOL bHasFirstTabPos : 1; + BOOL bGenerateTabPos : 1; + BOOL bIsRelTabPos : 1; + BOOL bCommaSeparated : 1; public: SwForm( TOXTypes eTOXType = TOX_CONTENT ); SwForm( const SwForm& rForm ); - SwForm& operator=( const SwForm& rForm ); + SwForm& operator=( const SwForm& rForm ); - inline void SetTemplate(USHORT nLevel, const String& rName); - inline const String& GetTemplate(USHORT nLevel) const; + inline void SetTemplate(USHORT nLevel, const String& rName); + inline const String& GetTemplate(USHORT nLevel) const; // #i21237# - void SetPattern(USHORT nLevel, const SwFormTokens& rName); - void SetPattern(USHORT nLevel, const String& rStr); - const SwFormTokens& GetPattern(USHORT nLevel) const; + void SetPattern(USHORT nLevel, const SwFormTokens& rName); + void SetPattern(USHORT nLevel, const String& rStr); + const SwFormTokens& GetPattern(USHORT nLevel) const; // fill tab stop positions from template to pattern // #i21237# - void AdjustTabStops(SwDoc& rDoc, + void AdjustTabStops(SwDoc& rDoc, BOOL bInsertNewTabStops = FALSE); inline TOXTypes GetTOXType() const; - inline USHORT GetFormMax() const; + inline USHORT GetFormMax() const; BOOL IsRelTabPos() const { return bIsRelTabPos; } - void SetRelTabPos( BOOL b ) { bIsRelTabPos = b; } + void SetRelTabPos( BOOL b ) { bIsRelTabPos = b; } - BOOL IsCommaSeparated() const { return bCommaSeparated;} - void SetCommaSeparated( BOOL b) { bCommaSeparated = b;} + BOOL IsCommaSeparated() const { return bCommaSeparated;} + void SetCommaSeparated( BOOL b) { bCommaSeparated = b;} static USHORT GetFormMaxLevel( TOXTypes eType ); - static const sal_Char* aFormEntry; // <E> + static const sal_Char* aFormEntry; // <E> static BYTE nFormEntryLen; // 3 characters - static const sal_Char* aFormTab; // <T> + static const sal_Char* aFormTab; // <T> static BYTE nFormTabLen; // 3 characters - static const sal_Char* aFormPageNums; // <P> + static const sal_Char* aFormPageNums; // <P> static BYTE nFormPageNumsLen; // 3 characters - static const sal_Char* aFormLinkStt; // <LS> + static const sal_Char* aFormLinkStt; // <LS> static BYTE nFormLinkSttLen; // 4 characters - static const sal_Char* aFormLinkEnd; // <LE> + static const sal_Char* aFormLinkEnd; // <LE> static BYTE nFormLinkEndLen; // 4 characters - static const sal_Char* aFormEntryNum; // <E#> + static const sal_Char* aFormEntryNum; // <E#> static BYTE nFormEntryNumLen; // 4 characters - static const sal_Char* aFormEntryTxt; // <ET> + static const sal_Char* aFormEntryTxt; // <ET> static BYTE nFormEntryTxtLen; // 4 characters - static const sal_Char* aFormChapterMark; // <C> + static const sal_Char* aFormChapterMark; // <C> static BYTE nFormChapterMarkLen; // 3 characters - static const sal_Char* aFormText; // <TX> + static const sal_Char* aFormText; // <TX> static BYTE nFormTextLen; // 4 characters - static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value + static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value static BYTE nFormAuthLen; // 3 characters }; @@ -471,7 +471,7 @@ namespace nsSwTOOElements const SwTOOElements TOO_OTHER = 0x80; } -#define TOX_STYLE_DELIMITER ((sal_Unicode)0x01) //JP 19.07.00: use a control char +#define TOX_STYLE_DELIMITER ((sal_Unicode)0x01) //JP 19.07.00: use a control char /*-------------------------------------------------------------------- Description: Class for all indexes @@ -480,13 +480,13 @@ namespace nsSwTOOElements class SW_DLLPUBLIC SwTOXBase : public SwClient { SwForm aForm; // description of the lines - String aName; // unique name + String aName; // unique name String aTitle; // title - String sMainEntryCharStyle; // name of the character style applied to main index entries + String sMainEntryCharStyle; // name of the character style applied to main index entries - String aStyleNames[MAXLEVEL]; // (additional) style names TOX_CONTENT, TOX_USER - String sSequenceName; // FieldTypeName of a caption sequence + String aStyleNames[MAXLEVEL]; // (additional) style names TOX_CONTENT, TOX_USER + String sSequenceName; // FieldTypeName of a caption sequence LanguageType eLanguage; String sSortAlgorithm; @@ -497,13 +497,13 @@ class SW_DLLPUBLIC SwTOXBase : public SwClient } aData; USHORT nCreateType; // sources to create the index from - USHORT nOLEOptions; // OLE sources - SwCaptionDisplay eCaptionDisplay; // - BOOL bProtected : 1; // index protected ? - BOOL bFromChapter : 1; // create from chapter or document - BOOL bFromObjectNames : 1; // create a table or object index + USHORT nOLEOptions; // OLE sources + SwCaptionDisplay eCaptionDisplay; // + BOOL bProtected : 1; // index protected ? + BOOL bFromChapter : 1; // create from chapter or document + BOOL bFromObjectNames : 1; // create a table or object index // from the names rather than the caption - BOOL bLevelFromChapter : 1; // User index: get the level from the source chapter + BOOL bLevelFromChapter : 1; // User index: get the level from the source chapter public: SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm, USHORT nCreaType, const String& rTitle ); @@ -516,75 +516,75 @@ public: // If not, so create it an copy all other used things. The return is this SwTOXBase& CopyTOXBase( SwDoc*, const SwTOXBase& ); - const SwTOXType* GetTOXType() const; // + const SwTOXType* GetTOXType() const; // USHORT GetCreateType() const; // creation types - const String& GetTOXName() const {return aName;} - void SetTOXName(const String& rSet) {aName = rSet;} + const String& GetTOXName() const {return aName;} + void SetTOXName(const String& rSet) {aName = rSet;} const String& GetTitle() const; // Title const String& GetTypeName() const; // Name const SwForm& GetTOXForm() const; // description of the lines - void SetCreate(USHORT); - void SetTitle(const String& rTitle); - void SetTOXForm(const SwForm& rForm); + void SetCreate(USHORT); + void SetTitle(const String& rTitle); + void SetTOXForm(const SwForm& rForm); - TOXTypes GetType() const; + TOXTypes GetType() const; - const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;} - void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;} + const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;} + void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;} // content index only inline void SetLevel(USHORT); // consider outline level - inline USHORT GetLevel() const; + inline USHORT GetLevel() const; // alphabetical index only inline USHORT GetOptions() const; // alphabetical index options - inline void SetOptions(USHORT nOpt); + inline void SetOptions(USHORT nOpt); // index of objects - USHORT GetOLEOptions() const {return nOLEOptions;} - void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;} + USHORT GetOLEOptions() const {return nOLEOptions;} + void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;} // index of objects // user defined index only - inline void SetTemplateName(const String& rName); // Absatzlayout beachten + inline void SetTemplateName(const String& rName); // Absatzlayout beachten - const String& GetStyleNames(USHORT nLevel) const + const String& GetStyleNames(USHORT nLevel) const { DBG_ASSERT( nLevel < MAXLEVEL, "Which level?"); return aStyleNames[nLevel]; } - void SetStyleNames(const String& rSet, USHORT nLevel) + void SetStyleNames(const String& rSet, USHORT nLevel) { DBG_ASSERT( nLevel < MAXLEVEL, "Which level?"); aStyleNames[nLevel] = rSet; } - BOOL IsFromChapter() const { return bFromChapter;} - void SetFromChapter(BOOL bSet) { bFromChapter = bSet;} + BOOL IsFromChapter() const { return bFromChapter;} + void SetFromChapter(BOOL bSet) { bFromChapter = bSet;} - BOOL IsFromObjectNames() const {return bFromObjectNames;} - void SetFromObjectNames(BOOL bSet) {bFromObjectNames = bSet;} + BOOL IsFromObjectNames() const {return bFromObjectNames;} + void SetFromObjectNames(BOOL bSet) {bFromObjectNames = bSet;} - BOOL IsLevelFromChapter() const {return bLevelFromChapter;} - void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;} + BOOL IsLevelFromChapter() const {return bLevelFromChapter;} + void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;} - BOOL IsProtected() const { return bProtected; } - void SetProtected(BOOL bSet) { bProtected = bSet; } + BOOL IsProtected() const { return bProtected; } + void SetProtected(BOOL bSet) { bProtected = bSet; } - const String& GetSequenceName() const {return sSequenceName;} - void SetSequenceName(const String& rSet) {sSequenceName = rSet;} + const String& GetSequenceName() const {return sSequenceName;} + void SetSequenceName(const String& rSet) {sSequenceName = rSet;} - SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;} - void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;} + SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;} + void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;} - BOOL IsTOXBaseInReadonly() const; + BOOL IsTOXBaseInReadonly() const; - const SfxItemSet* GetAttrSet() const; - void SetAttrSet( const SfxItemSet& ); + const SfxItemSet* GetAttrSet() const; + void SetAttrSet( const SfxItemSet& ); LanguageType GetLanguage() const {return eLanguage;} void SetLanguage(LanguageType nLang) {eLanguage = nLang;} @@ -593,7 +593,7 @@ public: void SetSortAlgorithm(const String& rSet) {sSortAlgorithm = rSet;} // #i21237# void AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop); - SwTOXBase& operator=(const SwTOXBase& rSource); + SwTOXBase& operator=(const SwTOXBase& rSource); }; @@ -605,7 +605,7 @@ public: //SwTOXMark // inline const String& SwTOXMark::GetAlternativeText() const - { return aAltText; } + { return aAltText; } inline const SwTOXType* SwTOXMark::GetTOXType() const { return (SwTOXType*)GetRegisteredIn(); } @@ -720,10 +720,10 @@ inline USHORT SwForm::GetFormMax() const //SwTOXType // inline const String& SwTOXType::GetTypeName() const - { return aName; } + { return aName; } inline TOXTypes SwTOXType::GetType() const - { return eType; } + { return eType; } // // SwTOXBase @@ -741,7 +741,7 @@ inline const String& SwTOXBase::GetTypeName() const { return GetTOXType()->GetTypeName(); } inline const SwForm& SwTOXBase::GetTOXForm() const - { return aForm; } + { return aForm; } inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop) { @@ -751,7 +751,7 @@ inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop) inline void SwTOXBase::SetCreate(USHORT nCreate) { nCreateType = nCreate; } -inline void SwTOXBase::SetTOXForm(const SwForm& rForm) +inline void SwTOXBase::SetTOXForm(const SwForm& rForm) { aForm = rForm; } inline TOXTypes SwTOXBase::GetType() const @@ -773,7 +773,7 @@ inline void SwTOXBase::SetTemplateName(const String& rName) { // OSL_ENSURE(GetTOXType()->GetType() == TOX_USER, "Falscher Feldtyp"); // OSL_ENSURE(aData.pTemplateName, "pTemplateName == 0"); -// (*aData.pTemplateName) = rName; +// (*aData.pTemplateName) = rName; DBG_WARNING("SwTOXBase::SetTemplateName obsolete"); aStyleNames[0] = rName; |