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 _SVX_LABDLG_HXX 28 #define _SVX_LABDLG_HXX 29 30 // include --------------------------------------------------------------- 31 32 33 #ifndef _FIELD_HXX //autogen 34 #include <vcl/field.hxx> 35 #endif 36 #ifndef _LSTBOX_HXX //autogen 37 #include <vcl/lstbox.hxx> 38 #endif 39 #ifndef _FIXED_HXX //autogen 40 #include <vcl/fixed.hxx> 41 #endif 42 #include <svtools/valueset.hxx> 43 #include <sfx2/tabdlg.hxx> 44 class SdrView; 45 46 // class SvxCaptionTabPage ----------------------------------------------- 47 48 const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3; 49 50 class SvxCaptionTabPage : public SfxTabPage 51 { 52 private: 53 ValueSet aCT_CAPTTYPE; 54 FixedText aFT_ABSTAND; 55 MetricField aMF_ABSTAND; 56 FixedText aFT_WINKEL; 57 ListBox aLB_WINKEL; 58 FixedText aFT_ANSATZ; 59 ListBox aLB_ANSATZ; 60 FixedText aFT_UM; 61 MetricField aMF_ANSATZ; 62 FixedText aFT_ANSATZ_REL; 63 ListBox aLB_ANSATZ_REL; 64 FixedText aFT_LAENGE; 65 MetricField aMF_LAENGE; 66 CheckBox aCB_LAENGE; 67 68 Image* mpBmpCapTypes[CAPTYPE_BITMAPS_COUNT]; 69 Image* mpBmpCapTypesH[CAPTYPE_BITMAPS_COUNT]; 70 71 String aStrHorzList; 72 String aStrVertList; 73 74 short nCaptionType; 75 sal_Bool bFixedAngle; 76 sal_Int32 nFixedAngle; 77 sal_Int32 nGap; 78 short nEscDir; 79 sal_Bool bEscRel; 80 sal_Int32 nEscAbs; 81 sal_Int32 nEscRel; 82 sal_Int32 nLineLen; 83 sal_Bool bFitLineLen; 84 85 sal_uInt16 nAnsatzRelPos; 86 sal_uInt16 nAnsatzTypePos; 87 sal_uInt16 nWinkelTypePos; 88 89 #ifdef _SVX_LABDLG_CXX 90 void SetupAnsatz_Impl( sal_uInt16 nType ); 91 void SetupType_Impl( sal_uInt16 nType ); 92 DECL_LINK( AnsatzSelectHdl_Impl, ListBox * ); 93 DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * ); 94 DECL_LINK( LineOptHdl_Impl, Button * ); 95 DECL_LINK( SelectCaptTypeHdl_Impl, void * ); 96 #endif 97 98 const SfxItemSet& rOutAttrs; 99 const SdrView* pView; 100 101 public: 102 SvxCaptionTabPage( Window* pParent, const SfxItemSet& rInAttrs ); 103 virtual ~SvxCaptionTabPage(); 104 105 static SfxTabPage* Create( Window*, const SfxItemSet& ); 106 static sal_uInt16* GetRanges(); 107 108 virtual sal_Bool FillItemSet( SfxItemSet& ); 109 virtual void Reset( const SfxItemSet & ); 110 void Construct(); 111 void SetView( const SdrView* pSdrView ) 112 { pView = pSdrView; } 113 114 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 115 void FillValueSet(); 116 }; 117 118 // class SvxCaptionTabDialog --------------------------------------------- 119 120 class SvxCaptionTabDialog : public SfxTabDialog 121 { 122 private: 123 // const SfxItemSet& rOutAttrs; 124 const SdrView* pView; 125 sal_uInt16 nAnchorCtrls; 126 127 Link aValidateLink; 128 129 virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); 130 131 public: 132 133 SvxCaptionTabDialog(Window* pParent, const SdrView* pView, 134 sal_uInt16 nAnchorTypes = 0 ); 135 136 ~SvxCaptionTabDialog(); 137 138 //link for the Writer to validate positions 139 void SetValidateFramePosLink( const Link& rLink ); 140 }; 141 142 143 #endif //_SVX_LABDLG_HXX 144 145