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,
56  const bool bIsEnabled) override;
57 
59  vcl::Window* pParent,
60  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
61  SfxBindings* pBindings);
62  virtual ~PageFormatPanel() override;
63  virtual void dispose() override;
64 
65  static FieldUnit GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState );
66 
67 private:
68 
70 
77 
83 
84  std::unique_ptr<SvxPageItem> mpPageItem;
85  std::unique_ptr<SvxLongLRSpaceItem> mpPageLRMarginItem;
86  std::unique_ptr<SvxLongULSpaceItem> mpPageULMarginItem;
87 
90 
95  OUString aCustomEntry;
96 
97  void Initialize();
98  void UpdateMarginBox();
99  void ExecuteMarginLRChange( const long nPageLeftMargin, const long nPageRightMargin );
100  void ExecuteMarginULChange( const long nPageTopMargin, const long nPageBottomMargin);
101  DECL_LINK(PaperFormatModifyHdl, ListBox&, void);
102  DECL_LINK(PaperSizeModifyHdl, Edit&, void);
103  DECL_LINK(PaperModifyMarginHdl, ListBox&, void );
104 };
105 
106 } } //end of namespace sw::sidebar
107 
108 #endif
109 
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::sfx2::sidebar::ControllerItem maPaperOrientationController
FieldUnit
void ExecuteMarginULChange(const long nPageTopMargin, const long nPageBottomMargin)
::sfx2::sidebar::ControllerItem maSwPageLRControl
Dialog to specify the properties of date form field.
Definition: accfrmobj.cxx:38
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
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState, const bool bIsEnabled) override
::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)