Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _SVX_BRKITEM_HXX
29 : : #define _SVX_BRKITEM_HXX
30 : :
31 : : #include <svl/eitem.hxx>
32 : : #include <editeng/svxenum.hxx>
33 : : #include <editeng/editengdllapi.h>
34 : :
35 : : namespace rtl
36 : : {
37 : : class OUString;
38 : : }
39 : :
40 : : // class SvxFmtBreakItem -------------------------------------------------
41 : :
42 : : /* [Description]
43 : :
44 : : This item Describes a wrap-attribute
45 : : Automatic?, Page or column break, before or after?
46 : : */
47 : : #define FMTBREAK_NOAUTO ((sal_uInt16)0x0001)
48 : :
49 [ - + ]: 456 : class EDITENG_DLLPUBLIC SvxFmtBreakItem : public SfxEnumItem
50 : : {
51 : : public:
52 : : TYPEINFO();
53 : :
54 : : inline SvxFmtBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/,
55 : : const sal_uInt16 nWhich );
56 : : inline SvxFmtBreakItem( const SvxFmtBreakItem& rBreak );
57 : : inline SvxFmtBreakItem& operator=( const SvxFmtBreakItem& rCpy );
58 : :
59 : : // "pure virtual Methods" from SfxPoolItem
60 : : virtual int operator==( const SfxPoolItem& ) const;
61 : : virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
62 : : virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
63 : :
64 : : virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
65 : : SfxMapUnit eCoreMetric,
66 : : SfxMapUnit ePresMetric,
67 : : String &rText, const IntlWrapper * = 0 ) const;
68 : : virtual rtl::OUString GetValueTextByPos( sal_uInt16 nPos ) const;
69 : :
70 : : virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
71 : : virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const;
72 : : virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const;
73 : : virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const;
74 : : virtual sal_uInt16 GetValueCount() const;
75 : :
76 : : // MS VC4.0 messes things up
77 : 20 : void SetValue( sal_uInt16 nNewVal )
78 : 20 : {SfxEnumItem::SetValue(nNewVal); }
79 : 22615 : SvxBreak GetBreak() const { return SvxBreak( GetValue() ); }
80 : : void SetBreak( const SvxBreak eNew )
81 : : { SetValue( (sal_uInt16)eNew ); }
82 : : };
83 : :
84 : :
85 : 161 : inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxBreak eBreak,
86 : : const sal_uInt16 _nWhich ) :
87 : 161 : SfxEnumItem( _nWhich, (sal_uInt16)eBreak )
88 : 161 : {}
89 : :
90 : 111 : inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ) :
91 : 111 : SfxEnumItem( rBreak )
92 : 111 : {}
93 : :
94 : 0 : inline SvxFmtBreakItem& SvxFmtBreakItem::operator=(
95 : : const SvxFmtBreakItem& rBreak )
96 : : {
97 : 0 : SetValue( rBreak.GetValue() );
98 : 0 : return *this;
99 : : }
100 : :
101 : : #endif
102 : :
103 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|