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 <sal/config.h>
24 #include <svl/setitem.hxx>
25 #include <svx/svxdllapi.h>
26 #include <editeng/svxenum.hxx>
28 /*--------------------------------------------------------------------
30 --------------------------------------------------------------------*/
32 enum class SvxPageUsage
41 /*--------------------------------------------------------------------
42 parts of the page description
43 --------------------------------------------------------------------*/
46 This item describes a page attribute (name of the template, enumeration,
47 portrait or landscape, layout)
50 class SVX_DLLPUBLIC SvxPageItem final
: public SfxPoolItem
53 OUString aDescName
; // name of the template
55 bool bLandscape
; // Portrait / Landscape
56 SvxPageUsage eUse
; // Layout
60 static SfxPoolItem
* CreateDefault();
61 SvxPageItem( const TypedWhichId
<SvxPageItem
> nId
);
62 SvxPageItem( const SvxPageItem
& rItem
);
64 virtual ~SvxPageItem() override
;
66 virtual SvxPageItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
67 virtual bool operator==( const SfxPoolItem
& ) const override
;
69 virtual bool GetPresentation( SfxItemPresentation ePres
,
72 OUString
&rText
, const IntlWrapper
& ) const override
;
74 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
75 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) 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 final
: public SfxSetItem
100 SvxSetItem( const TypedWhichId
<SvxSetItem
> nId
, const SfxItemSet
& rSet
);
101 SvxSetItem( const SvxSetItem
& rItem
, SfxItemPool
* pPool
= nullptr );
102 SvxSetItem( const TypedWhichId
<SvxSetItem
> nId
, SfxItemSet
&& pSet
);
104 virtual SvxSetItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
106 virtual bool GetPresentation( SfxItemPresentation ePres
,
109 OUString
&rText
, const IntlWrapper
& ) const override
;
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */