tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / include / svx / pageitem.hxx
blobde93730731d2fc1f607c836a279c1d7c28be57e7
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 <sal/config.h>
24 #include <svl/setitem.hxx>
25 #include <svx/svxdllapi.h>
26 #include <editeng/svxenum.hxx>
28 /*--------------------------------------------------------------------
29 usage of the page
30 --------------------------------------------------------------------*/
32 enum class SvxPageUsage
34 NONE = 0,
35 Left = 1,
36 Right = 2,
37 All = 3,
38 Mirror = 7
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
52 private:
53 OUString aDescName; // name of the template
54 SvxNumType eNumType;
55 bool bLandscape; // Portrait / Landscape
56 SvxPageUsage eUse; // Layout
58 public:
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,
70 MapUnit eCoreMetric,
71 MapUnit ePresMetric,
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;
77 // orientation
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; }
84 // enumeration
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
99 public:
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,
107 MapUnit eCoreMetric,
108 MapUnit ePresMetric,
109 OUString &rText, const IntlWrapper& ) const override;
113 #endif
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */