LCOV - code coverage report
Current view: top level - formula/source/ui/dlg - parawin.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 4 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_FORMULA_SOURCE_UI_DLG_PARAWIN_HXX
      21             : #define INCLUDED_FORMULA_SOURCE_UI_DLG_PARAWIN_HXX
      22             : 
      23             : #include <svtools/stdctrl.hxx>
      24             : #include <svtools/svmedit.hxx>
      25             : #include <vcl/lstbox.hxx>
      26             : #include <vcl/group.hxx>
      27             : #include <vcl/tabpage.hxx>
      28             : #include <vcl/tabctrl.hxx>
      29             : #include <vcl/scrbar.hxx>
      30             : 
      31             : #include <vector>
      32             : #include "formula/funcutl.hxx"
      33             : #include "formula/omoduleclient.hxx"
      34             : #include "ControlHelper.hxx"
      35             : 
      36             : namespace formula
      37             : {
      38             : 
      39             : #define NOT_FOUND 0xffff
      40             : 
      41             : class IFunctionDescription;
      42             : class IControlReferenceHandler;
      43             : 
      44             : class ParaWin : public TabPage
      45             : {
      46             : private:
      47             :         OModuleClient   m_aModuleClient;
      48             :         Link<>          aScrollLink;
      49             :         Link<>          aFxLink;
      50             :         Link<>          aArgModifiedLink;
      51             : 
      52             :         ::std::vector<sal_uInt16>   aVisibleArgMapping;
      53             :         const IFunctionDescription* pFuncDesc;
      54             :         IControlReferenceHandler*   pMyParent;
      55             :         sal_uInt16          nArgs;      // unsuppressed arguments
      56             :         vcl::Font        aFntBold;
      57             :         vcl::Font        aFntLight;
      58             : 
      59             :         VclPtr<FixedText>       m_pFtEditDesc;
      60             :         VclPtr<FixedText>       m_pFtArgName;
      61             :         VclPtr<FixedText>       m_pFtArgDesc;
      62             : 
      63             :         VclPtr<PushButton>      m_pBtnFx1;
      64             :         VclPtr<FixedText>       m_pFtArg1;
      65             :         VclPtr<ArgEdit>         m_pEdArg1;
      66             :         VclPtr<RefButton>       m_pRefBtn1;
      67             : 
      68             :         VclPtr<PushButton>      m_pBtnFx2;
      69             :         VclPtr<FixedText>       m_pFtArg2;
      70             :         VclPtr<ArgEdit>         m_pEdArg2;
      71             :         VclPtr<RefButton>       m_pRefBtn2;
      72             : 
      73             :         VclPtr<PushButton>      m_pBtnFx3;
      74             :         VclPtr<FixedText>       m_pFtArg3;
      75             :         VclPtr<ArgEdit>         m_pEdArg3;
      76             :         VclPtr<RefButton>       m_pRefBtn3;
      77             : 
      78             :         VclPtr<PushButton>      m_pBtnFx4;
      79             :         VclPtr<FixedText>       m_pFtArg4;
      80             :         VclPtr<ArgEdit>         m_pEdArg4;
      81             :         VclPtr<RefButton>       m_pRefBtn4;
      82             : 
      83             :         VclPtr<ScrollBar>       m_pSlider;
      84             :         OUString        m_sOptional;
      85             :         OUString        m_sRequired;
      86             :         bool        bRefMode;
      87             : 
      88             :         sal_uInt16      nEdFocus;
      89             :         sal_uInt16      nActiveLine;
      90             : 
      91             :         ArgInput        aArgInput[4];
      92             :         OUString        aDefaultString;
      93             :         ::std::vector<OUString>
      94             :                         aParaArray;
      95             : 
      96             :         DECL_LINK(ScrollHdl, void *);
      97             :         DECL_LINK( ModifyHdl, ArgInput* );
      98             :         DECL_LINK( GetEdFocusHdl, ArgInput* );
      99             :         DECL_LINK( GetFxFocusHdl, ArgInput* );
     100             :         DECL_LINK( GetFxHdl, ArgInput* );
     101             : 
     102             : protected:
     103             : 
     104             :         void            SliderMoved();
     105             :         void            ArgumentModified();
     106             :         void            FxClick();
     107             : 
     108             :         void            InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, PushButton& rBtnFx,
     109             :                                         ArgEdit& rEdArg, RefButton& rRefBtn);
     110             : 
     111             :         void            DelParaArray();
     112             :         void            SetArgumentDesc(const OUString& aText);
     113             :         void            SetArgumentText(const OUString& aText);
     114             : 
     115             : 
     116             :         void            SetArgName      (sal_uInt16 no,const OUString &aArg);
     117             :         void            SetArgNameFont  (sal_uInt16 no,const vcl::Font&);
     118             :         void            SetArgVal       (sal_uInt16 no,const OUString &aArg);
     119             : 
     120             :         void            HideParaLine(sal_uInt16 no);
     121             :         void            ShowParaLine(sal_uInt16 no);
     122             :         void            UpdateArgDesc( sal_uInt16 nArg );
     123             :         void            UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i );
     124             : 
     125             : public:
     126             :                         ParaWin(vcl::Window* pParent,IControlReferenceHandler* _pDlg);
     127             :                         virtual ~ParaWin();
     128             :         virtual void    dispose() SAL_OVERRIDE;
     129             : 
     130             :         void            SetFunctionDesc(const IFunctionDescription* pFDesc);
     131             :         void            SetArgumentOffset(sal_uInt16 nOffset);
     132             :         void            SetEditDesc(const OUString& aText);
     133             :         void            UpdateParas();
     134             :         void            ClearAll();
     135             : 
     136             :         bool            IsRefMode() {return bRefMode;}
     137           0 :         void            SetRefMode(bool bFlag) {bRefMode=bFlag;}
     138             : 
     139           0 :         sal_uInt16      GetActiveLine() { return nActiveLine;}
     140             :         void            SetActiveLine(sal_uInt16 no);
     141             :         RefEdit*        GetActiveEdit();
     142             :         OUString        GetActiveArgName();
     143             : 
     144             :         OUString        GetArgument(sal_uInt16 no);
     145             :         void            SetArgument(sal_uInt16 no, const OUString& aString);
     146             :         void            SetArgumentFonts(const vcl::Font& aBoldFont,const vcl::Font& aLightFont);
     147             : 
     148             :         void            SetEdFocus(sal_uInt16 nEditLine); //Sichtbare Editzeilen
     149             :         sal_uInt16      GetSliderPos();
     150             :         void            SetSliderPos(sal_uInt16 nSliderPos);
     151             : 
     152             :         void            SetScrollHdl( const Link<>& rLink ) { aScrollLink = rLink; }
     153             :         const Link<>&   GetScrollHdl() const { return aScrollLink; }
     154             : 
     155           0 :         void            SetArgModifiedHdl( const Link<>& rLink ) { aArgModifiedLink = rLink; }
     156             :         const Link<>&   GetArgModifiedHdl() const { return aArgModifiedLink; }
     157             : 
     158           0 :         void            SetFxHdl( const Link<>& rLink ) { aFxLink = rLink; }
     159             :         const Link<>&   GetFxHdl() const { return aFxLink; }
     160             : };
     161             : 
     162             : 
     163             : 
     164             : } // formula
     165             : 
     166             : #endif // INCLUDED_FORMULA_SOURCE_UI_DLG_PARAWIN_HXX
     167             : 
     168             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11