1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _SVX_PAGEITEM_HXX
20 #define _SVX_PAGEITEM_HXX
22 #include <svl/poolitem.hxx>
23 #include <tools/string.hxx>
24 #include "svx/svxdllapi.h"
29 SVX_CHARS_UPPER_LETTER
,
30 SVX_CHARS_LOWER_LETTER
,
39 /*--------------------------------------------------------------------
41 --------------------------------------------------------------------*/
45 SVX_PAGE_LEFT
= 0x0001,
46 SVX_PAGE_RIGHT
= 0x0002,
47 SVX_PAGE_ALL
= 0x0003,
48 SVX_PAGE_MIRROR
= 0x0007,
49 SVX_PAGE_HEADERSHARE
= 0x0040,
50 SVX_PAGE_FOOTERSHARE
= 0x0080
53 /*--------------------------------------------------------------------
54 parts of the page description
55 --------------------------------------------------------------------*/
58 This item describes a page attribute (name of the template, enumeration,
59 portait or landscape, layout)
62 class SVX_DLLPUBLIC SvxPageItem
: public SfxPoolItem
65 String aDescName
; // name of the template
66 SvxNumType eNumType
; // enumeration
67 sal_Bool bLandscape
; // Portrait / Landscape
68 sal_uInt16 eUse
; // Layout
73 SvxPageItem( const sal_uInt16 nId
);
74 SvxPageItem( const SvxPageItem
& rItem
);
76 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
77 virtual int operator==( const SfxPoolItem
& ) const;
79 virtual SfxItemPresentation
GetPresentation( SfxItemPresentation ePres
,
80 SfxMapUnit eCoreMetric
,
81 SfxMapUnit ePresMetric
,
82 OUString
&rText
, const IntlWrapper
* = 0 ) const;
84 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const;
85 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 );
86 virtual SfxPoolItem
* Create( SvStream
&, sal_uInt16
) const;
87 virtual SvStream
& Store( SvStream
& , sal_uInt16 nItemVersion
) const;
90 sal_uInt16
GetPageUsage() const { return eUse
; }
91 void SetPageUsage(sal_uInt16 eU
) { eUse
= eU
; }
93 sal_Bool
IsLandscape() const { return bLandscape
; }
94 void SetLandscape(sal_Bool bL
) { bLandscape
= bL
; }
97 SvxNumType
GetNumType() const { return eNumType
; }
98 void SetNumType(SvxNumType eNum
) { eNumType
= eNum
; }
100 // name of the descriptor
101 const String
& GetDescName() const { return aDescName
; }
102 void SetDescName(const String
& rStr
) { aDescName
= rStr
; }
107 /*--------------------------------------------------------------------
108 container for header/footer attributes
109 --------------------------------------------------------------------*/
111 class SVX_DLLPUBLIC SvxSetItem
: public SfxSetItem
114 SvxSetItem( const sal_uInt16 nId
, const SfxItemSet
& rSet
);
115 SvxSetItem( const SvxSetItem
& rItem
);
116 SvxSetItem( const sal_uInt16 nId
, SfxItemSet
* pSet
);
118 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
120 virtual SfxItemPresentation
GetPresentation( SfxItemPresentation ePres
,
121 SfxMapUnit eCoreMetric
,
122 SfxMapUnit ePresMetric
,
123 OUString
&rText
, const IntlWrapper
* = 0 ) const;
125 virtual SfxPoolItem
* Create( SvStream
&, sal_uInt16 nVersion
) const;
126 virtual SvStream
& Store( SvStream
&, sal_uInt16 nItemVersion
) const;
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */