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 ************************************************************************/
45 CF_NUMBER
= CF_BEGIN
, // nur die Kapitelnummer
46 CF_TITLE
, // nur die "Ueberschrift"
47 CF_NUM_TITLE
, // Kapitelnummer und "Ueberschrift"
48 CF_NUMBER_NOPREPST
, // nur die Kapitelnummer ohne Post/Prefix
49 CF_NUM_NOPREPST_TITLE
, // Kapitelnummer ohne Post/Prefix und "Ueberschrift"
53 /*--------------------------------------------------------------------
55 --------------------------------------------------------------------*/
57 class SwChapterFieldType
: public SwFieldType
62 virtual SwFieldType
* Copy() const;
68 /*--------------------------------------------------------------------
69 Beschreibung: Kapitelnummer
70 --------------------------------------------------------------------*/
71 class SwChapterField
: public SwField
73 friend class SwChapterFieldType
;
75 String sTitle
, sNumber
, sPre
, sPost
;
77 SwChapterField(SwChapterFieldType
*, sal_uInt32 nFmt
= 0);
79 void ChangeExpansion( const SwFrm
*, const SwTxtNode
*, BOOL bSrchNum
= FALSE
);
81 virtual String
Expand() const;
82 virtual SwField
* Copy() const;
84 inline BYTE
GetLevel() const;
85 inline void SetLevel(BYTE
);
87 inline const String
& GetNumber() const;
88 inline const String
& GetTitle() const;
89 virtual BOOL
QueryValue( ::com::sun::star::uno::Any
& rVal
, BYTE nMId
) const;
90 virtual BOOL
PutValue( const ::com::sun::star::uno::Any
& rVal
, BYTE nMId
);
93 inline BYTE
SwChapterField::GetLevel() const { return nLevel
; }
94 inline void SwChapterField::SetLevel(BYTE nLev
) { nLevel
= nLev
; }
95 inline const String
& SwChapterField::GetNumber() const { return sNumber
; }
96 inline const String
& SwChapterField::GetTitle() const { return sTitle
; }
98 } //namespace binfilter