1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_INC_TOX_HXX
20 #define INCLUDED_SW_INC_TOX_HXX
22 #include <cppuhelper/weakref.hxx>
23 #include <sal/log.hxx>
25 #include <i18nlangtag/lang.h>
26 #include <svl/poolitem.hxx>
28 #include <editeng/svxenum.hxx>
29 #include <swtypes.hxx>
35 namespace com
{ namespace sun
{ namespace star
{
36 namespace text
{ class XDocumentIndexMark
; }
44 typedef std::vector
<SwTOXMark
*> SwTOXMarks
;
46 // Entry of content index, alphabetical index or user defined index
48 extern const sal_Unicode C_NUM_REPL
;
49 extern const sal_Unicode C_END_PAGE_NUM
;
50 extern const OUString S_PAGE_DELI
;
52 class SW_DLLPUBLIC SwTOXMark
56 friend void _InitCore();
57 friend class SwTextTOXMark
;
59 OUString aAltText
; // Text of caption is different.
61 OUString aSecondaryKey
;
62 OUString aCitationKeyReading
;
64 // three more strings for phonetic sorting
65 OUString aTextReading
;
66 OUString aPrimaryKeyReading
;
67 OUString aSecondaryKeyReading
;
69 SwTextTOXMark
* pTextAttr
;
72 OUString m_aBookmarkName
;
73 OUString m_aEntryTypeName
; // stored specific entry type name for INDEX field \f
74 bool bAutoGenerated
: 1; // generated using a concordance file
75 bool bMainEntry
: 1; // main entry emphasized by character style
77 ::com::sun::star::uno::WeakReference
<
78 ::com::sun::star::text::XDocumentIndexMark
> m_wXDocumentIndexMark
;
80 SwTOXMark(); // to create the default attribute in _InitCore
84 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
* pNew
) SAL_OVERRIDE
;
87 TYPEINFO_OVERRIDE(); // rtti
89 // single argument ctors shall be explicit.
90 explicit SwTOXMark( const SwTOXType
* pTyp
);
93 SwTOXMark( const SwTOXMark
& rCopy
);
94 SwTOXMark
& operator=( const SwTOXMark
& rCopy
);
96 // "pure virtual methods" of SfxPoolItem
97 virtual bool operator==( const SfxPoolItem
& ) const SAL_OVERRIDE
;
98 virtual SfxPoolItem
* Clone( SfxItemPool
* pPool
= 0 ) const SAL_OVERRIDE
;
100 void InvalidateTOXMark();
102 OUString
GetText() const;
104 inline bool IsAlternativeText() const;
105 inline OUString
GetAlternativeText() const;
107 inline void SetAlternativeText( const OUString
& rAlt
);
109 // content or user defined index
110 inline void SetLevel(sal_uInt16 nLevel
);
111 inline sal_uInt16
GetLevel() const;
112 inline void SetBookmarkName( const OUString
& bName
);
113 inline OUString
GetBookmarkName() const;
114 inline void SetEntryTypeName( const OUString
& sName
);
115 inline OUString
GetEntryTypeName() const;
117 // for alphabetical index only
118 inline void SetPrimaryKey(const OUString
& rStr
);
119 inline void SetSecondaryKey(const OUString
& rStr
);
120 inline void SetTextReading(const OUString
& rStr
);
121 inline void SetPrimaryKeyReading(const OUString
& rStr
);
122 inline void SetSecondaryKeyReading(const OUString
& rStr
);
123 inline void SetCitationKeyReading(const OUString
& rStr
);
125 inline OUString
GetPrimaryKey() const;
126 inline OUString
GetSecondaryKey() const;
127 inline OUString
GetTextReading() const;
128 inline OUString
GetPrimaryKeyReading() const;
129 inline OUString
GetSecondaryKeyReading() const;
130 inline OUString
GetCitationKeyReading() const;
132 bool IsAutoGenerated() const {return bAutoGenerated
;}
133 void SetAutoGenerated(bool bSet
) {bAutoGenerated
= bSet
;}
135 bool IsMainEntry() const {return bMainEntry
;}
136 void SetMainEntry(bool bSet
) { bMainEntry
= bSet
;}
138 inline const SwTOXType
* GetTOXType() const;
140 const SwTextTOXMark
* GetTextTOXMark() const { return pTextAttr
; }
141 SwTextTOXMark
* GetTextTOXMark() { return pTextAttr
; }
143 SAL_DLLPRIVATE ::com::sun::star::uno::WeakReference
<
144 ::com::sun::star::text::XDocumentIndexMark
> const& GetXTOXMark() const
145 { return m_wXDocumentIndexMark
; }
146 SAL_DLLPRIVATE
void SetXTOXMark(::com::sun::star::uno::Reference
<
147 ::com::sun::star::text::XDocumentIndexMark
> const& xMark
)
148 { m_wXDocumentIndexMark
= xMark
; }
149 void DeRegister() { GetRegisteredInNonConst()->Remove( this ); }
150 void RegisterToTOXType( SwTOXType
& rMark
);
151 static void InsertTOXMarks( SwTOXMarks
& aMarks
, const SwTOXType
& rType
);
155 class SwTOXType
: public SwModify
158 SwTOXType(TOXTypes eTyp
, const OUString
& aName
);
160 // @@@ public copy ctor, but no copy assignment?
161 SwTOXType(const SwTOXType
& rCopy
);
163 inline OUString
GetTypeName() const;
164 inline TOXTypes
GetType() const;
170 // @@@ public copy ctor, but no copy assignment?
171 SwTOXType
& operator= (const SwTOXType
&) SAL_DELETED_FUNCTION
;
174 // Structure of the index lines
176 #define FORM_ALPHA_DELIMITTER 1
177 #define FORM_PRIMARY_KEY 2
178 #define FORM_SECONDARY_KEY 3
184 <E#> - entry number <E# CharStyleName,PoolId>
185 <ET> - entry text <ET CharStyleName,PoolId>
186 <E> - entry text and number <E CharStyleName,PoolId>
187 <T> - tab stop <T,,Position,Adjust>
188 <C> - chapter info n = {0, 1, 2, 3, 4 } values of SwChapterFormat <C CharStyleName,PoolId>
189 <TX> - text token <X CharStyleName,PoolId, TOX_STYLE_DELIMITERTextContentTOX_STYLE_DELIMITER>
190 <#> - Page number <# CharStyleName,PoolId>
191 <LS> - Link start <LS>
193 <A00> - Authority entry field <A02 CharStyleName, PoolId>
196 // These enum values are stored and must not be changed!
212 struct SW_DLLPUBLIC SwFormToken
215 OUString sCharStyleName
;
216 SwTwips nTabStopPosition
;
217 FormTokenType eTokenType
;
219 SvxTabAdjust eTabAlign
;
220 sal_uInt16 nChapterFormat
; //SwChapterFormat;
221 sal_uInt16 nOutlineLevel
;//the maximum permitted outline level in numbering
222 sal_uInt16 nAuthorityField
; //enum ToxAuthorityField
223 sal_Unicode cTabFillChar
;
224 bool bWithTab
; // true: do generate tab
225 // character only the tab stop
228 SwFormToken(FormTokenType eType
) :
232 eTabAlign( SVX_TAB_ADJUST_LEFT
),
233 nChapterFormat(0 /*CF_NUMBER*/),
234 nOutlineLevel(MAXLEVEL
), //default to maximum outline level
235 nAuthorityField(0 /*AUTH_FIELD_IDENTIFIER*/),
237 bWithTab(true) // #i21237#
240 OUString
GetString() const;
243 struct SwFormTokenEqualToFormTokenType
247 SwFormTokenEqualToFormTokenType(FormTokenType _eType
) : eType(_eType
) {}
248 bool operator()(const SwFormToken
& rToken
)
250 return rToken
.eTokenType
== eType
;
254 /// Vector of tokens.
255 typedef std::vector
<SwFormToken
> SwFormTokens
;
258 Helper class that converts vectors of tokens to strings and vice
261 class SW_DLLPUBLIC SwFormTokensHelper
264 SwFormTokens m_Tokens
;
270 @param rTokens vector of tokens
272 SwFormTokensHelper(const SwFormTokens
& rTokens
) : m_Tokens(rTokens
) {}
277 @param rStr string representation of the tokens
279 SwFormTokensHelper(const OUString
& rStr
);
282 Returns vector of tokens.
284 @return vector of tokens
286 const SwFormTokens
& GetTokens() const { return m_Tokens
; }
289 class SW_DLLPUBLIC SwForm
291 SwFormTokens aPattern
[ AUTH_TYPE_END
+ 1 ]; // #i21237#
292 OUString aTemplate
[ AUTH_TYPE_END
+ 1 ];
295 sal_uInt16 nFormMaxLevel
;
297 bool bGenerateTabPos
: 1;
298 bool bIsRelTabPos
: 1;
299 bool bCommaSeparated
: 1;
302 SwForm( TOXTypes eTOXType
= TOX_CONTENT
);
303 SwForm( const SwForm
& rForm
);
305 SwForm
& operator=( const SwForm
& rForm
);
307 inline void SetTemplate(sal_uInt16 nLevel
, const OUString
& rName
);
308 inline OUString
GetTemplate(sal_uInt16 nLevel
) const;
311 void SetPattern(sal_uInt16 nLevel
, const SwFormTokens
& rName
);
312 void SetPattern(sal_uInt16 nLevel
, const OUString
& rStr
);
313 const SwFormTokens
& GetPattern(sal_uInt16 nLevel
) const;
315 // fill tab stop positions from template to pattern- #i21237#
316 void AdjustTabStops( SwDoc
& rDoc
);
318 inline TOXTypes
GetTOXType() const;
319 inline sal_uInt16
GetFormMax() const;
321 bool IsRelTabPos() const { return bIsRelTabPos
; }
322 void SetRelTabPos( bool b
) { bIsRelTabPos
= b
; }
324 bool IsCommaSeparated() const { return bCommaSeparated
;}
325 void SetCommaSeparated( bool b
) { bCommaSeparated
= b
;}
327 static sal_uInt16
GetFormMaxLevel( TOXTypes eType
);
329 static OUString
GetFormEntry();
330 static OUString
GetFormTab();
331 static OUString
GetFormPageNums();
332 static OUString
GetFormLinkStt();
333 static OUString
GetFormLinkEnd();
334 static OUString
GetFormEntryNum();
335 static OUString
GetFormEntryText();
336 static OUString
GetFormChapterMark();
337 static OUString
GetFormText();
338 static OUString
GetFormAuth();
341 // Content to create indexes of
342 typedef sal_uInt16 SwTOXElement
;
343 namespace nsSwTOXElement
345 const SwTOXElement TOX_MARK
= 1;
346 const SwTOXElement TOX_OUTLINELEVEL
= 2;
347 const SwTOXElement TOX_TEMPLATE
= 4;
348 const SwTOXElement TOX_OLE
= 8;
349 const SwTOXElement TOX_TABLE
= 16;
350 const SwTOXElement TOX_GRAPHIC
= 32;
351 const SwTOXElement TOX_FRAME
= 64;
352 const SwTOXElement TOX_SEQUENCE
= 128;
353 const SwTOXElement TOX_TABLEADER
= 256;
354 const SwTOXElement TOX_TAB_IN_TOC
= 512;
355 const SwTOXElement TOX_BOOKMARK
= 1024;
356 const SwTOXElement TOX_NEWLINE
= 2048;
357 const SwTOXElement TOX_PARAGRAPH_OUTLINE_LEVEL
= 4096;
358 const SwTOXElement TOX_INDEX_ENTRY_TYPE
= 8192;
361 typedef sal_uInt16 SwTOIOptions
;
362 namespace nsSwTOIOptions
364 const SwTOIOptions TOI_SAME_ENTRY
= 1;
365 const SwTOIOptions TOI_FF
= 2;
366 const SwTOIOptions TOI_CASE_SENSITIVE
= 4;
367 const SwTOIOptions TOI_KEY_AS_ENTRY
= 8;
368 const SwTOIOptions TOI_ALPHA_DELIMITTER
= 16;
369 const SwTOIOptions TOI_DASH
= 32;
370 const SwTOIOptions TOI_INITIAL_CAPS
= 64;
373 //which part of the caption is to be displayed
374 enum SwCaptionDisplay
381 typedef sal_uInt16 SwTOOElements
;
382 namespace nsSwTOOElements
384 const SwTOOElements TOO_MATH
= 0x01;
385 const SwTOOElements TOO_CHART
= 0x02;
386 const SwTOOElements TOO_CALC
= 0x08;
387 const SwTOOElements TOO_DRAW_IMPRESS
= 0x10;
388 const SwTOOElements TOO_OTHER
= 0x80;
391 #define TOX_STYLE_DELIMITER ((sal_Unicode)0x01)
393 // Class for all indexes
394 class SW_DLLPUBLIC SwTOXBase
: public SwClient
396 SwForm aForm
; // description of the lines
397 OUString aName
; // unique name
398 OUString aTitle
; // title
399 OUString m_aBookmarkName
; //Bookmark Name
400 OUString m_aEntryTypeName
; // Type name
402 OUString sMainEntryCharStyle
; // name of the character style applied to main index entries
404 OUString aStyleNames
[MAXLEVEL
]; // (additional) style names TOX_CONTENT, TOX_USER
405 OUString sSequenceName
; // FieldTypeName of a caption sequence
407 LanguageType eLanguage
;
408 OUString sSortAlgorithm
;
411 sal_uInt16 nLevel
; // consider outline levels
412 sal_uInt16 nOptions
; // options of alphabetical index
415 sal_uInt16 nCreateType
; // sources to create the index from
416 sal_uInt16 nOLEOptions
; // OLE sources
417 SwCaptionDisplay eCaptionDisplay
;
418 bool bProtected
: 1; // index protected ?
419 bool bFromChapter
: 1; // create from chapter or document
420 bool bFromObjectNames
: 1; // create a table or object index
421 // from the names rather than the caption
422 bool bLevelFromChapter
: 1; // User index: get the level from the source chapter
425 // Add a data member, for record the TOC field expression of MS Word binary format
426 // For keeping fedality and may giving a better exporting performance
427 OUString maMSTOCExpression
;
428 bool mbKeepExpression
;
431 SwTOXBase( const SwTOXType
* pTyp
, const SwForm
& rForm
,
432 sal_uInt16 nCreaType
, const OUString
& rTitle
);
433 SwTOXBase( const SwTOXBase
& rCopy
, SwDoc
* pDoc
= 0 );
434 virtual ~SwTOXBase();
436 virtual bool GetInfo( SfxPoolItem
& rInfo
) const SAL_OVERRIDE
;
438 // a kind of CopyCtor - check if the TOXBase is at TOXType of the doc.
439 // If not, so create it an copy all other used things. The return is this
440 SwTOXBase
& CopyTOXBase( SwDoc
*, const SwTOXBase
& );
442 const SwTOXType
* GetTOXType() const;
444 sal_uInt16
GetCreateType() const; // creation types
446 OUString
GetTOXName() const {return aName
;}
447 void SetTOXName(const OUString
& rSet
) {aName
= rSet
;}
449 // for record the TOC field expression of MS Word binary format
450 const OUString
& GetMSTOCExpression() const{return maMSTOCExpression
;}
451 void SetMSTOCExpression(const OUString
& rExp
) {maMSTOCExpression
= rExp
;}
452 void EnableKeepExpression() {mbKeepExpression
= true;}
453 void DisableKeepExpression() {mbKeepExpression
= false;}
455 OUString
GetTitle() const; // Title
456 OUString
GetBookmarkName() const;
457 OUString
GetTypeName() const; // Name
458 const SwForm
& GetTOXForm() const; // description of the lines
460 void SetCreate(sal_uInt16
);
461 void SetTitle(const OUString
& rTitle
);
462 void SetTOXForm(const SwForm
& rForm
);
463 void SetBookmarkName(const OUString
& bName
);
465 TOXTypes
GetType() const;
467 OUString
GetMainEntryCharStyle() const {return sMainEntryCharStyle
;}
468 void SetMainEntryCharStyle(const OUString
& rSet
) {sMainEntryCharStyle
= rSet
;}
470 // for record the Index field expression of MS Word
471 OUString
GetEntryTypeName() const;
472 void SetEntryTypeName(const OUString
& sName
);
474 // content index only
475 inline void SetLevel(sal_uInt16
); // consider outline level
476 inline sal_uInt16
GetLevel() const;
478 // alphabetical index only
479 inline sal_uInt16
GetOptions() const; // alphabetical index options
480 inline void SetOptions(sal_uInt16 nOpt
);
483 sal_uInt16
GetOLEOptions() const {return nOLEOptions
;}
484 void SetOLEOptions(sal_uInt16 nOpt
) {nOLEOptions
= nOpt
;}
488 // user defined index only
489 inline void SetTemplateName(const OUString
& rName
); // Absatzlayout beachten
491 OUString
GetStyleNames(sal_uInt16 nLevel
) const
493 SAL_WARN_IF( nLevel
>= MAXLEVEL
, "sw", "Which level?");
494 return aStyleNames
[nLevel
];
496 void SetStyleNames(const OUString
& rSet
, sal_uInt16 nLevel
)
498 SAL_WARN_IF( nLevel
>= MAXLEVEL
, "sw", "Which level?");
499 aStyleNames
[nLevel
] = rSet
;
501 bool IsFromChapter() const { return bFromChapter
;}
502 void SetFromChapter(bool bSet
) { bFromChapter
= bSet
;}
504 bool IsFromObjectNames() const {return bFromObjectNames
;}
505 void SetFromObjectNames(bool bSet
) {bFromObjectNames
= bSet
;}
507 bool IsLevelFromChapter() const {return bLevelFromChapter
;}
508 void SetLevelFromChapter(bool bSet
) {bLevelFromChapter
= bSet
;}
510 bool IsProtected() const { return bProtected
; }
511 void SetProtected(bool bSet
) { bProtected
= bSet
; }
513 OUString
GetSequenceName() const {return sSequenceName
;}
514 void SetSequenceName(const OUString
& rSet
) {sSequenceName
= rSet
;}
516 SwCaptionDisplay
GetCaptionDisplay() const { return eCaptionDisplay
;}
517 void SetCaptionDisplay(SwCaptionDisplay eSet
) {eCaptionDisplay
= eSet
;}
519 bool IsTOXBaseInReadonly() const;
521 const SfxItemSet
* GetAttrSet() const;
522 void SetAttrSet( const SfxItemSet
& );
524 LanguageType
GetLanguage() const {return eLanguage
;}
525 void SetLanguage(LanguageType nLang
) {eLanguage
= nLang
;}
527 OUString
GetSortAlgorithm()const {return sSortAlgorithm
;}
528 void SetSortAlgorithm(const OUString
& rSet
) {sSortAlgorithm
= rSet
;}
530 void AdjustTabStops( SwDoc
& rDoc
)
532 aForm
.AdjustTabStops( rDoc
);
535 SwTOXBase
& operator=(const SwTOXBase
& rSource
);
536 void RegisterToTOXType( SwTOXType
& rMark
);
541 inline OUString
SwTOXMark::GetAlternativeText() const
544 inline OUString
SwTOXMark::GetBookmarkName() const
545 { return m_aBookmarkName
; }
547 inline OUString
SwTOXMark::GetEntryTypeName() const
548 { return m_aEntryTypeName
; }
550 inline const SwTOXType
* SwTOXMark::GetTOXType() const
551 { return static_cast<const SwTOXType
*>(GetRegisteredIn()); }
553 inline bool SwTOXMark::IsAlternativeText() const
554 { return !aAltText
.isEmpty(); }
556 inline void SwTOXMark::SetAlternativeText(const OUString
& rAlt
)
561 inline void SwTOXMark::SetBookmarkName(const OUString
& bName
)
563 m_aBookmarkName
= bName
;
566 inline void SwTOXMark::SetEntryTypeName(const OUString
& sName
)
568 m_aEntryTypeName
= sName
;
570 inline void SwTOXMark::SetLevel( sal_uInt16 nLvl
)
572 SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX
, "sw", "Wrong type");
576 inline void SwTOXMark::SetPrimaryKey( const OUString
& rKey
)
578 SAL_WARN_IF( GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
582 inline void SwTOXMark::SetSecondaryKey( const OUString
& rKey
)
584 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
585 aSecondaryKey
= rKey
;
588 inline void SwTOXMark::SetTextReading( const OUString
& rText
)
590 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
591 aTextReading
= rText
;
594 inline void SwTOXMark::SetPrimaryKeyReading( const OUString
& rKey
)
596 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
597 aPrimaryKeyReading
= rKey
;
600 inline void SwTOXMark::SetCitationKeyReading( const OUString
& rKey
)
602 SAL_WARN_IF(GetTOXType()->GetType() != TOX_CITATION
, "sw", "Wrong type");
603 aCitationKeyReading
= rKey
;
606 inline void SwTOXMark::SetSecondaryKeyReading( const OUString
& rKey
)
608 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
609 aSecondaryKeyReading
= rKey
;
612 inline sal_uInt16
SwTOXMark::GetLevel() const
614 SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX
, "sw", "Wrong type");
618 inline OUString
SwTOXMark::GetPrimaryKey() const
620 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
624 inline OUString
SwTOXMark::GetSecondaryKey() const
626 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
627 return aSecondaryKey
;
630 inline OUString
SwTOXMark::GetTextReading() const
632 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
636 inline OUString
SwTOXMark::GetPrimaryKeyReading() const
638 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
639 return aPrimaryKeyReading
;
642 inline OUString
SwTOXMark::GetSecondaryKeyReading() const
644 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
645 return aSecondaryKeyReading
;
648 inline OUString
SwTOXMark::GetCitationKeyReading() const
650 SAL_WARN_IF(GetTOXType()->GetType() != TOX_CITATION
, "sw", "Wrong type");
651 return aCitationKeyReading
;
656 inline void SwForm::SetTemplate(sal_uInt16 nLevel
, const OUString
& rTemplate
)
658 SAL_WARN_IF(nLevel
>= GetFormMax(), "sw", "Index >= GetFormMax()");
659 aTemplate
[nLevel
] = rTemplate
;
662 inline OUString
SwForm::GetTemplate(sal_uInt16 nLevel
) const
664 SAL_WARN_IF(nLevel
>= GetFormMax(), "sw", "Index >= GetFormMax()");
665 return aTemplate
[nLevel
];
668 inline TOXTypes
SwForm::GetTOXType() const
673 inline sal_uInt16
SwForm::GetFormMax() const
675 return nFormMaxLevel
;
680 inline OUString
SwTOXType::GetTypeName() const
683 inline TOXTypes
SwTOXType::GetType() const
688 inline const SwTOXType
* SwTOXBase::GetTOXType() const
689 { return static_cast<const SwTOXType
*>(GetRegisteredIn()); }
691 inline sal_uInt16
SwTOXBase::GetCreateType() const
692 { return nCreateType
; }
694 inline OUString
SwTOXBase::GetTitle() const
697 inline OUString
SwTOXBase::GetBookmarkName() const
698 { return m_aBookmarkName
; }
700 inline OUString
SwTOXBase::GetEntryTypeName() const
701 { return m_aEntryTypeName
; }
703 inline OUString
SwTOXBase::GetTypeName() const
704 { return GetTOXType()->GetTypeName(); }
706 inline const SwForm
& SwTOXBase::GetTOXForm() const
709 inline void SwTOXBase::SetCreate(sal_uInt16 nCreate
)
710 { nCreateType
= nCreate
; }
712 inline void SwTOXBase::SetTOXForm(const SwForm
& rForm
)
715 inline TOXTypes
SwTOXBase::GetType() const
716 { return GetTOXType()->GetType(); }
718 inline void SwTOXBase::SetLevel(sal_uInt16 nLev
)
720 SAL_WARN_IF(GetTOXType()->GetType() == TOX_INDEX
, "sw", "Wrong type");
724 inline sal_uInt16
SwTOXBase::GetLevel() const
726 SAL_WARN_IF(GetTOXType()->GetType() == TOX_INDEX
, "sw", "Wrong type");
730 inline void SwTOXBase::SetTemplateName(const OUString
& rName
)
732 SAL_WARN("sw", "SwTOXBase::SetTemplateName obsolete");
733 aStyleNames
[0] = rName
;
736 inline sal_uInt16
SwTOXBase::GetOptions() const
738 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
739 return aData
.nOptions
;
742 inline void SwTOXBase::SetOptions(sal_uInt16 nOpt
)
744 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
745 aData
.nOptions
= nOpt
;
748 #endif // INCLUDED_SW_INC_TOX_HXX
750 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */