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>
26 #include <svl/poolitem.hxx>
27 #include <svx/svxdllapi.h>
28 #include <editeng/svxenum.hxx>
30 /*--------------------------------------------------------------------
32 --------------------------------------------------------------------*/
34 enum class SvxPageUsage
43 /*--------------------------------------------------------------------
44 parts of the page description
45 --------------------------------------------------------------------*/
48 This item describes a page attribute (name of the template, enumeration,
49 portrait or landscape, layout)
52 class SVX_DLLPUBLIC SvxPageItem final
: public SfxPoolItem
55 OUString aDescName
; // name of the template
57 bool bLandscape
; // Portrait / Landscape
58 SvxPageUsage eUse
; // Layout
62 static SfxPoolItem
* CreateDefault();
63 SvxPageItem( const sal_uInt16 nId
);
64 SvxPageItem( const SvxPageItem
& rItem
);
66 virtual ~SvxPageItem() override
;
68 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
69 virtual bool operator==( const SfxPoolItem
& ) const override
;
71 virtual bool GetPresentation( SfxItemPresentation ePres
,
74 OUString
&rText
, const IntlWrapper
& ) const override
;
76 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
77 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) override
;
80 SvxPageUsage
GetPageUsage() const { return eUse
; }
81 void SetPageUsage(SvxPageUsage eU
) { eUse
= eU
; }
83 bool IsLandscape() const { return bLandscape
; }
84 void SetLandscape(bool bL
) { bLandscape
= bL
; }
87 SvxNumType
GetNumType() const { return eNumType
; }
88 void SetNumType(SvxNumType eNum
) { eNumType
= eNum
; }
90 // name of the descriptor
91 void SetDescName(const OUString
& rStr
) { aDescName
= rStr
; }
95 /*--------------------------------------------------------------------
96 container for header/footer attributes
97 --------------------------------------------------------------------*/
99 class SVX_DLLPUBLIC SvxSetItem final
: public SfxSetItem
102 SvxSetItem( const sal_uInt16 nId
, const SfxItemSet
& rSet
);
103 SvxSetItem( const SvxSetItem
& rItem
);
104 SvxSetItem( const sal_uInt16 nId
, std::unique_ptr
<SfxItemSet
>&& pSet
);
106 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
108 virtual bool GetPresentation( SfxItemPresentation ePres
,
111 OUString
&rText
, const IntlWrapper
& ) const override
;
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */