1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _SWFLDDB_HXX 28 #define _SWFLDDB_HXX 29 30 #include <vcl/fixed.hxx> 31 #include <vcl/lstbox.hxx> 32 #ifndef _SV_BUTTON_HXX //autogen 33 #include <vcl/button.hxx> 34 #endif 35 #include <vcl/group.hxx> 36 37 #include "condedit.hxx" 38 #include "dbtree.hxx" 39 #include "numfmtlb.hxx" 40 41 #include "fldpage.hxx" 42 43 /*-------------------------------------------------------------------- 44 Beschreibung: 45 --------------------------------------------------------------------*/ 46 47 class SwFldDBPage : public SwFldPage 48 { 49 FixedText aTypeFT; 50 ListBox aTypeLB; 51 FixedText aSelectionFT; 52 SwDBTreeList aDatabaseTLB; 53 54 FixedText aAddDBFT; 55 PushButton aAddDBPB; 56 57 FixedText aConditionFT; 58 ConditionEdit aConditionED; 59 FixedText aValueFT; 60 Edit aValueED; 61 RadioButton aDBFormatRB; 62 RadioButton aNewFormatRB; 63 NumFormatListBox aNumFormatLB; 64 ListBox aFormatLB; 65 FixedLine aFormatFL; 66 FixedLine aFormatVertFL; 67 68 String sOldDBName; 69 String sOldTableName; 70 String sOldColumnName; 71 sal_uLong nOldFormat; 72 sal_uInt16 nOldSubType; 73 Link aOldNumSelectHdl; 74 75 DECL_LINK( TypeHdl, ListBox* ); 76 DECL_LINK( NumSelectHdl, NumFormatListBox* pLB = 0); 77 DECL_LINK( TreeSelectHdl, SvTreeListBox* pBox ); 78 DECL_LINK( ModifyHdl, Edit *pED = 0 ); 79 DECL_LINK( AddDBHdl, PushButton* ); 80 81 void CheckInsert(); 82 83 using SwFldPage::SetWrtShell; 84 85 protected: 86 virtual sal_uInt16 GetGroup(); 87 88 public: 89 SwFldDBPage(Window* pParent, const SfxItemSet& rSet); 90 91 ~SwFldDBPage(); 92 93 static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet); 94 95 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 96 virtual void Reset( const SfxItemSet& rSet ); 97 98 virtual void FillUserData(); 99 void ActivateMailMergeAddress(); 100 101 void SetWrtShell(SwWrtShell& rSh); 102 }; 103 104 105 #endif 106 107