LibreOffice Module sw (master)  1
mmlayoutpage.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_UI_DBUI_MMLAYOUTPAGE_HXX
20 #define INCLUDED_SW_SOURCE_UI_DBUI_MMLAYOUTPAGE_HXX
21 
23 #include <mailmergehelper.hxx>
24 #include <vcl/button.hxx>
25 #include <vcl/field.hxx>
26 #include <vcl/layout.hxx>
27 #include <vcl/lstbox.hxx>
28 #include <com/sun/star/uno/Reference.h>
29 
30 class SwMailMergeWizard;
31 class SwFrameFormat;
32 class SwOneExampleFrame;
33 class SwWrtShell;
34 class SwView;
35 
36 namespace com{ namespace sun{ namespace star{ namespace beans{ class XPropertySet;}}}}
37 
39 {
41 
42  OUString m_sExampleURL;
44 
46 
48 
49  css::uno::Reference< css::beans::XPropertySet > m_xViewProperties;
50 
51  std::unique_ptr<weld::Container> m_xPosition;
52  std::unique_ptr<weld::CheckButton> m_xAlignToBodyCB;
53  std::unique_ptr<weld::Label> m_xLeftFT;
54  std::unique_ptr<weld::MetricSpinButton> m_xLeftMF;
55  std::unique_ptr<weld::MetricSpinButton> m_xTopMF;
56  std::unique_ptr<weld::Container> m_xGreetingLine;
57  std::unique_ptr<weld::Button> m_xUpPB;
58  std::unique_ptr<weld::Button> m_xDownPB;
59  std::unique_ptr<weld::ComboBox> m_xZoomLB;
60  std::unique_ptr<SwOneExampleFrame> m_xExampleFrame;
61  std::unique_ptr<weld::CustomWeld> m_xExampleContainerWIN;
62 
63  DECL_LINK(PreviewLoadedHdl_Impl, SwOneExampleFrame&, void);
64  DECL_LINK(ZoomHdl_Impl, weld::ComboBox&, void);
65  DECL_LINK(ChangeAddressHdl_Impl, weld::MetricSpinButton&, void);
66  DECL_LINK(GreetingsHdl_Impl, weld::Button&, void);
67  DECL_LINK(AlignToTextHdl_Impl, weld::ToggleButton&, void);
68 
70  SwWrtShell& rShell,
71  SwMailMergeConfigItem const & rConfigItem,
72  const Point& rDestination,
73  bool bAlignToBody,
74  bool bExample);
75  static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem const & rConfigItem, bool bExample);
76 
77  virtual void ActivatePage() override;
78  virtual bool commitPage(::svt::WizardTypes::CommitPageReason _eReason) override;
79 public:
81  virtual ~SwMailMergeLayoutPage() override;
82  virtual void dispose() override;
83 
84  static SwFrameFormat* InsertAddressAndGreeting(SwView const * pView,
85  SwMailMergeConfigItem& rConfigItem,
86  const Point& rAddressPos,
87  bool bAlignToBody);
88 };
89 
90 #endif
91 
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Button > m_xUpPB
std::unique_ptr< SwOneExampleFrame > m_xExampleFrame
std::unique_ptr< weld::MetricSpinButton > m_xLeftMF
virtual bool commitPage(::svt::WizardTypes::CommitPageReason _eReason) override
std::unique_ptr< weld::ComboBox > m_xZoomLB
DECL_LINK(PreviewLoadedHdl_Impl, SwOneExampleFrame &, void)
Used by the UI to modify the document model.
Definition: wrtsh.hxx:88
static SwFrameFormat * InsertAddressFrame(SwWrtShell &rShell, SwMailMergeConfigItem const &rConfigItem, const Point &rDestination, bool bAlignToBody, bool bExample)
static SwFrameFormat * InsertAddressAndGreeting(SwView const *pView, SwMailMergeConfigItem &rConfigItem, const Point &rAddressPos, bool bAlignToBody)
static void InsertGreeting(SwWrtShell &rShell, SwMailMergeConfigItem const &rConfigItem, bool bExample)
SwMailMergeLayoutPage(SwMailMergeWizard *pWizard, TabPageParent pParent)
std::unique_ptr< weld::CustomWeld > m_xExampleContainerWIN
Style of a layout element.
Definition: frmfmt.hxx:57
class SAL_NO_VTABLE XPropertySet
std::unique_ptr< weld::Button > m_xDownPB
std::unique_ptr< weld::Container > m_xPosition
virtual ~SwMailMergeLayoutPage() override
virtual void ActivatePage() override
std::unique_ptr< weld::CheckButton > m_xAlignToBodyCB
std::unique_ptr< weld::MetricSpinButton > m_xTopMF
std::unique_ptr< weld::Label > m_xLeftFT
css::uno::Reference< css::beans::XPropertySet > m_xViewProperties
std::unique_ptr< weld::Container > m_xGreetingLine
VclPtr< SwMailMergeWizard > m_pWizard
SwWrtShell * m_pExampleWrtShell
virtual void dispose() override
Definition: view.hxx:146
SwFrameFormat * m_pAddressBlockFormat