1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: chpfld.hxx,v $
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 ************************************************************************/
42 CF_NUMBER
= CF_BEGIN
, // nur die Kapitelnummer
43 CF_TITLE
, // nur die "Ueberschrift"
44 CF_NUM_TITLE
, // Kapitelnummer und "Ueberschrift"
45 CF_NUMBER_NOPREPST
, // nur die Kapitelnummer ohne Post/Prefix
46 CF_NUM_NOPREPST_TITLE
, // Kapitelnummer ohne Post/Prefix und "Ueberschrift"
50 /*--------------------------------------------------------------------
52 --------------------------------------------------------------------*/
54 class SwChapterFieldType
: public SwFieldType
59 virtual SwFieldType
* Copy() const;
65 /*--------------------------------------------------------------------
66 Beschreibung: Kapitelnummer
67 --------------------------------------------------------------------*/
68 class SW_DLLPUBLIC SwChapterField
: public SwField
70 friend class SwChapterFieldType
;
72 String sTitle
, sNumber
, sPre
, sPost
;
74 SwChapterField(SwChapterFieldType
*, sal_uInt32 nFmt
= 0);
76 // --> OD 2008-02-14 #i53420#
77 // void ChangeExpansion( const SwFrm*,
79 // BOOL bSrchNum = FALSE);
80 void ChangeExpansion( const SwFrm
*,
82 BOOL bSrchNum
= FALSE
);
84 void ChangeExpansion(const SwTxtNode
&rNd
, BOOL bSrchNum
);
86 virtual String
Expand() const;
87 virtual SwField
* Copy() const;
89 inline BYTE
GetLevel() const;
90 inline void SetLevel(BYTE
);
92 inline const String
& GetNumber() const;
93 inline const String
& GetTitle() const;
94 virtual BOOL
QueryValue( com::sun::star::uno::Any
& rVal
, USHORT nWhich
) const;
95 virtual BOOL
PutValue( const com::sun::star::uno::Any
& rVal
, USHORT nWhich
);
98 inline BYTE
SwChapterField::GetLevel() const { return nLevel
; }
99 inline void SwChapterField::SetLevel(BYTE nLev
) { nLevel
= nLev
; }
100 inline const String
& SwChapterField::GetNumber() const { return sNumber
; }
101 inline const String
& SwChapterField::GetTitle() const { return sTitle
; }
103 #endif // _CHPFLD_HXX