Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / pageitem.hxx
blob76260ebcad6be3e29fa748785954defa8892e1d4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 INCLUDED_SVX_PAGEITEM_HXX
20 #define INCLUDED_SVX_PAGEITEM_HXX
22 #include <svl/poolitem.hxx>
23 #include <svx/svxdllapi.h>
26 enum SvxNumType
28 SVX_CHARS_UPPER_LETTER,
29 SVX_CHARS_LOWER_LETTER,
30 SVX_ROMAN_UPPER,
31 SVX_ROMAN_LOWER,
32 SVX_ARABIC,
33 SVX_NUMBER_NONE,
34 SVX_CHAR_SPECIAL,
35 SVX_PAGEDESC
38 /*--------------------------------------------------------------------
39 usage of the page
40 --------------------------------------------------------------------*/
42 enum SvxPageUsage
44 SVX_PAGE_LEFT = 0x0001,
45 SVX_PAGE_RIGHT = 0x0002,
46 SVX_PAGE_ALL = 0x0003,
47 SVX_PAGE_MIRROR = 0x0007,
48 SVX_PAGE_HEADERSHARE = 0x0040,
49 SVX_PAGE_FOOTERSHARE = 0x0080
52 /*--------------------------------------------------------------------
53 parts of the page description
54 --------------------------------------------------------------------*/
57 This item describes a page attribute (name of the template, enumeration,
58 portrait or landscape, layout)
61 class SVX_DLLPUBLIC SvxPageItem: public SfxPoolItem
63 private:
64 OUString aDescName; // name of the template
65 SvxNumType eNumType; // enumeration
66 bool bLandscape; // Portrait / Landscape
67 sal_uInt16 eUse; // Layout
69 public:
71 TYPEINFO_OVERRIDE();
72 SvxPageItem( const sal_uInt16 nId );
73 SvxPageItem( const SvxPageItem& rItem );
75 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
76 virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
78 virtual bool GetPresentation( SfxItemPresentation ePres,
79 SfxMapUnit eCoreMetric,
80 SfxMapUnit ePresMetric,
81 OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
83 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
84 virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
85 virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const SAL_OVERRIDE;
86 virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const SAL_OVERRIDE;
88 // orientation
89 sal_uInt16 GetPageUsage() const { return eUse; }
90 void SetPageUsage(sal_uInt16 eU) { eUse= eU; }
92 bool IsLandscape() const { return bLandscape; }
93 void SetLandscape(bool bL) { bLandscape = bL; }
95 // enumeration
96 SvxNumType GetNumType() const { return eNumType; }
97 void SetNumType(SvxNumType eNum) { eNumType = eNum; }
99 // name of the descriptor
100 const OUString& GetDescName() const { return aDescName; }
101 void SetDescName(const OUString& rStr) { aDescName = rStr; }
106 /*--------------------------------------------------------------------
107 container for header/footer attributes
108 --------------------------------------------------------------------*/
110 class SVX_DLLPUBLIC SvxSetItem: public SfxSetItem
112 public:
113 SvxSetItem( const sal_uInt16 nId, const SfxItemSet& rSet );
114 SvxSetItem( const SvxSetItem& rItem );
115 SvxSetItem( const sal_uInt16 nId, SfxItemSet* pSet );
117 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
119 virtual bool GetPresentation( SfxItemPresentation ePres,
120 SfxMapUnit eCoreMetric,
121 SfxMapUnit ePresMetric,
122 OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
124 virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const SAL_OVERRIDE;
125 virtual SvStream& Store( SvStream&, sal_uInt16 nItemVersion ) const SAL_OVERRIDE;
131 #endif
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */