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_PAGEITEM_HXX
29 : : #define _SVX_PAGEITEM_HXX
30 : :
31 : : #include <svl/poolitem.hxx>
32 : : #include <tools/string.hxx>
33 : : #include "svx/svxdllapi.h"
34 : :
35 : :
36 : : enum SvxNumType
37 : : {
38 : : SVX_CHARS_UPPER_LETTER,
39 : : SVX_CHARS_LOWER_LETTER,
40 : : SVX_ROMAN_UPPER,
41 : : SVX_ROMAN_LOWER,
42 : : SVX_ARABIC,
43 : : SVX_NUMBER_NONE,
44 : : SVX_CHAR_SPECIAL,
45 : : SVX_PAGEDESC
46 : : };
47 : :
48 : : /*--------------------------------------------------------------------
49 : : usage of the page
50 : : --------------------------------------------------------------------*/
51 : :
52 : : enum SvxPageUsage
53 : : {
54 : : SVX_PAGE_LEFT = 0x0001,
55 : : SVX_PAGE_RIGHT = 0x0002,
56 : : SVX_PAGE_ALL = 0x0003,
57 : : SVX_PAGE_MIRROR = 0x0007,
58 : : SVX_PAGE_HEADERSHARE = 0x0040,
59 : : SVX_PAGE_FOOTERSHARE = 0x0080
60 : : };
61 : :
62 : : /*--------------------------------------------------------------------
63 : : parts of the page description
64 : : --------------------------------------------------------------------*/
65 : :
66 : : /*
67 : : This item describes a page attribute (name of the template, enumeration,
68 : : portait or landscape, layout)
69 : : */
70 : :
71 [ + - ][ - + ]: 3961 : class SVX_DLLPUBLIC SvxPageItem: public SfxPoolItem
72 : : {
73 : : private:
74 : : String aDescName; // name of the template
75 : : SvxNumType eNumType; // enumeration
76 : : sal_Bool bLandscape; // Portrait / Landscape
77 : : sal_uInt16 eUse; // Layout
78 : :
79 : : public:
80 : :
81 : : TYPEINFO();
82 : : SvxPageItem( const sal_uInt16 nId );
83 : : SvxPageItem( const SvxPageItem& rItem );
84 : :
85 : : virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
86 : : virtual int operator==( const SfxPoolItem& ) const;
87 : :
88 : : virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
89 : : SfxMapUnit eCoreMetric,
90 : : SfxMapUnit ePresMetric,
91 : : String &rText, const IntlWrapper * = 0 ) const;
92 : :
93 : : virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
94 : : virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
95 : : virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const;
96 : : virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const;
97 : :
98 : : // orientation
99 : 1157 : sal_uInt16 GetPageUsage() const { return eUse; }
100 : 2822 : void SetPageUsage(sal_uInt16 eU) { eUse= eU; }
101 : :
102 : 1169 : sal_Bool IsLandscape() const { return bLandscape; }
103 : 3961 : void SetLandscape(sal_Bool bL) { bLandscape = bL; }
104 : :
105 : : // enumeration
106 : 1157 : SvxNumType GetNumType() const { return eNumType; }
107 : 2822 : void SetNumType(SvxNumType eNum) { eNumType = eNum; }
108 : :
109 : : // name of the descriptor
110 : : const String& GetDescName() const { return aDescName; }
111 : 2822 : void SetDescName(const String& rStr) { aDescName = rStr; }
112 : : };
113 : :
114 : :
115 : :
116 : : /*--------------------------------------------------------------------
117 : : container for header/footer attributes
118 : : --------------------------------------------------------------------*/
119 : :
120 [ - + ]: 6695 : class SVX_DLLPUBLIC SvxSetItem: public SfxSetItem
121 : : {
122 : : public:
123 : : SvxSetItem( const sal_uInt16 nId, const SfxItemSet& rSet );
124 : : SvxSetItem( const SvxSetItem& rItem );
125 : : SvxSetItem( const sal_uInt16 nId, SfxItemSet* pSet );
126 : :
127 : : virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
128 : :
129 : : virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
130 : : SfxMapUnit eCoreMetric,
131 : : SfxMapUnit ePresMetric,
132 : : String &rText, const IntlWrapper * = 0 ) const;
133 : :
134 : : virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const;
135 : : virtual SvStream& Store( SvStream&, sal_uInt16 nItemVersion ) const;
136 : : };
137 : :
138 : :
139 : :
140 : :
141 : : #endif
142 : :
143 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|