1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _MAILMERGELAYOUTPAGE_HXX 24 #define _MAILMERGELAYOUTPAGE_HXX 25 26 #include <svtools/wizardmachine.hxx> 27 #include <mailmergehelper.hxx> 28 #ifndef _SV_BUTTON_HXX 29 #include <vcl/button.hxx> 30 #endif 31 #include <svtools/stdctrl.hxx> 32 #include <vcl/field.hxx> 33 #include <vcl/lstbox.hxx> 34 #include <com/sun/star/uno/Reference.h> 35 36 class SwMailMergeWizard; 37 class SwFrmFmt; 38 class SwOneExampleFrame; 39 class SwWrtShell; 40 class SwView; 41 42 namespace com{ namespace sun{ namespace star{ namespace beans{ class XPropertySet;}}}} 43 /*-- 02.04.2004 09:21:06--------------------------------------------------- 44 45 -----------------------------------------------------------------------*/ 46 class SwMailMergeLayoutPage : public svt::OWizardPage 47 { 48 SwBoldFixedInfo m_aHeaderFI; 49 50 FixedLine m_aPositionFL; 51 52 CheckBox m_aAlignToBodyCB; 53 FixedText m_aLeftFT; 54 MetricField m_aLeftMF; 55 FixedText m_aTopFT; 56 MetricField m_aTopMF; 57 58 FixedLine m_aGreetingLineFL; 59 FixedText m_aUpFT; 60 PushButton m_aUpPB; 61 FixedText m_aDownFT; 62 PushButton m_aDownPB; 63 64 Window m_aExampleContainerWIN; 65 Window m_aExampleWIN; 66 67 FixedText m_aZoomFT; 68 ListBox m_aZoomLB; 69 70 SwOneExampleFrame* m_pExampleFrame; 71 SwWrtShell* m_pExampleWrtShell; 72 73 String m_sExampleURL; 74 SwFrmFmt* m_pAddressBlockFormat; 75 76 bool m_bIsGreetingInserted; 77 78 SwMailMergeWizard* m_pWizard; 79 80 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xViewProperties; 81 82 DECL_LINK(PreviewLoadedHdl_Impl, void*); 83 DECL_LINK(ZoomHdl_Impl, ListBox*); 84 DECL_LINK(ChangeAddressHdl_Impl, MetricField*); 85 DECL_LINK(GreetingsHdl_Impl, PushButton*); 86 DECL_LINK(AlignToTextHdl_Impl, CheckBox*); 87 88 static SwFrmFmt* InsertAddressFrame( 89 SwWrtShell& rShell, 90 SwMailMergeConfigItem& rConfigItem, 91 const Point& rDestination, 92 bool bAlignToBody, 93 bool bExample); 94 static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample); 95 96 virtual void ActivatePage(); 97 virtual sal_Bool commitPage(::svt::WizardTypes::CommitPageReason _eReason); 98 public: 99 SwMailMergeLayoutPage( SwMailMergeWizard* _pParent); 100 ~SwMailMergeLayoutPage(); 101 102 static SwFrmFmt* InsertAddressAndGreeting(SwView* pView, 103 SwMailMergeConfigItem& rConfigItem, 104 const Point& rAddressPos, 105 bool bAlignToBody); 106 }; 107 108 #endif 109 110 111