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>
32 #include <o3tl/typed_flags_set.hxx>
36 namespace com
{ namespace sun
{ namespace star
{
37 namespace text
{ class XDocumentIndexMark
; }
45 typedef std::vector
<SwTOXMark
*> SwTOXMarks
;
47 // Entry of content index, alphabetical index or user defined index
49 extern const sal_Unicode C_NUM_REPL
;
50 extern const sal_Unicode C_END_PAGE_NUM
;
51 extern const OUString S_PAGE_DELI
;
53 class SW_DLLPUBLIC SwTOXMark
57 friend void InitCore();
58 friend class SwTextTOXMark
;
60 OUString m_aAltText
; // Text of caption is different.
61 OUString m_aPrimaryKey
;
62 OUString m_aSecondaryKey
;
63 OUString m_aCitationKeyReading
;
65 // three more strings for phonetic sorting
66 OUString m_aTextReading
;
67 OUString m_aPrimaryKeyReading
;
68 OUString m_aSecondaryKeyReading
;
70 SwTextTOXMark
* m_pTextAttr
;
73 OUString m_aBookmarkName
;
74 OUString m_aEntryTypeName
; // stored specific entry type name for INDEX field \f
75 bool m_bAutoGenerated
: 1; // generated using a concordance file
76 bool m_bMainEntry
: 1; // main entry emphasized by character style
78 css::uno::WeakReference
<css::text::XDocumentIndexMark
> m_wXDocumentIndexMark
;
80 SwTOXMark(); // to create the default attribute in InitCore
84 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
* pNew
) override
;
88 // single argument ctors shall be explicit.
89 explicit SwTOXMark( const SwTOXType
* pTyp
);
90 virtual ~SwTOXMark() override
;
92 SwTOXMark( const SwTOXMark
& rCopy
);
93 SwTOXMark
& operator=( const SwTOXMark
& rCopy
);
95 // "pure virtual methods" of SfxPoolItem
96 virtual bool operator==( const SfxPoolItem
& ) const override
;
97 virtual SfxPoolItem
* Clone( SfxItemPool
* pPool
= nullptr ) const override
;
99 void InvalidateTOXMark();
101 OUString
GetText() const;
103 inline bool IsAlternativeText() const;
104 inline const OUString
& GetAlternativeText() const;
106 inline void SetAlternativeText( const OUString
& rAlt
);
108 // content or user defined index
109 inline void SetLevel(sal_uInt16 nLevel
);
110 inline sal_uInt16
GetLevel() const;
111 inline void SetBookmarkName( const OUString
& bName
);
112 inline const OUString
& GetBookmarkName() const;
113 inline void SetEntryTypeName( const OUString
& sName
);
114 inline const OUString
& GetEntryTypeName() const;
116 // for alphabetical index only
117 inline void SetPrimaryKey(const OUString
& rStr
);
118 inline void SetSecondaryKey(const OUString
& rStr
);
119 inline void SetTextReading(const OUString
& rStr
);
120 inline void SetPrimaryKeyReading(const OUString
& rStr
);
121 inline void SetSecondaryKeyReading(const OUString
& rStr
);
122 inline void SetCitationKeyReading(const OUString
& rStr
);
124 inline OUString
const & GetPrimaryKey() const;
125 inline OUString
const & GetSecondaryKey() const;
126 inline OUString
const & GetTextReading() const;
127 inline OUString
const & GetPrimaryKeyReading() const;
128 inline OUString
const & GetSecondaryKeyReading() const;
130 bool IsAutoGenerated() const {return m_bAutoGenerated
;}
131 void SetAutoGenerated(bool bSet
) {m_bAutoGenerated
= bSet
;}
133 bool IsMainEntry() const {return m_bMainEntry
;}
134 void SetMainEntry(bool bSet
) { m_bMainEntry
= bSet
;}
136 inline const SwTOXType
* GetTOXType() const;
138 const SwTextTOXMark
* GetTextTOXMark() const { return m_pTextAttr
; }
139 SwTextTOXMark
* GetTextTOXMark() { return m_pTextAttr
; }
141 SAL_DLLPRIVATE
css::uno::WeakReference
<css::text::XDocumentIndexMark
> const& GetXTOXMark() const
142 { return m_wXDocumentIndexMark
; }
143 SAL_DLLPRIVATE
void SetXTOXMark(css::uno::Reference
<css::text::XDocumentIndexMark
> const& xMark
)
144 { m_wXDocumentIndexMark
= xMark
; }
145 void DeRegister() { GetRegisteredInNonConst()->Remove( this ); }
146 void RegisterToTOXType( SwTOXType
& rMark
);
147 static void InsertTOXMarks( SwTOXMarks
& aMarks
, const SwTOXType
& rType
);
151 class SwTOXType
: public SwModify
154 SwTOXType(TOXTypes eTyp
, const OUString
& aName
);
156 // @@@ public copy ctor, but no copy assignment?
157 SwTOXType(const SwTOXType
& rCopy
);
159 inline const OUString
& GetTypeName() const;
160 inline TOXTypes
GetType() const;
166 // @@@ public copy ctor, but no copy assignment?
167 SwTOXType
& operator= (const SwTOXType
&) = delete;
170 // Structure of the index lines
172 #define FORM_ALPHA_DELIMITTER 1
173 #define FORM_PRIMARY_KEY 2
174 #define FORM_SECONDARY_KEY 3
180 <E#> - entry number <E# CharStyleName,PoolId>
181 <ET> - entry text <ET CharStyleName,PoolId>
182 <E> - entry text and number <E CharStyleName,PoolId>
183 <T> - tab stop <T,,Position,Adjust>
184 <C> - chapter info n = {0, 1, 2, 3, 4 } values of SwChapterFormat <C CharStyleName,PoolId>
185 <TX> - text token <X CharStyleName,PoolId, TOX_STYLE_DELIMITERTextContentTOX_STYLE_DELIMITER>
186 <#> - Page number <# CharStyleName,PoolId>
187 <LS> - Link start <LS>
189 <A00> - Authority entry field <A02 CharStyleName, PoolId>
192 // These enum values are stored and must not be changed!
208 struct SW_DLLPUBLIC SwFormToken
211 OUString sCharStyleName
;
212 SwTwips nTabStopPosition
;
213 FormTokenType eTokenType
;
215 SvxTabAdjust eTabAlign
;
216 sal_uInt16 nChapterFormat
; //SwChapterFormat;
217 sal_uInt16 nOutlineLevel
;//the maximum permitted outline level in numbering
218 sal_uInt16 nAuthorityField
; //enum ToxAuthorityField
219 sal_Unicode cTabFillChar
;
220 bool bWithTab
; // true: do generate tab
221 // character only the tab stop
224 SwFormToken(FormTokenType eType
) :
228 eTabAlign( SvxTabAdjust::Left
),
229 nChapterFormat(0 /*CF_NUMBER*/),
230 nOutlineLevel(MAXLEVEL
), //default to maximum outline level
231 nAuthorityField(0 /*AUTH_FIELD_IDENTIFIER*/),
233 bWithTab(true) // #i21237#
236 OUString
GetString() const;
239 struct SwFormTokenEqualToFormTokenType
243 SwFormTokenEqualToFormTokenType(FormTokenType _eType
) : eType(_eType
) {}
244 bool operator()(const SwFormToken
& rToken
)
246 return rToken
.eTokenType
== eType
;
250 /// Vector of tokens.
251 typedef std::vector
<SwFormToken
> SwFormTokens
;
254 Helper class that converts vectors of tokens to strings and vice
257 class SW_DLLPUBLIC SwFormTokensHelper
260 SwFormTokens m_Tokens
;
266 @param rStr string representation of the tokens
268 SwFormTokensHelper(const OUString
& rStr
);
271 Returns vector of tokens.
273 @return vector of tokens
275 const SwFormTokens
& GetTokens() const { return m_Tokens
; }
278 class SW_DLLPUBLIC SwForm
280 SwFormTokens m_aPattern
[ AUTH_TYPE_END
+ 1 ]; // #i21237#
281 OUString m_aTemplate
[ AUTH_TYPE_END
+ 1 ];
284 sal_uInt16 m_nFormMaxLevel
;
286 bool m_bIsRelTabPos
: 1;
287 bool m_bCommaSeparated
: 1;
290 SwForm( TOXTypes eTOXType
= TOX_CONTENT
);
291 SwForm( const SwForm
& rForm
);
293 SwForm
& operator=( const SwForm
& rForm
);
295 inline void SetTemplate(sal_uInt16 nLevel
, const OUString
& rName
);
296 inline OUString
const & GetTemplate(sal_uInt16 nLevel
) const;
299 void SetPattern(sal_uInt16 nLevel
, const SwFormTokens
& rName
);
300 void SetPattern(sal_uInt16 nLevel
, const OUString
& rStr
);
301 const SwFormTokens
& GetPattern(sal_uInt16 nLevel
) const;
303 // fill tab stop positions from template to pattern- #i21237#
304 void AdjustTabStops( SwDoc
& rDoc
);
306 inline TOXTypes
GetTOXType() const;
307 inline sal_uInt16
GetFormMax() const;
309 bool IsRelTabPos() const { return m_bIsRelTabPos
; }
310 void SetRelTabPos( bool b
) { m_bIsRelTabPos
= b
; }
312 bool IsCommaSeparated() const { return m_bCommaSeparated
;}
313 void SetCommaSeparated( bool b
) { m_bCommaSeparated
= b
;}
315 static sal_uInt16
GetFormMaxLevel( TOXTypes eType
);
317 static OUString
GetFormEntry();
318 static OUString
GetFormTab();
319 static OUString
GetFormPageNums();
320 static OUString
GetFormLinkStt();
321 static OUString
GetFormLinkEnd();
322 static OUString
GetFormEntryNum();
323 static OUString
GetFormEntryText();
324 static OUString
GetFormChapterMark();
325 static OUString
GetFormText();
326 static OUString
GetFormAuth();
329 // Content to create indexes of
330 enum class SwTOXElement
: sal_uInt16
334 OutlineLevel
= 0x0002,
341 TableLeader
= 0x0100,
345 ParagraphOutlineLevel
= 0x1000,
346 IndexEntryType
= 0x2000,
349 template<> struct typed_flags
<SwTOXElement
> : is_typed_flags
<SwTOXElement
, 0x3fff> {};
352 enum class SwTOIOptions
: sal_uInt16
357 CaseSensitive
= 0x04,
359 AlphaDelimiter
= 0x10,
364 template<> struct typed_flags
<SwTOIOptions
> : is_typed_flags
<SwTOIOptions
, 0x7f> {};
367 //which part of the caption is to be displayed
368 enum SwCaptionDisplay
375 enum class SwTOOElements
: sal_uInt16
385 template<> struct typed_flags
<SwTOOElements
> : is_typed_flags
<SwTOOElements
, 0x9b> {};
388 #define TOX_STYLE_DELIMITER u'\x0001'
390 // Class for all indexes
391 class SW_DLLPUBLIC SwTOXBase
: public SwClient
393 SwForm m_aForm
; // description of the lines
394 OUString m_aName
; // unique name
395 OUString m_aTitle
; // title
396 OUString m_aBookmarkName
; //Bookmark Name
397 OUString m_aEntryTypeName
; // Type name
399 OUString m_sMainEntryCharStyle
; // name of the character style applied to main index entries
401 OUString m_aStyleNames
[MAXLEVEL
]; // (additional) style names TOX_CONTENT, TOX_USER
402 OUString m_sSequenceName
; // FieldTypeName of a caption sequence
404 LanguageType m_eLanguage
;
405 OUString m_sSortAlgorithm
;
408 sal_uInt16 nLevel
; // consider outline levels
409 SwTOIOptions nOptions
; // options of alphabetical index
412 SwTOXElement m_nCreateType
; // sources to create the index from
413 SwTOOElements m_nOLEOptions
; // OLE sources
414 SwCaptionDisplay m_eCaptionDisplay
;
415 bool m_bProtected
: 1; // index protected ?
416 bool m_bFromChapter
: 1; // create from chapter or document
417 bool m_bFromObjectNames
: 1; // create a table or object index
418 // from the names rather than the caption
419 bool m_bLevelFromChapter
: 1; // User index: get the level from the source chapter
422 // Add a data member, for record the TOC field expression of MS Word binary format
423 // For keeping fidelity and may giving a better exporting performance
424 OUString maMSTOCExpression
;
425 bool mbKeepExpression
;
428 SwTOXBase( const SwTOXType
* pTyp
, const SwForm
& rForm
,
429 SwTOXElement nCreaType
, const OUString
& rTitle
);
430 SwTOXBase( const SwTOXBase
& rCopy
, SwDoc
* pDoc
= nullptr );
431 virtual ~SwTOXBase() override
;
433 virtual bool GetInfo( SfxPoolItem
& rInfo
) const override
;
435 // a kind of CopyCtor - check if the TOXBase is at TOXType of the doc.
436 // If not, so create it an copy all other used things.
437 void CopyTOXBase( SwDoc
*, const SwTOXBase
& );
439 const SwTOXType
* GetTOXType() const;
441 SwTOXElement
GetCreateType() const; // creation types
443 const OUString
& GetTOXName() const {return m_aName
;}
444 void SetTOXName(const OUString
& rSet
) {m_aName
= rSet
;}
446 // for record the TOC field expression of MS Word binary format
447 const OUString
& GetMSTOCExpression() const{return maMSTOCExpression
;}
448 void SetMSTOCExpression(const OUString
& rExp
) {maMSTOCExpression
= rExp
;}
449 void EnableKeepExpression() {mbKeepExpression
= true;}
450 void DisableKeepExpression() {mbKeepExpression
= false;}
452 const OUString
& GetTitle() const; // Title
453 const OUString
& GetBookmarkName() const;
454 OUString
GetTypeName() const; // Name
455 const SwForm
& GetTOXForm() const; // description of the lines
457 void SetCreate(SwTOXElement
);
458 void SetTitle(const OUString
& rTitle
);
459 void SetTOXForm(const SwForm
& rForm
);
460 void SetBookmarkName(const OUString
& bName
);
462 TOXTypes
GetType() const;
464 const OUString
& GetMainEntryCharStyle() const {return m_sMainEntryCharStyle
;}
465 void SetMainEntryCharStyle(const OUString
& rSet
) {m_sMainEntryCharStyle
= rSet
;}
467 // for record the Index field expression of MS Word
468 const OUString
& GetEntryTypeName() const;
469 void SetEntryTypeName(const OUString
& sName
);
471 // content index only
472 inline void SetLevel(sal_uInt16
); // consider outline level
473 inline sal_uInt16
GetLevel() const;
475 // alphabetical index only
476 inline SwTOIOptions
GetOptions() const; // alphabetical index options
477 inline void SetOptions(SwTOIOptions nOpt
);
480 SwTOOElements
GetOLEOptions() const {return m_nOLEOptions
;}
481 void SetOLEOptions(SwTOOElements nOpt
) {m_nOLEOptions
= nOpt
;}
485 OUString
const & GetStyleNames(sal_uInt16 nLevel
) const
487 SAL_WARN_IF( nLevel
>= MAXLEVEL
, "sw", "Which level?");
488 return m_aStyleNames
[nLevel
];
490 void SetStyleNames(const OUString
& rSet
, sal_uInt16 nLevel
)
492 SAL_WARN_IF( nLevel
>= MAXLEVEL
, "sw", "Which level?");
493 m_aStyleNames
[nLevel
] = rSet
;
495 bool IsFromChapter() const { return m_bFromChapter
;}
496 void SetFromChapter(bool bSet
) { m_bFromChapter
= bSet
;}
498 bool IsFromObjectNames() const {return m_bFromObjectNames
;}
499 void SetFromObjectNames(bool bSet
) {m_bFromObjectNames
= bSet
;}
501 bool IsLevelFromChapter() const {return m_bLevelFromChapter
;}
502 void SetLevelFromChapter(bool bSet
) {m_bLevelFromChapter
= bSet
;}
504 bool IsProtected() const { return m_bProtected
; }
505 void SetProtected(bool bSet
) { m_bProtected
= bSet
; }
507 const OUString
& GetSequenceName() const {return m_sSequenceName
;}
508 void SetSequenceName(const OUString
& rSet
) {m_sSequenceName
= rSet
;}
510 SwCaptionDisplay
GetCaptionDisplay() const { return m_eCaptionDisplay
;}
511 void SetCaptionDisplay(SwCaptionDisplay eSet
) {m_eCaptionDisplay
= eSet
;}
513 bool IsTOXBaseInReadonly() const;
515 const SfxItemSet
* GetAttrSet() const;
516 void SetAttrSet( const SfxItemSet
& );
518 LanguageType
GetLanguage() const {return m_eLanguage
;}
519 void SetLanguage(LanguageType nLang
) {m_eLanguage
= nLang
;}
521 const OUString
& GetSortAlgorithm()const {return m_sSortAlgorithm
;}
522 void SetSortAlgorithm(const OUString
& rSet
) {m_sSortAlgorithm
= rSet
;}
524 void AdjustTabStops( SwDoc
& rDoc
)
526 m_aForm
.AdjustTabStops( rDoc
);
529 SwTOXBase
& operator=(const SwTOXBase
& rSource
);
530 void RegisterToTOXType( SwTOXType
& rMark
);
535 inline const OUString
& SwTOXMark::GetAlternativeText() const
536 { return m_aAltText
; }
538 inline const OUString
& SwTOXMark::GetBookmarkName() const
539 { return m_aBookmarkName
; }
541 inline const OUString
& SwTOXMark::GetEntryTypeName() const
542 { return m_aEntryTypeName
; }
544 inline const SwTOXType
* SwTOXMark::GetTOXType() const
545 { return static_cast<const SwTOXType
*>(GetRegisteredIn()); }
547 inline bool SwTOXMark::IsAlternativeText() const
548 { return !m_aAltText
.isEmpty(); }
550 inline void SwTOXMark::SetAlternativeText(const OUString
& rAlt
)
555 inline void SwTOXMark::SetBookmarkName(const OUString
& bName
)
557 m_aBookmarkName
= bName
;
560 inline void SwTOXMark::SetEntryTypeName(const OUString
& sName
)
562 m_aEntryTypeName
= sName
;
564 inline void SwTOXMark::SetLevel( sal_uInt16 nLvl
)
566 SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX
, "sw", "Wrong type");
570 inline void SwTOXMark::SetPrimaryKey( const OUString
& rKey
)
572 SAL_WARN_IF( GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
573 m_aPrimaryKey
= rKey
;
576 inline void SwTOXMark::SetSecondaryKey( const OUString
& rKey
)
578 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
579 m_aSecondaryKey
= rKey
;
582 inline void SwTOXMark::SetTextReading( const OUString
& rText
)
584 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
585 m_aTextReading
= rText
;
588 inline void SwTOXMark::SetPrimaryKeyReading( const OUString
& rKey
)
590 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
591 m_aPrimaryKeyReading
= rKey
;
594 inline void SwTOXMark::SetCitationKeyReading( const OUString
& rKey
)
596 SAL_WARN_IF(GetTOXType()->GetType() != TOX_CITATION
, "sw", "Wrong type");
597 m_aCitationKeyReading
= rKey
;
600 inline void SwTOXMark::SetSecondaryKeyReading( const OUString
& rKey
)
602 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
603 m_aSecondaryKeyReading
= rKey
;
606 inline sal_uInt16
SwTOXMark::GetLevel() const
608 SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX
, "sw", "Wrong type");
612 inline OUString
const & SwTOXMark::GetPrimaryKey() const
614 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
615 return m_aPrimaryKey
;
618 inline OUString
const & SwTOXMark::GetSecondaryKey() const
620 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
621 return m_aSecondaryKey
;
624 inline OUString
const & SwTOXMark::GetTextReading() const
626 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
627 return m_aTextReading
;
630 inline OUString
const & SwTOXMark::GetPrimaryKeyReading() const
632 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
633 return m_aPrimaryKeyReading
;
636 inline OUString
const & SwTOXMark::GetSecondaryKeyReading() const
638 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
639 return m_aSecondaryKeyReading
;
644 inline void SwForm::SetTemplate(sal_uInt16 nLevel
, const OUString
& rTemplate
)
646 SAL_WARN_IF(nLevel
>= GetFormMax(), "sw", "Index >= GetFormMax()");
647 m_aTemplate
[nLevel
] = rTemplate
;
650 inline OUString
const & SwForm::GetTemplate(sal_uInt16 nLevel
) const
652 SAL_WARN_IF(nLevel
>= GetFormMax(), "sw", "Index >= GetFormMax()");
653 return m_aTemplate
[nLevel
];
656 inline TOXTypes
SwForm::GetTOXType() const
661 inline sal_uInt16
SwForm::GetFormMax() const
663 return m_nFormMaxLevel
;
668 inline const OUString
& SwTOXType::GetTypeName() const
671 inline TOXTypes
SwTOXType::GetType() const
676 inline const SwTOXType
* SwTOXBase::GetTOXType() const
677 { return static_cast<const SwTOXType
*>(GetRegisteredIn()); }
679 inline SwTOXElement
SwTOXBase::GetCreateType() const
680 { return m_nCreateType
; }
682 inline const OUString
& SwTOXBase::GetTitle() const
685 inline const OUString
& SwTOXBase::GetBookmarkName() const
686 { return m_aBookmarkName
; }
688 inline const OUString
& SwTOXBase::GetEntryTypeName() const
689 { return m_aEntryTypeName
; }
691 inline OUString
SwTOXBase::GetTypeName() const
692 { return GetTOXType()->GetTypeName(); }
694 inline const SwForm
& SwTOXBase::GetTOXForm() const
697 inline void SwTOXBase::SetCreate(SwTOXElement nCreate
)
698 { m_nCreateType
= nCreate
; }
700 inline void SwTOXBase::SetTOXForm(const SwForm
& rForm
)
703 inline TOXTypes
SwTOXBase::GetType() const
704 { return GetTOXType()->GetType(); }
706 inline void SwTOXBase::SetLevel(sal_uInt16 nLev
)
708 SAL_WARN_IF(GetTOXType()->GetType() == TOX_INDEX
, "sw", "Wrong type");
709 m_aData
.nLevel
= nLev
;
712 inline sal_uInt16
SwTOXBase::GetLevel() const
714 SAL_WARN_IF(GetTOXType()->GetType() == TOX_INDEX
, "sw", "Wrong type");
715 return m_aData
.nLevel
;
718 inline SwTOIOptions
SwTOXBase::GetOptions() const
720 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
721 return m_aData
.nOptions
;
724 inline void SwTOXBase::SetOptions(SwTOIOptions nOpt
)
726 SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX
, "sw", "Wrong type");
727 m_aData
.nOptions
= nOpt
;
730 #endif // INCLUDED_SW_INC_TOX_HXX
732 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */