Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / uibase / inc / pagenumberdlg.hxx
blobcf719b492a33fc98e22516939938469496ed58d3
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 .
20 #pragma once
22 #include <sfx2/basedlgs.hxx>
23 #include <svx/pagenumberlistbox.hxx>
25 class SwWrtShell;
27 /// Page number wizard for easy header/footer page number insertion
28 class SwPageNumberDlg final : public SfxDialogController
30 std::unique_ptr<weld::Button> m_xOk;
31 std::unique_ptr<weld::Button> m_xCancel;
32 std::unique_ptr<weld::ComboBox> m_xPageNumberPosition;
33 std::unique_ptr<weld::ComboBox> m_xPageNumberAlignment;
34 std::unique_ptr<weld::CheckButton> m_xMirrorOnEvenPages;
35 std::unique_ptr<weld::CheckButton> m_xIncludePageTotal;
36 std::unique_ptr<SvxPageNumberListBox> m_xPageNumberTypeLB;
38 std::unique_ptr<weld::Image> m_xPreviewImage;
40 int m_aPageNumberPosition;
41 int m_aPageNumberAlignment;
42 SvxNumType m_nPageNumberType;
44 DECL_LINK(OkHdl, weld::Button&, void);
45 DECL_LINK(PositionSelectHdl, weld::ComboBox&, void);
46 DECL_LINK(AlignmentSelectHdl, weld::ComboBox&, void);
47 DECL_LINK(NumberTypeSelectHdl, weld::ComboBox&, void);
49 void updateImage();
51 public:
52 SwPageNumberDlg(weld::Window* pParent);
53 int GetPageNumberPosition() const { return m_aPageNumberPosition; }
54 int GetPageNumberAlignment() const { return m_aPageNumberAlignment; }
55 bool GetMirrorOnEvenPages();
56 bool GetIncludePageTotal();
57 SvxNumType GetPageNumberType() const { return m_nPageNumberType; }
58 void SetPageNumberType(SvxNumType nSet);
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */