1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef _SVX_LABDLG_HXX 28*cdf0e10cSrcweir #define _SVX_LABDLG_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir // include --------------------------------------------------------------- 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir #ifndef _FIELD_HXX //autogen 34*cdf0e10cSrcweir #include <vcl/field.hxx> 35*cdf0e10cSrcweir #endif 36*cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen 37*cdf0e10cSrcweir #include <vcl/lstbox.hxx> 38*cdf0e10cSrcweir #endif 39*cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen 40*cdf0e10cSrcweir #include <vcl/fixed.hxx> 41*cdf0e10cSrcweir #endif 42*cdf0e10cSrcweir #include <svtools/valueset.hxx> 43*cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 44*cdf0e10cSrcweir class SdrView; 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir // class SvxCaptionTabPage ----------------------------------------------- 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3; 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir class SvxCaptionTabPage : public SfxTabPage 51*cdf0e10cSrcweir { 52*cdf0e10cSrcweir private: 53*cdf0e10cSrcweir ValueSet aCT_CAPTTYPE; 54*cdf0e10cSrcweir FixedText aFT_ABSTAND; 55*cdf0e10cSrcweir MetricField aMF_ABSTAND; 56*cdf0e10cSrcweir FixedText aFT_WINKEL; 57*cdf0e10cSrcweir ListBox aLB_WINKEL; 58*cdf0e10cSrcweir FixedText aFT_ANSATZ; 59*cdf0e10cSrcweir ListBox aLB_ANSATZ; 60*cdf0e10cSrcweir FixedText aFT_UM; 61*cdf0e10cSrcweir MetricField aMF_ANSATZ; 62*cdf0e10cSrcweir FixedText aFT_ANSATZ_REL; 63*cdf0e10cSrcweir ListBox aLB_ANSATZ_REL; 64*cdf0e10cSrcweir FixedText aFT_LAENGE; 65*cdf0e10cSrcweir MetricField aMF_LAENGE; 66*cdf0e10cSrcweir CheckBox aCB_LAENGE; 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir Image* mpBmpCapTypes[CAPTYPE_BITMAPS_COUNT]; 69*cdf0e10cSrcweir Image* mpBmpCapTypesH[CAPTYPE_BITMAPS_COUNT]; 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir String aStrHorzList; 72*cdf0e10cSrcweir String aStrVertList; 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir short nCaptionType; 75*cdf0e10cSrcweir sal_Bool bFixedAngle; 76*cdf0e10cSrcweir sal_Int32 nFixedAngle; 77*cdf0e10cSrcweir sal_Int32 nGap; 78*cdf0e10cSrcweir short nEscDir; 79*cdf0e10cSrcweir sal_Bool bEscRel; 80*cdf0e10cSrcweir sal_Int32 nEscAbs; 81*cdf0e10cSrcweir sal_Int32 nEscRel; 82*cdf0e10cSrcweir sal_Int32 nLineLen; 83*cdf0e10cSrcweir sal_Bool bFitLineLen; 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir sal_uInt16 nAnsatzRelPos; 86*cdf0e10cSrcweir sal_uInt16 nAnsatzTypePos; 87*cdf0e10cSrcweir sal_uInt16 nWinkelTypePos; 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir #ifdef _SVX_LABDLG_CXX 90*cdf0e10cSrcweir void SetupAnsatz_Impl( sal_uInt16 nType ); 91*cdf0e10cSrcweir void SetupType_Impl( sal_uInt16 nType ); 92*cdf0e10cSrcweir DECL_LINK( AnsatzSelectHdl_Impl, ListBox * ); 93*cdf0e10cSrcweir DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * ); 94*cdf0e10cSrcweir DECL_LINK( LineOptHdl_Impl, Button * ); 95*cdf0e10cSrcweir DECL_LINK( SelectCaptTypeHdl_Impl, void * ); 96*cdf0e10cSrcweir #endif 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir const SfxItemSet& rOutAttrs; 99*cdf0e10cSrcweir const SdrView* pView; 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir public: 102*cdf0e10cSrcweir SvxCaptionTabPage( Window* pParent, const SfxItemSet& rInAttrs ); 103*cdf0e10cSrcweir virtual ~SvxCaptionTabPage(); 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir static SfxTabPage* Create( Window*, const SfxItemSet& ); 106*cdf0e10cSrcweir static sal_uInt16* GetRanges(); 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& ); 109*cdf0e10cSrcweir virtual void Reset( const SfxItemSet & ); 110*cdf0e10cSrcweir void Construct(); 111*cdf0e10cSrcweir void SetView( const SdrView* pSdrView ) 112*cdf0e10cSrcweir { pView = pSdrView; } 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir virtual void DataChanged( const DataChangedEvent& rDCEvt ); 115*cdf0e10cSrcweir void FillValueSet(); 116*cdf0e10cSrcweir }; 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir // class SvxCaptionTabDialog --------------------------------------------- 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir class SvxCaptionTabDialog : public SfxTabDialog 121*cdf0e10cSrcweir { 122*cdf0e10cSrcweir private: 123*cdf0e10cSrcweir // const SfxItemSet& rOutAttrs; 124*cdf0e10cSrcweir const SdrView* pView; 125*cdf0e10cSrcweir sal_uInt16 nAnchorCtrls; 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir Link aValidateLink; 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir public: 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir SvxCaptionTabDialog(Window* pParent, const SdrView* pView, 134*cdf0e10cSrcweir sal_uInt16 nAnchorTypes = 0 ); 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir ~SvxCaptionTabDialog(); 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir //link for the Writer to validate positions 139*cdf0e10cSrcweir void SetValidateFramePosLink( const Link& rLink ); 140*cdf0e10cSrcweir }; 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir #endif //_SVX_LABDLG_HXX 144*cdf0e10cSrcweir 145