update dev300-m58
[ooovba.git] / sw / inc / tox.hxx
blob17c9c3103e3441a3688e0b4204814ff8ccd4456e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tox.hxx,v $
10 * $Revision: 1.20 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _TOX_HXX
31 #define _TOX_HXX
33 #include <i18npool/lang.h>
34 #include <tools/string.hxx>
36 #include <svx/svxenum.hxx>
37 #include <svtools/svarray.hxx>
38 #include <svtools/poolitem.hxx>
39 #include "swdllapi.h"
40 #include <swtypes.hxx>
41 #include <toxe.hxx>
42 #include <calbck.hxx>
43 #include <errhdl.hxx>
45 #ifndef INCLUDED_VECTOR
46 #include <vector> // #i21237#
47 #define INCLUDED_VECTOR
48 #endif
50 class SwTOXType;
51 class SwTOXMark;
52 class SwTxtTOXMark;
53 class SwDoc;
55 SV_DECL_PTRARR(SwTOXMarks, SwTOXMark*, 0, 10)
57 /*--------------------------------------------------------------------
58 Description: Entry of content index, alphabetical index or user defined index
59 --------------------------------------------------------------------*/
61 #define IVER_TOXMARK_STRPOOL ((USHORT)1)
62 #define IVER_TOXMARK_NEWTOX ((USHORT)2)
64 class SW_DLLPUBLIC SwTOXMark : public SfxPoolItem, public SwClient
66 friend void _InitCore();
67 friend class SwTxtTOXMark;
69 String aAltText; // Der Text des Eintrages ist unterschiedlich
70 String aPrimaryKey, aSecondaryKey;
72 // three more strings for phonetic sorting
73 String aTextReading;
74 String aPrimaryKeyReading;
75 String aSecondaryKeyReading;
77 SwTxtTOXMark* pTxtAttr;
79 USHORT nLevel;
80 BOOL bAutoGenerated : 1; // generated using a concordance file
81 BOOL bMainEntry : 1; // main entry emphasized by character style
84 SwTOXMark(); // to create the dflt. atr. in _InitCore
86 public:
87 TYPEINFO(); // rtti
89 // single argument ctors shall be explicit.
90 explicit SwTOXMark( const SwTOXType* pTyp );
91 virtual ~SwTOXMark();
93 SwTOXMark( const SwTOXMark& rCopy );
94 SwTOXMark& operator=( const SwTOXMark& rCopy );
96 // "pure virtual methods" of SfxPoolItem
97 virtual int operator==( const SfxPoolItem& ) const;
98 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
100 String GetText() const;
102 inline BOOL IsAlternativeText() const;
103 inline const String& GetAlternativeText() const;
105 inline void SetAlternativeText( const String& rAlt );
107 // content or user defined index
108 inline void SetLevel(USHORT nLevel);
109 inline USHORT GetLevel() const;
111 // for alphabetical index only
112 inline void SetPrimaryKey(const String& rStr );
113 inline void SetSecondaryKey(const String& rStr);
114 inline void SetTextReading(const String& rStr);
115 inline void SetPrimaryKeyReading(const String& rStr );
116 inline void SetSecondaryKeyReading(const String& rStr);
118 inline const String& GetPrimaryKey() const;
119 inline const String& GetSecondaryKey() const;
120 inline const String& GetTextReading() const;
121 inline const String& GetPrimaryKeyReading() const;
122 inline const String& GetSecondaryKeyReading() const;
124 BOOL IsAutoGenerated() const {return bAutoGenerated;}
125 void SetAutoGenerated(BOOL bSet) {bAutoGenerated = bSet;}
127 BOOL IsMainEntry() const {return bMainEntry;}
128 void SetMainEntry(BOOL bSet) { bMainEntry = bSet;}
130 inline const SwTOXType* GetTOXType() const;
132 const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; }
133 SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; }
136 /*--------------------------------------------------------------------
137 Description: index types
138 --------------------------------------------------------------------*/
140 class SwTOXType : public SwModify
142 public:
143 SwTOXType(TOXTypes eTyp, const String& aName);
145 // @@@ public copy ctor, but no copy assignment?
146 SwTOXType(const SwTOXType& rCopy);
148 inline const String& GetTypeName() const;
149 inline TOXTypes GetType() const;
151 private:
152 String aName;
153 TOXTypes eType;
155 // @@@ public copy ctor, but no copy assignment?
156 SwTOXType & operator= (const SwTOXType &);
159 /*--------------------------------------------------------------------
160 Description: Structure of the index lines
161 --------------------------------------------------------------------*/
163 #define FORM_TITLE 0
164 #define FORM_ALPHA_DELIMITTER 1
165 #define FORM_PRIMARY_KEY 2
166 #define FORM_SECONDARY_KEY 3
167 #define FORM_ENTRY 4
170 Pattern structure
172 <E#> - entry number <E# CharStyleName,PoolId>
173 <ET> - entry text <ET CharStyleName,PoolId>
174 <E> - entry text and number <E CharStyleName,PoolId>
175 <T> - tab stop <T,,Position,Adjust>
176 <C> - chapter info n = {0, 1, 2, 3, 4 } values of SwChapterFormat <C CharStyleName,PoolId>
177 <TX> - text token <X CharStyleName,PoolId, TOX_STYLE_DELIMITERTextContentTOX_STYLE_DELIMITER>
178 <#> - Page number <# CharStyleName,PoolId>
179 <LS> - Link start <LS>
180 <LE> - Link end <LE>
181 <A00> - Authority entry field <A02 CharStyleName, PoolId>
184 // These enum values are stored and must not be changed!
185 enum FormTokenType
187 TOKEN_ENTRY_NO,
188 TOKEN_ENTRY_TEXT,
189 TOKEN_ENTRY,
190 TOKEN_TAB_STOP,
191 TOKEN_TEXT,
192 TOKEN_PAGE_NUMS,
193 TOKEN_CHAPTER_INFO,
194 TOKEN_LINK_START,
195 TOKEN_LINK_END,
196 TOKEN_AUTHORITY,
197 TOKEN_END
200 struct SW_DLLPUBLIC SwFormToken
202 String sText;
203 String sCharStyleName;
204 SwTwips nTabStopPosition;
205 FormTokenType eTokenType;
206 USHORT nPoolId;
207 SvxTabAdjust eTabAlign;
208 USHORT nChapterFormat; //SwChapterFormat;
209 USHORT nOutlineLevel;//the maximum permitted outline level in numbering
210 USHORT nAuthorityField; //enum ToxAuthorityField
211 sal_Unicode cTabFillChar;
212 sal_Bool bWithTab; // TRUE: do generate tab
213 // character only the tab stop
214 // #i21237#
216 SwFormToken(FormTokenType eType ) :
217 nTabStopPosition(0),
218 eTokenType(eType),
219 nPoolId(USHRT_MAX),
220 eTabAlign( SVX_TAB_ADJUST_LEFT ),
221 nChapterFormat(0 /*CF_NUMBER*/),
222 nOutlineLevel(MAXLEVEL), //default to maximum outline level
223 nAuthorityField(0 /*AUTH_FIELD_IDENTIFIER*/),
224 cTabFillChar(' '),
225 bWithTab(sal_True) // #i21237#
228 String GetString() const;
231 // -> #i21237#
233 Functor that is true when a given token has a certain token type.
235 @param _eType the type to check for
236 @param rToken the token to check
238 @retval TRUE the token has the given type
239 @retval FALSE else
241 struct SwFormTokenEqualToFormTokenType
243 FormTokenType eType;
245 SwFormTokenEqualToFormTokenType(FormTokenType _eType) : eType(_eType) {}
246 bool operator()(const SwFormToken & rToken)
248 return rToken.eTokenType == eType;
253 Functor that appends the string representation of a given token to a string.
255 @param _rText string to append the string representation to
256 @param rToken token whose string representation is appended
258 struct SwFormTokenToString
260 String & rText;
261 SwFormTokenToString(String & _rText) : rText(_rText) {}
262 void operator()(const SwFormToken & rToken) { rText += rToken.GetString(); }
265 /// Vector of tokens.
266 typedef std::vector<SwFormToken> SwFormTokens;
269 Helper class that converts vectors of tokens to strings and vice
270 versa.
272 class SW_DLLPUBLIC SwFormTokensHelper
274 /// the tokens
275 SwFormTokens aTokens;
278 Builds a token from its string representation.
280 @sPattern the whole pattern
281 @nCurPatternPos starting position of the token
283 @return the token
285 SW_DLLPRIVATE SwFormToken BuildToken( const String & sPattern,
286 xub_StrLen & nCurPatternPos ) const;
289 Returns the string of a token.
291 @param sPattern the whole pattern
292 @param nStt starting position of the token
294 @return the string representation of the token
296 SW_DLLPRIVATE String SearchNextToken( const String & sPattern,
297 xub_StrLen nStt ) const;
300 Returns the type of a token.
302 @param sToken the string representation of the token
303 @param pTokenLen return parameter the length of the head of the token
305 If pTokenLen is non-NULL the length of the token's head is
306 written to *pTokenLen
308 @return the type of the token
310 SW_DLLPRIVATE FormTokenType GetTokenType(const String & sToken,
311 xub_StrLen * pTokenLen) const;
313 public:
315 contructor
317 @param rTokens vector of tokens
319 SwFormTokensHelper(const SwFormTokens & rTokens) : aTokens(rTokens) {}
322 constructor
324 @param rStr string representation of the tokens
326 SwFormTokensHelper(const String & rStr);
329 Returns vector of tokens.
331 @return vector of tokens
333 const SwFormTokens & GetTokens() const { return aTokens; }
335 // <- #i21237#
337 class SW_DLLPUBLIC SwForm
339 SwFormTokens aPattern[ AUTH_TYPE_END + 1 ]; // #i21237#
340 String aTemplate[ AUTH_TYPE_END + 1 ];
342 TOXTypes eType;
343 USHORT nFormMaxLevel;
345 //USHORT nFirstTabPos; -> Value in tab token
346 // BOOL bHasFirstTabPos : 1;
347 BOOL bGenerateTabPos : 1;
348 BOOL bIsRelTabPos : 1;
349 BOOL bCommaSeparated : 1;
351 public:
352 SwForm( TOXTypes eTOXType = TOX_CONTENT );
353 SwForm( const SwForm& rForm );
355 SwForm& operator=( const SwForm& rForm );
357 inline void SetTemplate(USHORT nLevel, const String& rName);
358 inline const String& GetTemplate(USHORT nLevel) const;
360 // #i21237#
361 void SetPattern(USHORT nLevel, const SwFormTokens& rName);
362 void SetPattern(USHORT nLevel, const String& rStr);
363 const SwFormTokens& GetPattern(USHORT nLevel) const;
365 // fill tab stop positions from template to pattern
366 // #i21237#
367 void AdjustTabStops(SwDoc& rDoc,
368 BOOL bInsertNewTabStops = FALSE);
370 inline TOXTypes GetTOXType() const;
371 inline USHORT GetFormMax() const;
373 BOOL IsRelTabPos() const { return bIsRelTabPos; }
374 void SetRelTabPos( BOOL b ) { bIsRelTabPos = b; }
376 BOOL IsCommaSeparated() const { return bCommaSeparated;}
377 void SetCommaSeparated( BOOL b) { bCommaSeparated = b;}
379 static USHORT GetFormMaxLevel( TOXTypes eType );
381 static const sal_Char* aFormEntry; // <E>
382 static BYTE nFormEntryLen; // 3 characters
383 static const sal_Char* aFormTab; // <T>
384 static BYTE nFormTabLen; // 3 characters
385 static const sal_Char* aFormPageNums; // <P>
386 static BYTE nFormPageNumsLen; // 3 characters
387 static const sal_Char* aFormLinkStt; // <LS>
388 static BYTE nFormLinkSttLen; // 4 characters
389 static const sal_Char* aFormLinkEnd; // <LE>
390 static BYTE nFormLinkEndLen; // 4 characters
391 static const sal_Char* aFormEntryNum; // <E#>
392 static BYTE nFormEntryNumLen; // 4 characters
393 static const sal_Char* aFormEntryTxt; // <ET>
394 static BYTE nFormEntryTxtLen; // 4 characters
395 static const sal_Char* aFormChapterMark; // <C>
396 static BYTE nFormChapterMarkLen; // 3 characters
397 static const sal_Char* aFormText; // <TX>
398 static BYTE nFormTextLen; // 4 characters
399 static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value
400 static BYTE nFormAuthLen; // 3 characters
403 /*--------------------------------------------------------------------
404 Description: Content to create indexes of
405 --------------------------------------------------------------------*/
407 typedef USHORT SwTOXElement;
408 namespace nsSwTOXElement
410 const SwTOXElement TOX_MARK = 1;
411 const SwTOXElement TOX_OUTLINELEVEL = 2;
412 const SwTOXElement TOX_TEMPLATE = 4;
413 const SwTOXElement TOX_OLE = 8;
414 const SwTOXElement TOX_TABLE = 16;
415 const SwTOXElement TOX_GRAPHIC = 32;
416 const SwTOXElement TOX_FRAME = 64;
417 const SwTOXElement TOX_SEQUENCE = 128;
420 typedef USHORT SwTOIOptions;
421 namespace nsSwTOIOptions
423 const SwTOIOptions TOI_SAME_ENTRY = 1;
424 const SwTOIOptions TOI_FF = 2;
425 const SwTOIOptions TOI_CASE_SENSITIVE = 4;
426 const SwTOIOptions TOI_KEY_AS_ENTRY = 8;
427 const SwTOIOptions TOI_ALPHA_DELIMITTER = 16;
428 const SwTOIOptions TOI_DASH = 32;
429 const SwTOIOptions TOI_INITIAL_CAPS = 64;
432 //which part of the caption is to be displayed
433 enum SwCaptionDisplay
435 CAPTION_COMPLETE,
436 CAPTION_NUMBER,
437 CAPTION_TEXT
440 typedef USHORT SwTOOElements;
441 namespace nsSwTOOElements
443 const SwTOOElements TOO_MATH = 0x01;
444 const SwTOOElements TOO_CHART = 0x02;
445 const SwTOOElements TOO_CALC = 0x08;
446 const SwTOOElements TOO_DRAW_IMPRESS = 0x10;
447 // const SwTOOElements TOO_IMPRESS = 0x20;
448 const SwTOOElements TOO_OTHER = 0x80;
451 #define TOX_STYLE_DELIMITER ((sal_Unicode)0x01) //JP 19.07.00: use a control char
453 /*--------------------------------------------------------------------
454 Description: Class for all indexes
455 --------------------------------------------------------------------*/
457 class SW_DLLPUBLIC SwTOXBase : public SwClient
459 SwForm aForm; // description of the lines
460 String aName; // unique name
461 String aTitle; // title
463 String sMainEntryCharStyle; // name of the character style applied to main index entries
465 String aStyleNames[MAXLEVEL]; // (additional) style names TOX_CONTENT, TOX_USER
466 String sSequenceName; // FieldTypeName of a caption sequence
468 LanguageType eLanguage;
469 String sSortAlgorithm;
471 union {
472 USHORT nLevel; // consider outline levels
473 USHORT nOptions; // options of alphabetical index
474 } aData;
476 USHORT nCreateType; // sources to create the index from
477 USHORT nOLEOptions; // OLE sources
478 SwCaptionDisplay eCaptionDisplay; //
479 BOOL bProtected : 1; // index protected ?
480 BOOL bFromChapter : 1; // create from chapter or document
481 BOOL bFromObjectNames : 1; // create a table or object index
482 // from the names rather than the caption
483 BOOL bLevelFromChapter : 1; // User index: get the level from the source chapter
484 public:
485 SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm,
486 USHORT nCreaType, const String& rTitle );
487 SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = 0 );
488 virtual ~SwTOXBase();
490 virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
492 // a kind of CopyCtor - check if the TOXBase is at TOXType of the doc.
493 // If not, so create it an copy all other used things. The return is this
494 SwTOXBase& CopyTOXBase( SwDoc*, const SwTOXBase& );
496 const SwTOXType* GetTOXType() const; //
498 USHORT GetCreateType() const; // creation types
500 const String& GetTOXName() const {return aName;}
501 void SetTOXName(const String& rSet) {aName = rSet;}
503 const String& GetTitle() const; // Title
504 const String& GetTypeName() const; // Name
505 const SwForm& GetTOXForm() const; // description of the lines
507 void SetCreate(USHORT);
508 void SetTitle(const String& rTitle);
509 void SetTOXForm(const SwForm& rForm);
511 TOXTypes GetType() const;
513 const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;}
514 void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;}
516 // content index only
517 inline void SetLevel(USHORT); // consider outline level
518 inline USHORT GetLevel() const;
520 // alphabetical index only
521 inline USHORT GetOptions() const; // alphabetical index options
522 inline void SetOptions(USHORT nOpt);
524 // index of objects
525 USHORT GetOLEOptions() const {return nOLEOptions;}
526 void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;}
528 // index of objects
530 // user defined index only
531 inline void SetTemplateName(const String& rName); // Absatzlayout beachten
533 const String& GetStyleNames(USHORT nLevel) const
535 DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
536 return aStyleNames[nLevel];
538 void SetStyleNames(const String& rSet, USHORT nLevel)
540 DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
541 aStyleNames[nLevel] = rSet;
543 BOOL IsFromChapter() const { return bFromChapter;}
544 void SetFromChapter(BOOL bSet) { bFromChapter = bSet;}
546 BOOL IsFromObjectNames() const {return bFromObjectNames;}
547 void SetFromObjectNames(BOOL bSet) {bFromObjectNames = bSet;}
549 BOOL IsLevelFromChapter() const {return bLevelFromChapter;}
550 void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;}
552 BOOL IsProtected() const { return bProtected; }
553 void SetProtected(BOOL bSet) { bProtected = bSet; }
555 const String& GetSequenceName() const {return sSequenceName;}
556 void SetSequenceName(const String& rSet) {sSequenceName = rSet;}
558 SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;}
559 void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;}
561 BOOL IsTOXBaseInReadonly() const;
563 const SfxItemSet* GetAttrSet() const;
564 void SetAttrSet( const SfxItemSet& );
566 LanguageType GetLanguage() const {return eLanguage;}
567 void SetLanguage(LanguageType nLang) {eLanguage = nLang;}
569 const String& GetSortAlgorithm()const {return sSortAlgorithm;}
570 void SetSortAlgorithm(const String& rSet) {sSortAlgorithm = rSet;}
571 // #i21237#
572 void AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop);
573 SwTOXBase& operator=(const SwTOXBase& rSource);
577 /*--------------------------------------------------------------------
578 Description: Inlines
579 --------------------------------------------------------------------*/
582 //SwTOXMark
584 inline const String& SwTOXMark::GetAlternativeText() const
585 { return aAltText; }
587 inline const SwTOXType* SwTOXMark::GetTOXType() const
588 { return (SwTOXType*)GetRegisteredIn(); }
590 inline BOOL SwTOXMark::IsAlternativeText() const
591 { return aAltText.Len() > 0; }
593 inline void SwTOXMark::SetAlternativeText(const String& rAlt)
595 aAltText = rAlt;
598 inline void SwTOXMark::SetLevel( USHORT nLvl )
600 ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
601 nLevel = nLvl;
604 inline void SwTOXMark::SetPrimaryKey( const String& rKey )
606 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
607 aPrimaryKey = rKey;
610 inline void SwTOXMark::SetSecondaryKey( const String& rKey )
612 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
613 aSecondaryKey = rKey;
616 inline void SwTOXMark::SetTextReading( const String& rTxt )
618 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
619 aTextReading = rTxt;
622 inline void SwTOXMark::SetPrimaryKeyReading( const String& rKey )
624 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
625 aPrimaryKeyReading = rKey;
628 inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey )
630 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
631 aSecondaryKeyReading = rKey;
634 inline USHORT SwTOXMark::GetLevel() const
636 ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
637 return nLevel;
640 inline const String& SwTOXMark::GetPrimaryKey() const
642 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
643 return aPrimaryKey;
646 inline const String& SwTOXMark::GetSecondaryKey() const
648 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
649 return aSecondaryKey;
652 inline const String& SwTOXMark::GetTextReading() const
654 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
655 return aTextReading;
658 inline const String& SwTOXMark::GetPrimaryKeyReading() const
660 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
661 return aPrimaryKeyReading;
664 inline const String& SwTOXMark::GetSecondaryKeyReading() const
666 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
667 return aSecondaryKeyReading;
671 //SwForm
673 inline void SwForm::SetTemplate(USHORT nLevel, const String& rTemplate)
675 ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
676 aTemplate[nLevel] = rTemplate;
679 inline const String& SwForm::GetTemplate(USHORT nLevel) const
681 ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
682 return aTemplate[nLevel];
685 inline TOXTypes SwForm::GetTOXType() const
687 return eType;
690 inline USHORT SwForm::GetFormMax() const
692 return nFormMaxLevel;
697 //SwTOXType
699 inline const String& SwTOXType::GetTypeName() const
700 { return aName; }
702 inline TOXTypes SwTOXType::GetType() const
703 { return eType; }
706 // SwTOXBase
708 inline const SwTOXType* SwTOXBase::GetTOXType() const
709 { return (SwTOXType*)GetRegisteredIn(); }
711 inline USHORT SwTOXBase::GetCreateType() const
712 { return nCreateType; }
714 inline const String& SwTOXBase::GetTitle() const
715 { return aTitle; }
717 inline const String& SwTOXBase::GetTypeName() const
718 { return GetTOXType()->GetTypeName(); }
720 inline const SwForm& SwTOXBase::GetTOXForm() const
721 { return aForm; }
723 inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop)
725 aForm.AdjustTabStops(rDoc, bDefaultRightTabStop);
728 inline void SwTOXBase::SetCreate(USHORT nCreate)
729 { nCreateType = nCreate; }
731 inline void SwTOXBase::SetTOXForm(const SwForm& rForm)
732 { aForm = rForm; }
734 inline TOXTypes SwTOXBase::GetType() const
735 { return GetTOXType()->GetType(); }
737 inline void SwTOXBase::SetLevel(USHORT nLev)
739 ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
740 aData.nLevel = nLev;
743 inline USHORT SwTOXBase::GetLevel() const
745 ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
746 return aData.nLevel;
749 inline void SwTOXBase::SetTemplateName(const String& rName)
751 // ASSERT(GetTOXType()->GetType() == TOX_USER, "Falscher Feldtyp");
752 // ASSERT(aData.pTemplateName, "pTemplateName == 0");
753 // (*aData.pTemplateName) = rName;
754 DBG_WARNING("SwTOXBase::SetTemplateName obsolete");
755 aStyleNames[0] = rName;
759 inline USHORT SwTOXBase::GetOptions() const
761 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
762 return aData.nOptions;
765 inline void SwTOXBase::SetOptions(USHORT nOpt)
767 ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
768 aData.nOptions = nOpt;
772 #endif // _TOX_HXX