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 INCLUDED_SVX_PAGEITEM_HXX
20 #define INCLUDED_SVX_PAGEITEM_HXX
22 #include <svl/poolitem.hxx>
23 #include <svx/svxdllapi.h>
24 #include <editeng/svxenum.hxx>
26 /*--------------------------------------------------------------------
28 --------------------------------------------------------------------*/
30 enum class SvxPageUsage
39 /*--------------------------------------------------------------------
40 parts of the page description
41 --------------------------------------------------------------------*/
44 This item describes a page attribute (name of the template, enumeration,
45 portrait or landscape, layout)
48 class SVX_DLLPUBLIC SvxPageItem
: public SfxPoolItem
51 OUString aDescName
; // name of the template
53 bool bLandscape
; // Portrait / Landscape
54 SvxPageUsage eUse
; // Layout
58 static SfxPoolItem
* CreateDefault();
59 SvxPageItem( const sal_uInt16 nId
);
60 SvxPageItem( const SvxPageItem
& rItem
);
62 virtual ~SvxPageItem() override
;
64 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
65 virtual bool operator==( const SfxPoolItem
& ) const override
;
67 virtual bool GetPresentation( SfxItemPresentation ePres
,
70 OUString
&rText
, const IntlWrapper
* = nullptr ) const override
;
72 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
73 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) override
;
74 virtual SfxPoolItem
* Create( SvStream
&, sal_uInt16
) const override
;
75 virtual SvStream
& Store( SvStream
& , sal_uInt16 nItemVersion
) const override
;
78 SvxPageUsage
GetPageUsage() const { return eUse
; }
79 void SetPageUsage(SvxPageUsage eU
) { eUse
= eU
; }
81 bool IsLandscape() const { return bLandscape
; }
82 void SetLandscape(bool bL
) { bLandscape
= bL
; }
85 SvxNumType
GetNumType() const { return eNumType
; }
86 void SetNumType(SvxNumType eNum
) { eNumType
= eNum
; }
88 // name of the descriptor
89 void SetDescName(const OUString
& rStr
) { aDescName
= rStr
; }
93 /*--------------------------------------------------------------------
94 container for header/footer attributes
95 --------------------------------------------------------------------*/
97 class SVX_DLLPUBLIC SvxSetItem
: public SfxSetItem
100 SvxSetItem( const sal_uInt16 nId
, const SfxItemSet
& rSet
);
101 SvxSetItem( const SvxSetItem
& rItem
);
102 SvxSetItem( const sal_uInt16 nId
, SfxItemSet
* pSet
);
104 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
106 virtual bool GetPresentation( SfxItemPresentation ePres
,
109 OUString
&rText
, const IntlWrapper
* = nullptr ) const override
;
111 virtual SfxPoolItem
* Create( SvStream
&, sal_uInt16 nVersion
) const override
;
112 virtual SvStream
& Store( SvStream
&, sal_uInt16 nItemVersion
) const override
;
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */