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 28*cdf0e10cSrcweir #ifndef SC_PARAWIN_HXX 29*cdf0e10cSrcweir #define SC_PARAWIN_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include "funcutl.hxx" 32*cdf0e10cSrcweir #include "global.hxx" // ScAddress 33*cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 34*cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen 35*cdf0e10cSrcweir #include <vcl/lstbox.hxx> 36*cdf0e10cSrcweir #endif 37*cdf0e10cSrcweir #include <vcl/group.hxx> 38*cdf0e10cSrcweir #include <svtools/svmedit.hxx> 39*cdf0e10cSrcweir #include <vcl/tabpage.hxx> 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir #ifndef _SVSTDARR_STRINGS 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir #define _SVSTDARR_STRINGS 44*cdf0e10cSrcweir #include <svl/svstdarr.hxx> 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir #endif 47*cdf0e10cSrcweir #include <vcl/tabctrl.hxx> 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir #include <vector> 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir class ScFuncDesc; 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir //============================================================================ 54*cdf0e10cSrcweir #define NOT_FOUND 0xffff 55*cdf0e10cSrcweir //============================================================================ 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir class ScParaWin : public TabPage 58*cdf0e10cSrcweir { 59*cdf0e10cSrcweir private: 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir Link aScrollLink; 62*cdf0e10cSrcweir Link aFxLink; 63*cdf0e10cSrcweir Link aArgModifiedLink; 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir ::std::vector<sal_uInt16> aVisibleArgMapping; 66*cdf0e10cSrcweir const ScFuncDesc* pFuncDesc; 67*cdf0e10cSrcweir ScAnyRefDlg* pMyParent; 68*cdf0e10cSrcweir sal_uInt16 nArgs; // unsuppressed arguments 69*cdf0e10cSrcweir Font aFntBold; 70*cdf0e10cSrcweir Font aFntLight; 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir FixedInfo aFtEditDesc; 73*cdf0e10cSrcweir FixedText aFtArgName; 74*cdf0e10cSrcweir FixedInfo aFtArgDesc; 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir ImageButton aBtnFx1; 77*cdf0e10cSrcweir FixedText aFtArg1; 78*cdf0e10cSrcweir ArgEdit aEdArg1; 79*cdf0e10cSrcweir formula::RefButton aRefBtn1; 80*cdf0e10cSrcweir ImageButton aBtnFx2; 81*cdf0e10cSrcweir FixedText aFtArg2; 82*cdf0e10cSrcweir ArgEdit aEdArg2; 83*cdf0e10cSrcweir formula::RefButton aRefBtn2; 84*cdf0e10cSrcweir ImageButton aBtnFx3; 85*cdf0e10cSrcweir FixedText aFtArg3; 86*cdf0e10cSrcweir ArgEdit aEdArg3; 87*cdf0e10cSrcweir formula::RefButton aRefBtn3; 88*cdf0e10cSrcweir ImageButton aBtnFx4; 89*cdf0e10cSrcweir FixedText aFtArg4; 90*cdf0e10cSrcweir ArgEdit aEdArg4; 91*cdf0e10cSrcweir formula::RefButton aRefBtn4; 92*cdf0e10cSrcweir ScrollBar aSlider; 93*cdf0e10cSrcweir sal_Bool bRefMode; 94*cdf0e10cSrcweir 95*cdf0e10cSrcweir sal_uInt16 nEdFocus; 96*cdf0e10cSrcweir sal_uInt16 nActiveLine; 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir ArgInput aArgInput[4]; 99*cdf0e10cSrcweir String aDefaultString; 100*cdf0e10cSrcweir SvStrings aParaArray; 101*cdf0e10cSrcweir DECL_LINK( ScrollHdl, ScrollBar* ); 102*cdf0e10cSrcweir DECL_LINK( ModifyHdl, ArgInput* ); 103*cdf0e10cSrcweir DECL_LINK( GetEdFocusHdl, ArgInput* ); 104*cdf0e10cSrcweir DECL_LINK( GetFxFocusHdl, ArgInput* ); 105*cdf0e10cSrcweir DECL_LINK( GetFxHdl, ArgInput* ); 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir protected: 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir virtual void SliderMoved(); 110*cdf0e10cSrcweir virtual void ArgumentModified(); 111*cdf0e10cSrcweir virtual void FxClick(); 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx, 114*cdf0e10cSrcweir ArgEdit& rEdArg, formula::RefButton& rRefBtn); 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir void DelParaArray(); 117*cdf0e10cSrcweir void SetArgumentDesc(const String& aText); 118*cdf0e10cSrcweir void SetArgumentText(const String& aText); 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir void SetArgName (sal_uInt16 no,const String &aArg); 122*cdf0e10cSrcweir void SetArgNameFont (sal_uInt16 no,const Font&); 123*cdf0e10cSrcweir void SetArgVal (sal_uInt16 no,const String &aArg); 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir void HideParaLine(sal_uInt16 no); 126*cdf0e10cSrcweir void ShowParaLine(sal_uInt16 no); 127*cdf0e10cSrcweir void UpdateArgDesc( sal_uInt16 nArg ); 128*cdf0e10cSrcweir void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i ); 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir public: 131*cdf0e10cSrcweir ScParaWin(ScAnyRefDlg* pParent,Point aPos); 132*cdf0e10cSrcweir ~ScParaWin(); 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir void SetFunctionDesc(const ScFuncDesc* pFDesc); 135*cdf0e10cSrcweir void SetArgumentOffset(sal_uInt16 nOffset); 136*cdf0e10cSrcweir void SetEditDesc(const String& aText); 137*cdf0e10cSrcweir void UpdateParas(); 138*cdf0e10cSrcweir void ClearAll(); 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir sal_Bool IsRefMode() {return bRefMode;} 141*cdf0e10cSrcweir void SetRefMode(sal_Bool bFlag) {bRefMode=bFlag;} 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir sal_uInt16 GetActiveLine(); 144*cdf0e10cSrcweir void SetActiveLine(sal_uInt16 no); 145*cdf0e10cSrcweir formula::RefEdit* GetActiveEdit(); 146*cdf0e10cSrcweir String GetActiveArgName(); 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir String GetArgument(sal_uInt16 no); 149*cdf0e10cSrcweir void SetArgument(sal_uInt16 no, const String& aString); 150*cdf0e10cSrcweir void SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont); 151*cdf0e10cSrcweir 152*cdf0e10cSrcweir void SetEdFocus(sal_uInt16 nEditLine); //Sichtbare Editzeilen 153*cdf0e10cSrcweir sal_uInt16 GetSliderPos(); 154*cdf0e10cSrcweir void SetSliderPos(sal_uInt16 nSliderPos); 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir void SetScrollHdl( const Link& rLink ) { aScrollLink = rLink; } 157*cdf0e10cSrcweir const Link& GetScrollHdl() const { return aScrollLink; } 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir void SetArgModifiedHdl( const Link& rLink ) { aArgModifiedLink = rLink; } 160*cdf0e10cSrcweir const Link& GetArgModifiedHdl() const { return aArgModifiedLink; } 161*cdf0e10cSrcweir 162*cdf0e10cSrcweir void SetFxHdl( const Link& rLink ) { aFxLink = rLink; } 163*cdf0e10cSrcweir const Link& GetFxHdl() const { return aFxLink; } 164*cdf0e10cSrcweir }; 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir #endif // SC_PARAWIN_HXX 171*cdf0e10cSrcweir 172