LibreOffice Module sw (master)  1
PageFormatPanel.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEFORMATPANEL_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEFORMATPANEL_HXX
21 
22 #include <com/sun/star/frame/XFrame.hpp>
23 
25 
27 
28 #include <svx/pageitem.hxx>
29 #include <svx/rulritem.hxx>
30 #include <svx/papersizelistbox.hxx>
31 
32 #include <vcl/fixed.hxx>
33 #include <vcl/lstbox.hxx>
34 #include <tools/fldunit.hxx>
35 #include <svl/poolitem.hxx>
36 #include <svx/relfld.hxx>
37 
38 #include <memory>
39 
40 namespace sw { namespace sidebar {
41 
43  public PanelLayout,
45 {
46 public:
48  vcl::Window* pParent,
49  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
50  SfxBindings* pBindings);
51 
52  virtual void NotifyItemUpdate(
53  const sal_uInt16 nSId,
54  const SfxItemState eState,
55  const SfxPoolItem* pState) override;
56 
58  vcl::Window* pParent,
59  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
60  SfxBindings* pBindings);
61  virtual ~PageFormatPanel() override;
62  virtual void dispose() override;
63 
64  static FieldUnit GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState );
65 
66 private:
67 
69 
76 
82 
83  std::unique_ptr<SvxPageItem> mpPageItem;
84  std::unique_ptr<SvxLongLRSpaceItem> mpPageLRMarginItem;
85  std::unique_ptr<SvxLongULSpaceItem> mpPageULMarginItem;
86 
89 
94  OUString aCustomEntry;
95 
96  void Initialize();
97  void UpdateMarginBox();
98  void ExecuteMarginLRChange( const long nPageLeftMargin, const long nPageRightMargin );
99  void ExecuteMarginULChange( const long nPageTopMargin, const long nPageBottomMargin);
100  DECL_LINK(PaperFormatModifyHdl, ListBox&, void);
101  DECL_LINK(PaperSizeModifyHdl, Edit&, void);
102  DECL_LINK(PaperModifyMarginHdl, ListBox&, void );
103 };
104 
105 } } //end of namespace sw::sidebar
106 
107 #endif
108 
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::sfx2::sidebar::ControllerItem maPaperOrientationController
FieldUnit
void ExecuteMarginULChange(const long nPageTopMargin, const long nPageBottomMargin)
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
::sfx2::sidebar::ControllerItem maSwPageLRControl
Dialog to specify the properties of date form field.
VclPtr< SvxRelativeField > mpPaperWidth
void ExecuteMarginLRChange(const long nPageLeftMargin, const long nPageRightMargin)
::sfx2::sidebar::ControllerItem maSwPageULControl
static FieldUnit GetCurrentUnit(SfxItemState eState, const SfxPoolItem *pState)
VclPtr< PaperSizeListBox > mpPaperSizeBox
std::unique_ptr< SvxPageItem > mpPageItem
DECL_LINK(PaperFormatModifyHdl, ListBox &, void)
std::unique_ptr< SvxLongLRSpaceItem > mpPageLRMarginItem
VclPtr< FixedText > mpCustomEntry
::sfx2::sidebar::ControllerItem maMetricController
VclPtr< ListBox > mpMarginSelectBox
VclPtr< SvxRelativeField > mpPaperHeight
PageFormatPanel(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)
SfxItemState
std::unique_ptr< SvxLongULSpaceItem > mpPageULMarginItem
virtual ~PageFormatPanel() override
MapUnit
::sfx2::sidebar::ControllerItem maPaperSizeController
VclPtr< ListBox > mpPaperOrientation
virtual void dispose() override
static VclPtr< vcl::Window > Create(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)